Re: [Pharo-users] Glamour: update presenter with new text

2017-08-16 Thread Tudor Girba
Hi Hilaire, Sorry for the late reply. Indeed, it should be possible to do this, but we have to look closer at your concrete code. Here is an example: browser := GLMTabulator new. browser column: #one; column: #two. browser transmit to: #one; andShow: [ :a |

Re: [Pharo-users] Glamour: update presenter with new text

2017-07-15 Thread Hilaire
Thanks for the updates on both the internal dependencies and the ListPresentation. >From this browser, I deduced a second simpler browser for only one script. It was easy to do so thanks to your tips (attached pic). With this simpler script editor, when I open a script, I like it opens on the

Re: [Pharo-users] Glamour: update presenter with new text

2017-07-14 Thread Tudor Girba
Hi, > On Jul 14, 2017, at 9:52 AM, Hilaire wrote: > > Thanks Doru, it works as a charm! Great. > I don't think I could find it by myself, or I will have to become a Glamour > expert. Actually, this is not really related to Glamour, but to how CompiledMethods are dealt

Re: [Pharo-users] Glamour: update presenter with new text

2017-07-14 Thread Hilaire
Thanks Doru, it works as a charm! I don't think I could find it by myself, or I will have to become a Glamour expert. To make it perfect, there is still a fix needed for the DrGeo script browser: The class method 'scriptName' of each Dr. Geo script class returns a string, it used in the browser

Re: [Pharo-users] Glamour: update presenter with new text

2017-07-13 Thread Tudor Girba
Hi, I took a quick look. To get the methods properly update and selected when modifying code, you should use the reference to the method, and the not the compiled method. Try this: methodsIn: composite composite wrapper title: 'Methods' translated; show: [ :wrapper

Re: [Pharo-users] Glamour: update presenter with new text

2017-07-13 Thread Hilaire
Le 13/07/2017 à 10:01, Denis Kudriashov a écrit : > What exactly you are implementing? Browsers to edit Dr. Geo user script. Explained in a previous mail of this thread. The idea is to show the user the strict minimum, to reduce confusion. Hilaire -- Dr. Geo http://drgeo.eu

Re: [Pharo-users] Glamour: update presenter with new text

2017-07-13 Thread Denis Kudriashov
2017-07-13 9:00 GMT+02:00 Hilaire : > Plus I understood it will be replace by Calypso, right? > That's the plan. > > May be hacking on Calypso would make sense, but there are several use > cases I want to explore with Glamour, so... > What exactly you are implementing?

Re: [Pharo-users] Glamour: update presenter with new text

2017-07-13 Thread Hilaire
Plus I understood it will be replace by Calypso, right? May be hacking on Calypso would make sense, but there are several use cases I want to explore with Glamour, so... Le 12/07/2017 à 22:24, Stephane Ducasse a écrit : > I can tell you that you do not want to play with nautilus :). > > Stef

Re: [Pharo-users] Glamour: update presenter with new text

2017-07-12 Thread Stephane Ducasse
I can tell you that you do not want to play with nautilus :). Stef On Wed, Jul 12, 2017 at 6:01 PM, Hilaire wrote: > Le 05/07/2017 à 19:43, Juraj Kubelka a écrit : >> I have added the bold line from the previous >> post: >>

Re: [Pharo-users] Glamour: update presenter with new text

2017-07-12 Thread Tudor Girba
Hi, I will try to follow up tomorrow. Cheers, Doru > On Jul 12, 2017, at 6:01 PM, Hilaire wrote: > > Le 05/07/2017 à 19:43, Juraj Kubelka a écrit : >> I have added the bold line from the previous >> post: >>

Re: [Pharo-users] Glamour: update presenter with new text

2017-07-12 Thread Hilaire
Le 05/07/2017 à 19:43, Juraj Kubelka a écrit : > I have added the bold line from the previous > post: > http://forum.world.st/Custom-Glamour-browser-for-Dr-Geo-scripting-tp4952920p4953209.html > > > But it is not perfect, because it does not keep the selection. > > Hilaire, it looks like you

Re: [Pharo-users] Glamour: update presenter with new text

2017-07-05 Thread Hilaire
For me it unselects the method, and it still reverts the source code view with the previous source code method Le 05/07/2017 à 19:43, Juraj Kubelka a écrit : > *composite updateOn: MethodModified from: [ SystemAnnouncer > uniqueInstance ].* -- Dr. Geo http://drgeo.eu

Re: [Pharo-users] Glamour: update presenter with new text

2017-07-05 Thread Nicolai Hess
2017-07-05 19:43 GMT+02:00 Juraj Kubelka : > I think the issue is how to update a browser when a method is modified. > There is a script: > > -=-=-=-=- > browser := GLMTabulator new > column: #one; > column: #two; > column: #three; > yourself. > browser transmit to:

