Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Class based forms and Default DS
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01186390
Message ID:
01186397
Vues:
21
>>Hi everybody,
>>
>>Looks like the trick of sharing data session between two forms doesn't work with class based forms.
>>
>>I set my child form DS to be default and I have this form as a class and call it through menu manager DoForm method. It uses default DS and not the parent form DS as I hoped.
>>
>>What would be the best way to share a cursor created in the parent form with the child form in this case? Passing parent form's DE as a parameter or cursortoxml/xmltocursor?
>>
>>Thanks in advance.
>
>How about to pass DataSessionId of the parent form and use SET DATASESSION in the child ones?

Yes, that's what I have in mind, though Help doesn't recommend to use this option.

Strange, that it didn't work with class based forms, though. AFAIK I used this technique in MereMortals framework, where all forms are classes.

BTW, there is a problem with this approach. I can pass ID to Init, but I need to see this cursor earlier, because it's a record source for the grid.

On the other hand, in form's load the screen.ActiveForm is still the caller form.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform