Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Newbie ? on CursorAdapter
Message
From
13/02/2003 15:13:29
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00752449
Message ID:
00752867
Views:
20
Dimitry

>1. Add a property .oCaCollection to the form. Object reference to each CA should be in scope for the life of the form so I want to use the form property for that.

I like an individual property for each ca because it feels easier to debug and reference. Less flexable than a collection, though. Otherwise I don't see why it wouldn't work.

>2. Add element to collection .oCaCollection for every CA/table I need to open in the form.
>3. In LOAD method of the form create all CA's/cursors keeping the reference of each CA to an element in .oCaCollection.

Use the INIT instead of the LOAD. If the form gets instantiated/released multiple times there may be major blowups sometime in the future. Something is going on under the hood in the LOAD, and I don't know what it is. Whatever it is, it has given us major headaches a couple of times and it is alleviated when everything is move into the INIT.


>4. When form is closed, in UNLOAD method, release all CA objects.

Sounds okay to me. Might have a specific method that adds CA refs to the collection and another specific method that removes them.

Have Fun...
Regards,
- Glen -

The impossible we do immediately.
The miraculous will take a little longer.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform