COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :
Old 07-31-2009, 03:05 AM   #1
DukeRoodee
Human being with feelings
 
Join Date: Jul 2009
Posts: 20
Default A few issues with IPlug

Hi all :-)

i am currently building a GUI around a sampleplayer iīve developed, with IPlug.
The sampleplayer itself works fine within the IPlug frame but i am facing some issues with the GUI, maybe somebody can give me a few hints ?

1) This happens on my home-notebook, doublechecked with the @work-notebook and works fine there. Anyway: when i build a vsti with IPlug in DEBUG mode (Visual C++ 2008 Express), i get an assertion from some windows(?) core module when starting the vst in a host:
isctype.c Line: 56
Expression: (unsigned)(c+1) <=256
Iīve googled around but donīt find any helpful information except "this happens when you feed characters with values >256" ...but i donīt, iīve checked all sources.
The IPlug Example project would run into the same assertion failure when buildt as debug.
Honestly, i donīt know what to do because it actually runs on a different computer... any ideas ?

2) The GUI is updated sometimes, and sometimes not. So, for example i am using the FileSelectorControl for loading a bank. Works fine, but after loading the bank, i set new content into some TextControls and then, they sometimes update and sometimes not. If not, i have to close and reopen the GUI, and then the new texts appear. It also happens, that i simply set the content of a TextControl to "" , after clicking a IContactControl. Sometimes the TextControl gets updated, sometimes not.
(Talking about actions in OnParamChange() )
Iīve debugged the whole thing and i can say that all drawXXX-methods are being called, but without any effect on the screen.
Maybe there is something i have to do / set additionally but i have no idea at the moment.

3) It also happens, that i set a quite long string to a TextControl with 200 pixels width. It seems that the TextControl doesnīt care about the border because it displays the entire string (if needed, all across the screen). Then, when i set the content of the TextControl to "" ( and if the control would be updated (see issue 2)), then the space within the borders of the TextControl would be properly deleted, but the rest of the old string to the left and right of the TextControl borders is still on the screen.

Thanks for all thoughts :-)

best,
Rudi
DukeRoodee is offline   Reply With Quote
Old 08-03-2009, 04:09 AM   #2
cc_
Human being with feelings
 
Join Date: Mar 2009
Posts: 256
Default

1) Can't help you - sorry!

2) how are you setting the text controls? I had a problem like this when I first started out and it turned out I had misunderstood how the updating was meant to work.

3) Yes - I have seen this on Windows I guess it's a bug. It doesn't happen on OSX. So far I have avoided the problem by making sure that my text always fits in the box.
cc_ is offline   Reply With Quote
Old 08-03-2009, 04:31 AM   #3
DukeRoodee
Human being with feelings
 
Join Date: Jul 2009
Posts: 20
Default

Hi :-)

>>2) how are you setting the text controls? I had a problem like this when I first started out and it turned out I had misunderstood how the updating was meant to work.<<

It turned out that itīs a problem with the IFileSelector Control. Found this, because not using the IFileSelector Control, everything worked like a charm.
I managed to "fix" the problem using a recipe from one of the of the other threads (see the Redraw and SetAllControlsDirty lines)

void IFileSelectorControl::OnMouseDown(int x, int y, IMouseMod* pMod)
{
if (mPlug && mPlug->GetGUI()) {
mState = kFSSelecting;
SetDirty(false);

mPlug->GetGUI()->PromptForFile(&mFile, mFileAction, mDir.Get(), mExtensions.Get());
mValue += 1.0;
if (mValue > 1.0) {
mValue = 0.0;
}
mState = kFSDone;
SetDirty();

mPlug->GetGUI()->GetControl( 1 )->Redraw();
mPlug->GetGUI()->SetAllControlsDirty();
}
}

I donīt know if this is the right way, but it works now (possibly the ->Redraw() is not needed, iīll have to try this).



>>3) Yes - I have seen this on Windows I guess it's a bug. It doesn't happen on OSX. So far I have avoided the problem by making sure that my text always fits in the box.<<

Windows seems to need an additional format attribute, like
DT_END_ELLIPSIS. This way, the string will be cut to the right length and, if too long, 3 dots will appear at the right.

Iīve just inserted a

fmt |= DT_END_ELLIPSIS;

in bool IGraphicsWin:rawIText(IText* pText, char* str, IRECT* pR)
For me, itīs ok so far.


thanks so far...

best,
Rudi
DukeRoodee is offline   Reply With Quote
Old 08-04-2009, 07:26 AM   #4
cc_
Human being with feelings
 
Join Date: Mar 2009
Posts: 256
Default

Quote:
Originally Posted by DukeRoodee View Post

Iīve just inserted a

fmt |= DT_END_ELLIPSIS;

in bool IGraphicsWin:rawIText(IText* pText, char* str, IRECT* pR)
For me, itīs ok so far.
That's cool! I'll try that next time I try building on Windows...
cc_ 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 07:02 AM.


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