Welcome to the Official BlackBerry® Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
Developer
misty83
Posts: 745
Registered: 01-04-2009

what has happend to the TextField?

hi,

i've loaded project on which i was working few monts ago cause i need to update smth. before i did anything i've tried to compile it and got few errors about TextField! i've used it in few places, and now it seems that "the constructor is undefinied". i've checked 4.5 and 4.6 api and there is no constructor for it! what happened? my application was using TextFields and was working fine, what has happened now?

 

 

 

Please use plain text.
Developer
simon_hain
Posts: 10,780
Registered: 07-29-2008
My Carrier: O2 Germany

Re: what has happend to the TextField?

it uses the constructor of the superclass. TextField() or TextField(long style).
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.

peter_strange wrote:
"This process should happen traumatically for you in both JDE and Eclipse."
Please use plain text.
Developer
misty83
Posts: 745
Registered: 01-04-2009

Re: what has happend to the TextField?

i do not understand what's Your point.. there is no TextField() constructor! take a look in the api:

 

http://www.blackberry.com/developers/docs/4.2.1api/net/rim/device/api/ui/component/TextField.html

Please use plain text.
Developer
mantaker
Posts: 1,477
Registered: 12-30-2008

Re: what has happend to the TextField?

In 4.5 API set there are 4 constructors..

 

    public TextField();

 

    public TextField(long);

 

    public TextField(String, String);

 

    public TextField(String, String, int, long); 

 

Cheers... 

--
Manimaran Selvan
Co-Founder, Tech Lead,
Equity Markets Research Group
Please use plain text.
Developer
simon_hain
Posts: 10,780
Registered: 07-29-2008
My Carrier: O2 Germany

Re: what has happend to the TextField?

TextField extends Field.
Field has an empty contructor and one that takes long as an argument.
Ergo TextField has these constructors, too.

How about some "java is not an island" book?
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.

peter_strange wrote:
"This process should happen traumatically for you in both JDE and Eclipse."
Please use plain text.
Developer
misty83
Posts: 745
Registered: 01-04-2009

Re: what has happend to the TextField?

no, there is not!! look, here is 4.5 api for TextField and there are no constructors! also-i've got 4.5 in my eclipse and got an error that "constructor is undefinied"!!
Please use plain text.
Developer
mantaker
Posts: 1,477
Registered: 12-30-2008

Re: what has happend to the TextField?

I couldn't find a single constructor in 4.2.1 though!
--
Manimaran Selvan
Co-Founder, Tech Lead,
Equity Markets Research Group
Please use plain text.
Developer
simon_hain
Posts: 10,780
Registered: 07-29-2008
My Carrier: O2 Germany

Re: what has happend to the TextField?

[ Edited ]

in the 4.2.1 jar

// Method descriptor #647 ()V
public native TextField();


// Method descriptor #653 (J)V
public native TextField(long arg0);

// Method descriptor #655 (Ljava/lang/String;Ljava/lang/String:smileywink:V
public native TextField(java.lang.String arg0, java.lang.String arg1);

// Method descriptor #658 (Ljava/lang/String;Ljava/lang/String;IJ)V
public native TextField(java.lang.String arg0, java.lang.String arg1, int arg2, long arg3);

seems they are not listed in the API doc, that's all. you can use them.

Message Edited by simon_hain on 07-21-2009 11:46 AM
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.

peter_strange wrote:
"This process should happen traumatically for you in both JDE and Eclipse."
Please use plain text.
Developer
misty83
Posts: 745
Registered: 01-04-2009

Re: what has happend to the TextField?

but there was cause i was using it for few months!

 

eh.. do You maybe know how can i replace it? using what? i've tried to use LabelField, but TextField was better, it has-par example "setCursor()" method which i must use. if i use LabelFIeld on a manager and add too much text, then the text would be cut. for a TextField it is nicer-and when i setText() for which there is no space anymore, the text from the up will move up, and the new text is visible-it is like in console.. i hope i wrote clearly what the problem is..

 

 does any of You know how can i replace it?

 

 regards

Please use plain text.
Developer
misty83
Posts: 745
Registered: 01-04-2009

Re: what has happend to the TextField?

simon, but i cannot use them.. constructors are not visible..
Please use plain text.