Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Item Index unk
Message
From
28/07/2003 08:35:45
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00813212
Message ID:
00814044
Views:
13
Thanks Sergey,

That is how I implemented this solution as well. It is not elegant becasue if the collection is shrunk, then the index may change. I can live with it in this application because it will only be used as a relative sequence. I am using a collection to simulate Popups and the Items are bars.

Thanks

Glenn
>I'm not sure I understand you but if you don't have access to the collection than you have no way to find out a position of the object in the collection because the object has no "knowledge" that it's in the collection. Maybe you should store 'myindex' in the objects property at the time when you add this object to the collection?
>
>
>>Not in this case Sergey, I only have an object reference to the item sort of like this:
>>
>>Function dosomethihng
>>lparameters toObj && as collection item
>>nindex = toObj.whatismyindex()
>>define bar (whatismyindex) of somemenu prompt toObj.cprompt
>>return
>>
>>
>>In other words I only have the Item and not the collection.
>>
Previous
Reply
Map
View

Click here to load this message in the networking platform