Does ObjectID user object function over WindX?

Started by Jeff Wilder, May 04, 2020, 01:09:46 PM

Previous topic - Next topic

Jeff Wilder

Does the ObjectID user object method feature work over a WindX connection? I am having trouble attaching my custom object.
When I run the following program locally, it prints the objectID for my user object and sets the value. When ran over a WindX connection, it prints 0 (zero) and gives an error 88.

0010 BEGIN
0020 LET X=10
0030 GRID X,@(1,1,60,10)
0040 LET O=NEW("myGrid",X)
0050 LET X'OBJECTID=O
0060 PRINT 'LF','LF',X'OBJECTID
0070 X'SETVALUE(1,1,"hi")
0080 INPUT "Press Enter",*
0090 GRID REMOVE X
0100 END


myGrid.pvc is a clone of the example provided in the manual at https://manual.pvxplus.com/PXPLUS/properties/objectid.htm
I am using PxPlus 15.10 on the server and WindX.

Thank you,
Jeff

EVa

Jeff,

It will probably work when your custom object exists on the WindX PC (or is accessible from the WindX PC) and you change line 40 to:

LET O=NEW("[LCL]{path}myGrid",X)

where {path} is optional (and a true path).


-Eric-

Jeff Wilder

Thank you Eric. That does appear to work.

However, moving the custom object to the client defeats the purpose I had in mind for using the object in the first place. I had created some methods that aided a particular application's responsiveness by reducing the network traffic to the workstation. I suppose I can make it into a standalone class, but I really liked the idea of extending the grid's properties and having PxPlus manage the life of the class with the graphical control.

Best Regards,
Jeff

Thomas Bock

Jeff,

As long as you want to delegate the life time to PxPlus you can use "for control" in the new function.
We do a lot of instantiations in the post create logic like this:
myObj = new("myClass", id for control id)
This doesn't reduce network traffic, but you can improve the API of any control with your classes.