Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Known the last datasession
Message
From
12/06/2005 14:51:46
 
 
To
12/06/2005 13:39:41
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Environment versions
Visual FoxPro:
VFP 9
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01022522
Message ID:
01022608
Views:
13
>>>Specific:
>>>At design time:
>>>- click into a Toolbar's button, the toolbar alive into a private datasession.
>>>- on the Button.Click I must know the datasession active before the button's Mousedown.
>>>
>>>General:
>>>when active a datasession private, because of input a user
>>>(change form,toolbar,debug suspend a session code ...),
>>>is possible to know the previous datasession ?
>>>
>>>My answer is not, but I always hope in the providence.
>>>
>>>Thanks
>>______________________________________________________________________
>>Fabio,
>>
>>I've been thinking. How do you define the datasession active before the button's Mousedown ?
>>
>>Say that you have two forms active
>>Form 1 has the focus (can be reached with _screen.ActiveForm)
>>Form 2 does not have the focus, but has a timer executing that operates in the form's private datasession
>>
>
>Gregory,
>The issue is more general.
>
>>If the timer in form 2 executes, which one of the two has the active datasession ?
>>
>This is simple.
>If Timer it is a Form 2's member, then it is Form 2's private datasession,
>otherwise ( a property object ) it is _screen.ActiveForm private datasession.
>
>>If it is the former you can use _screen.ActiveForm. If it is the latter, then I don't know an answer to your question
>
>I have an unknown datasession active.
>Into a toolbar's button i want run a script into the unknown datasession.
>With toolbar or form i have found a solution ( Window message and BINDEVENT ),
>but with formset/session i have not a handle where to attack some code.
__________________________________________________________________________________
hi Fabio,

When you speak about unknown datasessions, I'm assuming that you have the DataSession window active and you have selected the unknown datasession.
Then the command window will have something like this : SET DATASESSION TO 4

The problem with objects (not only toolbars) is that the code executed in them is done in their (own) datasession

I've tried lots of things and have not succeeded

The only thing I can propose is to define an ON KEY LABEL and run the script from there. That runs in the Datasession selected with the datasession window or set within the command window
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform