[SOLVED] Custom translation table for keyboard and grid widget

Author: gianni.sandigliano@unifacesolutions.com (gianni)

We are moving a Uniface application from 9.2 to 9.6.07.X704. This application is using a customized translation table to remap various keys because of a specific request from the customer. ^128^CR   ^NEXT^FIELD                 ; Return = Next Field ^129^CR   ^CR                                  ; Shift-Return = CR ^128^171   <DETAIL>                       ; Double left click = Detail ^136.          ,                                       ; Dot on keypad = comma to properly support numeric input ^128^CR   ^NEXT^FIELD                 ; Enter on keypad = Next Field ^130^149  ^LAST^OCCURRENCE  ; Ctrl-End = Last Occurrence ^130^150  ^NEXT^OCCURRENCE ; Down = Next Occurrence ^130^151  ^NEXT^OCC_WINDOW ; Page Down = Next Set Of Occurrences ^130^155  ^FIRST^OCC_WINDOW ; Ctrl-Home = First Occurrence ^130^156  ^PREV^OCCURRENCE ; Up = Prev Occurrence ^130^157  ^PREV^OCC_WINDOW ; Page Up = Prev Set Of Occurrences Everything was perfectly working in U9.2 !!! Moving to U9.6 ALL grid widgets (and there are a lot!) are acting as fields were defined "MultiLine", so when "Return" is hit a newline is generated. I've looked into all "What's New" documentations from 9.2 to 9.6.07.X704 without being able to find any clue. We cannot change basic behaviour of grid widget because "Extended trigger" is not including an OnEdit opportunity at grid widget... Am I missing something or could simply be a bug? Thanks for any hint or support... Gianni

12 Comments

  1. Hi Gianni, I did a quick test here and I (so far) cannot see a difference between version 9.2 and 9.6(.07 + X704). In case an Edit Box is defined as Multiline then a new line is generated when hitting Enter (as expected) and if it's not then the macro "^NEXT_FIELD" is executed (as specified in the KTT). Is it maybe possible that the Multiline property has been set to On (by accident) in the INI file (in the [widgets] section)? Hope this helps. Daniel


    Author: diseli (daniel.iseli@uniface.com)
  2. diseli said Is it maybe possible that the Multiline property has been set to On (by accident) in the INI file (in the [widgets] section)?

    Hi Daniel, I've asked to developer first to double check it before writing; I got NO as an answer but I could check again soon... Take care it is not happening in standard editboxes but only in grid editboxes... Gianni


    Author: gianni (gianni.sandigliano@unifacesolutions.com)
  3. Hi Gianni, Thanks for the info. I've tested this here as well with Grid Edit Boxes and I (so far) could not find a problem. And a quick search in our knowledge base also did not reveal any known issues. What happens when you create a little test form with a dummy Grid entity and some fields (with version 9.6)? Can you see the problem there as well? Hope this helps. Daniel


    Author: diseli (daniel.iseli@uniface.com)
  4. Hi Daniel, today the developer has sent me the .INI file involved. I can confirm you there is NO reference to "multiline" in it. Tomorrow I'll have the possibility to check personally the whole development environment and eventually to build a small testset. Let's stay in touch on this issue...it's important for the partner (Labinf). Gianni


    Author: gianni (gianni.sandigliano@unifacesolutions.com)
  5. Hi Daniel, We have probably found this morning the issue origin. Involved fields are standard editboxes with NO Multiline definition: - in .INI - into field definition at Model level - into field definition at Component level The problem is not happening on all grid but only on those specialized for cash points. These grids have field frames defined with height = 2 because they should show field contents with a large font. We've built a simple form with fields having vertical size = 1 and everything was correct (BTW: this is probably the same test you've already done...) Then we resized the field frame with vertical size = 2 and the issue was there. It was correctly working in U92. I'am going to open a case on it. Gianni


    Author: gianni (gianni.sandigliano@unifacesolutions.com)
  6. Hi Gianni, Thanks for the info. I, however, still cannot see a difference between version 9.2 and 9.6. An Edit Box that is painted single line will by default use (i.e. when Multiline is not explicitly set somewhere) the setting "Multiline=off" and an Edit Box that is painted as multi-line (height > 1 cell) will use "Multiline=on". I can see this behavior regardless of using a normal Entity or a Grid. The only odd thing I've recognized is that the key mapping for the Keypad Enter key (you've mentioned in your initial post) does not look right:

    • ^128^CR   ^NEXT^FIELD                 ; Enter on keypad = Next Field

    ^128^CR is the mapping for the "normal" Enter key. in case you would like to change the Keypad Enter key then you need to use ^136^CR; e.g.

    • ^136^CR   ^NEXT^FIELD                 ; Enter on keypad = Next Field

    Hope this helps. Daniel


    Author: diseli (daniel.iseli@uniface.com)
  7. Hi Daniel, Setting explicitly Multiline=OFF for those fields having widget with vertical size > 1 solved the issue. Still I do not understand why 9.6 behave differently from 9.2 but ... it is solved! LaughKissLaughKissLaugh Gianni


    Author: gianni (gianni.sandigliano@unifacesolutions.com)
  8. Hi Gianni, Thanks for your reply. And I'm happy to hear that this is solved now. Smile Daniel


    Author: diseli (daniel.iseli@uniface.com)
  9. Hello, I remember this change of behaviour. I think in older version of Uniface the editboxes were "one line" by default. If you need a multiline you have to set it. But later on (and now) it depends on vertical size of editbox. If you draw it one cell height it is single line, byt if you draw it 2 or more lines height, it is multiline by default. If you set the multiline on or off it is applied of course. I do not remember, when it changed and I am not able to find it in what's new :) but according to our .ini files this change were made between version 9.3 and 9.5. Since in .ini file for U9.3 we do not have multiline set at all but in the .ini file for u9.5 we had to add multiline=off to the editbox definition. (We skipped the Uniface 9.4 - so we have no .ini for that version :-)). Not sure if it helps; just wanted to share the info. Zdeněk EDIT: I think similar behaviour was in U8 with special string? But in U9 there is no special string any more, all strings are just strings. (If I remember correctly).


    Author: sochaz (zdenek.socha@fullsys.cz)
  10. Hello Zdeněk, Thanks for the info.

    sochaz said I remember this change of behaviour. I think in older version of Uniface the editboxes were "one line" by default. If you need a multiline you have to set it. But later on (and now) it depends on vertical size of editbox. If you draw it one cell height it is single line, byt if you draw it 2 or more lines height, it is multiline by default. If you set the multiline on or off it is applied of course.

    I find this still a bit strange. According to the documentation (see for example here) the multi-line behavior of fields is as follows:

    Feature Uniface 8 String Uniface 8 Special String Uniface 9 String
    Multi-line behavior of fields painted with a height of 1 cell Single-line Multi-line Single-line
    Multi-line behavior of fields painted with a height of 2 or more cells Multi-line Multi-line Multi-line (no change)

     In case fields painted with a height of 2 or more cells behaved differently in the past then this probably was not correct.

    sochaz said I do not remember, when it changed and I am not able to find it in what's new :) but according to our .ini files this change were made between version 9.3 and 9.5. Since in .ini file for U9.3 we do not have multiline set at all but in the .ini file for u9.5 we had to add multiline=off to the editbox definition. (We skipped the Uniface 9.4 - so we have no .ini for that version :-)). Not sure if it helps; just wanted to share the info.

    This is certainly useful to know. Thanks for sharing. What I find odd is that I (so far) could not see a difference between version 9.2 (or 9.3) and 9.6. I've created my test form using 9.2 and then migrated it to version 9.6. As I've mentioned before, the Edit Box fields (painted single- or multi-line) in a Grid are behaving in the same way in version 9.2 as they do in 9.6.

    sochaz said EDIT: I think similar behaviour was in U8 with special string? But in U9 there is no special string any more, all strings are just strings. (If I remember correctly).

    That's correct (see the table above). Hope this helps. Daniel


    Author: diseli (daniel.iseli@uniface.com)
  11. I have also found BUG 29797: Mapping KeypadEnter to ^NEXT_FIELD does not work on multiline fields ... fixed in E110. Nevertheless, why we didn't have a multiline=off in our ini for U9.3 I can't really tell for sure.


    Author: sochaz (zdenek.socha@fullsys.cz)
  12. Thanks Zdeněk, to help to get out curtains! As told already I've given up to identifiy THE reason because for few days I was playing ping-pong with Daniel over the Internet: - It works... - It does NOT! - It works... - It does NOT work! Time passed and I was already running away with customer behind me... but then Daniel with a fabolous smash has hit the corner of lines at the end of the field... My stubborn head have started to understand...and we won last tie-break in this match! Thanks again guys! Gianni


    Author: gianni (gianni.sandigliano@unifacesolutions.com)