• 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: IBOutlet to different classes, conditional build
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IBOutlet to different classes, conditional build


  • Subject: Re: IBOutlet to different classes, conditional build
  • From: Trygve Inda <email@hidden>
  • Date: Thu, 24 Feb 2011 06:56:31 +0000
  • Thread-topic: IBOutlet to different classes, conditional build

>
> On 24/02/2011, at 5:29 PM, Trygve Inda wrote:
>
>> How can I properly set this up?
>
>
> I'm not sure if it's the best way, but you could just make MyObjectClass
> *always* an NSObject subclass, and let it act as an intermediary or controller
> for the real class. In other words, its interface is fixed in stone, but its
> internal implementation will change according to the conditional compilation.
> In other words it *has a* connection to the app delegate or pref pane
> controller which is established at runtime and then it passes on messages to
> that object, rather than trying to actually be that object.
>
> --Graham
>
>
>

I don't think that will work because the File's Owner of the prefpane has to
be a subclass of NSPreferencePane.

The problem is two-fold:

1) How can I have nibs, one with MyObjectClass:NSObject and the other with
MyObjectClass:NSPreferencePane where MyObjectClass  is essentially the same
but with a few #ifdef to have conditional compilation.

2) I need IBOutlets in ClassA, ClassB and ClassC to link to MyObjectClass so
I can't easily change it to MyObjectClassPrefStyle and MyObjectClassAppStyle
since then the IBOutlets would have to point to different types.


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: IBOutlet to different classes, conditional build
      • From: Graham Cox <email@hidden>
References: 
 >Re: IBOutlet to different classes, conditional build (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: IBOutlet to different classes, conditional build
  • Next by Date: Re: IBOutlet to different classes, conditional build
  • Previous by thread: Re: IBOutlet to different classes, conditional build
  • Next by thread: Re: IBOutlet to different classes, conditional build
  • Index(es):
    • Date
    • Thread