Re: Value transformers and app delegates
Re: Value transformers and app delegates
- Subject: Re: Value transformers and app delegates
- From: James Dessart <email@hidden>
- Date: Tue, 21 Dec 2004 11:11:51 -0500
On Tue, 21 Dec 2004 09:33:56 -0600, Brendan Younger <email@hidden> wrote:
> That's correct. NSApp will load your nib before
> -(void)applicationDid/WillFinishLaunching is ever called. To be
> absolutely sure that your transformer is registered, you can call
> [NSValueTransformer setValueTransformer:forName:] in your main()
> function, before the call to NSApplicationMain(), or you can override
> +(void)initialize in your application's delegate and register it there.
Thanks, I took the second option. However now it seems to fail with
the following exception:
2004-12-21 11:08:44.139 AdminTool[1069] *** Uncaught exception:
<NSInternalInconsistencyException> Cannot create BOOL from object ()
of class NSCFArray
My value transformer returns NSNumber as the transformedValueClass,
and the enabled attribute of a button is bound to the selectedObjects
array of an NSArrayController. Well, it's more than one button, but
I'm guessing that any one of those could be causing the exception.
Thanks again,
James
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden