[Xerte] Accessing associative arrays via variable?

Dave Burnett d_b_burnett at hotmail.com
Tue Dec 29 17:02:54 GMT 2009


Right.
OK in my instance as I have control over the term format.
AFA accessibility, I'm guessing no way to tabindex without setting each term in it's own display?
 

Subject: RE: [Xerte] Accessing associative arrays via variable?
Date: Tue, 29 Dec 2009 16:52:59 +0000
From: Julian.Tenney at nottingham.ac.uk
To: xerte at lists.nottingham.ac.uk










I think it didn't properly find all the instances in the text.
 
term
 
term.
 
term,
 
-term.
 
Term.
 
TERM
 
terms.
 
It just looked for [space]term[space] and didn't try anything more intelligent. Also it wasn't keyboard accessibile but that ought not to be reason to not have it at all.



From: xerte-bounces at lists.nottingham.ac.uk on behalf of Dave Burnett
Sent: Tue 29/12/2009 13:32
To: Xerte list
Subject: RE: [Xerte] Accessing associative arrays via variable?



Julian, before I go much further down this road, I ran across this and was wondering if you could elaborate:

"I commented out that functionality as I wasn't too happy with the way it worked,.."

http://lists.nottingham.ac.uk/pipermail/xerte/2009-April/001421.html

Hope Santa didn't bring too many lumps of coal to the Xerte listers.

Dave




Subject: RE: [Xerte] Accessing associative arrays via variable?
Date: Sun, 27 Dec 2009 22:46:43 +0000
From: Julian.Tenney at nottingham.ac.uk
To: xerte at lists.nottingham.ac.uk





b = new Object();
b.blah = 'value';
v='blah';
debug(b[v]); //works for me



From: xerte-bounces at lists.nottingham.ac.uk on behalf of Dave Burnett
Sent: Sun 27/12/2009 21:49
To: Xerte list
Subject: RE: [Xerte] Accessing associative arrays via variable?


help_defs = new Object();
helps_defs.Atomic = "Roosters are atomic";
debug(helps_defs.Atomic); // gives me "Roosters are atomic"


myVar = 'Atomic';
debug(help_defs[myVar]); // gives me undefined.





Subject: RE: [Xerte] Accessing associative arrays via variable?
Date: Sun, 27 Dec 2009 21:23:56 +0000
From: Julian.Tenney at nottingham.ac.uk
To: xerte at lists.nottingham.ac.uk





myVar = 'Atomic';
debug(help_defs[myVar]);



From: xerte-bounces at lists.nottingham.ac.uk on behalf of Dave Burnett
Sent: Sun 27/12/2009 18:05
To: Xerte list
Subject: [Xerte] Accessing associative arrays via variable?



help_defs = new Object();
helps_defs.Atomic = "Roosters are atomic";
debug(helps_defs.Atomic); // gives me "Roosters are atomic"

Can I sub a variable into the place of .Atomic in that last statement?

Sort of like in AW, to call a value from a property list using a variable for the property name I'd use:

Trace(my_prop_list[Symbol("a"^some_variable)]) 


Hotmail: Trusted email with Microsoft’s powerful SPAM protection. Sign up now. 


Hotmail: Powerful Free email with security by Microsoft. Get it now. 


Hotmail: Trusted email with Microsoft’s powerful SPAM protection. Sign up now.  		 	   		  
_________________________________________________________________
Hotmail: Free, trusted and rich email service.
http://clk.atdmt.com/GBL/go/171222984/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20091229/7d211a35/attachment.html


More information about the Xerte mailing list