Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » Of two conflicting lines, the wrong (=first) one wins?
Of two conflicting lines, the wrong (=first) one wins? [message #105516] Wed, 07 September 2005 16:34 Go to next message
Carsten Lergenmüller is currently offline Carsten LergenmüllerFriend
Messages: 9
Registered: July 2009
Junior Member
Hi,

if I add a Swing Button to Visual Form and modify its getter like shown
below, the preview shows the button text to be "Buggy", although running
the code would yield "Correct". I suspect this to be a bug in my VE 1.1.0.1.

/**
* This method initializes jButton
*
* @return javax.swing.JButton
*/
private JButton getJButton() {
if (jButton == null) {
jButton = new JButton();
jButton.setText("Buggy");
jButton.setText("Correct");
}
return jButton;
}

Why am I doing this? I'm not - in reality I'm first setting a definition
which initializes the button's text to a default value, and in the next
line I (sometimes) want to override this default. However, my override
is discarded and only the first modification to the button text is
respected. My code looks like this:

/**
* This method initializes jButton
*
* @return javax.swing.JButton
*/
private SpecialJButton getJButton() {
if (jButton == null) {
jButton = new SpecialJButton();

//setDefinitionId() calls setText("Default");
jButton.setDefinitionId("Button_Type_42");

//follwing line should override, but doesn't
jButton.setText("Override");
}
return jButton;
}

Any hints? Am I doing something wrong? Should I file a bug?

Thanks for the help,
Carsten
Re: Of two conflicting lines, the wrong (=first) one wins? [message #106332 is a reply to message #105516] Tue, 13 September 2005 08:03 Go to previous messageGo to next message
Carsten Lergenmüller is currently offline Carsten LergenmüllerFriend
Messages: 9
Registered: July 2009
Junior Member
Carsten Lergenmüller wrote:

> Any hints? Am I doing something wrong? Should I file a bug?

For anyone interested in this, this issue has be filed as Bug 109364, so
see
https://bugs.eclipse.org/bugs/show_bug.cgi?id=109364
for details.

Bye,
Carsten
Re: Of two conflicting lines, the wrong (=first) one wins? [message #106388 is a reply to message #106332] Tue, 13 September 2005 12:40 Go to previous message
Srimanth  is currently offline Srimanth Friend
Messages: 225
Registered: July 2009
Senior Member
Hi Carsten,
That defect has two parts to it. The first part is a known problem with
VE not parsing duplicate expressions correctly, for which
https://bugs.eclipse.org/bugs/show_bug.cgi?id=49464 exists. The second
problem however has to do with VE applying the properties on the remote
VM in an order different from the source - basically
jButton.setText("Override");
was being applied before
jButton.setDefinitionId("Button_Type_42");
and because of this you loose the override. I update the defect text to
reflect this.
Regards,
Sri.

Carsten Lergenmüller wrote:
> Carsten Lergenmüller wrote:
>
>> Any hints? Am I doing something wrong? Should I file a bug?
>
>
> For anyone interested in this, this issue has be filed as Bug 109364, so
> see
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=109364
> for details.
>
> Bye,
> Carsten
Re: Of two conflicting lines, the wrong (=first) one wins? [message #610746 is a reply to message #105516] Tue, 13 September 2005 08:03 Go to previous message
Carsten Lergenmüller is currently offline Carsten LergenmüllerFriend
Messages: 9
Registered: July 2009
Junior Member
Carsten Lergenmüller wrote:

> Any hints? Am I doing something wrong? Should I file a bug?

For anyone interested in this, this issue has be filed as Bug 109364, so
see
https://bugs.eclipse.org/bugs/show_bug.cgi?id=109364
for details.

Bye,
Carsten
Re: Of two conflicting lines, the wrong (=first) one wins? [message #610750 is a reply to message #106332] Tue, 13 September 2005 12:40 Go to previous message
Srimanth  is currently offline Srimanth Friend
Messages: 225
Registered: July 2009
Senior Member
Hi Carsten,
That defect has two parts to it. The first part is a known problem with
VE not parsing duplicate expressions correctly, for which
https://bugs.eclipse.org/bugs/show_bug.cgi?id=49464 exists. The second
problem however has to do with VE applying the properties on the remote
VM in an order different from the source - basically
jButton.setText("Override");
was being applied before
jButton.setDefinitionId("Button_Type_42");
and because of this you loose the override. I update the defect text to
reflect this.
Regards,
Sri.

Carsten Lergenmüller wrote:
> Carsten Lergenmüller wrote:
>
>> Any hints? Am I doing something wrong? Should I file a bug?
>
>
> For anyone interested in this, this issue has be filed as Bug 109364, so
> see
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=109364
> for details.
>
> Bye,
> Carsten
Previous Topic:Extending VE - modify the way the root is generated
Next Topic:Editor cannot be changed at this time
Goto Forum:
  


Current Time: Thu Apr 25 17:18:09 GMT 2024

Powered by FUDForum. Page generated in 0.03289 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top