Dear list,
I enhanced Mondrian to support announcement based event. Here an example: -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | view |
view := MOViewRenderer new. view subscribe: MOMouseEnter do: [:ann | (ann element notNil and: [(ann element isKindOf: MORoot) not]) ifTrue: [MOPopup show: ann element printString] ifFalse: [MOPopup remove] ].
view subscribe: MOMouseDown do: [:ann | ann inspect].
view nodeShape: (MORectangleShape new width: 30; height: 40). view nodes: (1 to: 5).
view open -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Two effects: - putting the mouse over a box display a popup window. - clicking on a box open an inspector
I propose an extension. I think this respects what was done in VW. But maybe one wants to have different event handler regarding the objects inserted. For example:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | view |
view := MOViewRenderer new. view nodeShape: (MORectangleShape new width: 30; height: 40).
view subscribe: MOMouseDown do: [:ann | ann inspect]. view nodes: (1 to: 5).
view subscribe: MOMouseDown do: [:ann | Beeper beep]. view nodes: (5 to: 10).
view open -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Nodes from 1 to 5 will open an inspector when clicked. Nodes from 1 to 10 will beep instead.
Cheers, Alexandre
doru and lukas I was wondering why you did not use morphs for mondrian since I have the impression that for drag and drop alex is reinventing the morph event dispatch loop.
Stef
On Feb 2, 2009, at 1:56 PM, Alexandre Bergel wrote:
Dear list,
I enhanced Mondrian to support announcement based event. Here an example: -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | view |
view := MOViewRenderer new. view subscribe: MOMouseEnter do: [:ann | (ann element notNil and: [(ann element isKindOf: MORoot) not]) ifTrue: [MOPopup show: ann element printString] ifFalse: [MOPopup remove] ].
view subscribe: MOMouseDown do: [:ann | ann inspect].
view nodeShape: (MORectangleShape new width: 30; height: 40). view nodes: (1 to: 5).
view open
Two effects:
- putting the mouse over a box display a popup window.
- clicking on a box open an inspector
I propose an extension. I think this respects what was done in VW. But maybe one wants to have different event handler regarding the objects inserted. For example:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | view |
view := MOViewRenderer new. view nodeShape: (MORectangleShape new width: 30; height: 40).
view subscribe: MOMouseDown do: [:ann | ann inspect]. view nodes: (1 to: 5).
view subscribe: MOMouseDown do: [:ann | Beeper beep]. view nodes: (5 to: 10).
view open
Nodes from 1 to 5 will open an inspector when clicked. Nodes from 1 to 10 will beep instead.
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
I was wondering why you did not use morphs for mondrian since I have the impression that for drag and drop alex is reinventing the morph event dispatch loop.
I don't know exactly the current situation, but when I last worked on Mondrian for Squeak it had drag and drop. These were a couple of lines of code built on top of the basic mouse events. Essentially this is the same as when you implement drag and drop in the HTML DOM tree.
Morphic is way too slow, way to wasteful with memory and too platform dependent for something like Mondrian. One of the reasons why the original Mondrian is not portable, is because it is tightly connected with the graphic system of VisualWorks.
Lukas
Hi,
As Lukas says, Morphs do not scale when you have thousands of them. Drag and drop did work at some point. It's just that Jorge and me started a larger refactoring that was supposed to improve the model but stopped at midway because of some low level problems.
I will synchronize tomorrow with Alex and we will see what we can do.
Cheers, Doru
On Feb 2, 2009, at 8:37 PM, Lukas Renggli wrote:
I was wondering why you did not use morphs for mondrian since I have the impression that for drag and drop alex is reinventing the morph event dispatch loop.
I don't know exactly the current situation, but when I last worked on Mondrian for Squeak it had drag and drop. These were a couple of lines of code built on top of the basic mouse events. Essentially this is the same as when you implement drag and drop in the HTML DOM tree.
Morphic is way too slow, way to wasteful with memory and too platform dependent for something like Mondrian. One of the reasons why the original Mondrian is not portable, is because it is tightly connected with the graphic system of VisualWorks.
Lukas
-- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com
"Be rather willing to give than demanding to get."
Hi,
As Lukas says, Morphs do not scale when you have thousands of them.
I really wonder why (expect that morphic is doing far too much too) I imgaine that this is the same as with VW and when adrian implemented the visualiziation for chronia. so do you draw on a canvas and map back the coordinates to the object that should represent it?
Stef
Drag and drop did work at some point. It's just that Jorge and me started a larger refactoring that was supposed to improve the model but stopped at midway because of some low level problems.
I will synchronize tomorrow with Alex and we will see what we can do.
Cheers, Doru
On Feb 2, 2009, at 8:37 PM, Lukas Renggli wrote:
I was wondering why you did not use morphs for mondrian since I have the impression that for drag and drop alex is reinventing the morph event dispatch loop.
I don't know exactly the current situation, but when I last worked on Mondrian for Squeak it had drag and drop. These were a couple of lines of code built on top of the basic mouse events. Essentially this is the same as when you implement drag and drop in the HTML DOM tree.
Morphic is way too slow, way to wasteful with memory and too platform dependent for something like Mondrian. One of the reasons why the original Mondrian is not portable, is because it is tightly connected with the graphic system of VisualWorks.
Lukas
-- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com
"Be rather willing to give than demanding to get."
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Yes, we basically draw on canvas. Actually in Mondrian, unlike in Chronia, we have an object for each figure, but the object is only doing Mondrian specific things and has no bloat with it. Initially we started Mondrian with HotDraw, but even that was too slow, so we (well, mostly Michael :)) ended up implementing dedicated objects.
Cheers, Doru
On Feb 2, 2009, at 9:22 PM, Stéphane Ducasse wrote:
Hi,
As Lukas says, Morphs do not scale when you have thousands of them.
I really wonder why (expect that morphic is doing far too much too) I imgaine that this is the same as with VW and when adrian implemented the visualiziation for chronia. so do you draw on a canvas and map back the coordinates to the object that should represent it?
Stef
Drag and drop did work at some point. It's just that Jorge and me started a larger refactoring that was supposed to improve the model but stopped at midway because of some low level problems.
I will synchronize tomorrow with Alex and we will see what we can do.
Cheers, Doru
On Feb 2, 2009, at 8:37 PM, Lukas Renggli wrote:
I was wondering why you did not use morphs for mondrian since I have the impression that for drag and drop alex is reinventing the morph event dispatch loop.
I don't know exactly the current situation, but when I last worked on Mondrian for Squeak it had drag and drop. These were a couple of lines of code built on top of the basic mouse events. Essentially this is the same as when you implement drag and drop in the HTML DOM tree.
Morphic is way too slow, way to wasteful with memory and too platform dependent for something like Mondrian. One of the reasons why the original Mondrian is not portable, is because it is tightly connected with the graphic system of VisualWorks.
Lukas
-- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com
"Be rather willing to give than demanding to get."
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."
Yes, we basically draw on canvas. Actually in Mondrian, unlike in Chronia, we have an object for each figure, but the object is only doing Mondrian specific things and has no bloat with it.
What alex showed me was not that snappy so I was wondering because drawing in the canvas can be really fast.
Initially we started Mondrian with HotDraw, but even that was too slow, so we (well, mostly Michael :)) ended up implementing dedicated objects.
I can imagine HotDraw is dog slow.
Thanks doru
Cheers, Doru
On Feb 2, 2009, at 9:22 PM, Stéphane Ducasse wrote:
Hi,
As Lukas says, Morphs do not scale when you have thousands of them.
I really wonder why (expect that morphic is doing far too much too) I imgaine that this is the same as with VW and when adrian implemented the visualiziation for chronia. so do you draw on a canvas and map back the coordinates to the object that should represent it?
Stef
Drag and drop did work at some point. It's just that Jorge and me started a larger refactoring that was supposed to improve the model but stopped at midway because of some low level problems.
I will synchronize tomorrow with Alex and we will see what we can do.
Cheers, Doru
On Feb 2, 2009, at 8:37 PM, Lukas Renggli wrote:
I was wondering why you did not use morphs for mondrian since I have the impression that for drag and drop alex is reinventing the morph event dispatch loop.
I don't know exactly the current situation, but when I last worked on Mondrian for Squeak it had drag and drop. These were a couple of lines of code built on top of the basic mouse events. Essentially this is the same as when you implement drag and drop in the HTML DOM tree.
Morphic is way too slow, way to wasteful with memory and too platform dependent for something like Mondrian. One of the reasons why the original Mondrian is not portable, is because it is tightly connected with the graphic system of VisualWorks.
Lukas
-- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com
"Be rather willing to give than demanding to get."
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."
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev