Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with bizobj instantiating another bizobj MM612
Message
De
19/07/2002 13:17:10
Jason Mesches
Ocean Systems Engineering Corporation
Carlsbad, Californie, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Divers
Thread ID:
00680275
Message ID:
00680540
Vues:
17
One other thing I forgot. I think this applies to MM6.1.2 -- if not take this with a shaker of salt! Oh yeah, and buy MM7!

There is a "new" kBizObj method, GetBizObject() that retrieves secondary object references with a little twist o' mojo that helps avoid dangling references.

It adds a custom property, 'lCreatedNewInstance,' to the new object. Later, if that property is .T., you'll know whether to call Destroy(), or set it to .NULL.
---J

>Hi,
>
>I'm having a problem in an app where one bizobj needs to instantiate a second bizobj for a lookup.
>
>The main bizobj is punch_bo and the lookup bizobj is employee_bo.
>
>punch_bo:postinithook:
>This.oEmployee_bo = createobj("employee_bo")
>return .t.
>
>When employee_bo is instantiated it becomes amnesic and "forgets" all about the current database so I'm prompted to select the table as if none were specified.
>
>The two bizobjs are not in a parent/child relationship.
>
>The database is in a remote drive (G:). This is established in the ini file I'm using and also in the metadbc.dbf table.
>
>I have traced the code in employee_bo.
>
>The problem takes place in the employee_de.opentables() method. Even though all the properties (database, alias, etc.) seem to be in order, once the line:
>This.oDataEnviroment.OpenTables() is executed, BOOM, I'm presented with a dialog box to select a table.
>
>What's going on here?
>
>Thanks for any ideas!!!
>
>Alex
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform