You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by Nigel Magnay <ni...@gmail.com> on 2014/02/17 14:03:05 UTC

undefined elements in Vector.<*>

I am attempting to use the paged list implementation here:
https://github.com/jamesward/DataPaging/blob/master/src/PagedList.as

This relies on storing 'undefined' values in a vector.

I cannot get this to work. The following does not produce any trace on my
test enviroment:

private const td:Vector.<*> = new Vector.<*>(100);

...

td[0] = undefined;

if( td[0] === undefined ) { trace("yes, it is undefined");


I.E: the values are *null *not *undefined. *

Is this some special compiler option (I'm using FB4.6 with a variety of
SDKs, none of which seem to worl).

RE: undefined elements in Vector.<*>

Posted by Maurice Amsellem <ma...@systar.com>.
Normally, * should accept undefined.
I didn't try though.

Maurice

-----Message d'origine-----
De : Nigel Magnay [mailto:nigel.magnay@gmail.com] 
Envoyé : lundi 17 février 2014 14:16
À : users@flex.apache.org
Objet : Re: undefined elements in Vector.<*>

I can adjust the code - I was more wondering why it didn't work (and clearly must have for some people!) so that I didn't make the same mistake in my own code..

I thought it was valid to store 'undefined's in Vector.<*>() ? Or is that a platform change ?


On Mon, Feb 17, 2014 at 1:10 PM, Maurice Amsellem < maurice.amsellem@systar.com> wrote:

> I have changed the code to use null instead of undefined to mark 
> pending  values , and it works perfectly well.
>
> Do you need the code for the change ?
>
> Maurice
>
> -----Message d'origine-----
> De : Nigel Magnay [mailto:nigel.magnay@gmail.com] Envoyé : lundi 17 
> février 2014 14:03 À : users@flex.apache.org Objet : undefined 
> elements in Vector.<*>
>
> I am attempting to use the paged list implementation here:
> https://github.com/jamesward/DataPaging/blob/master/src/PagedList.as
>
> This relies on storing 'undefined' values in a vector.
>
> I cannot get this to work. The following does not produce any trace on 
> my test enviroment:
>
> private const td:Vector.<*> = new Vector.<*>(100);
>
> ...
>
> td[0] = undefined;
>
> if( td[0] === undefined ) { trace("yes, it is undefined");
>
>
> I.E: the values are *null *not *undefined. *
>
> Is this some special compiler option (I'm using FB4.6 with a variety 
> of SDKs, none of which seem to worl).
>

Re: undefined elements in Vector.<*>

Posted by Nigel Magnay <ni...@gmail.com>.
I can adjust the code - I was more wondering why it didn't work (and
clearly must have for some people!) so that I didn't make the same mistake
in my own code..

I thought it was valid to store 'undefined's in Vector.<*>() ? Or is that a
platform change ?


On Mon, Feb 17, 2014 at 1:10 PM, Maurice Amsellem <
maurice.amsellem@systar.com> wrote:

> I have changed the code to use null instead of undefined to mark pending
>  values , and it works perfectly well.
>
> Do you need the code for the change ?
>
> Maurice
>
> -----Message d'origine-----
> De : Nigel Magnay [mailto:nigel.magnay@gmail.com]
> Envoyé : lundi 17 février 2014 14:03
> À : users@flex.apache.org
> Objet : undefined elements in Vector.<*>
>
> I am attempting to use the paged list implementation here:
> https://github.com/jamesward/DataPaging/blob/master/src/PagedList.as
>
> This relies on storing 'undefined' values in a vector.
>
> I cannot get this to work. The following does not produce any trace on my
> test enviroment:
>
> private const td:Vector.<*> = new Vector.<*>(100);
>
> ...
>
> td[0] = undefined;
>
> if( td[0] === undefined ) { trace("yes, it is undefined");
>
>
> I.E: the values are *null *not *undefined. *
>
> Is this some special compiler option (I'm using FB4.6 with a variety of
> SDKs, none of which seem to worl).
>

RE: undefined elements in Vector.<*>

Posted by Maurice Amsellem <ma...@systar.com>.
I have changed the code to use null instead of undefined to mark pending  values , and it works perfectly well.

Do you need the code for the change ?

Maurice

-----Message d'origine-----
De : Nigel Magnay [mailto:nigel.magnay@gmail.com] 
Envoyé : lundi 17 février 2014 14:03
À : users@flex.apache.org
Objet : undefined elements in Vector.<*>

I am attempting to use the paged list implementation here:
https://github.com/jamesward/DataPaging/blob/master/src/PagedList.as

This relies on storing 'undefined' values in a vector.

I cannot get this to work. The following does not produce any trace on my test enviroment:

private const td:Vector.<*> = new Vector.<*>(100);

...

td[0] = undefined;

if( td[0] === undefined ) { trace("yes, it is undefined");


I.E: the values are *null *not *undefined. *

Is this some special compiler option (I'm using FB4.6 with a variety of SDKs, none of which seem to worl).