App commands/menubar


#1

at long last, i’m rewriting the tutorial and the tutorial files.

i want to be clear on a few things though, to ensure that i give the most useful information from the start and not need to change lots of things as i go on.

one thing that i’ve often had to re-learn whenever i swing back into my coding mode is the ApplicationCommand stuff. specifically, where to keep the ApplicationCommandManager for maximum sensibility.

one main usefulness of the command system is giving a nice easy way to get a menubar hooked up to commands. the easiest way to get a menubar set up is in the DocumentWindow portion of the application (i.e. outside of the main program component). thus, in my experiments, i’ve often ended up putting the ApplicationCommandManager inside my DocumentWindow subclass, and connecting it to a MenuBarModel from there.

is this the place that you would recommend it going? i find it’s nice to consider the content component to be the whole guts of the program, but i remember having to place at least this much outside of it in order to hook the menu up easily, although i’m sure it can be done in many different ways.

i just want to be clear on a neat way of doing things so that the comments in my tutorial base files give the user (i.e. the client of the tutorial codebase) helpful guidance in many aspects of enhancing their program [e.g. ‘if you want to do X, this is a good place to start’]


#2

Nice one!

I think the best place for the command manager is probably the JUCEApplication class itself, or as a singleton. In the jucer I made it a global so it’s easy to access from all over the code, and it gets created/deleted at application startup/shutdown. That’s probably the most sensible plan.


#3

Two things. Anyone have a link to Haydxn’s tutorials? His website doesn’t work. Someone posted a link and I got JuceTutorial.pdf but there are others aren’t there? I’m looking to make a MenuBar. Looking for a tutorial on it. Is there a way to make them in Jucer? I made a new component then under sub components I right click in the area and there is no MenuBar option. Please help.


#4