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 58042 - cannot save my code
Summary: cannot save my code
Status: RESOLVED WORKSFORME
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 4.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-19 15:03 UTC by otan
Modified: 2005-04-21 09:12 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
the log file (100.76 KB, text/plain)
2005-04-19 15:05 UTC, otan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description otan 2005-04-19 15:03:03 UTC
WTF! I cannot save my code. File>Save , Ctrl+S , the save icon, run command... I
tried all of that but still, I can't save my code.

There is an existing java code which I created using the form editor of netbeans 4.1

I opened it and edited it using netbeans 4.1.

When I was saving the file, jaraaannn! WTF! I cannot save it!

What I just did was to copy my source code, opened a text editor, pasted my
source and save it.  And my code was finally saved... but using another
application. :(
Comment 1 otan 2005-04-19 15:05:02 UTC
Created attachment 21727 [details]
the log file
Comment 2 Marian Mirilovic 2005-04-19 16:04:08 UTC
reassigne to form for investigation, ..  at least there is ClassCastException
from form module ...
Comment 3 Tomas Pavek 2005-04-19 17:01:18 UTC
Interesting bug. Are you able to reproduce it? Have you edited some property of
Dimension type?
Comment 4 otan 2005-04-20 03:30:13 UTC
I have figured out the cause of the problem. It's a human error.
.......
There was an instance of a JPanel (jp1) I created using the form editor.
And there was another instance of Jpanel (jp2) I created by hand-coding.

At the code section of the properties window, I put a piece of code at the
"Post-Init Code" field:

jp1 = jp2;

That was the only edition I made to my code using the form editor and the rest
was adding code to the source.

I think the problem was in the form editor when I assigned the jp1 to another
object.  Maybe, I did a foolishness assigning jp1 to jp2, but there should be an
error report somewhere telling me the error, something like, "Operation not
permitted! assigning a variable generated by the form editor to another
object.".  So that foolish like me will not do it again and this kind of error
will be prevented.
--------------------
I don't know if I'm correct.
Comment 5 Tomas Pavek 2005-04-21 09:12:47 UTC
This does not seem to be related. You can write anything into the "code"
properties, it's on you to provide reasonable code. Form editor does not care
about it, it is treated as a text string, so it cannot cause any problems in
form editor if you write something "bad" here. You just may have problems when
compiling or running the code.

The problem that prevent you from saving the form is different. Accoridng to the
exceptions found in the log, there was a bad value in some property of Dimension
type - so some size like e.g. preferred size. Haven't you edited some? It is a
bug that the bad value got there (code string used instead of real Dimension
object), but it is not clear how it could happen. I'm not able to reproduce it.
So closing this report as WORKSFORME. If you find a way we could reproduce the
bug then please reopen this issue. Thanks.