Skip to main content



      Home
Home » Newcomers » Newcomers » How to access property.
How to access property. [message #239615] Fri, 02 November 2007 16:49 Go to next message
Eclipse UserFriend
hi,
I am new in Eclipse GMF. I want to access the property of a node Task(the
name property of Task) to write in a file. I tried to access in following
way:

String n="";
Task t=null;
n=t.getName();
fileWriter.write(n);

can any one help me in this regard
thanks in advance.
Noor
Re: How to access property. [message #239625 is a reply to message #239615] Fri, 02 November 2007 16:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wegener.cboenospam.com

Unless getName() is a static method, this is going to generate a
NullPointerException at run time. You need to assign t to an actual Task
instance.

"Noor" <nhlangrial@yahoo.com> wrote in message
news:54f86b98fcdeed4d200a9418bc469c5a$1@www.eclipse.org...
> hi,
> I am new in Eclipse GMF. I want to access the property of a node Task(the
> name property of Task) to write in a file. I tried to access in following
> way:
>
> String n="";
> Task t=null;
> n=t.getName();
> fileWriter.write(n);
>
> can any one help me in this regard
> thanks in advance.
> Noor
>
Re: How to access property. [message #239644 is a reply to message #239625] Sat, 03 November 2007 09:08 Go to previous message
Eclipse UserFriend
Hi,
thanks for the reply. if you can give me a hint how I can assign Task t to
an actual instance? it will be better if you explain it with example.

Thank you very much for your interest
Previous Topic:javadoc for plug-in not working
Next Topic:Installation - Java and C++
Goto Forum:
  


Current Time: Tue Jul 22 15:40:32 EDT 2025

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

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

Back to the top