Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Data Session Unknown(2)
Message
 
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00940424
Message ID:
00941117
Views:
11
Hi Friends,

I found the problem that was causing DataSession Unknown(2)

A Bug in VFP8 SP1. I tested in VFP9 Beta and worked Ok

Thanks all that helped me.

For confirmation execute the code below

*- TestBUG.PRG -*
*-
*- execute the code below, leave the form, execute the command SET in the
*- command window and see that a DataSession was Unknown(2)

frmTest = CREATEOBJECT("MyForm")

frmTest.Show()

RELEASE frmTest

* ----------- Classes Definitions ------------------*
DEFINE CLASS MyForm AS FORM

DataSession = 2 && Private DataSession
WindowType = 1

PROCEDURE INIT
This.AddObject('ContainerTest','MyContainer')
ENDPROC

PROCEDURE RELEASE
This.RemoveObject("ContainerTest")
ENDPROC

ENDDEFINE

DEFINE CLASS MyContainer AS Container

PROCEDURE INIT

*- The bug is in the line below
*- If the line below is executed the DataSession stay
*- Unknown(2) after the form release

IF This.Parent.Objects.Count = 1 && Here is the problem

ENDIF

ENDPROC

ENDDEFINE
Previous
Reply
Map
View

Click here to load this message in the networking platform