How to call a function is a Group???
Graham Samuel
livfoss at blueyonder.co.uk
Thu Apr 14 18:07:44 EDT 2005
The trouble with Devin's solution is that it doesn't actually supply
the result of the function. From the RunRev docs:
> You use the value function to call a function that's in the script of
> an object that isn't in the message path. Usually, you can only call
> custom functions that are somewhere in the message path, but you can
> use the value function to call any function in any object in an open
> stack.
>
> For example, suppose you want to use a function named "myFunction"
> which is defined in the script of card 1 of a stack named "My Stack".
> The following statement can be used to call the function from any
> script or from the message box:
>
> get value("myFunction()",card 1 of stack "My Stack")
>
> Tip: You can use the insert script command to place the object in
> the message path. In this case, you don't need to use the value
> function.
HTH
Graham
On Thu, 14 Apr 2005 14:48:40 -0600, Devin Asay <devin_asay at byu.edu>
wrote:
> Dave,
>
> If this is a function you have to put the function call in the proper
> format:
>
> get initializeGroup() --() are required even if the function doesn't
> require an argument.
>
> If you are trying to call this function from outside of the group,
> i.e., from an object outside of the group's message hierarchy, the
> situation is my complicated:
>
> send "get initializeGroup()" to group "mygrp"
>
> Devin
>
> On Apr 14, 2005, at 12:56 PM, David Burgun wrote:
>
>> Hi,
>>
>> I have a group ("myGroup") and in the script for the group I have a
>> function:
>>
>> function InitializeGroup
>>
>> end InitializeGroup
>>
>>
>>
>> Then in another object not in the group, I have:
>>
>> get InitializeGroup of group "myGroup"
>>
>> But I get an error on the call, what am I doing wrong?
>>
>> Thanks in advance
>> Dave
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>
>>
> Devin Asay
> Humanities Technology and Research Support Center
> Brigham Young University
------------------------------------------------------------------------
---
Graham Samuel / The Living Fossil Co. / UK and France
More information about the use-livecode
mailing list