Versions des environnements
>>>>I've just started to explore the dataenvironment and cursoradapter as subclasses. I am wondering if there is a way that is generally accepted as better than others for using these classes. It appears that I can either drop a DE class on a form, instantiate it in code in the form init, or use the DEclass property. Of those three methods which way is considered best? (or if there is something I don't know about please enlighten me!)
>>>
>>>Um... not the form's init, but form's load. You want the tables open before the controls instantiate, and form's init happens later.
>>
>>Of course... I'd have caught that.
>>
>>> You can use the new .bindcontrols property and bind them after DE object is created.
>>
>>My real question is though... which method is generally accepted as the best way to instantiate a DE class? Drop the DE on the form? Call it up from code? Use the DEClass property?
>No preference there from me - my forms don't have a DE.
>I figure that'd be a matter of your style, whatever you feel is the easiest to maintain. And I doubt there's any significant speed difference between the three.
I would expect that it is a matter of preference and possibly convenience. If you build a visual class and drop it on the form, then you cannot open the DE for editing while the form is open (you have to close the form and then open the DE class, close and go back to the form -- this is true for any class dropped on the form). However, with the visual class on the form, you have intellisense to reference the members during code writing. Also, if you want to override any inherited code behavior of the DE class in the main form, then the DE needs to be on the form to reference it.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement