|
Posted by Michael Winter on 10/13/80 11:21
On 16/07/2005 03:04, ^reaper^ wrote:
> However, since teh array has a built in hashing feature for direct
> access as well as teh iteration feature for list walking
There is no hashing in ECMAScript; square bracket notation is a form of
property accessor and is a feature of all objects. The single difference
between it and dot notation is that the former evaluates an expression,
converts it to a string, and uses that as the property name, rather than
using a token that matches the Identifier production.
Similarly, the for..in statement is a property enumerator, and also
functions with all objects.
Neither are features of the Array object, but are inherited from the
Object object.
The only arrays that you need are elements within map, and I would use
array literal syntax for them:
map.H = ['x0y0', 'x2y15', 'x17y11', 'x19y3'];
The map, mask, saved, and pv objects themselves should be Object objects.
[snip]
>> Creating a proper Map object would be more involved, yes, but a more
>> robust solution.
>
> Robust in what way?
Properties defined by the specification are not enumerable. All
user-defined properties are (including those propagated through
prototypes). Host properties are implementation specific. In certain
circumstances, simple enumeration works. In others, it will include
properties that wouldn't want. That isn't robust. If 'working' is good
for you, fine.
[snip]
> [A table] works great /until/ you start futzing around with... say,
> the browser text size options.
With your current situation, nothing short of including separate images
for each symbol will solve problems related to text resizing. Anything
else would be a half-measure.
The reason for resizing text is to make it more readable, but if your
preferred font size (for layout purposes) is too small, then the symbols
(and green text) probably will be as well. So on that point, worrying
about text resizing is a waste of time (unless you want to avoid images
altogether).
[snip]
> I suppose I could throw teh width into teh div container... hang on,
> brb. Nope, still doesn't work.
DIV elements do not have width attributes. Use CSS and em units (if you
still want to cling to resizing), not pixels.
> Though it doesn't really matter afaics, as teh menu controls (e.g.,
> save, refresh, mask, rots, etc) which are contained in their own
> table, do wonky things as well.
For the same reason as the INPUT elements in the previous table.
Solvable in the same way, too.
> That, and teh js does not appear to work with firefox eider.
You either forgot or ignored what I said about using the getElementById
method with name attributes.
Mike
--
Michael Winter
Prefix subject with [News] before replying by e-mail.
Navigation:
[Reply to this message]
|