Results 1 to 11 of 11

Thread: [RESOLVED] [2005] New List and Declaring Arrays

Threaded View

  1. #1

    Thread Starter
    Frenzied Member stimbo's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    1,739

    Resolved [RESOLVED] [2005] New List and Declaring Arrays

    I'm getting an error about object not being set to an instance of an object. I know it has something to do with the New keyword and when it goes to add data to the list it needs to have the space for it but I don't know what the format is to do that. Can someone point it out?

    VB Code:
    1. Public Class dataStructure
    2.  
    3.     Structure VideoEyeAnalysis
    4.         Dim second_Stamp As List(Of Integer)
    5.         Dim micro_SecondStamp As List(Of Integer)
    6.         Dim x_coOrdinates As List(Of Single)
    7.         Dim y_coOrdinates As List(Of Single)
    8.         Dim leftEye_Validity As List(Of Integer)
    9.         Dim rightEye_Validity As List(Of Integer)
    10.         Dim distance_measure As List(Of Single)
    11.     End Structure
    12.  
    13. End Class
    14. '24 = trials, 1 = 0 or 1 (number of times the clip is played)
    15. Public VideoEyeData(24, 1) As dataStructure.videoEyeAnalysis  'declare
    16.  
    17. 'On collecting data event I add data like so but this is wrong- how do I use the New word here to create the data point:
    18.  
    19.  VideoEyeData(trial_Count, videoPlay_Count).x_coOrdinates.Add _  'New have to go here?
    20.         ((gazeData.GazePosXLeftEye + gazeData.GazePosXRightEye) / 2)
    Last edited by stimbo; Feb 5th, 2007 at 10:46 AM.
    Stim

    Free VB.NET Book Chapter
    Visual Basic 2005 Cookbook Sample Chapter

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width