 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Jonathan Starr Guest
|
Posted: Fri Jun 24, 2005 4:27 pm Post subject: TEdit |
|
|
I have a TEdit on a form, with an initial Text set using the
form designer. When I run my program in the IDE and refer
to the Text field of the TEdit, i.e., myTEdit->Text->c_str (),
the value returned is al3ways junk, even if I have repeatedly
typed in a new value on the form. However if I force the
debugger, at a breakpoint, to display the value of myTEdit->Text,
then the correct value is shown, and is also read by the program.
If I run without the IDE, I can never get the value to be read.
Any suggestions?
|
|
| Back to top |
|
 |
Jonathan Starr Guest
|
Posted: Fri Jun 24, 2005 4:40 pm Post subject: Re: TEdit |
|
|
Jonathan Starr wrote:
| Quote: | I have a TEdit on a form, with an initial Text set using the
form designer. When I run my program in the IDE and refer
to the Text field of the TEdit, i.e., myTEdit->Text->c_str (),
the value returned is al3ways junk, even if I have repeatedly
typed in a new value on the form. However if I force the
debugger, at a breakpoint, to display the value of myTEdit->Text,
then the correct value is shown, and is also read by the program.
If I run without the IDE, I can never get the value to be read.
Any suggestions?
|
Additional info: If i create a new AnsiString based on the TEdit,
then everything works.
In other words, where Cindex is the TEdit, this fails:
char_p ptr = Cindex->Text.c_str ();
and this works:
AnsiString * foo = new AnsiString(Cindex->Text);
char_p ptr = foo->c_str ();
Some other TEdits on the same form work just fine.
|
|
| Back to top |
|
 |
|
|
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
|
|