Just a word to let All know that, Eric used to publish, there in France (some times ago, yet !), lots of very usefull HyperCard/Talk
related press papers, books, stacks and cd-roms...
Be warmly Welcome Eric. It's cool to see you there, just at the right place to meet lots of kindly xtalker(in)s :)
Bests, Pierre
Le 7 avr. 04, � 18:00, �ric Chatonet a �crit :
Le 7 avr. 04, � 17:34, Mark MacKenzie a �crit :
Hit a bit of a stumper for me.
At preopencard time I need to clear a bunch of globals. I created the
following handler and it doesn't seem to clear the globals involved. In
a succeeding handler they keep their previous values. Am I doing
something fundamentally wrong?
preOpenCard
put
"gBulletCalibre,gBulletDesign,gBulletSizedDiam,gBulletNomWeight,gBulle tLotCustom"
into gGlobalsToEmpty
repeat with x = 1 to the number of items of gGlobalsToEmpty
put empty into item x of gGlobalsToEmpty
end repeat
end preOpenCard
When faced with a series of globals to reset to zero or empty how do you
do it with a minimum of scripting?
Mark MacKenzie
Hi Mark, You have to declare global variables :
on preOpenCard
local tGlobalsToEmpty, tGlobalName
-----
put "gBulletCalibre,gBulletDesign,gBulletSizedDiam,gBulletNomWeight,gBullet LotCustom" into tGlobalsToEmpty
repeat for each item tGlobalName in tGlobalsToEmpty
do "global" && tGlobalName
do "put empty into" && tGlobalName
end repeat
end preOpenCard
You can also declare your globals outside the handler at the top of the script and forget nominal declaration in the preOpencard handler:
global gBulletCalibre,gBulletDesign,gBulletSizedDiam,gBulletNomWeight,gBulletL otCustom
-----
on preOpencard
local tGlobalsToEmpty, tGlobalName
-----
put "gBulletCalibre,gBulletDesign,gBulletSizedDiam,gBulletNomWeight,gBullet LotCustom" into tGlobalsToEmpty
repeat for each item tGlobalName in tGlobalsToEmpty
do "put empty into" && tGlobalName
end repeat
end preOpenCard
Hope this helps, Amicalement,
�ric Chatonet 24, Boulevard de Port-Royal 75005 Paris_______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
-- Bien cordialement, Pierre Sahores
100, rue de Paris F - 77140 Nemours
psahores (at) easynet.fr
GSM: +33 6 03 95 77 70 Pro: +33 1 41 60 52 68 Dom: +33 1 64 45 05 33 Fax: +33 1 64 45 05 33
Inspection acad�mique de Seine-Saint-Denis Applications et SGBD ACID SQL (WEB et PGI) Penser et produire "delta de productivit�"
_______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
