Results 1 to 7 of 7

Thread: Problems getting custom object into a custom collection [Resolved]

Threaded View

  1. #1

    Thread Starter
    Addicted Member Porsche944's Avatar
    Join Date
    Apr 2005
    Location
    Ann Arbor
    Posts
    182

    Resolved Problems getting custom object into a custom collection [Resolved]

    I have a class called objLocate which stores information about various searches my program performs. I also have a custom class that works like a collection. Both of the classes work correctly because I have gotten my save previous searches to work correctly. I am trying to create a list box now loaded with some standard features that will be linked to the custom collection class I created by referecing the object through the item property.

    I am getting the error
    Additional information: Object reference not set to an instance of an object
    on the line
    Dim tempObject As objLocate = New objLocate(SearchFor.RegularExpression, desMachineType.HomeWorkstation, "MA-EA.*", enumSaveName.DellTag, enumSearchTab.Basic, enumUpdateHashTable.No)

    I have tried as new objLocate as well and I even tried the like that is commented out which is a function i created to create these objects from the class. I keep getting the same error.

    VB Code:
    1. lstDivisions.Items.Add("MA-EA")
    2.         Dim tempObject As objLocate = New objLocate(SearchFor.RegularExpression, desMachineType.HomeWorkstation, "MA-EA.*", enumSaveName.DellTag, enumSearchTab.Basic, enumUpdateHashTable.No)
    3.         'Dim tempObject As objLocate = LoadLookingForObject(enumSearchTab.Basic, enumPresetSearch.GX110)
    4.         preDivision.Add(tempObject)
    5.         tempObject = Nothing
    6.         lstDivisions.Items.Add("MA-FI")
    7.         Dim tempObject1 As New objLocate(SearchFor.RegularExpression, desMachineType.HomeWorkstation, "MA-FI.*", enumSaveName.DellTag, enumSearchTab.Basic, enumUpdateHashTable.No)
    8.         preDivision.Add(tempObject1)
    Last edited by Porsche944; Jun 15th, 2005 at 02:18 PM.

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