🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #1115

NullPointerException in GUI builder when class hierarchy contains an abstract class

#1115
From: Jan Sundin
Date: Tue, 06 Apr 2004 10:15
31 lines
2669 bytes
Hi
I�m trying to migrate code from an existing user interface to JBuilder X. I have encountered a problem that I have tracked down to the following:
My class hierarchy typically has an abstract super class that extends JInternalFrame. This class adds some behaviour (both visual and nonvisual). Editing this abstract class in the gui builder works fine (impressive, wouldn�t have expected that to work). 

Now, the problem is that concrete _subclasses_ to the abstract class are not editable in the gui-builder! When trying to show them in the editor the following message is displayed in the Designer-message panel:

Failed to create live instance for variable 'this'. null
class java.lang.NullPointerException null

To �stdout� the following stacktrace is printed:
java.lang.NullPointerException
        at com.borland.jbuilder.designer.ui.ModelNode.<init>(Unknown Source)
        at com.borland.jbuilder.designer.ui.Model.<init>(Unknown Source)
        at com.borland.jbuilder.designer.ui.UIDesigner.annotate(Unknown Source)
        at com.borland.jbuilder.designer.DesignerManager.a(Unknown Source)
        at com.borland.jbuilder.designer.DesignerViewer.openImpl(Unknown Source)
        at com.borland.jbuilder.designer.DesignerViewer.open(Unknown Source)
        at com.borland.jbuilder.designer.DesignerViewer.changeUrl(Unknown Source)
        at com.borland.jbuilder.designer.DesignerViewer.viewerActivated(Unknown Source)
        at com.borland.jbuilder.designer.h.run(Unknown Source)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
�..

Making the super-class concrete makes the problem disaapear but that will force me to redesign my existing classhierarcy. Is this a bug? 

I�m using JBuilder (Developer Trial) 10.0.176.0

TIA,

Jan Sundin
Technical Details
Message-ID: <40727548$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!newsrout1.ntli.net!news.ntli.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 111d45,927d5a3b0bc0ff14,start
X-Google-Attributes: gid111d45,public
X-Google-ArrivalTime: 2004-04-06 02:39:28 PST
From: "Jan Sundin" <jan@sundin.com>
Sender: "Jan Sundin" <jan@sundin.com>
Reply-To: "Jan Sundin" <jan@sundin.com>
Subject: NullPointerException in GUI builder when class hierarchy contains an abstract class
Newsgroups: borland.public.jbuilder.java.swing
X-User-Info: 156.49.126.246     
NNTP-Posting-Host: 207.105.83.66
Message-ID: <40727548$1@newsgroups.borland.com>
Date: 6 Apr 2004 02:15:52 -0800
X-Trace: newsgroups.borland.com 1081242952 207.105.83.66 (6 Apr 2004 02:15:52 -0800)
Lines: 32
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!newsrout1.ntli.net!news.ntli.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail