Help with weird error!

Though the code seems correct somthing goes wrong!

Page 1 of 1

2 Replies - 525 Views - Last Post: 22 April 2010 - 09:39 AM Rate Topic: ***-- 2 Votes

#1 masocy  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 19-February 10

Help with weird error!

Posted 22 April 2010 - 06:57 AM

Please change the .txt extension of the attached file to .rar Attached File  123.txt (595.23K)
Number of downloads: 96
Its the whole Project file including a video in to illustrate the weird error! Since is almost impossible to describe the error!
For all of you who will try to open the project using visual studio be sure to Import the files in the rar for model model file.txt and catalogue file.txt for catalogue

'Marios Solomou 
Imports System.IO

Public Class DAC
    'Model File List Declarations
    Dim modelX As New List(Of Double)
    Dim modelY As New List(Of Double)

    'Catalogue File List Declarations
    Dim catalogueX As New List(Of Double)
    Dim catalogueFlux As New List(Of Double)
    Dim catalogueError As New List(Of Double)
    Dim catalogueFE As New List(Of Double)


    Private Sub ModelToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ModelToolStripMenuItem.Click


        modelDialog.Title = "Please Select a Model File"
        modelDialog.ShowDialog()




        Dim mdlrd As New StreamReader(modelDialog.FileName)
        ' Store contents in this String.
        Dim mdlline As String

        ' Read first line.
        mdlline = mdlrd.ReadLine


        ' Loop over each line in file, While list is Not Nothing.

        Do While (Not mdlline Is Nothing)

            'Split this line .
            Dim split As String() = mdlline.Split(" ")

            modelX.Add(CDbl(split(0)))
            modelY.Add(CDbl(split(1)))

            ' Read in the next line.

            mdlline = mdlrd.ReadLine
        Loop
        mdlrd.Close()

    End Sub

    Private Sub CatalogueToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

        catalogueDialog.Title = "Please Select a Catalogue File"
        catalogueDialog.ShowDialog()




        Dim ctlrd As New StreamReader(catalogueDialog.FileName)
        ' Store contents in this String.
        Dim ctlline As String

        ' Read first line.
        ctlline = ctlrd.ReadLine


        ' Loop over each line in file, While list is Not Nothing.


        Dim i As Integer = 1
        Do While (Not ctlline Is Nothing)
            Console.WriteLine(i & " " & ctlline)
            'Split this line .
            Dim split As String() = ctlline.Split(" ")
            MsgBox(split(0))
            MsgBox(split(14))

            ' Read in the next line.

            ctlline = ctlrd.ReadLine
            i = i + 1


            'Split this line .
            'Dim split As String() = ctlline.Split(" ")

            ' modelX.Add(CDbl(split(0)))
            'modelY.Add(CDbl(split(1)))

            ' Read in the next line.

            ctlline = ctlrd.ReadLine
        Loop
        ctlrd.Close()



    End Sub
End Class



Is This A Good Question/Topic? 0
  • +

Replies To: Help with weird error!

#2 CharlieMay  Icon User is offline

  • This space intentionally left blank
  • member icon

Reputation: 1606
  • View blog
  • Posts: 5,163
  • Joined: 25-September 09

Re: Help with weird error!

Posted 22 April 2010 - 09:06 AM

Well, right of the bat, I don't see a Handle on your catalogue menu item. But that isn't entirely the issue.
When I press F8 to step through the code all I get is a messagebox

"There is no source code available for the current location"

A google search on this gave numerous reasons and fixes but the most common was to just re-do your project.
For no bigger than your project is, that is what I would suggest but you can google and see if you come up with something instead.
Was This Post Helpful? 0
  • +
  • -

#3 CharlieMay  Icon User is offline

  • This space intentionally left blank
  • member icon

Reputation: 1606
  • View blog
  • Posts: 5,163
  • Joined: 25-September 09

Re: Help with weird error!

Posted 22 April 2010 - 09:39 AM

Well, after playing around I was able to go in and click on Build | Rebuild Datamining an Astronomical Catalogue

And was able to step through the code and get it to run as expected.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1