I have a handle to a static temp-table that I pass around. Is there a trick so that I can convert the handle parameter back to the static temp-table definition.
Ex.
DEFINE TEMP-TABLE my-table . . .
PUBLIC SomeMethod(INPUT TABLE-HANDLE my-table-handle)
... /* convert handle to static temp-table, so I can use my-table.field1 instead of my-table-handle:BUFFER-FIELD("field1") */
no, but instead of
my-table-handle:BUFFER-FIELD("field1"):BUFFER-VALUE
you can use the shortcut
my-table-handle::field1
(saves some typing, at least)
julian
On 10 March 2014 14:30, jquerijero
wrote:
> Is there a way to convert a temp-table handle back to the static definition?
> Thread created by jquerijero
>
> I have a handle to a static temp-table that I pass around. Is there a trick
> so that I can convert the handle parameter back to the static temp-table
> definition.
>
> Ex.
>
> DEFINE TEMP-TABLE my-table . . .
>
> PUBLIC SomeMethod(INPUT TABLE-HANDLE my-table-handle)
>
> ... /* convert handle to static temp-table, so I can use my-table.field1
> instead of my-table-handle:BUFFER-FIELD("field1") */
>
> Stop receiving emails on this subject.
>
> Flag this post as spam/abuse.
--
Julian Lyndon-Smith
IT Director,
dot.r
http://www.dotr.com
"The bitterness of poor quality remains long after the sweetness of
low price is forgotten"
Follow dot.r on http://twitter.com/DotRlimited
A small rider to that advice being that you need to be on v10 or later for that shortcut to work IIRC.
I have a handle to a static temp-table that I pass around. Is there a trick so that I can convert the handle parameter back to the static temp-table definition.
Ex.
DEFINE TEMP-TABLE my-table . . .
PUBLIC SomeMethod(INPUT TABLE-HANDLE my-table-handle)
... /* convert handle to static temp-table, so I can use my-table.field1 instead of my-table-handle:BUFFER-FIELD("field1") */
Flag this post as spam/abuse.
yup.
On 10 March 2014 14:38, James Palmer
wrote:
> RE: Is there a way to convert a temp-table handle back to the static
> definition?
> Reply by James Palmer
>
> A small rider to that advice being that you need to be on v10 or later for
> that shortcut to work IIRC.
>
> Stop receiving emails on this subject.
>
> Flag this post as spam/abuse.
--
Julian Lyndon-Smith
IT Director,
dot.r
http://www.dotr.com
"The bitterness of poor quality remains long after the sweetness of
low price is forgotten"
Follow dot.r on http://twitter.com/DotRlimited
If you know the definition of what you are receiving you can.
a.p
DEF VAR ht AS HANDLE. DEF VAR hb AS HANDLE. CREATE TEMP-TABLE ht. ht:ADD-NEW-FIELD( "ii", "integer" ). ht:TEMP-TABLE-PREPARE( "ttdynamic" ). hb = ht:DEFAULT-BUFFER-HANDLE. hb:BUFFER-CREATE(). hb::ii = 2014. RUN b.p (TABLE-HANDLE ht).
b.p
DEFINE TEMP-TABLE tt FIELD ii AS INT. DEFINE INPUT PARAMETER TABLE FOR tt. FOR EACH tt: MESSAGE tt.ii VIEW-AS ALERT-BOX. END.
I would assume that this also works with classes.
That's good to know.
Another questions;
Does it work if b.p uses INPUT-OUTPUT parameter?
Does it work if b.p uses INPUT-OUTPUT parameter and is run on the AppServer?