• 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: Value transformers and app delegates
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Value transformers and app delegates


  • Subject: Re: Value transformers and app delegates
  • From: Johan Kool <email@hidden>
  • Date: Sun, 16 Jan 2005 17:59:44 +0100

On Tue, 21 Dec 2004 11:11:51 -0500, James Dessart <email@hidden> wrote:
> 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
>

Hello,

I ran into the same problem. My app delegate's +(void)initialize
method was too late to register the value transformer that was used in
the nib that was loaded on startup. Registering before
NSApplicationMain() works, but it doesn't seem like the right way to
me. Is this a bug in Cocoa?

Thanks,

Johan Kool
 _______________________________________________
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

  • Follow-Ups:
    • Re: Value transformers and app delegates
      • From: mmalcolm crawford <email@hidden>
  • Prev by Date: Re: NSFileManager, 10.3.x and /tmp: bug?
  • Next by Date: Re: NSFileManager, 10.3.x and /tmp: bug?
  • Previous by thread: Copy Files build phase
  • Next by thread: Re: Value transformers and app delegates
  • Index(es):
    • Date
    • Thread