Minimal browser

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Minimal browser

Hilaire Fernandes-6
Hello,

With Pahro 1.4,

Browser newOnClass: Number selector: #+

use to open a minimal browser on the selected method (btw, it is broken now)

With:
Nautilus newOnClass: Number selector: #+


I get a full browser on the method. Is it possible to have a minimal
browser with Nautilus?
I need it in DrGeo to let users edit scripts, I don't want them to be
confused by a full browser.

Thanks

Hilaire


--
Dr. Geo http://drgeo.eu


Reply | Threaded
Open this post in threaded view
|

Re: Minimal browser

stepharo

> Hello,
>
> With Pahro 1.4,
>
> Browser newOnClass: Number selector: #+
>
> use to open a minimal browser on the selected method (btw, it is broken now)
>
> With:
> Nautilus newOnClass: Number selector: #+
>
>
> I get a full browser on the method. Is it possible to have a minimal
> browser with Nautilus?
> I need it in DrGeo to let users edit scripts, I don't want them to be
> confused by a full browser.
I did a small browser called ondoBrowser we could work together to make
it simple
for your users.

Basically I have two columns

     Classes | methods
     ----------------
     text method


Stef

Reply | Threaded
Open this post in threaded view
|

Re: Minimal browser

LogiqueWerks
I volunteer as a test user for this mini-B and DrGeo !

- Windows XP and 7
- various Linux

DrGeo rules !


On 14 May 2014 07:26, stepharo <[hidden email]> wrote:

Hello,

With Pahro 1.4,

Browser newOnClass: Number selector: #+

use to open a minimal browser on the selected method (btw, it is broken now)

With:
Nautilus newOnClass: Number selector: #+


I get a full browser on the method. Is it possible to have a minimal
browser with Nautilus?
I need it in DrGeo to let users edit scripts, I don't want them to be
confused by a full browser.
I did a small browser called ondoBrowser we could work together to make it simple
for your users.

Basically I have two columns

    Classes | methods
    ----------------
    text method


Stef


Reply | Threaded
Open this post in threaded view
|

Re: Minimal browser

Goubier Thierry
In reply to this post by Hilaire Fernandes-6
Like that?

This one is a full browser, scoped at the class (i.e. you can see this,
nothing more).

Not even the class side of the class :( (the surprise of playing with
Refactoring Environments)

Thierry

Le 14/05/2014 11:26, Hilaire Fernandes a écrit :

> Hello,
>
> With Pahro 1.4,
>
> Browser newOnClass: Number selector: #+
>
> use to open a minimal browser on the selected method (btw, it is broken now)
>
> With:
> Nautilus newOnClass: Number selector: #+
>
>
> I get a full browser on the method. Is it possible to have a minimal
> browser with Nautilus?
> I need it in DrGeo to let users edit scripts, I don't want them to be
> confused by a full browser.
>
> Thanks
>
> Hilaire
>
>
--
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

Capture du 2014-05-14 16:08:01.png (64K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Minimal browser

Hilaire Fernandes-6
In reply to this post by stepharo
Hi Stef,

It will be great, now I try to get this list down http://bug.drgeo.eu.
In the meantime, I updated the script related methods to use plain Nautilus.

Thanks

Hilaire

Le 14/05/2014 12:26, stepharo a écrit :

> I did a small browser called ondoBrowser we could work together to make
> it simple
> for your users.
>
> Basically I have two columns
>
>     Classes | methods
>     ----------------
>     text method
>

--
Dr. Geo http://drgeo.eu


Reply | Threaded
Open this post in threaded view
|

Re: Minimal browser

Hilaire Fernandes-6
In reply to this post by Goubier Thierry
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,...

Hilaire

Le 14/05/2014 16:12, Goubier Thierry a écrit :
> Like that?
>
> This one is a full browser, scoped at the class (i.e. you can see this,
> nothing more).
>
> Not even the class side of the class :( (the surprise of playing with
> Refactoring Environments)
>
> Thierry

--
Dr. Geo http://drgeo.eu

ScopedBrowserDrGeoUserScripts.png (78K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Minimal browser

stepharo
In reply to this post by LogiqueWerks
It needs to be improved (mainly missing menus actions).

check the Ondo package in

MCHttpRepository
    location: 'http://smalltalkhub.com/mc/StephaneDucasse/PetitsBazars/main'
    user: ''
    password: ''

I did two experiences (I wanted to see if I could build a browser only using announcements but I failed)
the other one is working but needs more love.

You can write on this project now

Stef


On 14/5/14 12:35, Robert Shiplett wrote:
I volunteer as a test user for this mini-B and DrGeo !

- Windows XP and 7
- various Linux

DrGeo rules !


On 14 May 2014 07:26, stepharo <[hidden email]> wrote:

Hello,

With Pahro 1.4,

Browser newOnClass: Number selector: #+

use to open a minimal browser on the selected method (btw, it is broken now)

With:
Nautilus newOnClass: Number selector: #+


I get a full browser on the method. Is it possible to have a minimal
browser with Nautilus?
I need it in DrGeo to let users edit scripts, I don't want them to be
confused by a full browser.
I did a small browser called ondoBrowser we could work together to make it simple
for your users.

Basically I have two columns

    Classes | methods
    ----------------
    text method


Stef



Reply | Threaded
Open this post in threaded view
|

Re: Minimal browser

Goubier Thierry
In reply to this post by Hilaire Fernandes-6


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

Reply | Threaded
Open this post in threaded view
|

Re: Minimal browser

Hilaire Fernandes-6
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


Reply | Threaded
Open this post in threaded view
|

Re: Minimal browser

Goubier Thierry


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

Reply | Threaded
Open this post in threaded view
|

Re: Minimal browser

Nicolai Hess
In reply to this post by Hilaire Fernandes-6
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 <[hidden email]>:
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



Reply | Threaded
Open this post in threaded view
|

Re: Minimal browser

Hilaire Fernandes-6
In reply to this post by Goubier Thierry
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