On Oct20, 2008, at 10:55 AM, Adam Penny wrote:

Hi again,

Sorry, in my naivité I had expected the drag and drop to do more, but having just created a new NSObject in IB and pointed at the wopolpref class I now discover that it dragging and dropping has done the trick.

Thank you very much!

Adam
On Oct20, 2008, at 1:59 AM, Nick Zitzmann wrote:


On Oct 19, 2008, at 9:33 AM, Adam Penny wrote:

Having constructed a preference subclass with the appropiate outlets corresponding to those I've placed in the nib file, I'm getting an NSObject and setting it's class to the preference pane subclass with my outlets in it, but this seems to be giving me an unexpected choice of outlets when I'm trying to connect them. I was hoping to see the outlets broadcastIP, printers and servers. Instead I see _FirstKeyView, _InitialKeyView, _LastKeyView window and New Referencing Outlet. Am I supposed to use something other than an NSObject when it's a preference pane in order to make connections?


Have you tried manually loading the header into IB by dragging the file onto the nib window? IB is supposed to automatically loads headers, but sometimes it doesn't.

Nick Zitzmann
<http://www.chronosnet.com/>



Hi again everyone,

Having made a bit of progress, I thought I'd go back and read the document at http://developer.apple.com/documentation/UserExperience/Conceptual/PreferencePanes/Tasks/Creation.html#/ /apple_ref/doc/uid/20000709 carefully to make sure I'm dotting the i's and crossing the t's as far as structure and strategy is concerned.

Wrt the above document I have a few things that I'd be grateful if somebody could clarify for me?

The document mentions:
6)'In the Classes pane, select the NSPreferencePane class and create a subclass of it. Rename it to whatever you want. This is a global property within the preference application, so include a unique prefix in the name as described in “Preventing Name Conflicts.”'

So in this case the class should be called UkCoPennynetWopolController?

It went to say that you could have an extra header file with something like this in it to save a bit of time:

#define SoundPref ComApplePreferenceSoundPref
#define AlertController ComApplePreferenceSoundAlertController
#define MicrophoneController ComApplePreferenceSoundMicrophoneController
so presumably I should write for the above.
#define WopolController UkCoPennynetWopolController
and then refer to it in my code just as WopolController. Just to check, but does that extra definitions header need any frameworks imported into it, or the #define statements only? My final query is simply that I'm not sure what class to use for reading and writing the plist corresponding to my string and two dicts to and from /Library/Preferences/uk.co.pennynet.wopol.plist? I was going to use PropertyListSerialization, but scouting around I got the impression that this is a bit of a faux pas. Then I saw NSUserDefaults, which seems good, but not quite right either. So I'm a bit stuck on that bit.
Thank you again.
Adam




_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to