Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
'Double duty' business objects
Message
From
20/12/2001 11:55:47
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00596733
Message ID:
00596836
Views:
23
>>Now this looks exciting to me as it allows the form to directly display the data without having to use some mechanism to pass it between the layers - my big question is - is this kind of behaviour supported and can I rely on it being available in the future? Could someone from Microsoft comment on this?
>>
>>Thank you for your time
>>
>
>David,
>I'm not from Microsoft but I've got a T-shirt. Does that count?
>
>IAC, yes this behavior is by design and should go on for quite awhile (forever is long time so I don't promis that). The reason that its different is you are doing two distinctly different behaviors.
>
>In the first scenario, you are creating an object in memory and then simply assigning it to a property of the form. The session object has no knowledge of the form at all. It has no attachment. The two objects can each be destroyed without affecting the other.
>
>In the second scenario, you are making the session object part of the form's containment. If the Parent property of the Session is checked, you will find an object reference to the form. The two objects can not be destroyed individually. The session object can; however, if the form is destroyed then all of its contained objects all also destroyed.
>
>Since the object is part of the form's containment in scenario #2, it must participate in the form's datasession (whatever that happens to be).
>
>HTH.
>
>In addition, Drew Speedie did a session at DevCon and WhilFest about business objects behaving differently depending on their environment. They could return an XML stream, ADO recordset or if in a pure VFP, monolithic environment, simply open a cursor to be used (in fact, VMP 6 will have this capability). You may be able to get some tips on this (slides, etc.) by e-mailing him. You can get his e-mail from http://www.visualmaxframe.com.

Thanks for replying Larry. I was unable to travel to the US for either of those conferences but did see the brief mention of Drew's work in the conference report. In fact that was where I copied the name 'double duty' from.

I also saw from the conference report that Drew had stuck to using containers rather than session objects. This led me to wonder if the behaviour I had discovered would turn out to be unreliable in practice...

David
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform