Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: Combobox and setfieldactive issue.  (Read 10246 times)
Ben R.
Posts: 28


« on: October 11, 2013, 05:26:28 pm »

I have a particular application in which users enter a help request. After the add function, the IT staff comes in behind them and updates the request to take ownership of it, and eventually to enter resolution notes. I have the fields seperated into groups corresponding to the different user fields (end user and IT), and when entering update mode I would like to disable all the end-user fields. This works for the most part, but there are two comboboxes that allow for issue categorization. When setting those inactive, the fields are blanked out rather than retaining their values in display.

Here is the code that I'm using to disable the end user fields:

before input
            if menu_item = "update" then
              call dialog.setfieldactive("htk_description",0)
              call dialog.setfieldactive("htk_description2",0)
              call dialog.setfieldactive("htk_select2",0)
              call dialog.setfieldactive("htk_notes",0)
              call dialog.setfieldactive("htk_priority",0)
              call llh_display()
            end if

Attached is the result of this code, showing the before and after of entering update mode.
Also here:

So my question is this: Am I taking the correct approach in how to mark the fields above noentry? If I am, is there a way to then assign values back to the comboboxes in order to not lose the display of the data they should contain?

Additionally, is there an easy way to set an entire group inactive? From the documentation the setfieldactive seems to be the only way to do it; there's not a setelementactive function for some reason.



* combobox.png (9.63 KB, 558x391 - viewed 1330 times.)
Reuben B.
Four Js
Posts: 1048


« Reply #1 on: October 14, 2013, 06:36:40 am »

Ben,

One of my local customers just reported a similar issue with combobox and inactive.  I couldn't reproduce but I have only looked at Windows so far.  What GDC version are you using and on what platform?

Reuben




Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
Ben R.
Posts: 28


« Reply #2 on: October 14, 2013, 04:40:30 pm »

GDC 2.11 on Windows.

So by saying you can't reproduce, you mean the code I used didn't blank out the combobox for you?
Reuben B.
Four Js
Posts: 1048


« Reply #3 on: October 15, 2013, 12:16:40 am »

I certainly didn't test on 2.11, but testing using it doesn't reveal the issue.

I am using GDC=2.11.13, FGL=2.11.16.  When stating versions, you ought to give the full version, not part of the version.

This is the little example program I used.  Can you see if the issue occurs with this.  If it doesn't modify so that the issue does occur.  I can't tell much from your limited sample code but I would be curious what llh_display() does.

Code
  1. MAIN
  2. DEFINE field1, field2, field3 STRING
  3.    CLOSE WINDOW SCREEN
  4.    OPTIONS FIELD ORDER FORM
  5.    OPTIONS INPUT WRAP
  6.  
  7.    OPEN WINDOW w WITH FORM "comboinactive"
  8.    LET field1 = "Y"
  9.    LET field2 = "Y"
  10.    LET field3 = "Y"
  11.    DISPLAY BY NAME field1, field2, field3
  12.    MENU ""
  13.        ON ACTION update
  14.            INPUT BY NAME field1, field2, field3 ATTRIBUTES(WITHOUT DEFAULTS=TRUE)
  15.                BEFORE INPUT
  16.                    CALL DIALOG.setFieldActive("formonly.field2", FALSE)
  17.                ON ACTION disable
  18.                    CALL DIALOG.setFieldActive("formonly.field2", FALSE)
  19.                ON ACTION enable
  20.                    CALL DIALOG.setFieldActive("formonly.field2", TRUE)
  21.            END INPUT
  22.        ON ACTION close
  23.            EXIT MENU
  24.    END MENU
  25. END MAIN

Code
  1. LAYOUT
  2. GRID
  3. {
  4. [f01    ]
  5. [f02    ]
  6. [f03    ]
  7. }
  8. END
  9. END
  10. ATTRIBUTES
  11. f01 = formonly.field1;
  12. COMBOBOX f02 = formonly.field2, ITEMS=(("Y","Yes"),("N","No")), NOT NULL;
  13. f03 = formonly.field3;


Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
Nuno G.
Posts: 38


« Reply #4 on: October 25, 2013, 05:21:53 pm »

Just curious: did you examined the aui to check if the combobox items are there and wich is the cb value? This is what i mean:

Define dn om.domnode

Let dn = ui.interface.getRootNode()
Call dn.writeXml(`test.xml`)

And then examine the xml file.
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines