question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MenubarItem() Argument Exceptions

See original GitHub issue

I am trying to create a menubar with two menu items(without the sub menus) by modifying the demo app.

At first, I tried

		var menu = new MenuBar ( new MenuBarItem [] {
			new MenuBarItem ("_Quit", "Quit the application", () => { if (Quit ()) top.Running = false; }),
			new MenuBarItem ("_Settings", "",() => Settings ())
		});

when I build, I receive error CS1729: ‘MenuBarItem’ does not contain a constructor that takes 3 arguments

Then I tried,

		var menu = new MenuBar ( new MenuBarItem [] {
			new MenuBarItem ("_Quit", "Quit the application", () => { if (Quit ()) top.Running = false; }, null),
			new MenuBarItem ("_Settings", "",() => Settings (), null)
		});

when I build, I receive error CS1729: ‘MenuBarItem’ does not contain a constructor that takes 4 arguments.

Not sure what I am doing wrong, I need help

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14

github_iconTop GitHub Comments

1reaction
jowlsawcommented, Aug 14, 2020

thank you, I will try building the Master, otherwise I will just wait for new version.

1reaction
BDispcommented, Aug 14, 2020

I think the nuget package does not have these updates yet.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ArgumentNullException when binding menuitem IsEnabled ...
When opening the File-menu, I get an exception. System.ArgumentNullException was unhandled HResult=-2147467261. Message=Value cannot be null.
Read more >
CA2208: Instantiate argument exceptions correctly
When a method has a parameter, and it throws an exception type that is, or derives from, ArgumentException, it is expected to call...
Read more >
Menu and MenuItem thorw "Invariant Violation: ...
Problem description I work with typescript, react and material-ui. I'm trying to do a snapshot test with jest. But material-ui's MenuItem ...
Read more >
MenuItem (Java Platform SE 8 )
Currently, menu items only support action events. Note that if the event parameter is null the behavior is unspecified and may result in...
Read more >
ASPxMenu - An error occurs when the menu item is clicked
Exception Details: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: index. Source ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found