Article View: borland.public.jbuilder.java.language
Article #7401Re: cut copy & paste issue
From: Michael Rachow
Date: Thu, 21 Jun 2001 08:03
Date: Thu, 21 Jun 2001 08:03
54 lines
2788 bytes
2788 bytes
Not a complete answer, but .. To a certain degree JBuilder dynamically executes your code, especially when entering design mode. There are constellations in code where JBuilder cannot excute while parsing it. The code is still legal will compile and run. Michael "dnoyeB" <lamont_gilbert @ rigidsoftware.com> schrieb im Newsbeitrag news:3b30f697_2@dnews... > I am using the actions from the defaulteditorkit to invoke the cut copy and > paste functions on my JTextComponent. > > The issue is how do I pass these objects to the actions without JBuilder > complaining about not being able to get a live object out? > > I get this error > Failed to create live value from new DefaultEditorKit.CutAction() in > JBCut.setAction( new DefaultEditorKit.CutAction()) > > If I have > DefaultEditorKit.CutAction cutAction; > I get this > Failed to create live value from cutAction in JMICut.setAction(cutAction) > > If I use this > Action pasteAction = new DefaultEditorKit.PasteAction(); > JButton.setAction(pasteAction); > I get this > Class or public constructor for the class not found: new > DefaultEditorKit.PasteAction() > Failed to create live value from new DefaultEditorKit.PasteAction() in > Action pasteAction = new DefaultEditorKit.PasteAction(); > > > The only way it works is for me to instantiate into a variable of its own > type > DefaultEditorKit.PasteAction pasteAction = new > DefaultEditorKit.PasteAction(); > then pass it into the button > JButton.setAction(pasteAction); > > This works fine, but Why doesent the first one work fine? It will compile > and run fine, but JBuilder complains during the compilation(though it > completes fine) > > > I suppose this has something to do with JBuilder not being able to get to > the public static inner class to instantiate it? > > > Anyone know? > >
Technical Details
Message-ID:
<3b31ae1f_1@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!netnews.com!news2.euro.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!t-online.de!news1.dtag.de!news.stgl.sel.alcatel.de!news.stgl.sel.alcatel.de!dnewsReferences:
<3b30f697_2@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,7da1fe556bbe85d6 X-Google-Attributes: gidf74b3,public X-Google-ArrivalTime: 2001-06-21 01:36:24 PST From: "Michael Rachow" <mrachow@BeraCom.de> Newsgroups: borland.public.jbuilder.java.language References: <3b30f697_2@dnews> Subject: Re: cut copy & paste issue Date: Thu, 21 Jun 2001 10:03:30 +0200 Lines: 56 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 NNTP-Posting-Host: 217.80.7.19 Message-ID: <3b31ae1f_1@dnews> X-Trace: dnews 993111583 217.80.7.19 (21 Jun 2001 01:19:43 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!netnews.com!news2.euro.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!t-online.de!news1.dtag.de!news.stgl.sel.alcatel.de!news.stgl.sel.alcatel.de!dnews