How do openXXX messages work on server?
Posted: Thu Jul 24, 2014 5:14 pm
I noticed that the openStack & openCard messages show in the dictionary as supported on server, but I am not sure what they are supposed to do there. My assumption was that since server doesn't have stacks or cards that one (maybe both?) of these message might get sent when a script was opened.
This would have been handy since it would make it much easier to develop on the desktop (where there is a debugger) and port to server. When developing on the desktop I could put all of the server-specific stuff into an openStack or openCard handler enclosed by an 'if the environment is "Server"' condition.
However, it seems that things don't work like that at all. The following script:
outputs just "finished". Clearly neither message gets sent. So...how are these supported in server? Also, is there a message that does get sent when a server script is opened that I could use like this?
Edit - Also tried the same with the startUp message - it also doesn't do anything
This would have been handy since it would make it much easier to develop on the desktop (where there is a debugger) and port to server. When developing on the desktop I could put all of the server-specific stuff into an openStack or openCard handler enclosed by an 'if the environment is "Server"' condition.
However, it seems that things don't work like that at all. The following script:
Code: Select all
<?lc
on openStack
put "Got an openStack Message" & return
end openStack
on openCard
put "Got an openCard Message" & return
end openCard
put "finished"
?>
Edit - Also tried the same with the startUp message - it also doesn't do anything