fourjs-reuben / tool_styledemo

New proposed demo program
MIT License
0 stars 1 forks source link

Review build_per logic to handle case where no attributes are specified #19

Open fourjs-reuben opened 1 month ago

fourjs-reuben commented 1 month ago
CALL sb.append("EDIT f02 = formonly.test1, STYLE=\"test\"")  -- TODO replace edit with widget type
    FOR i = 1 TO m_data.widget_attribute_arr.getLength()
        CALL sb.append(", ")
        CALL sb.append(m_data.widget_attribute_arr[i].widget_attribute_name)
        IF m_data.widget_attribute_arr[i].widget_attribute_value.getLength() > 0 THEN
            CALL sb.append(" = ")
            -- TODO implement a way to determine if value is quoted or not
            CALL sb.append(m_data.widget_attribute_arr[i].widget_attribute_value)
        END IF
    END FOR
    CALL sb.append(";\n")

from styledemo_launcher.4gl, the array still has a length of 1 in the auto append case ...Need to add an IF around that tests if both name and value are empty. if so, don't append empty row

CountedElkO commented 1 month ago

Completed