This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 185791 - Cut (and paste) of UI elements doesn't work
Summary: Cut (and paste) of UI elements doesn't work
Status: RESOLVED DUPLICATE of bug 111311
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Natural Layout (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 normal (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-09 04:23 UTC by xandrani
Modified: 2010-05-11 09:30 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description xandrani 2010-05-09 04:23:39 UTC
Cut and paste doesn't seem to work.

I had to copy and paste, but when I did the variable names of the new elements were the same as the copied ones but with the digit '1' appended (which of course for copying is logical).

I then deleted the original UI elements, but now the references in the code to the original UI elements failed (as the '1' was missing... obviously).

This is why the cut and paste feature is important as it would put them in the clipboard without appending the '1' (or whatever number), so that when they were pasted elsewhere the original code would still work.
Comment 1 Jan Stola 2010-05-10 09:31:52 UTC
I am sorry, I am not able to reproduce this issue. Could you, please, provide more details. It would be great to describe _exact_ steps to reproduce and/or attach a reproducible test-case. Thank you in advance.

> I then deleted the original UI elements, but now the references
> in the code to the original UI elements failed (as the '1' was
> missing... obviously).

It is not clear what references you speak about. It seems that some details are missing in the description of this problem. Please, elaborate.
Comment 2 xandrani 2010-05-10 10:01:28 UTC
OK maybe I wasn't clear.  CUT and pasting of elements does not work but COPYING and pasting does.

A 'cut' is equal to a copy then an immediate delete.

Here's some steps to reproduce:
1) Start a new project (Java Desktop Application).
2) Create a button in the FrameView using the GUI Builder.
3) Select the button (left mouse click).
4) Right mouse click the button to bring up the context menu.
5) Select 'cut'.

Notice that the button is not 'cut'.
Comment 3 Jan Stola 2010-05-10 11:44:13 UTC
> 5) Select 'cut'.
>
> Notice that the button is not 'cut'.

What do you mean by 'is not cut'? When you 'cut' a button then nothing happens until you paste it somewhere. So, I am not sure what do you expect to happen just after 'cut'.
Comment 4 Tomas Pavek 2010-05-10 11:59:21 UTC
Note that Cut & Paste moves a component when Paste is invoked on the target container, and keeps its variable name (if done within the same form).
Comment 5 xandrani 2010-05-10 20:06:25 UTC
OK, I'm assuming you've never used 'cut and paste' on a computer before, please see below:

http://en.wikipedia.org/wiki/Cut,_copy,_and_paste#Cut_and_paste

# Visibly, "cut" text immediately disappears from its location. "Cut" files typically change color to indicate that they will be moved.


The button should disappear and be copied in to the clipboard ready for being pasted!  Check out ANY application, they ALL do this.  Do you not understand what 'cut' does!?
Comment 6 Jan Stola 2010-05-11 09:30:40 UTC

*** This bug has been marked as a duplicate of bug 111311 ***