[Progress Communities] [Progress OpenEdge ABL] Forum Post: RE: Type compatibility between HANDLE and Progress.Lang.Object

  • Thread starter Thread starter Peter Judge
  • Start date Start date
Status
Not open for further replies.
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:DoAction(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...
 
Status
Not open for further replies.
Back
Top