• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: including xibs from another project
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: including xibs from another project


  • Subject: Re: including xibs from another project
  • From: Jonas Maebe <email@hidden>
  • Date: Wed, 20 Jan 2010 17:19:14 +0100


On 20 Jan 2010, at 16:47, 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

That's because the compiler has to pass a reference to the Foo class information as target parameter to the objc_msgSend() function. Hence, the linker knows that it has to link in Foo.


but if you call

	[ foo anyInstanceMethod ]

where foo is explicitly defined to be a Foo*, it doesn't link it in.

In this case, the target parameter of objc_msgSend() is simply the variable "foo". At the assembler/machine code level, there is no information whatsoever about what that variable's type is (it's just a random memory location), and hence the linker does not know anything about it (even if you enable debug info, because the debug info does not explicitly reference the class information; it rather partially duplicates that info and primarily relies on the debugger to look up most things at run time using reflection).



Jonas _______________________________________________ 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
  • Follow-Ups:
    • Re: including xibs from another project
      • From: Roland King <email@hidden>
References: 
 >including xibs from another project (From: Roland King <email@hidden>)
 >Re: including xibs from another project (From: Roland King <email@hidden>)
 >Re: including xibs from another project (From: Mark Woollard <email@hidden>)
 >Re: including xibs from another project (From: Jocelyn Houle <email@hidden>)
 >Re: including xibs from another project (From: Fritz Anderson <email@hidden>)
 >Re: including xibs from another project (From: Roland King <email@hidden>)
 >Re: including xibs from another project (From: Fritz Anderson <email@hidden>)
 >Re: including xibs from another project (From: Roland King <email@hidden>)

  • Prev by Date: Re: Why does IB insist on putting NSTextView in an NSScrollView
  • Next by Date: Re: including xibs from another project
  • Previous by thread: Re: including xibs from another project
  • Next by thread: Re: including xibs from another project
  • Index(es):
    • Date
    • Thread