Re: Scripting AppleTalk and iBuild
Re: Scripting AppleTalk and iBuild
- Subject: Re: Scripting AppleTalk and iBuild
- From: Mike Thorpe <email@hidden>
- Date: Fri, 16 Mar 2001 15:20:18 +0100
Aaron,
>
Other, unrelated problem: I have invented a "digital sundial", that is,
>
a clock whose hours vary with the length of the day rather than being
>
constant. Currently I have this implemented in Dialog Director, but I'd
>
prefer to do it in something that didn't require me to manually quit the
>
program if I want to restart the computer, not to mention that I'd like
>
to be able to use menus. I know FaceSpan will do the job, but I don't
>
feel like paying $200 yet (maybe if I'm _really_ good for the next few
>
months...). iBuild seemed like it might be a low-cost alternative, but
>
I can't get it to work. I created a stack in which there was a card in
>
which there was a text field called "the_output", to which I want my
>
sundial to send the current time. (In this test version, it tries to
>
display the "ordinary" time.) Unfortunately, it doesn't work. I try to
>
have it post the current time every time the stack is idle, but for some
>
reason that escapes me, it doesn't. The posting works fine if I have it
>
triggered by something else though. My code:
>
>
on idle
>
transduce(time string of the (current date))
>
return 1
>
end idle
>
>
on transduce(x)
>
set the value of object "the_output" to x
>
end transduce
Make sure that you put the script an "event handler object" (to handle the
the "on idle" statement), and not a "script applet" object. I tried this
here and it worked first time.
Due to a programming oversight on my part, the "stack script" was not
responding to "on idle" events. Apologies - this has now been corrected.
If you can't get it to work, let me know and I'll send you an example stack
off-list.
Regards,
Mike Thorpe.