Hello, this is a compiler bug/weakness.
When introducing ON ACTION action-name ATTRIBUTES() we excluded ON ACTION action-name iNFIELD field-name ATTRIBUTES(). Why? The semantics was not clear. What happens in this example:
ON ACTION foo INFIELD field1 ATTRIBUTE(DEFAULTVIEW = YES, TEXT = "abc", ACCELERATOR = "Control-X")
ON ACTION foo INFIELD field2 -- without attributes
What happens if the focus switches from field1 to field2? The answer should be: DEFAULTVIEW = auto, TEXT = "foo", no accelerator.
In 3.00.05 we have fixed:
https://agile.strasbourg.4js.com/jira/browse/FGL-4140 ON ACTION ATTRIBUTES must belong to the sub-dialog.
That's a similar situation:
DIALOG
INPUT ..
ON ACTION foo ATTRIBUTE ...
INPUT ..
ON ACTION foo ATTRIBUTE ...
END DIALOG
I've created this new bug:
https://agile.strasbourg.4js.com/jira/browse/FGL-5311 ui: ON ACTION ATTRIBUTES should be possible for actions with INFIELD clause.
Out of scope:
My instinct: the same action should have in any context the same attributes. It's kind of annoying to repeat the attributes when using an action more than once. For that reason: use action defaults, avoid action attributes in the 4GL code.
Use the ATTRIBUTES clause only for actions appearing no where else in your project.