Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sesssion Class
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Miscellaneous
Thread ID:
00222980
Message ID:
00234037
Views:
44
Terry,

Here's some code I've generated and tested and it seems to work properly. Maybe sub-classing the cursors is a problem. I don't know.
* Test Session Class
DEFINE CLASS MySession AS SESSION
  oDE = .NULL.
  
  PROCEDURE Init
  
    LPARAMETER pcfile, pcname
    
    SET PROCEDURE TO (pcfile) ADDITIVE
    This.oDE = CREATEOBJECT(pcname)
    RELEASE PROCEDURE (pcfile)
    * This will open the tables
    This.oDE.OpenTables
    RETURN
  ENDPROC
ENDDEFINE
* Generated by my code generator.
DEFINE CLASS WARPDATADE AS DataEnvironment
  InitialSelectedAlias = "warpdata"

  PROCEDURE Init
    This.AddObject("Cursor1", "cursor")
    WITH This.Cursor1
      .CursorSource = "warpdata"
      .Alias = "warpdata"
      .BufferModeOverride = 5
      .Order = "date"
      .Database = "warping.dbc"
    ENDWITH
    This.AddObject("Cursor2", "cursor")
    WITH This.Cursor2
      .CursorSource = "stylgrps"
      .Alias = "stylgrps"
      .Order = "style"
      .Database = "warping.dbc"
    ENDWITH
    This.AddObject("Cursor3", "cursor")
    WITH This.Cursor3
      .CursorSource = "operator"
      .Alias = "operator"
      .Order = "operator"
      .Database = "warping.dbc"
    ENDWITH
    This.AddObject("Cursor4", "cursor")
    WITH This.Cursor4
      .CursorSource = "warp_std"
      .Alias = "warp_std"
      .Order = "style"
      .Database = "warping.dbc"
    ENDWITH
  ENDPROC

  PROCEDURE Destroy

    This.CloseTables
    RETURN
  ENDPROC
ENDDEFINE
I'm still working with the code generator, so all the bells and whistles aren't in yet.

Let me know if you see something here that might be different from what you're doing.

hth,
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform