I was actually hoping the compiler would either generate a public alias to
put into info()["mixins"]; or leave that class out of the list entirely,
maybe with a warning... Might file a bug some time :)
-Josh
On Mon, Sep 1, 2008 at 4:10 PM, Josh McDonald <[EMAIL PROTECTED]> wrote:
> package pkg
> {
> public class Class1
> {
> private var ref:Class2;
> }
> }
>
> package pkg
> {
> [Mixin]
> internal class Class2
> {
> public static function init(foo:*) : void
> {
> trace("Class2.init called with foo = " + foo);
> }
> }
> }
>
> There's a ref to Class1 from Application.
>
> I would have thought that getDefinitionByName("pkg.Class2") would throw an
> exception, but it's just returning null. Perhaps that's the behaviour for
> "found but hidden", or it might be just special behaviour on behalf of SM or
> because it's frame1...
>
> -Josh
>
>
> On Mon, Sep 1, 2008 at 3:59 PM, Alex Harui <[EMAIL PROTECTED]> wrote:
>
>> Interesting, what name did you use for the look up? How was the class
>> set up? It doesn't surprise me though.
>>
>>
>>
>> *From:* [email protected] [mailto:[EMAIL PROTECTED] *On
>> Behalf Of *Josh McDonald
>> *Sent:* Sunday, August 31, 2008 10:43 PM
>> *To:* [email protected]
>> *Subject:* Re: [flexcoders] Quick question about Mixins and internal
>> class scope
>>
>>
>>
>> I was just hoping it was something that'd been tried and there's be an
>> answer. The answer for anybody following this however, is that
>> getDefinitionByName() returns null, and you NPE inside SystemManager :)
>>
>> -Josh
>>
>> On Mon, Sep 1, 2008 at 3:28 PM, Alex Harui <[EMAIL PROTECTED]> wrote:
>>
>> In case you were hoping I had the answer, I don't. Should be a 10 minute
>> experiment though. However, an internal class can certainly be handed the
>> SM by the first [mixin] that uses it
>>
>>
>>
>> *From:* [email protected] [mailto:[EMAIL PROTECTED] *On
>> Behalf Of *Josh McDonald
>> *Sent:* Sunday, August 31, 2008 5:43 PM
>> *To:* [email protected]
>> *Subject:* [flexcoders] Quick question about Mixins and internal class
>> scope
>>
>>
>>
>> Hey guys,
>>
>> I'm miles from compiling and testing what I'm writing at the moment, so I
>> thought I'd just ask in case somebody knows- will getDefinitionByName("foo")
>> fail on an "internal" class when SystemManager is trying to call init() on
>> the mixins? I have a class I'd like to make internal, but it needs to be a
>> mixin as well in order to get a reference to SystemManager ASAP.
>>
>> Cheers,
>> -Josh
>>
>> --
>> "Therefore, send not to know For whom the bell tolls. It tolls for thee."
>>
>> :: Josh 'G-Funk' McDonald
>> :: 0437 221 380 :: [EMAIL PROTECTED]
>>
>>
>>
>>
>> --
>> "Therefore, send not to know For whom the bell tolls. It tolls for thee."
>>
>> :: Josh 'G-Funk' McDonald
>> :: 0437 221 380 :: [EMAIL PROTECTED]
>>
>>
>>
>
>
>
> --
> "Therefore, send not to know For whom the bell tolls. It tolls for thee."
>
> :: Josh 'G-Funk' McDonald
> :: 0437 221 380 :: [EMAIL PROTECTED]
>
--
"Therefore, send not to know For whom the bell tolls. It tolls for thee."
:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]