• 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: [Cocoa-Java] Seeking some explanations around an NotSerializableException
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Cocoa-Java] Seeking some explanations around an NotSerializableException


  • Subject: Re: [Cocoa-Java] Seeking some explanations around an NotSerializableException
  • From: Frédéric BLANC <email@hidden>
  • Date: Mon, 24 Jan 2005 19:52:32 +0100

Hi Glen, and thanks for your help.

> > In a Java-based Cocoa application, I now receive a
> > java.io.NotSerializableException at runtime when invoking the standard
> > "Customize Toolbar…" action :( ! (...)
> What class is not serializable?
I've been told that my custom toolbar controller isn't (it's named...
"ToolbarController" :) !)

> Are you writing to an OutputStream anywhere?
Nope. But something involved in the "Customize Toolbar..." action
may.. (See log below.)

> A posting a stacktrace (...) [may help find the problem]
Here's the Xcode Tools log:
2005-01-24 19:38:13.988 MyApp[450] java/io/NotSerializableException:
com.domain.myapp.ToolbarController
Stack Trace:
java.io.NotSerializableException: com.domain.myapp.ToolbarController
	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
	at com.apple.cocoa.foundation.NSObject.clone(Native Method)
	at com.apple.cocoa.foundation.NSObject.clone(NSObject.java:57)
Note: I hadn't put the trace in my former post since I'm not sure it helps :( !

> and the offending selection of code may help find the problem.
I haven't written anything strange; removing my menuNeedsUpdate()
implementation (this was the sole code added) still exposed this
behaviour. (And it worked flawlessly until I add a ToolbarController
instance as the delegate of the "menu" data member of my
NSPopUpButton-based toolbar item.)

If you're willing to dig a little (thx!), I may build a concise Xcode
project to illustrate the situation; it would be easier for anyone to
see what's happening here…

Thanks in advance,


— Frédéric BLANC (email@hidden)
 _______________________________________________
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

References: 
 >[Cocoa-Java] Seeking some explanations around an NotSerializableException (From: Frédéric BLANC <email@hidden>)

  • Prev by Date: Re: Managing multiple nibs
  • Next by Date: Re: Capturing 'pageup' and 'pagedown' keys in NSTextField
  • Previous by thread: [Cocoa-Java] Seeking some explanations around an NotSerializableException
  • Next by thread: Re: [Cocoa-Java] Seeking some explanations around anNotSerializableException
  • Index(es):
    • Date
    • Thread