Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [ve-dev] Methods of BeanProxyAdapter

Hi Rich,

Thanks for your help.

More questions:

1. Now I am able to see the widgets on the canvas and also see the effects
of property changes immediately. However, there is one problem. If I close
the Visual Class and open it again, I don't see anything. It requires at
least 3-4 presses of "synch/refresh" button before I can see the images on
the canvas. Could you please explain this behavior? Isn't initial parsing
same as refresh? If not then why are multiple refreshes required? Shouldn't
the first refresh itself do the job?

2. Expressions

An expression is a sort of collection where we put many method invocations.
All the methods are executed in the sequence they have been put in the
expression when he expression is invoked.

So if I instantiate a Bean in the target VM and I want to set some
properties on it at creation time, I put all such methods in the same
expression.

Is there a way of doing conditional execution of methods in an expression?
I.e. suppose a method returns a Boolean value, and based on the value I want
to execute certain methods, how do I test the result of such a method. For
example, for a table, I want to set a model on it in the Target VM if it
does not already have a model. So the expression has:
- call isTableModelSet on table's expression IProxy
- the above method returns a boolean, based on its value...
- call setTableModel on table's IProxy

3.

In VE 1.0, to refer to a proxy, IBeanProxy was used, and to obtain a method
proxy class name was not needed, only method name was needed. E.g.

IMethodProxy method = widgetProxy.getTypeProxy().getMethodProxy("aMethod");
// widgetProxy is of type IBeanProxy

So this code could be used for all the widgets that had getModel method.

In VE 1.1, in expression IProxy is used to refer to widget' proxy. To get a
method, we need to provide class name and method name

// widgetProxy is of type IProxy
IProxyMethod method =
widgetProxy.getProxyFactoryRegistry().getBeanTypeProxyFactory().getMethodPro
xyFactory().getMethodProxy(
    			"AClass",
    			"aMethod", new String[] {});

Since a class name is required, it is not possible to use the same stmt to
get methods of same name for different widgets.

Is there an alternative way of getting a method from an IProxy without
specifying class name?

Thanks and regards,

Janak



Back to the top