Joe,
yowzah86 wrote:
>
>
> Hi
>
> Does anyone have 2 or 3 lines of code that does this in the new API.
>
You can't get an environment in plug-in init because there is no
environment at that point. However, in plug-in idle (or any time
really), you can get an environment using the FMX_SetToCurrentEnv call
like so:
fmx::errcode fError;
fmx::ExprEnvAutoPtr fEnv;
fError = FMX_SetToCurrentEnv(&(*fEnv));
if (fError == 0)
{
// use it...
}
I've also seen this before (I think it's right):
fError = FMX_SetToCurrentEnv(fEnv->get());
... if you don't like the looks of &(*fEnv) .. :)
HTH,
Jake
> thanks
> Joe Mele
>
--
Jake Traynham
Owner, CNS Plug-ins
http://www.cnsplug-ins.com/