On Wednesday, July 2, 2003, at 08:50 AM, [EMAIL PROTECTED] wrote:


--__--__--

Message: 10
Date: Tue, 1 Jul 2003 12:19:09 -0500
Subject: Re: <lingo-l> List bracket access
From: Howdy-Tzi <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]

On Tuesday, Jul 1, 2003, at 11:41 America/Chicago, Kerry Thompson wrote:

But I'm not. I'm getting the value, i.e., [135, 137, 0, 0, 0, 0]

Right.
[...snip]

Yes. You have to get both the prop and the list item and assemble them by hand into another proplist:


-- Welcome to Director --
vpl= ["TB199": [135, 137, 0, 0, 0, 0], "TB53": [138, 158, 11, 92, 0, 0]]
prop = getPropAt ( vpl, 1 )
val = vpl[1]
lNew = [:]
lNew.addProp ( prop, val )
put lNew
-- ["TB199": [135, 137, 0, 0, 0, 0]]

Just a note on the above. Since a property will be created when first referenced, bracket access will suffice, as in:


-- Welcome to Director -- vpl= ["TB199": [135, 137, 0, 0, 0, 0], "TB53": [138, 158, 11, 92, 0, 0]]

i = [:]
i[vpl.getPropAt(1).symbol]=vpl[1]
put i

-- [#TB199: [135, 137, 0, 0, 0, 0]]

Is it still a good idea to "symbolize" a string to make it a "real" prop (#TB199 as opposed to "TB199") - or has this distinction become obsolete? I remember having had difficulties in 8.5 with very specific (probably protected) words. I think "long" - intended for "longitude", was one of them. #name was another, maybe #age also. Those still will not trigger proper coloring in MX scripting window.

Denis

P.-S. Apologies if this was mentioned already - I'm on digest mode.


[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