'the owner' query

Graham Samuel livfoss at mac.com
Wed Oct 23 11:12:23 EDT 2013


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 the form

   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 error.

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?

TIA

Graham



More information about the use-livecode mailing list