> In my dialog panel, I have a PoXtEditTextData *hitFile. I would like to
> allow the user to set this from the command line, so I need to use
> hitFile->setString("fileName"); but this leaves the field on the panel
> blank. What am I doing wrong? FWIW, I am using 3DMS 3.5 on RedHat
> 6.1.1.
I thought I had seen this work in one of our demo programs
and I was right, but there is a strange twist. The actual
behavior may indicate a bug, but at least you'll have a
fairly simple work-around.
I noticed that we create the editText field like this:
PoXtEditTextData *pText =
new PoXtEditTextData( "Label", "Initial string", 20 );
dlgElements[FIELD_ID] = pText;
but calling pText->setString() has no effect. What
does work, is this code in the dialog callback function:
dialogCallback( void *user_data,
PoXtDialog::PoXtDialogDataCB * data) {
...
PoXtEditTextData *pText2 =
(PoXtEditTextData*)data->dialog->get1Value(FIELD_ID);
pText2->setString( "New string" );
The really strange thing is that the pText and pText2
pointers do not contain the same value. Oh well.
Hope this helps.
-Mike
TGS Inc, http://www.tgs.com