[EuGENia | EOL] Adding new label problem [message #482899] |
Fri, 28 August 2009 09:44  |
Eclipse User |
|
|
|
Hello,
I'm trying to add a new label to the compartment of XXX node. But it is
not working out.
var label = new GmfGraph!Label("temp");
CompartmentFigure.children.add(label);
If I do this then it allows me to all blank label where I want but, when
I try to add name and text to label it is not working.
var label = new GmfGraph!Label;
label.name = "RuleNacsCompartmentFigureLabel";
label.text = "NACs Compartment";
CompartmentFigure.children.add(label);
Please help me with this.
Many thanks,
Mihir
|
|
|
|
{solved} [EuGENia | EOL] Adding new label problem [message #482941 is a reply to message #482907] |
Fri, 28 August 2009 11:35  |
Eclipse User |
|
|
|
Hi Dimitris,
Thanks for your help.
Actually I was just experimenting with the constructor if it works and
so I forgot to remove it while pasting that bit of code here in the post. :)
After changing "" to '', it works fine.. :)
Thanks a million,
Mihir
Dimitris Kolovos wrote:
> Hi Mihir,
>
> EOL doesn't support constructors with parameters for model elements such
> as GmfGraph!Label("temp").
>
> Also, in EOL strings are placed within '' (support for "" will be added
> in the next version) so you should try:
>
> var label = new GmfGraph!Label;
> label.name = 'RuleNacsCompartmentFigureLabel';
> label.text = 'NACs Compartment';
> CompartmentFigure.children.add(label);
>
> Cheers,
> Dimitris
>
> Mihir wrote:
>> Hello,
>>
>> I'm trying to add a new label to the compartment of XXX node. But it
>> is not working out.
>>
>>
>> var label = new GmfGraph!Label("temp");
>> CompartmentFigure.children.add(label);
>>
>> If I do this then it allows me to all blank label where I want but,
>> when I try to add name and text to label it is not working.
>>
>> var label = new GmfGraph!Label;
>> label.name = "RuleNacsCompartmentFigureLabel";
>> label.text = "NACs Compartment";
>> CompartmentFigure.children.add(label);
>>
>>
>> Please help me with this.
>>
>> Many thanks,
>> Mihir
>
>
|
|
|
Re: [EuGENia | EOL] Adding new label problem [message #579841 is a reply to message #482899] |
Fri, 28 August 2009 09:47  |
Eclipse User |
|
|
|
Hi Mihir,
EOL doesn't support constructors with parameters for model elements such
as GmfGraph!Label("temp").
Also, in EOL strings are placed within '' (support for "" will be added
in the next version) so you should try:
var label = new GmfGraph!Label;
label.name = 'RuleNacsCompartmentFigureLabel';
label.text = 'NACs Compartment';
CompartmentFigure.children.add(label);
Cheers,
Dimitris
Mihir wrote:
> Hello,
>
> I'm trying to add a new label to the compartment of XXX node. But it is
> not working out.
>
>
> var label = new GmfGraph!Label("temp");
> CompartmentFigure.children.add(label);
>
> If I do this then it allows me to all blank label where I want but, when
> I try to add name and text to label it is not working.
>
> var label = new GmfGraph!Label;
> label.name = "RuleNacsCompartmentFigureLabel";
> label.text = "NACs Compartment";
> CompartmentFigure.children.add(label);
>
>
> Please help me with this.
>
> Many thanks,
> Mihir
--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
|
|
|
{solved} [EuGENia | EOL] Adding new label problem [message #579858 is a reply to message #482907] |
Fri, 28 August 2009 11:35  |
Eclipse User |
|
|
|
Hi Dimitris,
Thanks for your help.
Actually I was just experimenting with the constructor if it works and
so I forgot to remove it while pasting that bit of code here in the post. :)
After changing "" to '', it works fine.. :)
Thanks a million,
Mihir
Dimitris Kolovos wrote:
> Hi Mihir,
>
> EOL doesn't support constructors with parameters for model elements such
> as GmfGraph!Label("temp").
>
> Also, in EOL strings are placed within '' (support for "" will be added
> in the next version) so you should try:
>
> var label = new GmfGraph!Label;
> label.name = 'RuleNacsCompartmentFigureLabel';
> label.text = 'NACs Compartment';
> CompartmentFigure.children.add(label);
>
> Cheers,
> Dimitris
>
> Mihir wrote:
>> Hello,
>>
>> I'm trying to add a new label to the compartment of XXX node. But it
>> is not working out.
>>
>>
>> var label = new GmfGraph!Label("temp");
>> CompartmentFigure.children.add(label);
>>
>> If I do this then it allows me to all blank label where I want but,
>> when I try to add name and text to label it is not working.
>>
>> var label = new GmfGraph!Label;
>> label.name = "RuleNacsCompartmentFigureLabel";
>> label.text = "NACs Compartment";
>> CompartmentFigure.children.add(label);
>>
>>
>> Please help me with this.
>>
>> Many thanks,
>> Mihir
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.24077 seconds