Playground and Smalltalk script

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

Playground and Smalltalk script

HilaireFernandes
Hi,

Same question asked there
http://forum.world.st/Pharo-4-Playground-open-file-menu-tt4823334.html.

I tried to follow the suggested solutions:

1) Following article:
http://www.humane-assessment.com/blog/managing-external-pharo-scripts-with-gtinspector-and-gtspotter/ 


Accessing to DrGeo SmalltalkScripts folder from Spotter, it works when
the user input ../../SmalltalkScripts. As it is not a discoverable
features for the user, I want to add a menu entry in the world menu to
open Spotter with path ../../SmalltalkScripts already set.

I tried:


  GTSpotterMorph new
         extent: 400@500;
         doLayout;
         spotterModel: (GTSpotter on:DrGDefault mySketchesPath parent /
'SmalltalkSketches' );
         openCenteredInWorld

(Btw, the descriptions in the Settings browser concerning Spotter are
still broken.)

When dive-in the display script is empty, any idea? I have to Enter to
get it seens in an inspector.

Moreoever I see one minor issue: Spotter looks at relative path
relatively from the folder where the image was built not from where it
is runned. Note: FileBrowser properly open relatively to the path where
it is runned.

2) I tried the complementary approach with play-cache, I edited in the
setting browser the play cache path to DrGeo SmalltalkScripts. Now when
I edit some new scripts in the Playground, I can rename it and it is
saved in the SmalltalkScripts. Now when exploring, the SmalltalkScripts,
there are several additionnal file not meaning full for the enduser. Is
there a way for Playground to only save one file as pageName.st?

An interesting option will be for me to add two menu entries in
GTPlayground to load/save script. Is it possible? It will make the user
experience a bit easier.

Thanks

Hilaire

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


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

Re: Playground and Smalltalk script

HilaireFernandes
The issue can be seen in the built at
https://www.dropbox.com/s/a4wb7c6od4fdl9k/DrGeo.app-18.06a.zip?dl=0

In the world menu, just select "Open script", Spotter is open in a
folder full of .st scripts, Ctrl-Left does not preview the script
content, any idea?

Hilaire

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



Reply | Threaded
Open this post in threaded view
|

Re: Playground and Smalltalk script

Tudor Girba-2
Hi,

The preview happens with Ctrl+p (or clicking on the large gray arrow that goes out of the window frame).

Ctrl+Right goes inside the selected object and tries to search there.

Cheers,
Doru

> On Apr 16, 2018, at 9:34 PM, Hilaire <[hidden email]> wrote:
>
> The issue can be seen in the built at https://www.dropbox.com/s/a4wb7c6od4fdl9k/DrGeo.app-18.06a.zip?dl=0
>
> In the world menu, just select "Open script", Spotter is open in a folder full of .st scripts, Ctrl-Left does not preview the script content, any idea?
>
> Hilaire
>
> --
> Dr. Geo
> http://drgeo.eu
>
>
>

--
www.tudorgirba.com
www.feenk.com

"There are no old things, there are only old ways of looking at them."





Reply | Threaded
Open this post in threaded view
|

Re: Playground and Smalltalk script

HilaireFernandes
Of course I meant Ctrl-Right, the preview on .st. script is then empty.
Or do I have the preview unactivated?

Try out the built I proivde a link to, it now works on Mac OSX too :)

Thanks


Hilaire



-----
http://drgeo.eu
--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

Reply | Threaded
Open this post in threaded view
|

Re: Playground and Smalltalk script

Tudor Girba-2
Hi,

I did try out.

Indeed, the preview is deactivated by default. Please use Ctrl+P for toggling preview. Ctrl+Right dives in the object.

If you want to script it, take a look at:
GTSpotter class>>#exampleWithPreview

Cheers,
Doru

> On Apr 17, 2018, at 10:49 AM, HilaireFernandes <[hidden email]> wrote:
>
> Of course I meant Ctrl-Right, the preview on .st. script is then empty.
> Or do I have the preview unactivated?
>
> Try out the built I proivde a link to, it now works on Mac OSX too :)
>
> Thanks
>
>
> Hilaire
>
>
>
> -----
> http://drgeo.eu
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>

--
www.tudorgirba.com
www.feenk.com

"There are no old things, there are only old ways of looking at them."





