General information
Category:
The Mere Mortals Framework
Hi Chris.
As long as you are having the bizobject that opened the appropriate view do all the data manipulation etc. it will work fine. goapp.oLookup, for example, will be able to work with all the views that it's environment opened but your private datasession bizobject will not. Have oPrivate call a method on oLookup to add a new LookupID in the primary table etc. by passing to a method the needed information to create the new record. There are probably other slick ways of doing this but at least I know that this works. So the answer is "Yes", the bizobject references required 'solve' the issue of changing datasessions.
HTH
Dan
>I seem to have found a blank spot in my OOP knowledge regarding how objects and VFP Datasessions interact. Specifically, I wanted to hang a few lookup type business objects off the main application object, and then use them from other private datasession forms later.
>
>My example thinking goes like this:
>goapp.oLookup is a bizobject with Lookup.DBF. goapp.oNotes has Notes.DBF and Notes.FPT. They both sit in the global(default) datasession. PrvForm has a private datasession with an oPrivate bizobject. oPrivate wants to use oLookup to put a LookupID in the primary table. It also wants to put a NoteID in the table the same way, but instead of just pointing to an existing record, it needs to create a new record in oNotes.
>
>That's when I got bitten, crossing datasessions and objects in my mind and not seeing how they work together. Am I overthinking all of this, will the bizobject references required 'solve' the issue of changing datasessions?
>I'm looking a little more for theory than code, because I think my test code is suffering more from theory failure.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only