tags:

views:

109

answers:

1

Hi, i'm a little stuck on getting a plugin to work. I need it to take a "src" parameter but I can't seem to make it do this.

So i've basically got the npsimple basic plugin.

It's probably something really silly i'm missing Joe

+1  A: 

You should get src as one of the parameters that are passed to NPP_New():

NPError NPP_New
          (NPMIMEType    pluginType,
           NPP instance, uint16 mode,
           int16 argc,   char *argn[],
           char *argv[], NPSavedData *saved)
{
    char* srcValue = 0;

    for(int i=0; i<argc; ++i) 
    {
        if(strcmp("src", argn[i]) == 0) {
            srcValue = argv[i];
            break;
        }
    }

    /* ... */
}
Georg Fritzsche