September 11, 2006
Jarrett Billingsley wrote:
> "Ivan Senji" <ivan.senji_REMOVE_@_THIS__gmail.com> wrote in message news:ee46qa$2frb$1@digitaldaemon.com...
> 
>> The current workaround I'm using can hardly be called a workaround at all:
>>
>> O outerO;
>>
>> class O
>> {
>>   this()
>>   {
>>     outerO = this;
>>   }
>>
>>   class I1
>>   {
>>   }
>>   class I2
>>   {
>>     this()
>>     {
>>       I1 a = outerO.new I1;
>>     }
>>   }
>> }
>>
>> The only problem with this is that I am limited to only one instance of O this way :)
> 
> Then move outerO into O :)  Thus, outerO is initialized as the "this" for each instance, and the inner classes can access outerO without the need for any kind of qualification. 
> 

Thanks Jarrett! I can't believe I didn't think of that, that will work perfectly :)
If I had a wall nearby I would be banging my head into it for not thinking of that.
Thanks again!! :)
September 12, 2006
"Ivan Senji" <ivan.senji_REMOVE_@_THIS__gmail.com> wrote in message news:ee4dj2$2onc$1@digitaldaemon.com...

> If I had a wall nearby I would be banging my head into it for not thinking of that.

That's what desks are for!


1 2
Next ›   Last »