On 14/12/14 21:44, stepharo wrote:
I got the same problem when I put an Halt pressing on any button leads to the opening of the same UI. I wonder if there is not an interaction between spec and the UI modal opening.
I read the code of ImageModel and I did not find anything special.

Yes, I thought as well that could be something regarding modal UI, but I have so little knowledge of Spec and the way it interacts with Morphic that I could not tell more. OK, it works correctly if I put the dialog code inside a block and i fork it, so probably the modal window blocks the way the action of the icon is triggered.

I'll try to investigate more.
Thanks for the feedback,

Tommaso

Stef.
Le 14/12/14 20:26, Tommaso Dal Sasso a écrit :
I have a weird behavior building an interface with Spec.

I have a window built with Spec, and I want to add a button that shows a dialog with some text.
To display the dialog I use the following line:

UIManager default longMessage: 'a text message' title: 'some title'.

And I hooked this code to a widget through the #action: method.
The problem is: If I use a ButtonModel, the code behaves correctly showing the dialog. If I use an instance of the class ImageModel to display an icon, the dialog is displayed but the interface "hangs", in the sense that the "ok" button won't close the dialog and every click would spawn a new dialog.

I would like to use an icon because it integrates better with the interface.
Do you know if it is a bug or if I am doing something wrong?

Thanks,
Tommaso


P.s.: Steps to reproduce

If you need a working example you can inspect the code on the bleeding edge version of ShoreLine Reporter by following these instructions:
1. download a recent Pharo 4 image;
2. open a workspace and run: ConfigurationOfShoreLineReporter loadBleedingEdge
3. trigger an exception (for example by running 3/0 in a workspace).
4. click 'Report'
5. click the '?' button on the right side of the window.







Reply via email to