Action and ActionConvertors

[email protected] Thu, 24 Feb 2005 16:54:01 -0500 (EST)
Newsgroups gmane.comp.embedded.carlsbad-cubes
Message-ID <[email protected]>
Hi

I saw the foll code in Parser.java

            if (Action.class.equals( paraType )) {
              para = engine.getClient().getClass().getField( attr.getValue() ).get( engine.getClient() );
              action = (Action) para;
            } else {
              para = converter.convert( paraType, attr, engine.getLocalizer() );
            }

			method.invoke( obj, new Object[]{para} ); // ATTR SET

But after the method.invoke, the action object is not used again, that I can
see.  Can someone please give a quick explanation, or a pointer for where to
look further?

I am assuming that if this Action was associated with a button or something,
then that button has to call the action when clicked? Where can I find the
code for this in Swix?

The method object is retrieved using a guessSetter .. for my action, say Back,
I have a setter method setBack(Action a) in my class as well as a getBack().

However, instead of using getBack() as I would expect, the code on line 2
above looks for a field of my class called Back (lcased) rather than a getter ?

In short, it uses setters, but not getters?

thx,
n

-- 
Nandan Bagchee

Excuse me, but what the hell?

	-- Slava Pestov
	   on seeing:
  	   FunctorParser parser = new FunctorParser();
  	   BinaryFunctor toggleOther = parser.parseBinary("x.setEnabled(!x.isEnabled())",
	   											   JButton.class, ActionEvent.class);