Re: [Pharo-users] Glamour: update presenter with new text

2017-07-05 Thread Hilaire
Okay, I will try to describe it: First in Dr. Geo there is user scripting. The idea is to let the user define a computing object he can plug on a sketch. This object receive an arbitrary number of objects as arguments selected from the sketch by mouse. This script object is a class, subclass of

Re: [Pharo-users] Glamour: update presenter with new text

2017-07-05 Thread Juraj Kubelka
I think the issue is how to update a browser when a method is modified. There is a script: -=-=-=-=- browser := GLMTabulator new column: #one; column: #two; column: #three; yourself. browser transmit to: #one; andShow: [ :composite | composite

Re: [Pharo-users] Glamour: update presenter with new text

2017-07-05 Thread Tudor Girba
Hi Hilaire, I think it does fit your problem. However, I am not sure what the current problem is. Could you describe it again in more details? Cheers, Doru > On Jul 5, 2017, at 5:10 PM, Hilaire wrote: > > May be my use case does not fit to Glamour, but I am tempted to

Re: [Pharo-users] Glamour: update presenter with new text

2017-07-05 Thread Hilaire
May be my use case does not fit to Glamour, but I am tempted to think it does. I really need help on that to make progress. Thanks Hilaire Le 04/07/2017 à 23:08, Hilaire a écrit : > > I added these lines of code, but it is not that yet: > > browser updateOn: GLMItemAdded from: #yourself;

Re: [Pharo-users] Glamour: update presenter with new text

2017-07-04 Thread Hilaire
I added these lines of code, but it is not that yet: browser updateOn: GLMItemAdded from: #yourself; updateOn: GLMItemRemoved from: #yourself. -- Dr. Geo http://drgeo.eu

Re: [Pharo-users] Glamour: update presenter with new text

2017-07-04 Thread Hilaire
Le 03/07/2017 à 23:20, Juraj Kubelka a écrit : > You may have a wrapper that holds the compiled method. So, the method list > can hold your wrappers instead of compiled methods. > Than your wrapper could listen to the system announcer for changes and > updates its value accordingly. > Or you

Re: [Pharo-users] Glamour: update presenter with new text

2017-07-03 Thread Juraj Kubelka
> El 03-07-2017, a las 22:28, Hilaire escribió: > > I will be curious to know how to do that… You may have a wrapper that holds the compiled method. So, the method list can hold your wrappers instead of compiled methods. Than your wrapper could listen to the system announcer

Re: [Pharo-users] Glamour: update presenter with new text

2017-07-03 Thread Hilaire
I will be curious to know how to do that... Le 03/07/2017 à 18:08, Andrei Chis a écrit : > 'aCompiledMethod' references the old method. To make this work you'll > need to not reference the compiled method object directly or also > refresh the list of methods. -- Dr. Geo http://drgeo.eu

Re: [Pharo-users] Glamour: update presenter with new text

2017-07-03 Thread Andrei Chis
If I'm not mistaken CompiledMethod instances are immutable. When you run 'compiledMethod methodClass compile: presentation text' another CompiledMethod object is created and installed in the methods dictionary. So in the display block 'aCompiledMethod' references the old method. To make this work

Re: [Pharo-users] Glamour: update presenter with new text

2017-07-03 Thread Hilaire
Sorry for the text formating, it was wrong, hope it is better now: || || |sourceIn: composite| |^ composite pharoMethod| |title: 'Source code' translated;| |smalltalkClass: [ :each | each methodClass];| |display: [ :aCompiledMethod | aCompiledMethod sourceCode

Re: [Pharo-users] Glamour: update presenter with new text

2017-07-03 Thread Hilaire
Ah sorry no it is not working as expected. When I saved a modified method, the presenter got its source text updated (good), but the morph view is reversed to its previous content. Here is the code I use, anything wrong in the code bellow? Thanks Hilaire sourceIn: composite ^ composite

Re: [Pharo-users] Glamour: update presenter with new text

2017-07-03 Thread Hilaire
Thanks Le 02/07/2017 à 20:21, Andrei Chis a écrit : > You should send #update to the presentation. By default the > presentation does not update when an action is executed, as the action > could be anything. > -- Dr. Geo http://drgeo.eu

Re: [Pharo-users] Glamour: update presenter with new text

2017-07-02 Thread Andrei Chis
Hi, You should send #update to the presentation. By default the presentation does not update when an action is executed, as the action could be anything. sourceIn: composite ^ composite text title: 'Source code' translated; display: [ :aCompiledMethod | aCompiledMethod

[Pharo-users] Glamour: update presenter with new text

2017-07-02 Thread Hilaire
Hi, In the method bellow, when the method is recompiled, the presenter's text is still the same (i.e. select another method, then the modified method: the former source code is still presented). How to request an update of the presenter's text with the newer method source? sourceIn: composite