RE: [Flashcoders] Identifier expected

2007-02-12 Thread Mendelsohn, Michael
Funny, Danny. I'm hoping someday it will all be just one language. - MM You can tell that Michael is mostly a Director user, can't you? :) ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chatty

RE: [Flashcoders] Identifier expected

2007-02-12 Thread Danny Kodicek
> Hi list... > > Simple question -- why doesn't the 2nd line work? The > identifier expected error is traced at compile time. > > Thanks, > - Michael M. > > > function createObj():Void { > this._data = new Object(); > this._data["a"] = {"1":new Number(0), "2":new > Number(0), "

RE: [Flashcoders] Identifier expected

2007-02-09 Thread Mendelsohn, Michael
Thanks everyone for the responses. This thread has been really helpful. - MM ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fi

Re: Re[2]: [Flashcoders] Identifier expected

2007-02-09 Thread Ian Thomas
var data:Object=new Object(); data.a=new Object(); data.a.t1=0; data.a.'t2=0; Whoops - a stupid stray quote in the last line. Should of course have been: data.a.t2=0; Ian ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or sea

Re: Re[2]: [Flashcoders] Identifier expected

2007-02-09 Thread Ian Thomas
It's nothing to do with the 'a', it's the 't1' and such in quotes that's the issue. >>MJ> function createData():Void { >>MJ> this._data = new Object(); >>MJ> this._data["a"] = new Object(); >>MJ> this._data["a"] = {"t1":0, "t2":0}; } // The quotes in this line are wrong Won't com

RE: Re[2]: [Flashcoders] Identifier expected

2007-02-09 Thread Merrill, Jason
n Behalf >>Of Rákos Attila >>Sent: Friday, February 09, 2007 3:13 PM >>To: Flashcoders mailing list >>Subject: Re[2]: [Flashcoders] Identifier expected >> >> >>MJ> OK, I see, so then curious why this script returns >>compiler errors: >>MJ>

Re[2]: [Flashcoders] Identifier expected

2007-02-09 Thread R�kos Attila
MJ> OK, I see, so then curious why this script returns compiler errors: MJ> MJ> function createData():Void { MJ> this._data = new Object(); MJ> this._data["a"] = new Object(); MJ> this._data["a"] = {"t1":0, "t2":0}; MJ> } Because when using the object initializer operator, you cannot

RE: Re[2]: [Flashcoders] Identifier expected

2007-02-09 Thread Steven Sacks | BLITZ
Stop using new Object() and use {}; :) I'm not experiencing the same issue you're having Jason. Not sure why. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listin

Re: SPAM-LOW: [Flashcoders] Identifier expected

2007-02-09 Thread Derek Vadneau
; this._data["a"][1] = new Number(0) ... } Derek Vadneau - Original Message - From: "Mendelsohn, Michael" <[EMAIL PROTECTED]> To: "Flashcoders mailing list" Sent: Friday, February 09, 2007 1:08 PM Subject: SPAM-LOW: [Flashcoders] Identifier expected

RE: Re[2]: [Flashcoders] Identifier expected

2007-02-09 Thread Merrill, Jason
>>[mailto:[EMAIL PROTECTED] On Behalf >>Of Rákos Attila >>Sent: Friday, February 09, 2007 2:31 PM >>To: Flashcoders mailing list >>Subject: Re[2]: [Flashcoders] Identifier expected >> >> >>MJ> That's because you're still not refrencing an

RE: [Flashcoders] Identifier expected

2007-02-09 Thread Merrill, Jason
>>-Original Message- >>From: [EMAIL PROTECTED] >>[mailto:[EMAIL PROTECTED] On Behalf >>Of Ian Thomas >>Sent: Friday, February 09, 2007 2:47 PM >>To: Flashcoders mailing list >>Subject: Re: [Flashcoders] Identifier expected >> >>Uh,

RE: [Flashcoders] Identifier expected

2007-02-09 Thread Merrill, Jason
lf >>Of Ian Thomas >>Sent: Friday, February 09, 2007 2:47 PM >>To: Flashcoders mailing list >>Subject: Re: [Flashcoders] Identifier expected >> >>Uh, Jason. >> >>There's nothing wrong with saying: >> >>var data:Object=new Object(); &g

Re: [Flashcoders] Identifier expected

2007-02-09 Thread Ian Thomas
Original Message- >>From: [EMAIL PROTECTED] >>[mailto:[EMAIL PROTECTED] On Behalf >>Of Mendelsohn, Michael >>Sent: Friday, February 09, 2007 2:02 PM >>To: Flashcoders mailing list >>Subject: RE: [Flashcoders] Identifier expected >> >>Thanks Jason.

Re[2]: [Flashcoders] Identifier expected

2007-02-09 Thread R�kos Attila
MJ> That's because you're still not refrencing an object that exists: MJ> >>>this._data["a"] = new Object(); MJ> MJ> You're saying, Hey, _data, make your "a" property an object. But Flash MJ> is saying, hold on cowboy, I don't see any property of _data called "a". You are not right, it is tota

RE: [Flashcoders] Identifier expected

2007-02-09 Thread Merrill, Jason
y. Jason Merrill Bank of America Learning & Organizational Effectiveness >>-Original Message- >>From: [EMAIL PROTECTED] >>[mailto:[EMAIL PROTECTED] On Behalf >>Of Mendelsohn, Michael >>Sent: Friday, February 09, 2007 2:02 PM >>To: Fl

RE: [Flashcoders] Identifier expected

2007-02-09 Thread Steven Sacks | BLITZ
oders mailing list > Subject: RE: [Flashcoders] Identifier expected > > Thanks Jason. I see what you're saying. So I inited an > object and then define it, but the below still errors. I was > just hoping to be able to define my object with only one line of code. > > priva

RE: [Flashcoders] Identifier expected

2007-02-09 Thread Mendelsohn, Michael
Thanks Jason. I see what you're saying. So I inited an object and then define it, but the below still errors. I was just hoping to be able to define my object with only one line of code. private function createData():Void { this._data = new Object(); this._data["a"] = new Object

RE: [Flashcoders] Identifier expected

2007-02-09 Thread Erik Bianchi
*can't use* {:} -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Erik Bianchi Sent: Friday, February 09, 2007 10:25 AM To: 'Flashcoders mailing list' Subject: RE: [Flashcoders] Identifier expected 2 issues: 1) identifiers are an expressi

RE: [Flashcoders] Identifier expected

2007-02-09 Thread Merrill, Jason
Sent: Friday, February 09, 2007 1:09 PM >>To: Flashcoders mailing list >>Subject: [Flashcoders] Identifier expected >> >>Hi list... >> >>Simple question -- why doesn't the 2nd line work? The >>identifier expected error is traced at compile time. >

RE: [Flashcoders] Identifier expected

2007-02-09 Thread Steven Sacks | BLITZ
> As you have discovered you are not able to use numbers as > keys in line objects. That's not true. Just wrote this and it works fine. a = {}; a["a"] = {}; a["a"][1] = new Number(5); trace(a["a"][1]); -- 5 Works for me. You must be doing something else wrong. I'm not sure why you're using n

RE: [Flashcoders] Identifier expected

2007-02-09 Thread Erik Bianchi
"; trace(this[1]); but then you can use {:} type syntax. -erik -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mendelsohn, Michael Sent: Friday, February 09, 2007 10:09 AM To: Flashcoders mailing list Subject: [Flashcoders] Identifier expected Hi lis

Re: [Flashcoders] Identifier expected

2007-02-09 Thread Chris Benjaminsen
As you have discovered you are not able to use numbers as keys in line objects. Trying to do what you do will however not change this. Only way to do what you want would be to insert the indexes manually: function createObj():Void { this._data = new Object(); this._data["a"] = n

[Flashcoders] Identifier expected

2007-02-09 Thread Mendelsohn, Michael
Hi list... Simple question -- why doesn't the 2nd line work? The identifier expected error is traced at compile time. Thanks, - Michael M. function createObj():Void { this._data = new Object(); this._data["a"] = {"1":new Number(0), "2":new Number(0), "3":new Number(0)}; }