Ok... I'll try to explain my scenario, I think I must be something wrong:
1) 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) 2) Outside the glamour browser, in another place of the window, I have a bunch of buttons. 3) 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.
Cheers, Esteban
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."
Hi,
suppose something like the centralized menus from mac: a bunch of browsers and just one menu, enabling/disabling it's options depending the opened browsers.
Cheers, Esteban
pd: nevertheless, first thing I have to do is to review my design, to see if I can overcome this problem :)
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
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
Hello Moosers,
By mistake I was trying to load a project from SqueakSource in which I had forgot to load some classes. The project is called XUnitTest and its main objective is to make Moose aware of unit tests, which in some cases it already is aware, but anyway, one of my tests was trying to load some class called Example1Test into Moose and then perform some assertions.
It turns out I'm really starting to use Monticello and there are certain things I still don't quite understand well, for example that it doesn't automatically realize all the classes I've changed and include them in the project XUnitTest, I didn't quite understand the message protocol part yet (method category). I guess doing that automatically would be dangerous.
Then I tried to load XUnitTest in a clean image (with Moose loaded of course) and I got this error:
"Sets can't meaningful contain nil as an element" at:
MooseimportClassesTask>>addClass: aClass ^classes add: aClass
Then I changed the code from this:
MooseSqueakClassPackageImporterTask>>initialize
super initialize. importerClass := SmalltalkImporter. classes := OrderedCollection new. classExtensions := OrderedCollection new. packages := OrderedCollection new.
To this:
MooseSqueakClassPackageImporterTask>>initialize
super initialize. importerClass := SmalltalkImporter. classes := IdentitySet new. classExtensions := OrderedCollection new. packages := OrderedCollection new.
Now, the test correctly fails indicating that my class is missing (I'm ataching a picture of it), which I think is the intended behavior. So my questions are:
1. Is this the intended behavior? 2. If it is, who should I contact with this patch? (or how can I know who to contact)
Cheers, Guillermo.
Hi Guillermo
By mistake I was trying to load a project from SqueakSource in which I had forgot to load some classes. The project is called XUnitTest and its main objective is to make Moose aware of unit tests, which in some cases it already is aware, but anyway, one of my tests was trying to load some class called Example1Test into Moose and then perform some assertions.
It turns out I'm really starting to use Monticello and there are certain things I still don't quite understand well, for example that it doesn't automatically realize all the classes I've changed and include them in the project XUnitTest, I didn't quite understand the message protocol part yet (method category). I guess doing that automatically would be dangerous.
You should show that to me.
Then I tried to load XUnitTest in a clean image (with Moose loaded of course) and I got this error:
"Sets can't meaningful contain nil as an element" at:
[...]
As far as I understand, the problem is Example1Test does not exist. Since you probably renamed it after your test has been written, then Example1Test points to nil. It does not make sense to send "addClass: nil"
Alexandre
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."