Re: including xibs from another project
Re: including xibs from another project
- Subject: Re: including xibs from another project
- From: Fritz Anderson <email@hidden>
- Date: Wed, 20 Jan 2010 09:24:10 -0600
On 20 Jan 2010, at 7:12 AM, Roland King wrote:
> I do understand by the way why -all_load works around this, I just don't understand why my instance method calls aren't enough to cause the linker to pull code in and I need class method calls.
Objective-C is a dynamic language. Method calls get dispatched to actual code only at run time. The caller's method selectors and class names may not even appear in the source code; with key-value coding and run-time class creation (both EXTREMELY common, even if you don't use them yourself), method and class names may get composed at run time from formatted strings. Even if the method name were known to a certainty, there is (effectively) no class hierarchy to identify the class to which the method belongs, nor whether you intend to use a class that just happens to implement a method of the same name; and so there is no way to know whether a class is used.
When your code is compiled and linked, the compiler and linker have no way of knowing whether any message send will end up in your library. By static-language rules (which the gcc tool chain assumes), the library's classes look unused, and they don't make it through dead-code stripping. If you want a class to be included in your application, you have to say so explicitly.
— F
_______________________________________________
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