VST Tooltips on Win32

I can’t get them to work i have the same code and tooltips appear normally on MAC (Xcode 2.4.1 now) i compile the same thing on Win32, open miniHost and no tooltips, i even modified the official demo to

cpp file
#include "MySlider.h"


const String MySlider::getTooltip()
{
	return (T("Tooltip"));
}

.h file
#include <juce.h>


class MySlider : public Slider
{
public:
	MySlider(String name) : Slider (name)
	{
	}

	const String getTooltip();
};

in the DemoEditorComponent.cpp/h

private: 
    TooltipWindow *tooltipPtr;

tooltipPtr = new TooltipWindow (this, 350);
addAndMakeVisible (gainSlider = new MySlider (T("gain")));

i checked the same way in a normal EXE in the demo project (thos examples in the projects dir) and this works fine when standalone (there isn’t really anything more to this) it does not work in VST.

also:
juce demo plugin:
crashes energyXT (it load ok opens the editor but when you try to close the editor it crashes with a kernel32.dll error)

does not work on SaviHOST, VSTHost (some other freeware hosts, most of them, the same ditor problems or the editor does not apeear at all)

all tested on Win2K with juce 1.40 and latest audioPlugin.

Ok, thanks. I’ve got some changes to the plugin wrapper for the next release anyway, but I’ll double-check it in those hosts.

Ok, I don’t know if it’s because of changes I’ve made since the last release, but I’ve just tried the hosts you mention, and they all work perfectly for me.

Also, the tooltips seem fine - I just added this member variable to DemoEditorComponent:

    TooltipWindow tooltipWindow;

and this in the constructor:

gainSlider->setTooltip (T("changes the volume of the audio that runs through the plugin.."));

Are you sure it’s not your own changes that are crashing it?

when i changed to a static memeber in the class the tooltips appear in your demo, but now MiniHost crashes everytime it exists after loading this plugin (i re-downloaded the source code from the website now, compiled it with VC6 as a Win32 dynamic dll).

Perhaps i’m missing something at compile time, maybe there is something more than just an empty dll project in VC6 i noticed that the demo lacks vc6 example project and i can’t get VS .net or any higher for now. And propably that might be causing the crashes ?

Also when i do the same thing in my plug the tooltips do not appear.

Is there a difference between static and dyanmic creation of the TooltipWindow memeber ?

you mustn’t use any static components, and especially not in a plugin! Of course that’ll make it crash on exit, because the statics get deleted after juce has already deinitialised everything, so all hell will be let loose in their destructors!

well okay

  1. your right stsaic crashes the host, so i went back to
new TooltipWindow

and it works fine.

  1. the part that was nor working on Win32 (witch is weird cause it worked fine on MAC), was that i wrote my own (acutally built with JUCER) buttons and combos deriving them from your classes and giving them their own const String getTooltip(); method instead using your basic and doing setTooltip(), the buttons had custom GUI design though so i had to. So i went back to you classes and setTooltip() and it works. Dont know how and why it worked on MAC but it did.

and i tried that code that i just downloaded and that works with miniHost (working tooltips) it still hangs energyXT when closing the GUI. same error.

Sometimes if you override a virtual you need to do a complete rebuild for it to link correctly. Or maybe you just spelt the method name wrong or something.

All seems ok in energyxt over here.

if i missspelled the methods than they wouldnt work on the MAC either (i use the same code from SVN). i always do clean/rebuild after SVN update.

ok could you provide the binary dll for me to test it here ? upload it here http://atom.maczo.pl/files (create a dir for yourself or something) and i’ll test
it with both binaries.

Sure, I’ll email it to you.

your right your version works fine no crashes. i use 1.40 and the latest juceaudioplugin demo and i still can’t get it to work.

do you think that the VS6 compiler might have some problems with that. whitch one did you use ?

No, it won’t be the compiler. Probably something I’ve changed since last version.

ill continue with the tooltips

i have a situation that a class A has some components (sliders, knobs, buttons) those are defined in a XML file and dynamicly added, a tooltip is also defined in the XML. This class adds them and becomes the listener for those components. This class is never visible there is a class B that is the editor that calls addAndMakeVisible (component); for each one returned by class A. Now should tooltips be visible in this case in the editor without any additional code. The Editor has a tooltipWindow defined, but the components are not created in it, it only shows them. I’m asking cause MAC shows thes Windows doesnt (windows works fine now with tooltips), this is still the same VST, host is Live, Xcode 2.4.1

It should be fine. I’m trying to get a new release together, so wait for that in case I’ve fixed something that’s getting in your way.

allright i’ll wait, thanks for the help.


this error appears when i click the “close” button of the plugin on eXT
interface.

okay i just get both new 1.41 and the audio plugin framework. I still get the same error, so now i definetly think it’s my VC6. I’ll try to do a build with VSExpress or VS2005 cause i’m out of ideas, it might be that the standard VC6 “Dynamic Link Library” project template has some bad settings or something.

there is only one warning always:

e:\dev\projects\juceaudioplugin\wrapper\formats\vst\juce_vstwrapper.cpp(206) : warning C4541: 'dynamic_cast' used on polymorphic type 'class juce::Component' with /GR-; unpredictable behavior may result

I don’t know what “GR-” does, but have you checked that you’ve enabled run-time typing?

I fixed it like you said RTTI has to be enabled (it isn’t in VC6 by default). So ext now loads and runs nicely. BUT :slight_smile:

this is displayed in Tracktion2 when loading the new plug.

i this an error ? or something that can be discarded (the plug works OK and Tracktion2 after you click OK).

atomix: have you tried debugging ? can you post here the callstack when the error occurs ?
i have similar problems when closing the editor of VST plugins on EnergyXT2 on linux with a shared plugin message thread. probably the two cases are the same problem, that might be in the VstWrapper effEditClose (function deleteEditor)…

if you can post the callstack here it will help me to tweak it to make it work.