FeaturesPluginsDocs & SupportCommunityPartners

NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

force a type on variable/class property

 
Post new topic   Reply to topic    NetBeans Forums -> PHP Users
View previous topic :: View next topic  
Author Message
ziad



Joined: 10 Mar 2009
Posts: 20

PostPosted: Fri Apr 17, 2009 11:56 am    Post subject: force a type on variable/class property Reply with quote

Hi,

Can anyone tell me how I force NB to use a particular class type for a variable or class property so that I can use code completion?

I looked for this on the forum but couldn't find anything.

Thanks.
Ziad
Back to top
View user's profile Send private message
Yannick Mortier
Posted via mailing list.





PostPosted: Fri Apr 17, 2009 3:51 pm    Post subject: force a type on variable/class property Reply with quote

2009/4/17 ziad <address-removed>:
Quote:
Hi,



Can anyone tell me how I force NB to use a particular class type for a variable or class property so that I can use code completion?



I looked for this on the forum but couldn't find anything.



Thanks.

Ziad












I know I could manage this with a PHPDoc Comment... Though I couldn't
reproduce it at the moment.
Seems like this is a bug in the development build that I just use, but
try to write something above the declaration of the variable like:

/*
* @var type
*/

Where type is the type the variable should have. I really can remember
that NetBeans did parse this. I must do some research and download the
latest nightly build.



--
Currently developing a browsergame...
http://www.p-game.de
Trade - Expand - Fight

Follow me on twitter!
http://twitter.com/moortier
Back to top
ziad



Joined: 10 Mar 2009
Posts: 20

PostPosted: Tue Apr 28, 2009 10:43 am    Post subject: Re: force a type on variable/class property Reply with quote

Hi Yannic,

Thanks for your reply. I tried that but it didn't work. Any other suggestions anyone?

Yannick Mortier wrote:
2009/4/17 ziad <address-removed>:
Quote:
Hi,



Can anyone tell me how I force NB to use a particular class type for a variable or class property so that I can use code completion?



I looked for this on the forum but couldn't find anything.



Thanks.

Ziad












I know I could manage this with a PHPDoc Comment... Though I couldn't
reproduce it at the moment.
Seems like this is a bug in the development build that I just use, but
try to write something above the declaration of the variable like:

/*
* @var type
*/

Where type is the type the variable should have. I really can remember
that NetBeans did parse this. I must do some research and download the
latest nightly build.



--
Currently developing a browsergame...
http://www.p-game.de
Trade - Expand - Fight

Follow me on twitter!
http://twitter.com/moortier
Back to top
View user's profile Send private message
Tomas Mysik
Posted via mailing list.





PostPosted: Tue Apr 28, 2009 11:05 am    Post subject: force a type on variable/class property Reply with quote

Hi,

Dne úterý 28 dubna 2009 12:43:19 ziad napsal(a):
Quote:
Thanks for your reply. I tried that but it didn't work. Any other
suggestions anyone?

if this [1] does not work for you, please, file an issue [2].

Thanks.
Tomas
[1] http://blogs.sun.com/netbeansphp/entry/defining_a_variable_type_in
[2] http://www.netbeans.org/community/issues
--
Tomas Mysik
address-removed
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> PHP Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB