Hi,
As I said, the problem is that Glamour does not aggregate these internal announcements through one announcer that can be accessible from outside. A solution here would be to make the browser always propagate the internal announcements. Like this, you should be able to listen to the outer browser.
However, I am not sure I would like to do that :). The idea of Glamour is that if you want a piece of data from somewhere, you should explicitly model it with transmissions. So, if you want to be notified from some #selection port of a #pane, what you want is to create a transmission from that port to the outer pane:
browser transmit from: #page; toOutside: #selectionFromPane.
Then, if you listen to the GLMContextChanged of the outer browser, you should get announcements for changes in the #selectionFromPane port.
Cheers, Doru
On 27 Oct 2010, at 00:50, Esteban Lorenzano wrote:
Hi,
Ok, so I suppose that GLMContextChanged (or some "model" announcement) should be triggered when a #selection: message is sent... the only problem is that the announcer is being reset each time a copy is made (and I thing presenter copies are being used a lot inside glamour)... and the announcement is lost. Of course, I can call an announcer *outside* glamour, but that feels veeeeeeery hacky... any idea of how to solve this issue will be very welcome :)
cheers, Esteban
El 26/10/2010, a las 8:18a.m., Tudor Girba escribió:
Hi Esteban,
On 25 Oct 2010, at 23:50, Esteban Lorenzano wrote:
Ok... I'll try to explain my scenario, I think I must be something wrong:
- I'm embedding a browser in my own window (I'm not opening them using #openOn:). btw, this leads to an override in GLMMorphicPaneRenderer>>#render: to check if window is nil)
- Outside the glamour browser, in another place of the window, I have a bunch of buttons.
- that buttons should be enabled/disabled depending some of the selections of the browser
I hope this made my needs clearer... and of course, if I'm using glamour in a wrong way, please let me know.
As I understand, you need announcements from inside Glamour. In this case you should try to not depend on the announcements specific to Morphic, because those can change all the time (they are supposed to be internal). Instead, if you must react to something inside, you should always go through the model of Glamour. Unfortunately, at the moment, there is no aggregator of all announcements inside a browser, but you can try to hook to the existing announcements. In particular, you are interested in getting GLMContextChanged from the presentations inside the panes of the browser (look at references, in tests).
Still, I would like to ask about the use case. Why would you need to embed this browser in an external context. Is it because that context is not handleable by Glamour?
Cheers, Doru
Cheers, Esteban
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com
"Value is always contextual."
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com
"Value is always contextual."