IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Just playing around
It does seem idiosyncratic. In the first place, you have to use assignment - casting doesn't work in-line. Means that the following won't compile:

TREAT(scribble(1) AS rectangle).setHeight(60);

Guess you could work around that by just using assignment. Also, a simple assignment copies the object as a clone. Any modifications are not applied to the original object. Means that if you drew the original base object, it remains unmodified after the setHeight instruction:

scribble(1).draw();

Still fumbling my way around PL/SQL, but would it require a REF of some sorts to make the scribble(1) and rect vars point to the same memory location?
New The problem with REFs:
They're only usable on table objects, not transitory objects.

Copying the object as a clone isn't really a solution, since that's fairly wasteful. The idea is to use the original.

Also, if you save a bunch of rectangles in a collection (varray of shape_t), and then do a treat to get a rectangle back, does it have the attributes of the original rectangle, or only those of the shape_t plus new default rectangle attributes?
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New Quickly exhausting my sum total of PL/SQL knowledge :-)
Also, if you save a bunch of rectangles in a collection (varray of shape_t), and then do a treat to get a rectangle back, does it have the attributes of the original rectangle, or only those of the shape_t plus new default rectangle attributes?
From my limited tests, it does appear that the attributes from the collection are correctly maintained (although copy would seem to be the more appropriate term).

Copying the object as a clone isn't really a solution, since that's fairly wasteful. The idea is to use the original.
Can't help you there. A downcast operator that clones really isn't a downcast operator is it? :-)

Speaking of cast, what about the CAST function. Appears to convert one type of collection to another. But I can't figure how to use it.
New Re: Quickly exhausting my sum total of PL/SQL knowledge :-)
Only works on collections and built-ins.

And in the case of a collection, CAST apparently needs to be used on a query.
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
     Objects, REFs, and Oracle collections - (admin) - (10)
         Will TREAT not work? - (ChrisR) - (7)
             Interesting... - (admin) - (6)
                 Just playing around - (ChrisR) - (3)
                     The problem with REFs: - (admin) - (2)
                         Quickly exhausting my sum total of PL/SQL knowledge :-) - (ChrisR) - (1)
                             Re: Quickly exhausting my sum total of PL/SQL knowledge :-) - (admin)
                 Some other thoughts on TREAT - (ChrisR) - (1)
                     I'll pass that on - (admin)
         can you not bang out to .dat files in the OS? - (boxley) - (1)
             In-memory, transient. - (admin)

Goo goo goo joob!
172 ms