Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DataSession
Message
De
11/11/2004 02:23:20
 
 
À
10/11/2004 12:57:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
00959894
Message ID:
00960300
Vues:
10
>Thank you, I'll give a look to this object tomorrow morning, but with this session object , may I call form with do form MyForm, where myform is a visual class ? Doesn't it refer only to an its own PrivATE DATASESSION OR to the standard one ?
>Anyway thank you for your reply, i'll let you know
>

Of course u can !
Just set form's datasession property to ;
1 - default datasession.
So it will use session and data previosely opened in object that called it.

Also if you are opening your tables in code then set DE properties as

.AutoOpenTables=.f.
.AutoCloseTables=.f.

So you don't get any 'phantom' aliases when u list expect them :)

Within yr session object code u simply call the form to execute.

You can also pass that object reference to form you hv called
and store it in (for that purpose) added form's property,
so form can then use all methods of a session object that called it.

Example:
**session object code
.
.
.

procedure run_form
    lParameters cForm
    local cForm
    .
    . 
    do form (cForm) with this  


procedure do_something
    wait wind 'I just did'


enddefine
form's init gets it and saves it in added property called 'underworld'
**forms init
  procedure init
     lParameters oCaller
     this.underworld=oCaller

** and then from anywhere in yr form u can call it like;

thisform.underworld.do_something()
It is very powerfull & flexible concept for connecting
multiple forms functionalities with underlying code.

Works much better then formset!


Rgds++
*****************
Srdjan Djordjevic
Limassol, Cyprus

Free Reporting Framework for VFP9 ;
www.Report-Sculptor.Com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform