calling a remote function..

Chipp Walters chipp at chipp.com
Fri Jan 19 09:36:07 EST 2007


Hi Jim,

Call is supposed to used with handlers, not functions. Fooey ;-)

On 1/19/07, Jim Ault <JimAultWins at yahoo.com> wrote:
>
> Try using the Call, as this is supposed to keep the current variable
> environment even though you are outside the message path.  This is from
> the
> original HCard navigation so you could travel across hard drives and
> computers and yet update the original variable space.
>
> I have never used this, so testing is required.
>
> If call "foo" does not work, then it is time to do a call "fooey".
>
> Jim Ault
> Las Vegas
>
>
> On 1/19/07 4:55 AM, "Chipp Walters" <chipp at chipp.com> wrote:
>
> > Trying to call function 'foo(param1,param2)' in button "bar" from
> somewhere
> > outside the message path.
> >
> > So, I do this:
> >
> > put "1,000" into param1
> > put "Soldiers" into param2
> > get value("foo(param1,param2)",btn "bar")
> >
> > Sadly, the literals "param1" and "param2" are passed to foo instead of
> the
> > variables.
> > I've tried escaping, quoting, and waving a half dead chicken over foo.
> No
> > good. Any ideas?
> >
> > TRY YOURSELF
> > Create a new stack:
> > create button "bar" with script:
> >
> > function foo param1,param2
> >   answer param1 &cr& param2
> > end foo
> >
> > Create another button "PressMe"
> >
> > on mouseUp
> >   put "1,000" into param1
> >   put "soldiers" into param2
> >   answer value("foo(param1,param2)",btn "bar")
> > end mouseUp
> >
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>



More information about the use-livecode mailing list