Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [e4-dev] Programmatically adding a command to a tool item

On Fri, Mar 23, 2012 at 9:10 AM, Toedter, Kai <kai.toedter@xxxxxxxxxxx> wrote:
> I assume you are adding the command and handler to the application, right?
yes, but I was not sure if this is necessary if both command and handler are “local”, meaning only relevant to a dynamically created tool item.

You need to add the MCommand to the application so it gets read by the system (with an MCommandParameter if you want to use parameters, add the MCommandParameter before you add the MCommand to the application).  You need to either add the handler to the appropriate place in the model (the part, the window, or the application) *or*  use the EHandlerService from the appropriate place in the model to activate that handler programmatically.


Paul Webster
Hi floor.  Make me a sammich! - GIR

Back to the top