COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :
Old 06-23-2016, 03:36 AM   #1
SaschArt
Human being with feelings
 
SaschArt's Avatar
 
Join Date: Aug 2013
Posts: 236
Default SetTextFromPlug generate an error

I try to update a simple text out when parameters change:

In header I add :

Code:
public:
	ITextControl* outContr;
In ::PlugExample I add:

Code:
outContr=new ITextControl(this, &IRECT(10, 100, 10 + 128, 100 + 32), &IText(14, &COLOR_WHITE, "Courier"), "");
pGraphics->AttachControl(outContr);
In OnParamChange:
Code:
	char *out;
	IMutexLock lock(this);

	sprintf(out, "param: %d", paramIdx);
	outContr->SetTextFromPlug(out);
What is wrong in this code, VC build give no error.
SaschArt is offline   Reply With Quote
Old 06-23-2016, 04:14 AM   #2
stw
Human being with feelings
 
stw's Avatar
 
Join Date: Apr 2012
Posts: 279
Default

Try to declare a char array: E.g. char out[5]
stw is offline   Reply With Quote
Old 06-23-2016, 06:31 AM   #3
SaschArt
Human being with feelings
 
SaschArt's Avatar
 
Join Date: Aug 2013
Posts: 236
Default

Thanks, worked
SaschArt is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 09:47 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.