CREATE ... SHARED

GregTomkins

Active Member
Is there any way to achieve 'CREATE BUFFER b FOR TABLE "Orders" SHARED ?

I don't see any syntax for this, nor do I see any way the Call Object could be mangled to achieve this.

Yes, I know shared buffers are terrible, but we have some from the 90's that we aren't likely to get rid of.
 
Dynamic objects themselves are not "shared" - instead they live in a widget-pool, where that widget-pool can be scoped to a procedure or the session. You need to be aware that, if the dynamics objects lives in the widget-pool scoped to a procedure, it will automatically be removed from memory when the procedure goes out of scope - ends. If you need to access a dynamic handle-based object - like yours - all you need to have is the handle to it. Therefore you would either define the handle variable as shared, pass it as paramter - or, if you can't do that, pick it up with a widget walk, sense-wise not necessarily in that particular order.

Normally I would have such a dynamic object encapsuled in a procedure or class which provides a get function or method that passes out the handle to it.

Heavy Regards, RealHeavyDude.
 
The requirement is to CREATE not DEFINE, thereby allowing it to handle buffers defined only at run-time ... pick it up with a widget walk is what I was looking for, thanks very much!
 
And, of course, you should be asking yourself why you want to create or define anything as shared ... that has not been best practice in ABL for 20 years.
 
Back
Top