Using Pharo window
Spec provides a hook for any application to open in the Pharo window. This allows to simulate a native window application (with the restriction of a single window application).
To do so, you simply need to open your application with the openWorldWithSpec
message.
By example opening a MessageBrowser usually results to a new window into the Pharo window.
(MessageBrowser
browseMessages: Object methods
refreshingBlock: []
named: '') openWithSpec
This code produces a new window looking like
To open a similar MessageBrowser using the Pharo window, the following code can be executed
(MessageBrowser
browseMessages: Object methods
refreshingBlock: []
named: '') openWorldWithSpec
It will resize the Pharo window and change its title as seen in the figure