Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to pass value of parameters from UI to BIZ to DA
Message
From
21/01/2008 06:31:29
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01283283
Message ID:
01283560
Views:
14
>>>You see, the BIZ object does not know of the UI class. But from Dragan's message I can see that I can pass UI object to BIZ and BIZ to DA and using amembers() do what needs to be done.
>>>
>>>Thank you very much for your help.
>>
>>Actually I don't see:) They are objects of the same form,no?
>>Cetin
>
>Maybe I can clarify. You are right, BIZ object belongs to the form which is UI. BIZ object is instantiated in the INIT method of the UI form. And when BIZ object is instantiated, in its (BIZ) INIT method it instantiates the DA object. Passing THISFORM (UI) to the BIZ on instantiation allows the BIZ get some values from properties of the UI form. And then BIZ passes itself (THIS) to the DA object on instantiating. And DA can now get values of the BIZ object properties. Does the above makes it more clear? <g>.

Dmitry,
I'm afarid it still doesn't make sense to me. If UI is the form, BIZ belongs to form and DA inited there, why would you ever need to pass thisform and this (and consider you need to, doesn't really matter).
BIZ can simply check thisform properties and DA in turn can check BIZ and thisform properties.
If you need those properties to be evaluated later (say form would get some parameter and then set the properties, BIZ and DA needs to read this properties) then you have 2 options at least:
1) In form.init update BIZ and DA properties.
2) Call BIZ and DA.Init()
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform