I sometimes rely on the assumption that
member("")
returns member(-1 of castlib 1)
and/or that
member("").type
returns #empty
BUT I have discovered a small bug (or at least inconsistent behavior). If you delete a cast member's name in the GUI - effectively naming it "" then
member("")
will return a reference to this now nameless cast member. If there are more than one cast members whose names have been erased, the first of these is referenced.
this sounds fairly close to expectation (first found, etc.)
There is no way of telling whether a nameless castmember once had a name, because cast members that have never had names also have "" for the name property. Director, however, sees a difference in this case.
so it sounds as if there IS a difference - members that once had a name are found by your test & ones that were never named aren't found.
Is this a known issue? I have seen it in Director 8.5 and MX on both Mac and Windows. It is easily reproduced (and fairly easy to work around), but like all such bugs, not knowing about it can cause some hassle or havoc.
it's probably been there since at least d7 when the cast was recreated on the new playback engine.
I shall be reporting it, because it hints at something messy underneath the cast member naming/reference resolving mechanism which is not particularly comforting.
It sounds like a bug could be described like this: member("") doesn't return the first unnamed member that has never been named. members that have been named seem to work as expected.
As for WHY you are doing this, I think you should consider better mechanisms
To finding a blank castmember slot., perhaps try this:
on findNewmember newMember = new(#bitmap) newMember.erase() return newMember end
thisNewMember = findNewmember()
& if you are trying to find members with erased names (or members with unerased names), there are better approaches that the one you are suggesting (repeat loops thru the members)
hth -Buzz
Brennan
[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!]
