Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Obtaining all Objects and Control Sources
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00467812
Message ID:
00467873
Vues:
11
Hi!

These methods require running of each forms to store control sources in the DBF file. Really only project scan required in development environment for that (Imagine change of classes, running each form and than change classes back).

As about use of Assign method - it is pure way of event dispatching for all form objects and all container objects. I used this, for example, to refresh properly grids on the form after grid lost focus, or se focus to the control that have special control source (for example, required field). Its very nice that SetAll fires assign method.


>
>There are two other methods to achieve the same functionality:
>1) Just navigate through form controls and check, if type("loControl.ControlSource")="C", etc.
>
>2) You the idea, I got from Trey Walpole, e.g.
> Form.SetAll('lRetrieveSource',.t.)
>
> Add property lRetrieveSource to the classes, you want to retrieve source.
> Add method RetrieveSource with the needed code.
> Add assign method to this property with the following code:
>
>lparameters vNewVal
>*To do: Modify this routine for the Assign method
>with this
>	.lRetrieveSource = m.vNewVal
>	if m.vNewVal
>		.RetrieveSource()
>	endif
>endwith
>
>
>May be this is not efficient for this particular task, but you can use this idea for something else. I really like this idea (if you want to execute some code for all your objects you can add some property to this object and give it assign method).
>
>HTH
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform