Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why can't I change DataSession in a class
Message
De
07/06/2002 14:54:18
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Why can't I change DataSession in a class
Divers
Thread ID:
00666133
Message ID:
00666133
Vues:
44
I tried this:
SomeForm.Method()
  local lo
  lo = NewObject('Save_Ds','Save_Ds.prg')
  Set DataSession to SomeOtherDataSession
  .... print a report from SomeOtherDataSession
  release lo
  .... continue some more in Form.DataSession

Save_DS.prg
  Define Class Save_Ds as Custom
    nDS = Set('DataSession')
    Procedure Destroy()
      Set DataSession to this.nDs
    EndProc
  EndDefine
Why doesn't it work?
In the debugger. As soon as the Save_Ds.Destroy() method starts, the DataSession changes from SomeOtherDataSession to the one I want (making the line "Set DataSession to this.nDs" pointless), but as soon as it goes back to SomeForm.Method() the DataSession changes back to SomeOtherDataSessoin.
Bill Morris
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform