Re: [Flashcoders] Strict Datatyping Question

2005-10-31 Thread Robert Tweed
Chris Velevitch wrote: I think the confusion occurs because you seem to be mixing up the distinction between declaration and reference. Another distinction, which isn't very clear in ActionScript, is the distinction between declaration and definition. The declaration is where you tell the

Re: [Flashcoders] Strict Datatyping Question

2005-10-31 Thread Ian Thomas
Nope. my_win, the variable, is still declared (to the compiler) as a MovieClip. It only knows about it as type MovieClip. The object it 'points to' happens to be of type MyCustomForm, which is an object that inherits from MovieClip. It does all the things that MovieClip does, just does more

Re: [Flashcoders] Strict Datatyping Question

2005-10-31 Thread JesterXL
as datatyping, but no coercion. - Original Message - From: Ian Thomas [EMAIL PROTECTED] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: Monday, October 31, 2005 10:42 AM Subject: Re: [Flashcoders] Strict Datatyping Question Nope. my_win, the variable, is still declared

Re: [Flashcoders] Strict Datatyping Question

2005-10-31 Thread JesterXL
: [Flashcoders] Strict Datatyping Question On 10/31/05, Ian Thomas [EMAIL PROTECTED] wrote: So in short - you can do exactly what you wrote down, but: - Only because MovieClip is a dynamic class Actually, skip that - it only works later in your code if you call methods of MyCustomForm because

Re: [Flashcoders] Strict Datatyping Question

2005-10-31 Thread Ian Thomas
No - it _doesn't_ change the type of the variable from the compiler's PoV, that's my point. :-) I've probably been explaining really badly. The statement: var my_var:A; defines a thing which can point to objects of type A. This thing can only _ever_ hold references to objects of type A and

RE: [Flashcoders] Strict Datatyping Question

2005-10-31 Thread Adams, Matt
Has the bug been fixed in 8? Matt -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of JesterXL Sent: Monday, October 31, 2005 11:01 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] Strict Datatyping Question To clarify, it changes to the type

Re: [Flashcoders] Strict Datatyping Question

2005-10-31 Thread Ian Thomas
Matt, See all the previous mails. It's not a bug, so won't have been fixed. It's the way that the language is supposed to work. Ian On 10/31/05, Adams, Matt [EMAIL PROTECTED] wrote: Has the bug been fixed in 8? Matt ___ Flashcoders mailing list

Re: [Flashcoders] Strict Datatyping Question

2005-10-31 Thread Muzak
You might find the answer here: http://www.ecma-international.org/publications/standards/Ecma-262.htm Furthermore, in Flash 4, a colon was used to get/set a variable in a certain timeline. If I remember correcty, it looked something like this: phrases/introduction:String = blah; Where 'String'

Re: [Flashcoders] Strict Datatyping Question

2005-10-30 Thread Chris Velevitch
On 10/31/05, Joseph Balderson [EMAIL PROTECTED] wrote: Why it is illegal to combine both a path declaration and a datatype declaration in the same expression i.e.: ... // illegal syntax error this.clip1.myVar:Number = 42; This illegal because myVar has already be declared in the definition

Re: [Flashcoders] Strict Datatyping Question

2005-10-30 Thread Joseph Balderson
Robert Tweed wrote: When you specify a type, you are declaring an object to the compiler. Based on that, the compiler will check the code for any expressions that conflict with the known declaration. It can only do this at compile-time: there is no runtime type-checking. When you use a path

Re: [Flashcoders] Strict Datatyping Question

2005-10-30 Thread Liam Morley
mailing list flashcoders@chattyfig.figleaf.com Sent: Monday, October 31, 2005 12:30 AM Subject: Re: [Flashcoders] Strict Datatyping Question On 10/31/05, Joseph Balderson [EMAIL PROTECTED] wrote: Why it is illegal to combine both a path declaration and a datatype declaration in the same