Re: IB3 - Stop Displaying id Members as Outlets!
Re: IB3 - Stop Displaying id Members as Outlets!
- Subject: Re: IB3 - Stop Displaying id Members as Outlets!
- From: "Sean McBride" <email@hidden>
- Date: Mon, 11 Aug 2008 10:53:16 -0400
- Organization: Rogue Research
On 8/9/08 5:20 PM, Seth Willits said:
>> There isn't a way to override this besides giving your variables
>> specific types. I'm curious, what is causing you to have so many
>> instance variables typed as id?
>
>I don't have many of them, it's the simple fact that I have *one* at
>all. Targets for actions -- typed as id. (I'm not a control or action
>cell subclass). Delegate -- typed as id. Identifier object -- typed as
>id.
This IB behaviour annoys me too.
In addition to Seth's reasons, another I can add: the compiler.
Sometimes I use 'id' because otherwise I need all kinds of casts to shut
the compiler up. For example, NSView's 'window' method returns
NSWindow* but NSAlert's 'window' method returns 'id'. So there are
times when my header ends up with the lowest common denominator.
Anyway, just look at NSWindow.h. It has lots of 'id' ivars. If it can
happen to Apple, it can happen to us 3rd party devs too.
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
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