Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TALK getting set ON, but I'm not doing it
Message
 
To
02/11/2007 14:46:50
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01266166
Message ID:
01266175
Views:
9
>>>Very strange. When the INIT of a class is run, right after the parameter statement, TALK is getting set ON. I put a breakpoint on SET('TALK') and that's where it is happening, but there is nothing there that I can see that would cause it to do that. Any ideas? Thanks!
>>
>>SET TALK is one of these settings which depends of current data session (like SET DELETED, SET EXACT etc.)
>>I have a class (stolen long ago from Solution samples) that handles these settings for me. I just added it in my base form class.
>
>Ahhh. I did add a DataSession = 2 to the class, which is based on a form. How can a make sure that TALK stays at whatever it is before the class is run?

As I said, I have an non-visual class (based on custom) which I add in my base form.
That class has code only in Init and destroy event:
Init Event is:
* Save old settings to be restored.
THIS.cPoint    = SET("POINT")
THIS.cSep      = SET("SEPARATOR")
THIS.cDate     = SET("DATE")
THIS.cCurrency = SET("CURRENCY", 1)
THIS.cTalk     = SET("TALK")
THIS.cDeleted  = SET("DELETED")
THIS.cSafety   = SET("SAFETY")
THIS.cRefresh  = SET("REFRESH")
THIS.cExact    = SET("EXACT")
this.chours    = SET("Hours")


SET POINT     TO POINT_LOC
SET SEPARATOR TO SEP_LOC
SET DATE      TO DATE_LOC
SET CURRENCY  TO CURRENCY_LOC
SET CENTURY   ON
SET CENTURY   TO 19 ROLLOVER 50
SET NOTIFY    OFF
SET ECHO      OFF
SET DEBUG     OFF

IF this.IWantToSetHour
   IF this.hour_12 
      SET HOURS TO 12
   ELSE
      SET HOURS TO 24
   ENDIF
ENDIF

IF this.IWantToSeeDeletedRecords
   SET DELETED ON
ELSE
   SET DELETED OFF
ENDIF

IF this.IWantSetExactON
   SET EXACT ON
ELSE
   SET EXACT OFF
ENDIF

SET SAFETY  OFF
SET TALK    OFF
SET REFRESH TO 5,5
Destroy Event:
LOCAL cMacro
cMacro = THIS.cTalk
SET TALK &cMacro

cMacro = THIS.cDeleted
SET DELETED &cMacro

cMacro = THIS.cExact
SET EXACT &cMacro

SET POINT     TO THIS.cPoint
SET SEPARATOR TO THIS.cSep
SET DATE      TO (THIS.cDate)
SET CURRENCY  TO THIS.cCurrency
SET REFRESH   TO this.cRefresh
SET HOURS     TO this.chours
That's it.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform