Re: nibs don't respect protocols
Re: nibs don't respect protocols
- Subject: Re: nibs don't respect protocols
- From: Matt Neuburg <email@hidden>
- Date: Wed, 02 Jun 2010 16:56:01 -0700
- Thread-topic: nibs don't respect protocols
On or about 6/2/10 1:25 PM, thus spake "Jonathan Hess" <email@hidden>:
>
> On Jun 2, 2010, at 11:27 AM, Matt Neuburg wrote:
>
>> I'm moving this over from Cocoa-Dev, so if you have the feeling you've seen
>> this before, that's why.
>>
>> I'm struck by the following sort of situation. A UIApplication's delegate
>> property is defined as an id <UIApplicationDelegate>. But if I hook up the
>> UIApplication proxy object in a nib to another instance as its delegate, and
>> if that other instance does _not_ formally adopt UIApplicationDelegate,
>> there seems to be no penalty: the nib doesn't complain, and the app runs
>> fine.
>>
>> So... Are nibs just ignorant of protocols? This feels like a bug. If you try
>> to hook up an outlet to the wrong type (e.g. a UILabel instead of a declared
>> UITextField), you can't; Interface Builder won't let you. Well, a class that
>> doesn't declare conformance to UIApplicationDelegate *is* the wrong type for
>> UIApplication's delegate; yet Interface Builder *does* let you. In that
>> case, what's the point of having the protocol at all?
>>
>> I'd be willing to file a bug but I think I'd like some encouragement
>> first... :) m.
>
> Thanks Matt, please do file a bug at http://bugreport.apple.com/.
Thanks - submitted as bug ID 8054227.
m.
--
matt neuburg, phd = email@hidden, http://www.tidbits.com/matt/
pantes anthropoi tou eidenai oregontai phusei
Among the 2007 MacTech Top 25, http://tinyurl.com/2rh4pf
AppleScript: the Definitive Guide, 2nd edition
http://www.tidbits.com/matt/default.html#applescriptthings
Take Control of Exploring & Customizing Snow Leopard
http://tinyurl.com/kufyy8
RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html
TidBITS, Mac news and reviews since 1990, http://www.tidbits.com
_______________________________________________
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