Earlier today I wrote:
>
>On 9/2/01 1:52 am, John Kiltinen <[EMAIL PROTECTED]> wrote:
>
>> However I would like the ink setting to be right when the stack opens.
>> When I include these same lines in a "on preopenStack" or a "on openCard"
>> handler, it doesn't seem to work. Specifically, the stack was created on a
>> Mac. When I first open it under Windows, with this ink-setting script in
>> either of the preopenStack or the openCard handlers, the stack opens with
>> the Mac's ink settings.
>>
>> Is it the case that the stack cannot query to find out the platform this
>> early? If so, does anyone have a suggestion as to how to achieve the
>> objective of starting with the right platform-specific settings?
To which Kevin Miller replied:
>This should work: please could you post the script?
>
>Regards,
>
>Kevin
>
>Kevin Miller <[EMAIL PROTECTED]> <http://www.runrev.com/>
>Runtime Revolution Limited (formerly Cross Worlds Computing).
>Tel: +44 (0)131 672 2909. Fax: +44 (0)1639 830 707.
Thanks, Kevin for helping me solve the problem. How, you ask? Simply
because your assurance that the method I was using should work caused me to
look in another direction which led to seeing what the problem was.
What I was doing in the script was putting the name of the ink that was
right for the platform into a global variable. The "Reset" button has a
repeat loop which sets the ink of all of the relevant graphics to what is
in this global variable. However I neglected to put the same repeat loop
into the openCard handler where I also wanted to initialize the inks of the
graphics. The global variable had the name of the correct ink, but this
was not in the
As a result, when I would first open the stack under Windows, the inks were
as they had been saved the last time the stack was saved on the Mac, namely
with the Mac ink. The global variable had the correct value in it for
Windows, as confirmed by a "put" to the message box, but there was no
script that would set the inks of the graphics to this correct ink.
It is no longer needed to help me solve my problem, but since you asked,
here is the script I used. (This might help some other neophyte developer
like me who reads this list.)
--Check the platform and set the ink that works for each of them.
if the platform is MacOS then
put adMin into MyKindInk
else
if the platform is Win32 then
put SrcAnd into MyKindInk
else
put notSrcAnd into MyKindInk
end if
end if
(MyKindInk is the global variable. The ink that works for Mac is "adMin"
and the one that works for Windows is "SrcAnd". I wrote this so that, for
diagnostic purposes, if the engine was not picking up the platform
properly, then it would set MyKindInk to notSrcAnd, so I would be able to
recognize this. If I ever want to implement this application for UNIX,
clearly I will want to redo this.)
John Kiltinen
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
John Kiltinen ([EMAIL PROTECTED]) Home Office
Professor, Dept. of Math. & CS Tel.(906) 228-8035 or (906) 227-1600
Northern Michigan University Fax (906) 228-4667 or (906) 2272010
Marquette, MI 49855 USA
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Archives: http://www.mail-archive.com/[email protected]/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.