T
The Natural Philosopher
I am trying to create what amounts to an array of 'structures'.
I.e. I want to dynamically add to and access an object as
myobject[number].anothernumber // actually represents a nesting level.
and
myobject[number].elementintheDOM // this is a pointer to
//store particular elements..i.e.
//I want to be able to do things like
myobject[number].elementintheDOM.style.display='block';
Myobject is essentially external to the (one) function that accesses it
- or a static, in C terms within it. 'number' is not a continuous
set..its a sparse matrix.
Now I have searched the net, and there seems to be no one who has
actually done this.
All the idiots guides are for more simple arrays. And most seem to be
giving what amounts to the same examples.
What I need is the correct syntax for declaring it, adding to it, and
stepping through it to extract values. So easy in a strict type
language, so non intuitive in javascript..
Mind you, i never managed to create an array of pointers to functions in
C either. If I got the syntax right, the compiler choked
So easy in Assembler..;-)
I.e. I want to dynamically add to and access an object as
myobject[number].anothernumber // actually represents a nesting level.
and
myobject[number].elementintheDOM // this is a pointer to
//store particular elements..i.e.
//I want to be able to do things like
myobject[number].elementintheDOM.style.display='block';
Myobject is essentially external to the (one) function that accesses it
- or a static, in C terms within it. 'number' is not a continuous
set..its a sparse matrix.
Now I have searched the net, and there seems to be no one who has
actually done this.
All the idiots guides are for more simple arrays. And most seem to be
giving what amounts to the same examples.
What I need is the correct syntax for declaring it, adding to it, and
stepping through it to extract values. So easy in a strict type
language, so non intuitive in javascript..
Mind you, i never managed to create an array of pointers to functions in
C either. If I got the syntax right, the compiler choked
So easy in Assembler..;-)