ApplicationCommandManager should be global?


#1

In the help…

[quote]To set up your app to use commands, you’ll need to do the following:
Create a global ApplicationCommandManager to hold the list of all possible commands.[/quote]

In the demo app the ApplicationCommandManager is created in the main DocumentWindow and passed into it’s content component through the constructor. Jules, have you just done this because in the case of the demo, the content component is the only component that implements commands, so it’s just ‘nicer’ that way?

For a more complex project should it just be made global for simplicity? I’m just trying to wrap my head around the ‘correct’ way of using the command system…

Thanks,

Matt. :slight_smile: [/quote]


#2

You could make it global if you want - if you’re doing that, I’d reccommend making it a singleton, and using the DeletedAtShutdown class to get rid of it when the app closes.


#3

Cool. Cheers for the reply!

Matt.


#4