Re: including xibs from another project
Re: including xibs from another project
- Subject: Re: including xibs from another project
- From: Roland King <email@hidden>
- Date: Thu, 21 Jan 2010 00:09:28 +0800
and I covered that in the rest of my reply.
normally if it's a Bar* where Bar is a subclass of Foo and you called anyInstanceMethod on it it's quite likely that the Bar will call [ super anyInstanceMethod ] as part of its implementation, or the init or dealloc of a Bar will call the init or dealloc methods of Foo. Sure there are cases in which Bar, a subclass of Foo, reimplements the class entirely and calls no code from the baseclass, but that's not a very common case. So surely a prudent linker would link in the code for Foo with a reasonable expectation some of it was going to be used. But it doesn't seem to unless an explicit class method of Foo is called.
On 20-Jan-2010, at 11:57 PM, Rick Genter wrote:
>
> On Jan 20, 2010, at 7:47 AM, Roland King wrote:
>
>> ok this makes some sense, there's lots of ways in which I can see dynamic resolution of classes or methods isn't known at link time, KVO, methods composed from strings, I would not expect a linker to figure that out. But that's not where we are in this example, it's a little more direct than that, there's a class Foo and if you call
>>
>> [ Foo anyMethod ]
>>
>> all the code for Foo gets linked in
>>
>> but if you call
>>
>> [ foo anyInstanceMethod ]
>>
>> where foo is explicitly defined to be a Foo*, it doesn't link it in.
>
> Just because foo is declared to be as Foo* doesn't mean that it is. It could be a Bar*, where Bar is a subclass of Foo.
> --
> Rick Genter
> email@hidden
>
>
>
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden