Skip to content
This repository has been archived by the owner on Dec 1, 2020. It is now read-only.

update ofUITextInput via code #246

Open
Prodical opened this issue Jun 16, 2015 · 0 comments
Open

update ofUITextInput via code #246

Prodical opened this issue Jun 16, 2015 · 0 comments

Comments

@Prodical
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant