Performing a user interaction always goes through signaling the
notification. For example to request a text input:
expression := OBTextRequest new
prompt: 'Enter a matching expression';
signal
Or to open the completion dialog:
category := OBCompletionRequest new
assisted: true;
collection: categories;
prompt: 'Add Category';
signal
Or to open a new browser:
view := OBBrowseRequest new
browser: OBSystemBrowser new;
signal
Note that Morphic raises some interaction notifications in a very
hackish too (with information stuffed into arrays and dictionaries)
when opening some (of course not all) of the user interactions. OB
implemented its own user interaction mechanism long before Morphic was
improved and also to remain independent of the platform/view.
Lukas
On 24 January 2011 13:07, Tudor Girba <[email protected]> wrote:
> Hi Lukas,
>
> On 24 Jan 2011, at 15:57, Lukas Renggli wrote:
>
>>> My main current question is what are the reasons for OBInteractionRequest
>>> to subclass Notification?
>>
>> To be able to perform user interactions anywhere without having a
>> global OBPlatform instance, and without having to pass OBPlatform in
>> or store OBPlatform anywhere. There can be multiple UI platforms
>> active at the same time and they can even change over the lifetime of
>> a single browser window.
>
> I am not sure I understand. Why did it have to be a subclass of Notification?
> Would it not be enough to have it as a subclass of Object?
>
> Cheers,
> Doru
>
>
>
>> Lukas
>>
>> --
>> Lukas Renggli
>> www.lukas-renggli.ch
>>
>
> --
> www.tudorgirba.com
>
> "The coherence of a trip is given by the clearness of the goal."
>
>
>
>
>
>
--
Lukas Renggli
www.lukas-renggli.ch