Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MenuBar in a SubForm #88

Open
cursork opened this issue Jan 22, 2025 · 0 comments
Open

MenuBar in a SubForm #88

cursork opened this issue Jan 22, 2025 · 0 comments

Comments

@cursork
Copy link
Contributor

cursork commented Jan 22, 2025

MenuBar is listed as having both Form and SubForm as parents in the documentation. It works inside a SubForm when EWC is run in Browser mode, but not in Desktop mode. It does work in Browser mode for EWC, and both of these render very similarly:

  EWC.Init'Browser'

  'F'eWC'Form'
  'F.MB'eWC'MenuBar'
  'F.MB.X'eWC'Menu' 'xyz'
  'F.MB.X.Y'eWC'MenuItem' 'yyy'

  'F'eWC'Form'
  'F.SF'eWC'SubForm'
  'F.SF.MB'eWC'MenuBar'
  'F.SF.MB.X'eWC'Menu' 'xyz'
  'F.SF.MB.X.Y'eWC'MenuItem' 'yyy'

Trying with EWC.Init'Desktop' and a subform, the expression 'F.SF.MB'eWC'MenuBar' from above fails:

  ⍎VALUE ERROR: Undefined name: HR
  ∆WC[103] F.SF.HR
                ∧

Note that the first example above works in ⎕WC when the menu is on the form, but silently fails without error when the menu is on the subform:

  'F'⎕WC'Form'
  'F.SF'⎕WC'SubForm'
  'F.SF.MB'⎕WC'MenuBar'
  'F.SF.MB.X'⎕WC'Menu' 'A menu'
  'F.SF.MB.X.A'⎕WC'MenuItem' 'aaa'

The ⎕WC docs say that both Form and SubForm may be parents to MenuBar, but given that we do not currently have example applications using this and that it seems a basic example doesn't succeed in ⎕WC, I think we should improve the error case for adding a menubar to a subform.

Non-urgent, as I haven't seen this used in any potential production code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant