P
Peter Judge
Guest
Object references and HANDLEs are not type-compatible. > Sometimes it seems that they are two different types of memory references that live in their own separate worlds This is well put, and true. There is an OpenEdge.Core.WidgetHandle OOABL type that you can use to wrap a handle. It has the ability to destroy the wrapped handle once the object is GC’ed or destroyed. Handles aren’t automatically collected since there is a lot of code that depends on them being available until the * application * decides they’re no longer needed. You can see this intent in code that looks like RUN foo.p PERSISTENT. Notice there’s no SET In 11.6.3 there were a bunch of Ccs.Common.Support OOABL interfaces like IHandleHolder added (to support another feature). This one is implemented by the WidgetHandle type, and lets you potentially do something like Obj
oAction(NEW OpenEdge.Core.WidgetHandle(handle-in-question)). You can see an example of how we use those in the HTTP Client’s JsonBodyWriter:Write() method.
Continue reading...

Continue reading...