Oh. My bad - should read the entire thread first before posting.
I had a similar need, and ended up doing it in a loop like you did,
mainly because from the languages I've used before, exceptions tend to
be 'expensive' in terms of computation time. Not sure what the case is
with AS3.
2009/1/20 do
i use hasOwnProperty in the function i posted but i can only use it to check
immediate properties. it doesn't support nested properties, for example
var obj:Object = new Object();
obj.apple = new Object();
obj.apple.color = "red";
// hasOwnProperty doesn't support nested properties
var b1:Boolean
The hasOwnProperty method available in all objects does exactly this.
http://livedocs.adobe.com/flex/3/langref/Object.html#hasOwnProperty()
Why it is called hasOwnProperty rather than hasProperty I have no idea.
2009/1/19 dorkie dork from dorktown :
> late night... thanks
>
> On Sun, Jan 18, 200
late night... thanks
On Sun, Jan 18, 2009 at 10:05 AM, Ralf Bokelberg
wrote:
> doesn't try catch help here? If no error is thrown, isset returns true
>
> ralf
>
>
> On Sun, Jan 18, 2009 at 1:46 PM, dorkie dork from dorktown
> >
> wrote:
> > I have a PHP statement that I am trying to write in AS
doesn't try catch help here? If no error is thrown, isset returns true
ralf
On Sun, Jan 18, 2009 at 1:46 PM, dorkie dork from dorktown
wrote:
> I have a PHP statement that I am trying to write in AS3. So far it errors
> out because the properties do not exist on it yet. How would/should I
> rewr
er sorry for the php references. i am knee deep in translating php code. :P
On Sun, Jan 18, 2009 at 7:39 AM, dorkie dork from dorktown <
dorkiedorkfromdorkt...@gmail.com> wrote:
> I don't like to know if there is an easier way to do this so I wrote this
> function to check if a object or the requ
I don't like to know if there is an easier way to do this so I wrote this
function to check if a object or the requested properties exist on the
object.
// call it like this
isset_drilldown(this.language_data,'STYLES','BRACKETS',0);
// Determine whether a variable set via a drill down through t
I have a PHP statement that I am trying to write in AS3. So far it errors
out because the properties do not exist on it yet. How would/should I
rewrite this for AS3? Here is the statement:
// at the time this is run "this.language_data" is an object with 2
properties
// the "STYLES" property does
8 matches
Mail list logo