Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DataSession
Message
From
11/11/2004 02:23:20
 
 
To
10/11/2004 12:57:39
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00959894
Message ID:
00960300
Views:
9
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform