Problems using Send and Functions with 2 parameters

Jim Ault JimAultWins at yahoo.com
Tue Aug 8 13:11:45 EDT 2006


On 8/8/06 7:24 AM, "Ian McKnight" <iangmcknight at googlemail.com> wrote:
> Can anyone shed some light on this please?
> I could keep the function and calling handler together but would
> prefer to have all important scripts in one place.

why are you sending
"get randomTim(5,2)"
instead of 
"randomTime(5,2)"

I am not sure what you expect the group script container to do.

Jim Ault
Las Vegas

On 8/8/06 7:24 AM, "Ian McKnight" <iangmcknight at googlemail.com> wrote:

> Hi
> 
> I have a function 'randonTime' which accepts two parameters, the first
> specifies whether a time should be in 5, 10 15 etc minute intervals,
> the second specifies 12 or 24 hour clock and returns a valid time in
> the form hh:mm.
> 
> With the function handler in the same script as the calling handler ( a
> button)
> 
> get randomTime(5,2)
> put the result
> 
> works as expected.  -- 12:45  6:15  21:55 19:25 etc
> 
> However, when the function is placed in a group on the same card
> 
> send "get randomTime(5,2)" to group "analogClock"
> put the result
> 
> only the minutes are return.  -- :45  :15  :55  :25
> 
> The second parameter is ignored so the fuinction doesn't create an hour.
> 
> Can anyone shed some light on this please?
> I could keep the function and calling handler together but would
> prefer to have all important scripts in one place.
> 
> Thanks.





More information about the use-livecode mailing list