Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Ideas for passing records back to calling form
Message
From
27/11/2015 10:22:46
 
 
To
18/09/2015 12:56:10
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 8
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01624724
Message ID:
01627990
Views:
143
Hi Tamar,

Am liking working with collections! Paper was also helpful.

One thing I ran into that I could not solve was that I wanted to sort the collection after it had been assembled - I looked at putting an index key with each item in the collection but unfortunately in this situation, I do not know the key until after the collection has been created (it is a collection of objects and the key that I could use comes at a later stage in the process).

It seems there is no way to update a key after the fact so what I had to do was to throw all the objects into an array, put my key into the 2nd column of the array, sort the array and then move the objects back into a new collection. It works but doesn't seem optimal. Thankfully it will only ever be a small collection of 20 to 30 objects. I don't really notice any big hit on performance.

Albert
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform