[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [ve-dev] Beans.isDesignTime
|
Hi
Rich,
Is
there another way to prevent code from getting executed in the Target
VM?
In the
following code snippets, even if I am setting the background color under
!isDesignTime, the background is set in the target VM and shown in the model and
property sheet:
private ULCButton getUlcButton() {
if (ulcButton ==
null) {
ulcButton = new
ULCButton();
ulcButton.setText("ULCButton");
if(!Beans.isDesignTime()){
ulcButton.setBackground(Color.red);
}
}
return
ulcButton;
}
----------------------------------------------------------------------------------
private JButton getJButton() {
if (jButton == null)
{
jButton = new
JButton();
jButton.setText("JButton");
if
(!Beans.isDesignTime())
{
jButton.setBackground(Color.red);
}
}
return
jButton;
}
Why is
setBackground being executed?
Thanks
and regards,
Janak
Hi,
The code should not
execute because you said only execute if NOT design time. The target VM will
be marked as design time.
Rich
"Janak Mulani"
<janak.mulani@xxxxxxxxx> Sent by: ve-dev-bounces@xxxxxxxxxxx
08/10/2006 08:12 AM
Please respond
to Discussions people developing code for the Visual Editor
project
<ve-dev@xxxxxxxxxxx> |
|
To
| "ve-Dev@Eclipse. Org"
<ve-dev@xxxxxxxxxxx>
|
cc
|
|
Subject
| [ve-dev]
Beans.isDesignTime |
|
Hi,
In VE, If I put a piece of code under the
condition:
if (!Beans.isDesignTime()) {
code
}
Will the code be executed in the
Target VM?
Is there a way to suppress code from being executed in the
Target VM?
Thanks and
regards,
Janak
_______________________________________________
ve-dev
mailing
list
ve-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ve-dev