Hi!
OE 11.6.1: I'm trying to instantiate a Stack object but I'm told that it's an abstract class, although the class browser suggests otherwise. Is this a bug or a feature? Of course I know I can inherit the Stack class, but this seems unnecessary.
Sample code:
using OpenEdge.Core.Collections.Stack.
define variable elementStack as Stack no-undo.
elementStack = new Stack(). /* error 15107 */
Cheers
A Stack Object is indeed an Abstract Class so it can't be directly instantiated. See
documentation.progress.com/.../index.html
It is a Collection they had methods supporting Last-in, First-Out (LIFO) semantics.
Implementations of the abstract class are necessary where the type of object in the stack is specified. You might want to create, for example, and ObjectStack. See
documentation.progress.com/.../index.html
Once created you can cast it as a "Stack" and use the Stack methods generically (or not).
A Stack Object is indeed an Abstract Class so it can't be directly instantiated. See
documentation.progress.com/.../index.html
It is a Collection they had methods supporting Last-in, First-Out (LIFO) semantics.
Implementations of the abstract class are necessary where the type of object in the stack is specified. You might want to create, for example, and ObjectStack. See
documentation.progress.com/.../index.html
Once created you can cast it as a "Stack" and use the Stack methods generically (or not).
Ah, I overlooked ObjectStack. Thanks.