lingo-l consistent way to check for existence of member

2005-10-07 Thread 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

Re: lingo-l consistent way to check for existence of member

2005-10-07 Thread Cole Tierney
on memberExists (someName) return (member(someName).membernum 0) -- only for dir 10 return (not voidP(member(someName))) -- only for dir =10 end Here's the obvious/ugly way that you probably would like to avoid: on memberExists (someName) if the scriptExecutionStyle 10 then return

RE: lingo-l consistent way to check for existence of member

2005-10-07 Thread Thomas Higgins
Would this work? put ((member does not exist).number 0) -- 0 Nope, that will fail if the scriptExecutionStyle is set to 10 as the invalid member reference returns VOID, and VOID does not have a number property and so a script error will occur. The problem here is that prior to MX'04 all the

Re: lingo-l consistent way to check for existence of member

2005-10-07 Thread alpha
Quoting Cole Tierney [EMAIL PROTECTED]: Would this work? put ((member does not exist).number 0) In MX 2004, (member does not exist).number returns a script error on my machine (Win XP). I think that's because member(does not exist) returns void. This has come up before, and we've flogged it

Re: ÍøÒ×ÓÊÏä×Ô¶¯»Ø¸´: Re: lingo-l consistent way to check for existence of member

2005-10-07 Thread alpha
Quoting [EMAIL PROTECTED]: Äú·¢¸øÎÒµÄÐżþÒѾ­ÊÕµ½¡£ Easy for you to say. Cordially, Kerry Thompson [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

Re: lingo-l consistent way to check for existence of member

2005-10-07 Thread Cole Tierney
At 12:47 PM -0400 10/7/05, Cole Tierney wrote: on memberExists (someName) return (member(someName).membernum 0) -- only for dir 10 return (not voidP(member(someName))) -- only for dir =10 end Here's the obvious/ugly way that you probably would like to avoid: on memberExists (someName)

Re: lingo-l consistent way to check for existence of member

2005-10-07 Thread Valentin Schmidt
Thanks Alex. So we have the following 2 equivalent methods to check for existence of a member that work for all dir version: on memberExists (tMemRef) if voidP(tMemRef) then return FALSE return (tMemRef.number 0) end on memberExists (tMemRef) if ilk(tMemRef)#member then return FALSE