flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mihai Chira <mihai.ch...@gmail.com>
Subject Re: hasOwnProperty with namespace
Date Tue, 24 Jun 2014 17:58:59 GMT
Great article, thank you. It's good to discover this functionality.

Though I'm now starting to think it's impossible to do what I was hoping
without describeType[JSON]? I find it strange.
On 24 Jun 2014 18:22, "Mark Line" <markline@gmail.com> wrote:

> This might help: http://jacksondunstan.com/articles/2609
> On 24 Jun 2014 18:08, "Mihai Chira" <mihai.chira@gmail.com> wrote:
>
> > It does do it, but I was hoping I could achieve it with
> > hasOwnProperty() because it's in a memory and speed-sensitive area of
> > the application.
> >
> > On 24 June 2014 17:06, Subscriptions <subscriptions@leeburrows.com>
> wrote:
> > > describeType might do the job
> > >
> > >
> >
> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/utils/package.html#describeType()
> > >
> > >
> > >
> > > On 24/06/2014 16:46, Mihai Chira wrote:
> > >>
> > >> Is there a way to check if an object instance has a non-public
> > >> property if you know its namespace?
> > >>
> > >> If you say object.hasOwnProperty("name") it will only return true if
> > >> "name" is public. However, it returns false if "name" is, say,
> > >> mx_internal (or under another namespace): mx_internal var name:String;
> > >>
> > >> I've tried:
> > >>
> > >> object.hasOwnProperty("name"); //false
> > >> object.hasOwnProperty(new QName(mx_internal, "name")); //false
> > >> object.hasOwnProperty(new
> > >> QName("http://www.adobe.com/2006/flex/mx/internal", "name")); //false
> > >>
> > >> Any ideas? This web post[1] seems to imply that at least at one point
> > >> it was possible to use QName in conjunction with non-XML objects'
> > >> hasOwnProperty() function. Has this changed, or am I doing something
> > >> wrong?
> > >>
> > >>
> > >> Thanks!
> > >>
> > >> [1] http://www.leichtgewicht.at/718/mastering-as3-namespaces/#qname
> > >
> > >
> > > --
> > > Lee Burrows
> > > ActionScripter
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message