pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sandro Martini <sandro.mart...@gmail.com>
Subject Re: Action.getNamedActions() cannot be updated with an new action
Date Mon, 16 Jul 2012 15:42:03 GMT
> Thanks all.  I sorted out without to have a dummy one.

Anyway, inside MenuBarTest (under tests) you can find this (could be useful):

    public void startup(Display display, Map<String, String>
properties) throws Exception {
        // put this before loading the related bxml, or an
IllegalArgumentException will be thrown
        Action.getNamedActions().put("about", new Action() {
            public void perform(Component source) {

        BXMLSerializer bxmlSerializer = new BXMLSerializer();
        frame2 = (Frame)bxmlSerializer.readObject(MenuBarTest.class,


> But I'm still finding a bit to understanding why this is a standard behavior.
Me too (for some things ;-) ...).

The trick suggested by Roger is interesting, maybe we can verify if
something like this could be put somewhere in Pivot (maybe under
tests), just for reference ... Roger, what do you think ?


View raw message