Article View: borland.public.jbuilder.java.language
Article #7466cut copy & paste issue
From: dnoyeB
Date: Wed, 20 Jun 2001 18:03
Date: Wed, 20 Jun 2001 18:03
42 lines
2197 bytes
2197 bytes
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:
<3b30f697_2@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnewsShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,7da1fe556bbe85d6,start X-Google-Attributes: gidf74b3,public X-Google-ArrivalTime: 2001-06-20 12:32:59 PST From: "dnoyeB" <lamont_gilbert @ rigidsoftware.com> Newsgroups: borland.public.jbuilder.java.language Subject: cut copy & paste issue Date: Wed, 20 Jun 2001 14:03:07 -0400 Lines: 44 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: 63.68.196.49 Message-ID: <3b30f697_2@dnews> X-Trace: dnews 993064599 63.68.196.49 (20 Jun 2001 12:16:39 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews