Re: EC subclass constructor trouble

Gary Teter <[email protected]>
Newsgroups gmane.comp.web.webobjects.devel
Message-ID <[email protected]>
Is it possible that the user is temporary (hasn't been saved yet)?  
You can't localize a fault for an object with a temporary globalID  
into another ec.

On Mar 29, 2006, at 11:28 AM, Zak Burke wrote:

> I have an EC class that extends EOEditingContext. Occasionally,  
> when creating a child EC of an existing EC, I get a NPE on the last  
> line of the constructor (see below). Any idea how that is possible?  
> I'm at a loss.
>
> init() is not a likely culprit; all it does is a single call to  
> super.setMessageHandler().
>
> zak.
>
>
> public I3pkbEditingContext(Session s, EOEditingContext ec)
> {
>     super(ec);
>     init();
>     User u = s.user();
>     if (u != null)
>         this.user = (User) EOUtilities.localInstanceOfObject(this, u);
> }

-- 
WireHose: Smart metadata and personalization for WebObjects.
http://www.wirehose.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.