Re: [Pharo-users] Minimal browser
Le 14/05/2014 20:31, Hilaire Fernandes a écrit : Could be yes. Needed action is editing&recompiling code and creating new method in a given class as shown in the screenshot from DrGeo 13.10: even this one is a temporary solution because still too much is exposed to the user as the class/instance button,... Have you considered controlling the user experience directly to let him focus only on the method to create or edit? Creating a text editor window in coding mode with the ability to edit or create a method in a preset class is not much work; I'd say around 20 lines with the default menu and an accept which compiles. If you want complete control on the menu (i.e. a bit more polish than the default and control over which shortcuts are active), I can extract what I've done for mine: it's a minimal command objects API to couple menus and shortcuts inspired by the one of the OmniBrowser (of Pharo 1.4). In there, a typical command with its shortcut/label/icon/activation status is about five lines long. The example I showed you is a full browser, but in which all actions, refactorings and searches will be limited to the class. I still think it is a bit too much for you use case. Thierry -- Thierry Goubier CEA list Laboratoire des Fondations des Systèmes Temps Réel Embarqués 91191 Gif sur Yvette Cedex France Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95
Re: [Pharo-users] Minimal browser
Thierry, I was not aware it could be that short. Yes it will be nice. All in all: - one GUI tool to edit an existing script (so no visibility on the other methods of the class) - one GUI tool to create a method (with visibility to the other method of the class, as possible examples) Hilaire Le 15/05/2014 09:18, Goubier Thierry a écrit : > Have you considered controlling the user experience directly to let him > focus only on the method to create or edit? > > Creating a text editor window in coding mode with the ability to edit or > create a method in a preset class is not much work; I'd say around 20 > lines with the default menu and an accept which compiles. > > If you want complete control on the menu (i.e. a bit more polish than > the default and control over which shortcuts are active), I can extract > what I've done for mine: it's a minimal command objects API to couple > menus and shortcuts inspired by the one of the OmniBrowser (of Pharo > 1.4). In there, a typical command with its > shortcut/label/icon/activation status is about five lines long. -- Dr. Geo http://drgeo.eu
Re: [Pharo-users] Minimal browser
Le 15/05/2014 09:29, Hilaire Fernandes a écrit : Thierry, I was not aware it could be that short. Yes it will be nice. All in all: - one GUI tool to edit an existing script (so no visibility on the other methods of the class) Hilaire, Would you need the script to hide the fact it is a method or not? I.e. make it DSL-Like and hide the method header and its parameters? - one GUI tool to create a method (with visibility to the other method of the class, as possible examples) Does it includes the ability to modify existing methods? I ask that to see if we need to hide much of what makes a system browser in Smalltalk, or, to the contrary, if it is a good idea to open up to the browser world so as to introduce the user (maybe advanced) to the underlying Pharo so as to allow for more powerfull extensions. If we need to hide, then it will be with a dedicated GUI. If we open up, then a restricted browser is best (and then, if we want to keep to standards in Pharo, it means Nautilus). Is DrGeo development open so that I may write it myself ? Thierry Hilaire Le 15/05/2014 09:18, Goubier Thierry a écrit : Have you considered controlling the user experience directly to let him focus only on the method to create or edit? Creating a text editor window in coding mode with the ability to edit or create a method in a preset class is not much work; I'd say around 20 lines with the default menu and an accept which compiles. If you want complete control on the menu (i.e. a bit more polish than the default and control over which shortcuts are active), I can extract what I've done for mine: it's a minimal command objects API to couple menus and shortcuts inspired by the one of the OmniBrowser (of Pharo 1.4). In there, a typical command with its shortcut/label/icon/activation status is about five lines long. -- Thierry Goubier CEA list Laboratoire des Fondations des Systèmes Temps Réel Embarqués 91191 Gif sur Yvette Cedex France Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95
Re: [Pharo-users] Minimal browser
With Spec, it is really easy to make some simple widgets: "you have a class and a method?" class:=Morph. method:=class>>#openInWorld. "want some textmorp?" code := TextModel new. code text:method sourceCode. "with styling?" code aboutToStyle:true. "in context of the class" code behavior:class. "do it!" code openWithSpec. "more? save on accept..." code acceptBlock:[:text | class compile:text notifying:nil. ]. Composing models: class:=Morph. method:=class>>#openInWorld. composed:= DynamicComposableModel new. composed instantiateModels: #(code TextModel method TextInputFieldModel). composed code text:method sourceCode. composed method text: method selector asString. composed code aboutToStyle:true. composed code behavior:class. composed code acceptBlock:[:text | class compile:text notifying:nil. ]. composed method acceptBlock:[:text | method:=class methodDict at:text asSymbol. composed code text:method sourceCode. ]. composed openWithSpecLayout:( SpecLayout composed newColumn:[:r | r add: #method height:25; add: #code]; yourself). or search for DynamicComposableModel in this mailing list or look at some other basic Spec examples in Pharo: | cb | cb := ClassMethodBrowser new. cb openWithSpec. cb classes: Smalltalk allClasses. | si | si := MethodBrowser new. si openWithSpec. si methods: Object methodDict values 2014-05-15 9:29 GMT+02:00 Hilaire Fernandes : > Thierry, > > I was not aware it could be that short. Yes it will be nice. > All in all: > - one GUI tool to edit an existing script (so no visibility on the other > methods of the class) > - one GUI tool to create a method (with visibility to the other method > of the class, as possible examples) > > > Hilaire > > Le 15/05/2014 09:18, Goubier Thierry a écrit : > > > Have you considered controlling the user experience directly to let him > > focus only on the method to create or edit? > > > > Creating a text editor window in coding mode with the ability to edit or > > create a method in a preset class is not much work; I'd say around 20 > > lines with the default menu and an accept which compiles. > > > > If you want complete control on the menu (i.e. a bit more polish than > > the default and control over which shortcuts are active), I can extract > > what I've done for mine: it's a minimal command objects API to couple > > menus and shortcuts inspired by the one of the OmniBrowser (of Pharo > > 1.4). In there, a typical command with its > > shortcut/label/icon/activation status is about five lines long. > > > -- > Dr. Geo http://drgeo.eu > > >
[Pharo-users] Pharo Video Tutorial
As you may or may not be aware of I have started a series of Video Tutorials that I upload to YouTube. I also add these tutorials to my "Pharo Video Tutorial" playlist. Since the last time I posted I have added 9 new tutorials. The playlist is now 2 hours and 22 minutes long and of course there is a lot more to come. The playlist is here : https://www.youtube.com/watch?v=Ol5ivaEATLQ&list=PLqbtQ7OkSta0ULYAd7Qdxof851ybh-_m_ This is the list of the video tutorials the new ones are marked with bold : 1) Why Pharo 2) Install Pharo 3) Create a Class 4) Workspace Variables 5) Instance Variables 6) Temporary Variables *7) Inheritance* *8) Binary Messages* *9) Class Variables and Methods* *10) Class and Method Comments* *11) Browser Icons* *12) Conditions * *14) Arrays* *15) OrderedCollection and useful methods for collections*
Re: [Pharo-users] Pharo Video Tutorial
Excellent! Doru On Thu, May 15, 2014 at 6:36 PM, kilon alios wrote: > As you may or may not be aware of I have started a series of Video > Tutorials that I upload to YouTube. I also add these tutorials to my "Pharo > Video Tutorial" playlist. Since the last time I posted I have added 9 new > tutorials. The playlist is now 2 hours and 22 minutes long and of course > there is a lot more to come. > > The playlist is here : > > > https://www.youtube.com/watch?v=Ol5ivaEATLQ&list=PLqbtQ7OkSta0ULYAd7Qdxof851ybh-_m_ > > This is the list of the video tutorials the new ones are marked with bold : > > 1) Why Pharo > 2) Install Pharo > 3) Create a Class > 4) Workspace Variables > 5) Instance Variables > 6) Temporary Variables > *7) Inheritance* > *8) Binary Messages* > *9) Class Variables and Methods* > *10) Class and Method Comments* > *11) Browser Icons* > *12) Conditions * > *14) Arrays* > *15) OrderedCollection and useful methods for collections* > > > -- www.tudorgirba.com "Every thing has its own flow"
Re: [Pharo-users] Pharo Video Tutorial
supercool kilon, thank you very much! Esteban On 15 May 2014, at 18:36, kilon alios wrote: > As you may or may not be aware of I have started a series of Video Tutorials > that I upload to YouTube. I also add these tutorials to my "Pharo Video > Tutorial" playlist. Since the last time I posted I have added 9 new > tutorials. The playlist is now 2 hours and 22 minutes long and of course > there is a lot more to come. > > The playlist is here : > > https://www.youtube.com/watch?v=Ol5ivaEATLQ&list=PLqbtQ7OkSta0ULYAd7Qdxof851ybh-_m_ > > This is the list of the video tutorials the new ones are marked with bold : > > 1) Why Pharo > 2) Install Pharo > 3) Create a Class > 4) Workspace Variables > 5) Instance Variables > 6) Temporary Variables > 7) Inheritance > 8) Binary Messages > 9) Class Variables and Methods > 10) Class and Method Comments > 11) Browser Icons > 12) Conditions > 14) Arrays > 15) OrderedCollection and useful methods for collections > >
Re: [Pharo-users] Minimal browser
Good evening, Le 15/05/2014 10:40, Goubier Thierry a écrit : > Would you need the script to hide the fact it is a method or not? I.e. > make it DSL-Like and hide the method header and its parameters? For now, it should have the method name to let the user define keyword script message. But this could be as well put in appropriate field. > >> - one GUI tool to create a method (with visibility to the other method >> of the class, as possible examples) > > Does it includes the ability to modify existing methods? It should as well. > I ask that to see if we need to hide much of what makes a system browser > in Smalltalk, or, to the contrary, if it is a good idea to open up to > the browser world so as to introduce the user (maybe advanced) to the > underlying Pharo so as to allow for more powerfull extensions. This is also my thinking it is nice to let the user explore the environment arround. I know Alain, a Pharo fan now, discocer the underlying Pharo with DrGeo scripting et al. Anyway for now in the WIP code, it is Nautilus that show up. > > If we need to hide, then it will be with a dedicated GUI. If we open up, > then a restricted browser is best (and then, if we want to keep to > standards in Pharo, it means Nautilus). > > Is DrGeo development open so that I may write it myself ? DrGeo development is open to anyone interested to participate. I granted you write access. Instruction to install from source: http://smalltalkhub.com/#!/~HilaireFernandes/DrGeo Correct if anythings unclear. Thanks Hilaire -- Dr. Geo http://drgeo.eu