How to assign fill-in using only wiget-handle?

Posted by wmurawski on 25-Feb-2014 13:31

Hi!

I want to make some changes to many fill-ins without using "assign fill-in-..".

Is it possible to do this using only handles to widgets in the way similar to bellow but somehow  without explicit assign fill-in-..:

def var wh as handle no-undo.
wh = focus.
do while wh <> ?:
    if wh:type = "FILL-IN" then do:
        /* let's assume every fill-ins are defined as character */
        wh:screen-value = wh:screen-value + "x" no-error. /*some changes*/
        if wh:name = "FILL-IN-1" then do:
            assign FILL-IN-1.  /* how to replace this explicit assign*/
            message
                "FILL-IN-1:screen-value =" FILL-IN-1:screen-value
                skip "FILL-IN-1 =" FILL-IN-1
                view-as alert-box.
        end.
    end.
    wh = wh:next-sibling.
end.

Posted by Lieven De Foor on 25-Feb-2014 15:40

I don't think it is possible... but it would be useful indeed!

Progress could add a "VALUE" property, with the same datatype as the fill-in's datatype (like the BUFFER-VALUE property on a buffer field object) or provide an ASSIGN() method (although I would prefer the former)

Posted by Mike Fechner on 26-Feb-2014 00:02

The INPUT-VALUE property of the FILL in is of the same data type as the underlying field. DBNAME and TABLE tell you if it's bound to a buffer field - in which case the NAME is the NAME of the field.

That way you can ASSIGN bufferFieldHandle:BUFFER-VALUE = wh:INPUT-VALUE.

I am afraid that for FILL-INS's bound to a variable this won't be possible.

All Replies

Posted by Lieven De Foor on 25-Feb-2014 15:40

I don't think it is possible... but it would be useful indeed!

Progress could add a "VALUE" property, with the same datatype as the fill-in's datatype (like the BUFFER-VALUE property on a buffer field object) or provide an ASSIGN() method (although I would prefer the former)

Posted by Mike Fechner on 26-Feb-2014 00:02

The INPUT-VALUE property of the FILL in is of the same data type as the underlying field. DBNAME and TABLE tell you if it's bound to a buffer field - in which case the NAME is the NAME of the field.

That way you can ASSIGN bufferFieldHandle:BUFFER-VALUE = wh:INPUT-VALUE.

I am afraid that for FILL-INS's bound to a variable this won't be possible.

This thread is closed