Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error# 31 Invalid Subscript Reference error
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Divers
Thread ID:
00801461
Message ID:
00801758
Vues:
19
>
>If I place a ctextboxl container from the kcontrls class on the selection page and set the cviewparamter to the parameter name, do I still have to call the postinithook and the prerequeryhook?
>

PostInitHook() will automatically fire when the business object is instanciated. PreRequeryHook() is automatically called when doing a Requery().

I always populate my view parameters in the PostInitHook(), and use properties on the business object. For example, if I had a view (and it was the primary view for this business object) that returned a single record via the vp_field parameter, I would create a property on the business object called "iField". Then I would add code to the PostInitHook that looked like:
This.AddViewParameter("vp_field", "This.iField")
Once I've dropped this on a form, I would bind the control to this property. Anytime a Requery() occurs, the business object will automatically populate the vp_field parameter based on the iField property. The nice thing about doing things this way is it maximizes reuse. I can use the same business object, without modification, for a desktop app or a web app.

I don't use the cViewParameter property on the controls, so I'm not really familar with how they work. Maybe someone else will jump in.
-Paul

RCS Solutions, Inc.
Blog
Twitter
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform