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
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
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
: [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
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
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
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
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'
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
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
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
11 matches
Mail list logo