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.
Good.

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() {
            @Override
            public void perform(Component source) {
...
        });

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

...


> 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 ?


Bye

Mime
View raw message