'the owner' query
dunbarx at aol.com
dunbarx at aol.com
Wed Oct 23 11:19:21 EDT 2013
Just a thought. Put parentheses around all explicit object references and see if the script and msg work as advertised:
if (the owner of tgrcID) <> (grp "theProtectedGroup") then ...
From: Graham Samuel <livfoss at mac.com>
To: Rev Use-List <use-revolution at lists.runrev.com>
Sent: Wed, Oct 23, 2013 11:13 am
Subject: 'the owner' query
I'm trying to use the concept of 'the owner' to detect certain grouped controls
on a card, where as it happens I want to skip a looped operation on these
particular objects. I'm using a construction like:
if the owner of tgrcID <> grp "theProtectedGroup" then ...
In this example tgrcID contains a graphic's ID - in fact it's a line from 'the
selectedObjects'. The group mentioned exists and is on the same card. When
executed as part of an apparently error-free script, or in the message box in
put the owner of tgrcID <> grp "theProtectedGroup"
I get this runtime error:
> Error description: Factor: error in right operand
Putting bits of the comparison in brackets, wrapping it up in 'do' etc don't
make a difference to the error. Trying to use value(tgrcID) produces a different
If I put this in the message box when I have a specific ID in tgrcID
put the owner of tgrcID
I get the expected answer, i.e. the type and name of the owner. So it looks as
if there is a syntactical problem of some kind in the engine.
Knowing the above, I can do a workaround, by executing something like
put the owner of tgrcID into temp
put temp <> "grp" && quote & "theProtectedGroup" & quote
which doesn't give an error, just the expected result (true or false).
Is it me, or is it a bug?
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
More information about the use-livecode