PDA

View Full Version : Getting LWITEMINFO in an itemMotion plugin



GregMalick
06-03-2008, 12:34 AM
I'm writing an itemMotion plugin.
I'm having problems with:



static LWItemInfo *iteminfo = NULL;

static int Handler (.....)
{
...
iteminfo = global( LWITEMINFO_GLOBAL, GFUSE_TRANSIENT );
...
}


iteminfo always seems to be zero.
I've tried it in the Handler and in the Create routines but I always get zero.

This is probably something stupid but I can't figure out what I'm doing wrong.
Any suggestions?


oh . . . . LW9.2

GregMalick
06-03-2008, 01:36 AM
OK testing 9.2 and it also fails.
Tested in LW9.5 and it works.

This must be a bug that was fixed.

Jarno
06-03-2008, 02:19 AM
You're not trying to use a plugin compiled with the 9.5 LWSDK in 9.2 are you? That won't work as the plugin would ask LW for a newer version of the global than can be provided.

---JvdL---

GregMalick
06-03-2008, 07:14 PM
Sounds logical - I'll check when I get home.
But I wonder why the other globals don't have that problem?

Jarno
06-03-2008, 10:15 PM
It depends on whether or not the version number for the particular global was increased. A new version of LW does not automatically mean a new version for the globals.

---JvdL---

GregMalick
06-03-2008, 11:59 PM
Thanks Jarno.

That was the problem.... copying project data from one directory to another.
the wrong Server reference was brought across.