Am 07.10.2005 um 18:25 schrieb Valentin Schmidt:
hi list,
does anyone know a way to check for the existence of a member with
a given name that works for both dmx and dmx2004?
I know the following 2 methods, but it would be nicer to have a
consistent method for all versions:
on memberExists (someName)
return (member(someName).membernum > 0) -- only for dir < 10
return (not voidP(member(someName))) -- only for dir >=10
end
here's what I use:
on mGetMemType memref
if ilk(memref) <> #member then return #empty
return memref.type
end
if mGetMemType(member("something")) = #bitmap then ....
I didn't come up with a one-liner.
while I appreciate the fact, that lingo is much more consistent and
tidy since D10, I liked the old *sluggish* behavior of returning
always a member reference of type #empty regardless what.
since very much of my code relied on that I continued to use it via
my own "two line" check.
---------------------------
|||
a¿ex
[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
lingo-l@penworks.com (Problems, email [EMAIL PROTECTED]). Lingo-L is for
learning and helping with programming Lingo. Thanks!]