Reply | Threaded
Open this post in threaded view
|

Re: Playground and Smalltalk script

HilaireFernandes
Okay, activate the preview by default, nicer, not sure if it should be
activated after all.

The Ctrl-Right dives in still produces empty frame. Is it because
dive-in has no operation on .st scripts?

Thanks

Hilaire


Le 17/04/2018 à 11:34, Tudor Girba a écrit :
> Indeed, the preview is deactivated by default. Please use Ctrl+P for toggling preview. Ctrl+Right dives in the object.
>
> If you want to script it, take a look at:
> GTSpotter class>>#exampleWithPreview

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



Reply | Threaded
Open this post in threaded view
|

Re: Playground and Smalltalk script

Tudor Girba-2
At every step, Spotter shows you the searches defined for the object you are looking at. The very first object is an instance of GTSpotter itself. If you dive in an object, the search will be performed within the context of that object.

In your case, if you dive in an .st file, the Spotter will try to search within that context. As there is no search, it will show an empty pane. It is not ideal, but at the time we did not find a better solution.

Doru

> On Apr 17, 2018, at 5:34 PM, Hilaire <[hidden email]> wrote:
>
> Okay, activate the preview by default, nicer, not sure if it should be activated after all.
>
> The Ctrl-Right dives in still produces empty frame. Is it because dive-in has no operation on .st scripts?
>
> Thanks
>
> Hilaire
>
>
> Le 17/04/2018 à 11:34, Tudor Girba a écrit :
>> Indeed, the preview is deactivated by default. Please use Ctrl+P for toggling preview. Ctrl+Right dives in the object.
>>
>> If you want to script it, take a look at:
>> GTSpotter class>>#exampleWithPreview
>
> --
> Dr. Geo
> http://drgeo.eu
>
>
>

--
www.tudorgirba.com
www.feenk.com

"Obvious things are difficult to teach."





Reply | Threaded
Open this post in threaded view
|

Re: Playground and Smalltalk script

HilaireFernandes
Ok, got it.

And what about no dive-in if there is no search in that context. Will it
be consistent with the overall behavior of Spotter?


Le 17/04/2018 à 19:37, Tudor Girba a écrit :
> In your case, if you dive in an .st file, the Spotter will try to search within that context. As there is no search, it will show an empty pane. It is not ideal, but at the time we did not find a better solution.

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



Reply | Threaded
Open this post in threaded view
|

Re: Playground and Smalltalk script

Tudor Girba-2
Hi,

It would if we would be able to know that there is no search possible within a context.

In your case, an .st file is a FileReference, and this class defines several searches (for example for files in a folder). Thus we cannot guarantee statically that no search is possible, so we chose to allow you to always dive in.

But, this is the behavior of the generic Spotter. In your case you want a more restricted behavior (simple list, no dive in), and this is certainly legitimate, and it would be ideal to support it.

Cheers,
Doru

> On Apr 17, 2018, at 8:53 PM, Hilaire <[hidden email]> wrote:
>
> Ok, got it.
>
> And what about no dive-in if there is no search in that context. Will it be consistent with the overall behavior of Spotter?
>
>
> Le 17/04/2018 à 19:37, Tudor Girba a écrit :
>> In your case, if you dive in an .st file, the Spotter will try to search within that context. As there is no search, it will show an empty pane. It is not ideal, but at the time we did not find a better solution.
>
> --
> Dr. Geo
> http://drgeo.eu
>
>
>

--
www.tudorgirba.com
www.feenk.com

"What we can governs what we wish."





Reply | Threaded
Open this post in threaded view
|

Re: Playground and Smalltalk script

HilaireFernandes
Anyway it is not big deal, I was just wondering.

Thanks for the clarification

Hilaire


Le 17/04/2018 à 21:07, Tudor Girba a écrit :

> Hi,
>
> It would if we would be able to know that there is no search possible within a context.
>
> In your case, an .st file is a FileReference, and this class defines several searches (for example for files in a folder). Thus we cannot guarantee statically that no search is possible, so we chose to allow you to always dive in.
>
> But, this is the behavior of the generic Spotter. In your case you want a more restricted behavior (simple list, no dive in), and this is certainly legitimate, and it would be ideal to support it.
>
> Cheers,
> Doru

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