In a previous version of ofxUI I could change the value of a Text Input box via code using the following:
char mratioStr[16];
sprintf(mratioStr, "%i/%i", mcol, mrow);
((ofxUITextInput*) guiSC->getWidget("TEXT INPUT"))->setTextString(mratioStr);
Since updating to oF8.4 and the newest version of ofxUI I can't seem to get this code to work... or any other code e.g.
Hi
In a previous version of ofxUI I could change the value of a Text Input box via code using the following: char mratioStr[16]; sprintf(mratioStr, "%i/%i", mcol, mrow); ((ofxUITextInput*) guiSC->getWidget("TEXT INPUT"))->setTextString(mratioStr);
Since updating to oF8.4 and the newest version of ofxUI I can't seem to get this code to work... or any other code e.g.
string mRatioFractionString = "TEST"; mRatioFractionWidget->setTextString(mRatioFractionString);
where I've declared this elsewhere in the code:
ofxUITextInput *mRatioFractionWidget; mRatioFractionWidget = new ofxUITextInput("TEXT INPUT", "1/1", 60, 25);
oF consistently breaks at line 393 of ofxUITextInput.cpp textstring = ""; with an error: Thread 1: EXC_BAD_ACCESS (code = 1, address = 0x8c)
I've been banging my head against this a while... any advice appreciated.
Best
Prodical