Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing object reference to a new form
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00322790
Message ID:
00323187
Views:
19
>>
>>Another thing you can do is populate the control sources of the controls in >the Init() of the form...
>
> Since I didn't have many controls on the form, this is actually how I handled it.
>
>>
>>Another thing you could do is use the method Kevin McNiesh wrote about in his January FA article. Basically the same as above, but instead of the code being in the init of the form, you put it in the 'event' of the controls and 'raise' the event in the init() of your form.
>>
>
> I guess I'll have to pickup a copy of it. I'm not sure I see the difference between that and a method call except for symantics.
>
>Thanks for the feedback.

Looser coupling between the form and the objects.. what if you move on of the controls on to a page frame, you would have to modify the code in init that references it.

By raising an event in the forms init you don't know what controls will respond to it, or even need to know where they are placed in the forms containership hierarchy.

Also, you could reuse these controls on other forms that have an object reference to this object... if you have such a thing.

BOb
Previous
Reply
Map
View

Click here to load this message in the networking platform