doubts about globals, seeking advise...

Andre Garzia soapdog at mac.com
Sun Jan 4 04:10:39 EST 2004


	Hi folks,

	Can two stacks share globals? Like that, I've got a splashscreen stack 
and a app stack, can I open a database connection in the splash screen 
stack, put the ID in a global and then call DB Methods in the app 
stack? It's like that, i've got a running app, it works, but I decided 
to add a standard splash screen (thats reused many times, so it's got 
it's own stack), I decided that the splash screen should be the 
mainstack (thats its setting in the distribution builder) since I want 
it to appear first. I used to open and close the DB Connections in the 
openStack and closeStack handlers of the app stack, but when I build 
the distribution (including all libs and stuff), the DB funcs start 
shouting about invalid id, I think that's happening because my global 
vars are missing...  I tried another approach opening and closing 
connections in splashscreen, writing IDs to custom props and reading 
them from the other stack, but that's just ugly. Anyone here got two 
cents to spare on advise? How should I proceed? Should my splashscreen 
stack just call the other stack openStack handler and pray?

	Cheers, happy 2004

Andre Garzia ð 2003
imac2 ibook p100 e uma torradeira....


More information about the use-livecode mailing list