Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [ve-dev] Unable to see images on Open

Hi Rich,

Please see my answers below.

>>>>>>>>>>>
1. SCENARIO:

- Drop a ULCButton on the canvas. Works ok.
- Close Visual Class.
- Open Visual Class. ULCButton is not visible.
- Refresh/Synch once and the ULCButton is visible.

Question:

Why doesn't the button show up on opening the Visual Class? Why is a refresh
required?

>>> RLK
I did recently find an ordering problem with SWT Shell because the
addToFreeForm was called AFTER the shell was instantiated in the initial
refresh. This meant that the shell took its default visibility value of
false, and so didn't show any of the children. This only happened because by
default SWT Shells are not visible. You need to explicitly make them
visible.
>>>

I checked the order in the debugger and it seems ok.

First the bean is instantiated (the process is started by
CompositionProxyAdapter.initBeanProxy())

Then SubClassCompositionComponentsGraphicalEditPart.activate() is called,
which calls ULCComponentGraphicalEditPart.activate(), which does
ImageFigureController.setImageNotifier(ULCComponentProxyAdapter), which
calls refreshImage() on ULCCompProxyAdapter, which delegates to
ComponentManager.refreshImage().

(The call sequence is similar as in the case of JButton).

Yet I don't see ULCButton on opening the Visual Class. It requires a
refresh. Can you tell me why?

How do I go about debugging this?
>>>>>>>>>>>>>>>>>>

--- RLK I need to understand something first. Your settings are applied to a
ULC component, correct? They are not directly applied to the Swing visual
that represents the component. When a setting is applied to a ULC component,
how is the Swing visual changed? Is it set immediately from the ULC
component. Your next response sort of indicates that you need to call pack
on the top level ULC Component and only then will the Swing visuals be
updated. Is that correct? If that is correct then the pack needs to occur in
the initial instantiation after everything else has been instantiated but
before the images are requested. Is that correct?

JMM: Yes correct. Pack is needed to update the swing component.

Correct we want to pack just before images are requested. Where is this
hook?

Thanks and regards,

Janak




Back to the top