• 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: Debugging preference pane
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Debugging preference pane


  • Subject: Re: Debugging preference pane
  • From: Adam Penny <email@hidden>
  • Date: Fri, 24 Oct 2008 00:37:38 +0200

Oh good grief, thank you very much. Right that problems fixed, but now I have this error when the pane first loads.

Sorry, to keep asking what I imagine are pretty basic questions. I've been trying to get clues online, but to no avail.

This is my error message:
2008-10-24 00:30:44.604 System Preferences[1164:10b] Tried to set an object of class NSCFArray for filter predicate of a controller <NSArrayController: 0xeaa4630>[object class: printer, number of selected objects: 0]
2008-10-24 00:30:47.855 System Preferences[1164:10b] [NSPrefPaneBundle instantiatePrefPaneObject] (/Users/adam/Library/PreferencePanes/ Wopol.prefPane): should only be called once



Here's my WopolPref.m file at the moment. #import "WopolPref.h"


@implementation WopolPref

- (id)initWithBundle:(NSBundle *)bundle
{
    if (![super initWithBundle:bundle]) return nil;
	appID = CFSTR("uk.co.pennynet.Wopol");
	servers=[[NSMutableArray alloc] init];
	printers=[[NSMutableArray alloc] init];
	broadcastIP= @"255.255.255.255";
    return self;
}

- (void) mainViewDidLoad
{
CFPropertyListRef value;
/*Initialise the broadcastIP textfield*/
value=CFPreferencesCopyAppValue( CFSTR("broadcastIP"), appID);
if (value && CFGetTypeID(value) == CFStringGetTypeID()) [broadcastIP setStringValue:(NSString *)value];
else [broadcastIP setStringValue:(NSString *)@"255.255.255.255"];


	/*Initialise the printers array*/

	/*Initialise the servers array*/

	/*release the value*/
	if (value) CFRelease(value);
}

- (void) setPrinters:(NSMutableArray *)a;
{
//Method for adding a new printer, with connected server and printer URI to the printers dict
if (a==printers) return;
[a retain];
[printers release];
printers = a;
}


- (void) setServers:(NSMutableArray *)a;
{
	//Method for adding a new server, with mac address to the servers dict
	if (a==servers) return;
	[a retain];
	[servers release];
	servers = a;
}

@end


[NSPrefPaneBundle instantiatePrefPaneObject]

2008-10-24 00:30:44.604 System Preferences[1164:10b] Tried to set an object of class NSCFArray for filter predicate of a controller <NSArrayController: 0xeaa4630>[object class: printer, number of selected objects: 0]
2008-10-24 00:30:47.855 System Preferences[1164:10b] [NSPrefPaneBundle instantiatePrefPaneObject] (/Users/adam/Library/PreferencePanes/ Wopol.prefPane): should only be called once
On Oct23, 2008, at 11:18 PM, glenn andreas wrote:



On Oct 23, 2008, at 4:10 PM, Adam Penny wrote:

Nope, I've triple checked the bindings and they're fine, but I do have two table views in two different tab views in my prefpane window, could that be causing some issues with their respective array controllers getting mixed up?

Adam

ADPServer has the keys
name
mac

ADPPrinter has the keys
name
host
uri

The source code you showed us had: @implementation ADPPrinter ... @synthesize name; @synthesize server; @synthesize uri; @end

Note that the source says "server" and not "host" (which is what the runtime is looking for)


Glenn Andreas email@hidden <http://www.gandreas.com/> wicked fun! Cardographer | the custom playing card designer



_______________________________________________

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


References: 
 >Debugging preference pane (From: Adam Penny <email@hidden>)
 >Re: Debugging preference pane (From: Nick Zitzmann <email@hidden>)
 >Re: Debugging preference pane (From: Adam Penny <email@hidden>)
 >Re: Debugging preference pane (From: Nick Zitzmann <email@hidden>)
 >Re: Debugging preference pane (From: Adam Penny <email@hidden>)
 >Re: Debugging preference pane (From: glenn andreas <email@hidden>)

  • Prev by Date: Re: /Library/Logs vs. user/Library/Logs
  • Next by Date: Re: Mouse Coalescing
  • Previous by thread: Re: Debugging preference pane
  • Next by thread: Re: Debugging preference pane
  • Index(es):
    • Date
    • Thread