Yes...but...if it has a "certain custom property", could that behavior not
also have a "certain method"?  Then you could just use
sendAllSprites(#certainMethod).  More specifically to your case:
sendAllSprites(#useBuiltInCursor)  This would be much more efficient than
testing each behavior instance of each sprite.

John

----- Original Message -----
From: "Lee Blinco" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 02, 2004 5:04 AM
Subject: <lingo-l> detect sprites with a certain property


> Hi
> is it possible to loop through all sprites in the score and detect whether
> each sprite has a certain custom property.
> If the sprite has any custom properties then i can use
>
> repeat with k = 1 to the lastChannel
>     repeat with l = 1 to sprite(k).count()
>       if sprite(k).getPropAt(l) = #myBuiltInCursor then
>         sprite(k).cursor = sprite(k).myBuiltInCursor
>       else
>         nothing
>       end if
>       end repeat
>     end repeat
>
> but this fails when a sprite has no properties  as it returns a "handler
not
> in object error".
> so is it poosible to test for whether a sprite has any custom properties
at
> all or not.
> chhers
> Lee Blinco
> Multimedia Developer
> AVR Productions
> +44 (0)1462 819603
>
>
> [To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is
for learning and helping with programming Lingo.  Thanks!]
>
>

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email [EMAIL 
PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping 
with programming Lingo.  Thanks!]

Reply via email to