Print

Print


Liviu:

Thank you for your incredibly fast response.

I had done the following in Python.

I created a class MyObjectGridPortrayal2D  extending
ObjectGridPortrayal2D. My getInspector(wrapper,state) method
simply returned an instance of MyInspector(wrapper,state).

I created a class MyInspector extending Inspector.
Its initialization code took the wrapper passed to
it, extracted the object and accessed the object values
to be displayed.

Now things got fuzzy for me. My impression
when reading the documentation on SimpleInspector was that
I needed to package the values to be displayed in a
CollectionProperties, it being the only Properties that
did not seem to use the get/set accessing method.

So I wrapped the array of values in CollectionProperties(),
created an instance of SimpleInspector, and tried to
force it to have my CollectionProperties instance
with an assignment:
 mySimpleInspector.properties = myCollectionProperties
I then followed the Java code in creating a box, setting the
layout of mySimpleInspector, adding the box and refreshing
the controller.

This seemed to be very convoluted. A consequence of my lack of
understanding of the display mechanism. It also did not work.
Not unexpected.

What got more confusing was the updateInspector method. I
do not know when it is called, and I don't know what it expects
to be done, other than repeat the process followed in the
initialization code. The tutorial examples had an already
existing inspector do the updating, which did not help.

I am sorry for the rambling. I will continue to experiment
with creating a custom portrayal that constructs the
visualization (widgets) containing the information.

Again, thank you for your speedy response.

Norm