Re: [Pharo-project] can we include this in NewInspector ?? (WAS) Fwd: [ANN] MagmaBrowser
Cool :) It is added in the last version. Thank you for your participation at NewInspector ! I think the best way to preview a form is to show it in the right side of the NewInspector in place of the description panel, but it is a really big challenge: NewInspector is unaware about the composants of the frame (everything is done by model). I must found a way to achieve this :) Fréd ---- Frédéric Pluquet Université Libre de Bruxelles (ULB) Assistant http://www.ulb.ac.be/di/fpluquet On Mon, Dec 21, 2009 at 4:57 PM, Mariano Martinez Peck < marianopeck@gmail.com> wrote:
Hi Frederic. Henrik Sperre Johansen created this method:
Form >> asNINode ^ (super asNINode) addAction: (NIAction labeled: 'Preview' shortcut: $p target: [ :aForm | | anOffset aFrame | anOffset := aForm width @ aForm height / -2. aFrame := LayoutFrame fractions: (0.5 @ 0.5 corner: 0.5 @ 0.5) offsets: (anOffset corner: anOffset). (SystemWindow labelled: 'Form preview') addMorph: (ImageMorph new image: aForm) fullFrame: aFrame; openInWorldExtent: (aForm extent max: 267 @ 0) ] actionSelector: #value: withArgs: {self} category: 'Preview'); yourself
It let you see the image of something. Example, inspect a form ( ThemeIcons infoIcon ), right-click the Form node, and select preview.
In addition, he told me this:
"For inclusion in the NewInspector package on SqueakSource, I would at least change the magic number 267 first, to one computed based on the width of the Window label, 267 is merely what is needed to display it fully with the standard window font in PharoDev :) Feel free to do so, and ask Frederique Pluquet to to include it there."
So....can you take care of this and include it ? would be very useful!!!
Thank you very much.
Mariano
---------- Forwarded message ---------- From: Henrik Sperre Johansen <henrik.s.johansen@veloxit.no> Date: Thu, Dec 17, 2009 at 10:12 PM Subject: Re: [Pharo-project] [ANN] MagmaBrowser To: pharo-project@lists.gforge.inria.fr
On 16.12.2009 11:29, Mariano Martinez Peck wrote:
This is an excellent job. Congratulations Hernán.
I have a question....how could you draw the photo instead of the array of bytes on the browser? I really hate when developing with seaside and I have some pictures in my filelibrary class and when I browse them I see the array of bits...but I want to see the picture!!!
Thanks
Mariano For a proof of concept of what is possible using the NewInspector, install this method: Form>>asNINode ^ (super asNINode) addAction: (NIAction labeled: 'Preview' shortcut: $p target: [ :aForm | aForm depth < 32 ifTrue: [ Display getCanvas image: aForm at: 10 @ 10 ] ifFalse: [ Display getCanvas translucentImage: aForm at: 10 @ 10 ] ] actionSelector: #value: withArgs: {self} category: 'Preview'); yourself
then inspect a form (Say, ThemeIcons infoIcons ), right-click the Form node, and select preview.
Ideally it'd be nice to add an extra "Preview" item to the subnodes of Forms in the NI, which when clicked would show the form on the right side, but I don't (easily) see how you can temporarily replace the TextMorph on the right side with something capable of displaying Forms
With some more work on the closure it should be possible to open the preview in a separate window though :)
Cheers, Henry
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
On Mon, Dec 21, 2009 at 8:09 PM, Frederic Pluquet <fpluquet@ulb.ac.be>wrote:
Cool :)
It is added in the last version. Thank you for your participation at NewInspector !
you are welcome, it was all thanks to henrik.
I think the best way to preview a form is to show it in the right side of the NewInspector in place of the description panel, but it is a really big challenge: NewInspector is unaware about the composants of the frame (everything is done by model). I must found a way to achieve this :)
yes, that would be REALLYYYYYYYYY cool! but REALLY COOL. hahahah. I don't know to much, but maybe you can ask in the mailing list and someone has an idea :)
Fréd ---- Frédéric Pluquet Université Libre de Bruxelles (ULB) Assistant http://www.ulb.ac.be/di/fpluquet
On Mon, Dec 21, 2009 at 4:57 PM, Mariano Martinez Peck < marianopeck@gmail.com> wrote:
Hi Frederic. Henrik Sperre Johansen created this method:
Form >> asNINode ^ (super asNINode) addAction: (NIAction labeled: 'Preview' shortcut: $p target: [ :aForm | | anOffset aFrame | anOffset := aForm width @ aForm height / -2. aFrame := LayoutFrame fractions: (0.5 @ 0.5 corner: 0.5 @ 0.5) offsets: (anOffset corner: anOffset). (SystemWindow labelled: 'Form preview') addMorph: (ImageMorph new image: aForm) fullFrame: aFrame; openInWorldExtent: (aForm extent max: 267 @ 0) ] actionSelector: #value: withArgs: {self} category: 'Preview'); yourself
It let you see the image of something. Example, inspect a form ( ThemeIcons infoIcon ), right-click the Form node, and select preview.
In addition, he told me this:
"For inclusion in the NewInspector package on SqueakSource, I would at least change the magic number 267 first, to one computed based on the width of the Window label, 267 is merely what is needed to display it fully with the standard window font in PharoDev :) Feel free to do so, and ask Frederique Pluquet to to include it there."
So....can you take care of this and include it ? would be very useful!!!
Thank you very much.
Mariano
---------- Forwarded message ---------- From: Henrik Sperre Johansen <henrik.s.johansen@veloxit.no> Date: Thu, Dec 17, 2009 at 10:12 PM Subject: Re: [Pharo-project] [ANN] MagmaBrowser To: pharo-project@lists.gforge.inria.fr
On 16.12.2009 11:29, Mariano Martinez Peck wrote:
This is an excellent job. Congratulations Hernán.
I have a question....how could you draw the photo instead of the array of bytes on the browser? I really hate when developing with seaside and I have some pictures in my filelibrary class and when I browse them I see the array of bits...but I want to see the picture!!!
Thanks
Mariano For a proof of concept of what is possible using the NewInspector, install this method: Form>>asNINode ^ (super asNINode) addAction: (NIAction labeled: 'Preview' shortcut: $p target: [ :aForm | aForm depth < 32 ifTrue: [ Display getCanvas image: aForm at: 10 @ 10 ] ifFalse: [ Display getCanvas translucentImage: aForm at: 10 @ 10 ] ] actionSelector: #value: withArgs: {self} category: 'Preview'); yourself
then inspect a form (Say, ThemeIcons infoIcons ), right-click the Form node, and select preview.
Ideally it'd be nice to add an extra "Preview" item to the subnodes of Forms in the NI, which when clicked would show the form on the right side, but I don't (easily) see how you can temporarily replace the TextMorph on the right side with something capable of displaying Forms
With some more work on the closure it should be possible to open the preview in a separate window though :)
Cheers, Henry
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
On 21.12.2009 20:09, Frederic Pluquet wrote:
Cool :)
It is added in the last version. Thank you for your participation at NewInspector !
I think the best way to preview a form is to show it in the right side of the NewInspector in place of the description panel, but it is a really big challenge: NewInspector is unaware about the composants of the frame (everything is done by model). I must found a way to achieve this :)
Fréd ---- Frédéric Pluquet Université Libre de Bruxelles (ULB) Assistant http://www.ulb.ac.be/di/fpluquet Yes, that was my first thought too, as I told Mariano in a private mail. Sadly, setting the description to be a Form didn't work as well as I had hoped ...
So this was the result of the "what can I come up with in 20 mins?" approach :) Probably should be written with a PluggableImageSpec/Morph (which don't exist yet) either way if you're using ToolBuilder for the cross-ui implementation potential. Cheers, Henry
Yes ! I find a way to view the form in place of the description pane ! Finally it was not so hard :) Check the last version of NewInspector and inspect for example "Form allInstances". In the same time, I personalized also the color instances :) For example, inspect : "Color allInstances first: 1000" To Pharo developers: if you want to see anything in place of the description pane, please write a descriptionChildrenSpecBlock (see classes Color and Form for more explanations) and submit it to me. Fréd ---- Frédéric Pluquet Université Libre de Bruxelles (ULB) Assistant http://www.ulb.ac.be/di/fpluquet On Mon, Dec 21, 2009 at 10:04 PM, Henrik Sperre Johansen < henrik.s.johansen@veloxit.no> wrote:
On 21.12.2009 20:09, Frederic Pluquet wrote:
Cool :)
It is added in the last version. Thank you for your participation at NewInspector !
I think the best way to preview a form is to show it in the right side of the NewInspector in place of the description panel, but it is a really big challenge: NewInspector is unaware about the composants of the frame (everything is done by model). I must found a way to achieve this :)
Fréd ---- Frédéric Pluquet Université Libre de Bruxelles (ULB) Assistant http://www.ulb.ac.be/di/fpluquet
Yes, that was my first thought too, as I told Mariano in a private mail. Sadly, setting the description to be a Form didn't work as well as I had hoped ...
So this was the result of the "what can I come up with in 20 mins?" approach :) Probably should be written with a PluggableImageSpec/Morph (which don't exist yet) either way if you're using ToolBuilder for the cross-ui implementation potential.
Cheers, Henry
2009/12/21 Frederic Pluquet <fpluquet@ulb.ac.be>
Yes ! I find a way to view the form in place of the description pane ! Finally it was not so hard :) Check the last version of NewInspector and inspect for example "Form allInstances".
This is great man. Thank you very much to you and to henrik!!! In the same time, I personalized also the color instances :) For example,
inspect : "Color allInstances first: 1000"
To Pharo developers: if you want to see anything in place of the description pane, please write a descriptionChildrenSpecBlock (see classes Color and Form for more explanations) and submit it to me.
Fréd ---- Frédéric Pluquet Université Libre de Bruxelles (ULB) Assistant http://www.ulb.ac.be/di/fpluquet
On Mon, Dec 21, 2009 at 10:04 PM, Henrik Sperre Johansen < henrik.s.johansen@veloxit.no> wrote:
On 21.12.2009 20:09, Frederic Pluquet wrote:
Cool :)
It is added in the last version. Thank you for your participation at NewInspector !
I think the best way to preview a form is to show it in the right side of the NewInspector in place of the description panel, but it is a really big challenge: NewInspector is unaware about the composants of the frame (everything is done by model). I must found a way to achieve this :)
Fréd ---- Frédéric Pluquet Université Libre de Bruxelles (ULB) Assistant http://www.ulb.ac.be/di/fpluquet
Yes, that was my first thought too, as I told Mariano in a private mail. Sadly, setting the description to be a Form didn't work as well as I had hoped ...
So this was the result of the "what can I come up with in 20 mins?" approach :) Probably should be written with a PluggableImageSpec/Morph (which don't exist yet) either way if you're using ToolBuilder for the cross-ui implementation potential.
Cheers, Henry
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Fred this is cool !! Now I was thinking if you could not reuse this block and use it to add the visual before the [1] : Form... as int he explorer Stef
Form allInstances
Good idea. Too easy finally :) Done in the last version (see the screenshot)! For Form and Color instances. Parametrizable by blocks or method overridding (#niIcon or #niIconName) :) Fréd ---- Frédéric Pluquet Université Libre de Bruxelles (ULB) Assistant http://www.ulb.ac.be/di/fpluquet 2009/12/22 Stéphane Ducasse <stephane.ducasse@inria.fr>
Fred
this is cool !!
Now I was thinking if you could not reuse this block and use it to add the visual before the [1] : Form... as int he explorer
Stef
Form allInstances
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Looks good! Alexandre On 22 Dec 2009, at 21:35, Frederic Pluquet wrote:
Good idea. Too easy finally :) Done in the last version (see the screenshot)!
For Form and Color instances. Parametrizable by blocks or method overridding (#niIcon or #niIconName) :)
Fréd ---- Frédéric Pluquet Université Libre de Bruxelles (ULB) Assistant http://www.ulb.ac.be/di/fpluquet
2009/12/22 Stéphane Ducasse <stephane.ducasse@inria.fr> Fred
this is cool !!
Now I was thinking if you could not reuse this block and use it to add the visual before the [1] : Form... as int he explorer
Stef
Form allInstances
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
<Forms with Icons !.png>_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
I like when we can get the butter and the money for the butter :) Indeed like that this is really cool. Did you try to see if you could display any morph like that? ( I mean as icon). Stef On Dec 22, 2009, at 9:35 PM, Frederic Pluquet wrote:
Good idea. Too easy finally :) Done in the last version (see the screenshot)!
For Form and Color instances. Parametrizable by blocks or method overridding (#niIcon or #niIconName) :)
Fréd ---- Frédéric Pluquet Université Libre de Bruxelles (ULB) Assistant http://www.ulb.ac.be/di/fpluquet
2009/12/22 Stéphane Ducasse <stephane.ducasse@inria.fr> Fred
this is cool !!
Now I was thinking if you could not reuse this block and use it to add the visual before the [1] : Form... as int he explorer
Stef
Form allInstances
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
<Forms with Icons !.png>_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Icons for Morph instances : Done :) Moreover I put the image of the morph in the description pane (see the screenshot) ! :) Other things Stef ? :) Fred ---- Frédéric Pluquet Université Libre de Bruxelles (ULB) Assistant http://www.ulb.ac.be/di/fpluquet On Wed, Dec 23, 2009 at 8:58 AM, Stéphane Ducasse <stephane.ducasse@inria.fr
wrote:
I like when we can get the butter and the money for the butter :) Indeed like that this is really cool. Did you try to see if you could display any morph like that? ( I mean as icon). Stef
On Dec 22, 2009, at 9:35 PM, Frederic Pluquet wrote:
Good idea. Too easy finally :) Done in the last version (see the screenshot)!
For Form and Color instances. Parametrizable by blocks or method overridding (#niIcon or #niIconName) :)
Fréd ---- Frédéric Pluquet Université Libre de Bruxelles (ULB) Assistant http://www.ulb.ac.be/di/fpluquet
2009/12/22 Stéphane Ducasse <stephane.ducasse@inria.fr> Fred
this is cool !!
Now I was thinking if you could not reuse this block and use it to add the visual before the [1] : Form... as int he explorer
Stef
Form allInstances
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
<Forms with Icons !.png>_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
that's is TOO cool :) 2009/12/23 Frederic Pluquet <fpluquet@ulb.ac.be>
Icons for Morph instances : Done :) Moreover I put the image of the morph in the description pane (see the screenshot) ! :)
Other things Stef ? :)
Fred ---- Frédéric Pluquet Université Libre de Bruxelles (ULB) Assistant http://www.ulb.ac.be/di/fpluquet
On Wed, Dec 23, 2009 at 8:58 AM, Stéphane Ducasse < stephane.ducasse@inria.fr> wrote:
I like when we can get the butter and the money for the butter :) Indeed like that this is really cool. Did you try to see if you could display any morph like that? ( I mean as icon). Stef
On Dec 22, 2009, at 9:35 PM, Frederic Pluquet wrote:
Good idea. Too easy finally :) Done in the last version (see the screenshot)!
For Form and Color instances. Parametrizable by blocks or method overridding (#niIcon or #niIconName) :)
Fréd ---- Frédéric Pluquet Université Libre de Bruxelles (ULB) Assistant http://www.ulb.ac.be/di/fpluquet
2009/12/22 Stéphane Ducasse <stephane.ducasse@inria.fr> Fred
this is cool !!
Now I was thinking if you could not reuse this block and use it to add the visual before the [1] : Form... as int he explorer
Stef
Form allInstances
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
<Forms with Icons !.png>_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
This is christmax.
Icons for Morph instances : Done :) Moreover I put the image of the morph in the description pane (see the screenshot) ! :)
Other things Stef ? :)
This is cool definitively cool. Are the morphs living? :) can I interact with them? I guess not because it would mean that you have either to copy them (bad idea). So I was dreaming :) Stef
I was thinking if this little improvement will be of help to NullPointer and the UIBuilder. On Wed, Dec 23, 2009 at 12:15 PM, Stéphane Ducasse < stephane.ducasse@inria.fr> wrote:
This is christmax.
Icons for Morph instances : Done :) Moreover I put the image of the morph in the description pane (see the screenshot) ! :)
Other things Stef ? :)
This is cool definitively cool. Are the morphs living? :) can I interact with them? I guess not because it would mean that you have either to copy them (bad idea). So I was dreaming :)
Stef
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
participants (5)
-
Alexandre Bergel -
Frederic Pluquet -
Henrik Sperre Johansen -
Mariano Martinez Peck -
Stéphane Ducasse