FWIW,

the scriptExecutionStyle = 10
put member("notamembername").ilk
-- #void
put symbolP(member("notamembername").ilk)
-- 1

the scriptExecutionStyle = 9
put member("notamembername").ilk
-- <Void>
put voidP(member("notamembername").ilk)
-- 1

~Mathew


roymeo wrote:
member("notamembername").ilk returns <VOID> for non-existant members in DMX...

What's it do in Director MX2004?


(M = 1000, X = 10, MX = 1010. Then, I suppose we either add or subtract or append 2004....D3014, D-994, or D10102004)


At 01:24 AM 6/3/2004, you wrote:

At 19:58 Uhr -0400 02.06.2004, roymeo wrote:

I've always (and it doesn't seem like it's been broken) used
member("whatever") = member("THIS_MEMBER_HAD_BETTER_NOT_EXIST_OR_THIS_CODE_WILL_BE_BIT_BY_A_MOOSE")



if they are equal, then the "whatever" member doesn't exist. Then they can change those types all they want, you're just checking to see if they're both empty members.


you should be aware of the fact, that if you address a member by name all members in all castlibs will be checked if they match. this can take a huge amount of time, if you have a great number of members.
doing it twice is twice to determine if one member is present is still worse.


I used to check the type of the member, which broke in D10, due to the handling of member("non-existant").
in fact it makes much more sense to get void as return value, than a member object, which is member(-1), which IMO is nothing else, than a hack.
but the old way was very functional, because I could just write something like:


if member("whatever").type = #bitmap then
....

now I must check first, if it is a member objecvt and afterwards, if it is of the right type.

so I now have a function in my moviescript, with the handlers used for all movies, which is:

on mGetMemType memref
  if ilk(memref) <> #member then return #empty
  return memref.type
end

and I could change the line:

if member("whatever").type = #bitmap then
...

into:

if mGetMemType(member("whatever")) = #bitmap then
...


--

  |||
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 [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]

Reply via email to