Re: [Pharo-users] Flattr added to pharo.org

2015-09-09 Thread Marcus Denker
Yes, the whole setup is not good… we are thinking of how to improve. 
I will look at this bus later (else I do nothing else than things like this)

Marcus

> On 08 Sep 2015, at 21:25, Offray Vladimir Luna Cárdenas  
> wrote:
> 
> Thanks! I now will update my profile... any way to recover the password? 
> (Sorry :-P)
> 
> Cheers,
> 
> Offray
> 
> On 08/09/15 02:31, Marcus Denker wrote:
>> Hello,
>> 
>> Sorry, I activated it!
>> 
>>  Marcus
>> 
>>> On 08 Sep 2015, at 04:04, Offray Vladimir Luna Cárdenas >> > wrote:
>>> 
>>> Hi,
>>> 
>>> In a related matter, I have donated to the association and became a member, 
>>> but my name is not listed in its web page. There is any way to verify that 
>>> the association went fine? Which is the procedure?
>>> 
>>> Cheers,
>>> 
>>> Offray
>>> 
>>> On 01/09/15 07:39, Marcus Denker wrote:
 Hi,
 
 We added at Flattr button:
 
 http://pharo.org/contribute 
 
 
 Direkt link is:  
 https://flattr.com/thing/4606474/Pharo-Welcome-to-Pharo
  
 
 
Marcus
>>> 
>> 
> 



[Pharo-users] [ANN] MessageFlowBrowser

2015-09-09 Thread Torsten Bergmann
A new tool to browse and dive deep into the flow of messages
using a tree representation (messages, senders, implementors, ...)
and further on. I know such a tool from Smalltalk/MT and it is really
helpful to trace a message flow without running in the debugger.

See the attached screenshot, the best is to try it: 

In a latest Pharo 5.0 image (Pharo5.0 Latest update: #50314)
you can evaluate:

  Gofer new
 url: 'http://smalltalkhub.com/mc/TorstenBergmann/MessageFlowBrowser/main';
 package: 'Tool-MessageFlowBrowser';
 load

to load it.

Then open whatever method in Nautilus and choose "Message Flow" from the context
menu. The nice thing is that you can dive into senders, implementors, messages 
sent 
deeper and deeper (or up again) and you do not open more and more windows but 
stay 
in a single window !!!

Alternatively you can start the tool from the playground:

 MessageFlowBrowser openOn: #inspect "open the flow browser on a selector"

 MessageFlowBrowser openOn: (Compiler>>#evaluate) "open the flow browser on a 
method"
 
 MessageFlowBrowser openOn: Object   "open the flow browser on a class"

 1 messageFlow.  "open the flow browser on the class of an 
instance"


If someone with GT knowledge and time could help to correct the syntax 
highlighting 
in the code pane this would be super cool (see method MessageFlowBrowser 
#openOn:). 
Also selection could be improved to show/highlight the messages sent directly
in the code. Unfortunately I'm not so familar with the current code editors - so
any help is appreciated.

Repo is open for contribution. 

Thanks
T.



[Pharo-users] Having a look at Git+Pharo

2015-09-09 Thread Damien Cassou
Hi,

today I wanted to have a look at how git integrates with Pharo. This is
what I found (mostly done by Thierry Goubier, thank you very much) and
what I didn't find:

- there is some documentation here:
  
https://ci.inria.fr/pharo-contribution/view/Books/job/PharoBookWorkInProgress/lastSuccessfulBuild/artifact/book-result/GitAndPharo/GitAndPharo.html
  But this is largely unfinished material. I contributed by adding a few
  things here and there but not much. If you have some experience,
  please share it there
  (https://github.com/SquareBracketAssociates/PharoInProgress). Missing
  things include:

  - a discussion about which process to follow in which conditions
(should I use GitFileTree or FileTree?)

  - a discussion about moving a smalltalkhub repository to git while
preserving history

  - a discussion on how to write Metacello configurations for a project
on git and for a project which depends on a project on git.

- there is a nice git merge driver
  (https://github.com/ThierryGoubier/GitFileTree-MergeDriver). It seems
  to work fine. I sent 3 minor pull requests.

- a list of tools missing before everyone uses git. For example:

  - A tool to resolve merge conflicts in Pharo. We should reuse the diff
widget we have.

-- 
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill



Re: [Pharo-users] Having a look at Git+Pharo

2015-09-09 Thread Damien Cassou

something else I forgot:

- what happens if a Metacello description loads a project hosted in git
  but I still want to be able to hack on this dependency. So, this
  dependency should not be read-only for me

- where to put the git repositories when images are frequently deleted
  and downloaded again from the launcher? What if I Pillar is hosted on
  github, Jenkins build Pillar images, and I want to download an image
  with Pillar inside? How do I link the Pillar of the image to a
  repository? Which repository?

-- 
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill



Re: [Pharo-users] [ANN] MessageFlowBrowser

2015-09-09 Thread Nicolai Hess
2015-09-09 14:07 GMT+02:00 Torsten Bergmann :

> A new tool to browse and dive deep into the flow of messages
> using a tree representation (messages, senders, implementors, ...)
> and further on. I know such a tool from Smalltalk/MT and it is really
> helpful to trace a message flow without running in the debugger.
>


Great!


>
>
> If someone with GT knowledge and time could help to correct the syntax
> highlighting
> in the code pane this would be super cool (see method MessageFlowBrowser
> #openOn:).
>

You need to set the class this method belongs to:

a smalltalkCode
   smalltalkClass: [:each | each  ];
   display: [:each | each sourceCode ]].


> Also selection could be improved to show/highlight the messages sent
> directly
> in the code. Unfortunately I'm not so familar with the current code
> editors - so
> any help is appreciated.
>
> Repo is open for contribution.
>
> Thanks
> T.
>
>


Re: [Pharo-users] Having a look at Git+Pharo

2015-09-09 Thread Thierry Goubier
2015-09-09 16:29 GMT+02:00 Damien Cassou :

>
> something else I forgot:
>
> - what happens if a Metacello description loads a project hosted in git
>   but I still want to be able to hack on this dependency. So, this
>   dependency should not be read-only for me
>

Can you give an example?


>
> - where to put the git repositories when images are frequently deleted
>   and downloaded again from the launcher? What if I Pillar is hosted on
>   github, Jenkins build Pillar images, and I want to download an image
>   with Pillar inside? How do I link the Pillar of the image to a
>   repository? Which repository?
>

Having a gitfiletree repository with an auto-clone / lazy clone option
would work. When you open the repository for the first time, it clones it
from where it was originally referenced. May not work transparently if
there are authentification issues for the clone.

Thierry


>
> --
> Damien Cassou
> http://damiencassou.seasidehosting.st
>
> "Success is the ability to go from one failure to another without
> losing enthusiasm." --Winston Churchill
>
>


Re: [Pharo-users] Having a look at Git+Pharo

2015-09-09 Thread Thierry Goubier
2015-09-09 16:04 GMT+02:00 Damien Cassou :

> Hi,
>
> today I wanted to have a look at how git integrates with Pharo. This is
> what I found (mostly done by Thierry Goubier, thank you very much) and
> what I didn't find:
>
> - there is some documentation here:
>
> https://ci.inria.fr/pharo-contribution/view/Books/job/PharoBookWorkInProgress/lastSuccessfulBuild/artifact/book-result/GitAndPharo/GitAndPharo.html
>   But this is largely unfinished material. I contributed by adding a few
>   things here and there but not much. If you have some experience,
>   please share it there
>   (https://github.com/SquareBracketAssociates/PharoInProgress). Missing
>   things include:
>
>   - a discussion about which process to follow in which conditions
> (should I use GitFileTree or FileTree?)
>
>   - a discussion about moving a smalltalkhub repository to git while
> preserving history
>
>   - a discussion on how to write Metacello configurations for a project
> on git and for a project which depends on a project on git.
>
> - there is a nice git merge driver
>   (https://github.com/ThierryGoubier/GitFileTree-MergeDriver). It seems
>   to work fine. I sent 3 minor pull requests.
>
> - a list of tools missing before everyone uses git. For example:
>
>   - A tool to resolve merge conflicts in Pharo. We should reuse the diff
> widget we have.
>

Dale proposed some tools: a diff parser/reader?

A reader for files with conflict markers.

Thierry


>
> --
> Damien Cassou
> http://damiencassou.seasidehosting.st
>
> "Success is the ability to go from one failure to another without
> losing enthusiasm." --Winston Churchill
>
>


Re: [Pharo-users] [Pharo-dev] [ANN] MessageFlowBrowser

2015-09-09 Thread Torsten Bergmann
Nicolai wrote:
>You need to set the class this method belongs to:
>
>a smalltalkCode
>   smalltalkClass: [:each | each  ];
>   display: [:each | each sourceCode ]].

Yes - I know that. At least from the code I found in the image.
But how do I do that in the context of Glamour where the tree is
transmitted to the code pane...

See #openOn: in MessageFlowBrowser. 

Thanks
T.



Re: [Pharo-users] Having a look at Git+Pharo

2015-09-09 Thread Thierry Goubier
2015-09-09 16:43 GMT+02:00 Peter Uhnák :

>   - a discussion about moving a smalltalkhub repository to git while
>> preserving history
>
>
> I've migrated some time ago
>
> http://forum.world.st/moving-to-git-and-preserving-monticello-history-td4806386.html
>
> some (if not all) of the issues were resolved iirc, however since I didn't
> need to migrate since then I don't know the current status.
>
>   - a discussion about which process to follow in which conditions
>> (should I use GitFileTree or FileTree?)
>
>
> Please note that GitFileTree didn't reliably work under Windows (problems
> with ProcessWrapper or something; crashing a lot), don't know the current
> status.
>

I don't either. I made some changes on the ProcessWrapper use, hoping for
the best, but I can't test :(


> However from practical standpoint:
> * with GitFileTree each MC commit inside Pharo creates a Git commit, so if
> you change X packages within a single repo, you get also X git commits
> * with FileTree you could pack them together more tightly but you need to
> commit to git explicity.
>

Dale has the idea of a project (grouping packages) with a single commit;
however the MC API has no notion of committing multiple packages in one
step except when dealing with dependencies. GitFileTree, for handling
package dependencies, has a mode for writing multiple packages and commit
only once, so one commit for multiple packages would be very easy to do. A
special api for Versionner?

Thierry


[Pharo-users] Observing changes of regular attributes

2015-09-09 Thread Peter Uhnák
Hi,

is there a mechanism for observing a change of regular variables?

Normally I would use ValueHolder (or fire announcements manually), but this
assumes I can change the code.

For example imagine a method of someone else's package
~~~
FAMIXNamedEntity>>name: aString
name := aString
~~~

I could simply override the method, but that's very brittle since if I were
to update the package it would load the "unmodified" version.

Can I somehow overload the assignment operator? Can I augment methods? Is
this even possible?

Thanks,
Peter


Re: [Pharo-users] Having a look at Git+Pharo

2015-09-09 Thread Peter Uhnák
>
>   - a discussion about moving a smalltalkhub repository to git while
> preserving history


I've migrated some time ago
http://forum.world.st/moving-to-git-and-preserving-monticello-history-td4806386.html

some (if not all) of the issues were resolved iirc, however since I didn't
need to migrate since then I don't know the current status.

  - a discussion about which process to follow in which conditions
> (should I use GitFileTree or FileTree?)


Please note that GitFileTree didn't reliably work under Windows (problems
with ProcessWrapper or something; crashing a lot), don't know the current
status.

However from practical standpoint:
* with GitFileTree each MC commit inside Pharo creates a Git commit, so if
you change X packages within a single repo, you get also X git commits
* with FileTree you could pack them together more tightly but you need to
commit to git explicity.

but otherwise I don't see much practical difference

- what happens if a Metacello description loads a project hosted in git
>   but I still want to be able to hack on this dependency. So, this
>   dependency should not be read-only for me


This is in my eyes very messy you could either add the package to a
repository after you have loaded your project,
or lock local repos... but it's quite a pain to keep everything in sync...
but I didn't have time to simplify my workflow here yet.


"GitFileTree"
Gofer new
url: 'http://smalltalkhub.com/mc/Pharo/MetaRepoForPharo50/main';
configurationOf: 'GitFileTree';
loadDevelopment.

"Dependency 1"
Metacello new
baseline: 'Dependency1';
repository: 'gitfiletree:///home/wherever/dependency1/repository';
lock.

"Dependency 2"
Metacello new
baseline: 'Project2';
repository: 'gitfiletree:///home/wherever/project2/repository';
lock.
"My Project"
Metacello new
baseline: 'MyProject';
repository: 'gitfiletree:///home/wherever/myProject/repository';
onConflict: [ :ex | ex allow ];
load.


Peter


Re: [Pharo-users] [Smalltalks 2015] --- Invitation

2015-09-09 Thread Offray Vladimir Luna Cárdenas

Wow! that's close, finally :-). A pair of questions:

- Talks must be only in English?
- There are some kind of scholarships?

Hopefully I will be there :-)

Offray

On 18/08/15 19:55, Andres Valloud wrote:
The Fundación Argentina de Smalltalk proudly invites you to one of the 
premier Smalltalk conferences in the world. Let's meet at Buenos 
Aires, November 11-13!  For more details, see the invitation here:


http://www.fast.org.ar/Smalltalks2015-invitation.pdf








Re: [Pharo-users] [Smalltalks 2015] --- Invitation

2015-09-09 Thread Andres Valloud

Hello,

Generally we suggest talks are in English because it's an international 
conference, but it's not mandatory.


What kind of scholarship are thinking of?

Andres.

On 9/9/15 18:13 , Offray Vladimir Luna Cárdenas wrote:

Wow! that's close, finally :-). A pair of questions:

- Talks must be only in English?
- There are some kind of scholarships?

Hopefully I will be there :-)

Offray

On 18/08/15 19:55, Andres Valloud wrote:

The Fundación Argentina de Smalltalk proudly invites you to one of the
premier Smalltalk conferences in the world. Let's meet at Buenos
Aires, November 11-13!  For more details, see the invitation here:

http://www.fast.org.ar/Smalltalks2015-invitation.pdf











Re: [Pharo-users] [Moose-dev] [ann] brick on top of bloc - preview

2015-09-09 Thread Offray Vladimir Luna Cárdenas

Thanks Johan,

I'm willing to test your Spec-Glamour integration and finally I have the 
time for that. Wait for questions ;-).


Cheers,

Offray

On 09/09/15 15:33, Johan Fabry wrote:


On Sep 9, 2015, at 14:16, Offray Vladimir Luna Cárdenas 
> wrote:


Should I stick with Spec?


Yes. It is the UI builder for Pharo. Technologies underneath may 
change but Spec is designed such that it can be adapted to them.


---> Save our in-boxes! http://emailcharter.org <---

Johan Fabry   - http://pleiad.cl/~jfabry 
PLEIAD and RyCh labs  -  Computer Science Department (DCC)  - 
 University of Chile






Re: [Pharo-users] [Moose-dev] [ann] brick on top of bloc - preview

2015-09-09 Thread Johan Fabry

> On Sep 9, 2015, at 14:16, Offray Vladimir Luna Cárdenas  
> wrote:
> 
> Should I stick with Spec?

Yes. It is the UI builder for Pharo. Technologies underneath may change but 
Spec is designed such that it can be adapted to them.

---> Save our in-boxes! http://emailcharter.org <---

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD and RyCh labs  -  Computer Science Department (DCC)  -  University of 
Chile



Re: [Pharo-users] [ANN] Multiple Desktop support for Pharo 5

2015-09-09 Thread Offray Vladimir Luna Cárdenas
Thanks a lot Torsten for this writing. In [1] you can find my annotated 
version using hypothesis[2]


[1] 
https://via.hypothes.is/https://medium.com/concerning-pharo/multiple-desktops-for-pharo-5cbc46f3179f

[2] https://hypothes.is/

Cheers,

Offray

On 26/08/15 20:19, Torsten Bergmann wrote:

Julien Delplanque provided this week a goodie to switch between
"desktops" - but his initial solution was more or less hiding windows
and not really switching between real Pharo worlds/desktops.

I gave him some tips what could be done on the pharo-user list. Havent heard
from him afterwards.

Now I was able to spend a few hours on this topic myself and implemented
a full multiple desktop solution myself.

This works in Pharo 5 only (currently) and requires latest VM (at least on 
Windows)
from files.pharo.org to get the keyboard shortcuts right.

To try:

   Gofer new
 smalltalkhubUser: 'TorstenBergmann' project: 'DesktopManager';
 configuration;
 loadDevelopment.

The goodie has some nice features like keyboard navigation, world menu
integration and even a custom spotter with preview of the desktops.

Quick start:
===
  - evaluate the above expression in a Pharo 5 image
  - check the world menu "Desktop"
  - you can press CTRL + D and then CTRL + A (= Desktop Add) to add a new 
desktop
  - you can press CTRL + D and then CTRL + D (= Desktop Desktop) to open the 
overview
  - you can press CTRL + D and then CTRL + P (= Desktop Previous) to navigate 
to the previous desktop
  - you can press CTRL + D and then CTRL + N (= Desktop Next) to navigate to 
the next desktop

The code is hopefully a good example on how to build a custom spotter, 
shortcuts, inspector extensions, ...
Additionally all this is described in a new article including screenshots
and a guide on how to use this new goodie:

https://medium.com/@astares/multiple-desktops-for-pharo-5cbc46f3179f

Actually the article took more time to write than coding but I hope
it helps explaining Pharo and why it is a power tool.

Project is on http://www.smalltalkhub.com/#!/~TorstenBergmann/DesktopManager
Article and code is still subject to change.

Have fun
T.





Re: [Pharo-users] [ANN] MessageFlowBrowser

2015-09-09 Thread Alexandre Bergel
Hi Torsten,

Can you make it available from the catalog browser ?

Alexandre
-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



> On Sep 9, 2015, at 9:07 AM, Torsten Bergmann  wrote:
> 
> A new tool to browse and dive deep into the flow of messages
> using a tree representation (messages, senders, implementors, ...)
> and further on. I know such a tool from Smalltalk/MT and it is really
> helpful to trace a message flow without running in the debugger.
> 
> See the attached screenshot, the best is to try it: 
> 
> In a latest Pharo 5.0 image (Pharo5.0 Latest update: #50314)
> you can evaluate:
> 
>  Gofer new
> url: 'http://smalltalkhub.com/mc/TorstenBergmann/MessageFlowBrowser/main';
> package: 'Tool-MessageFlowBrowser';
> load
> 
> to load it.
> 
> Then open whatever method in Nautilus and choose "Message Flow" from the 
> context
> menu. The nice thing is that you can dive into senders, implementors, 
> messages sent 
> deeper and deeper (or up again) and you do not open more and more windows but 
> stay 
> in a single window !!!
> 
> Alternatively you can start the tool from the playground:
> 
> MessageFlowBrowser openOn: #inspect "open the flow browser on a selector"
> 
> MessageFlowBrowser openOn: (Compiler>>#evaluate) "open the flow browser on a 
> method"
> 
> MessageFlowBrowser openOn: Object   "open the flow browser on a class"
> 
> 1 messageFlow.  "open the flow browser on the class of an 
> instance"
> 
> 
> If someone with GT knowledge and time could help to correct the syntax 
> highlighting 
> in the code pane this would be super cool (see method MessageFlowBrowser 
> #openOn:). 
> Also selection could be improved to show/highlight the messages sent directly
> in the code. Unfortunately I'm not so familar with the current code editors - 
> so
> any help is appreciated.
> 
> Repo is open for contribution. 
> 
> Thanks
> T.
> 
> 



Re: [Pharo-users] [Pharo-dev] [ANN] MessageFlowBrowser

2015-09-09 Thread Alexandre Bergel
Also, it would be great to have it accessible from the World/Tools menu.

Alexandre
-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



> On Sep 9, 2015, at 9:07 AM, Torsten Bergmann  wrote:
> 
> A new tool to browse and dive deep into the flow of messages
> using a tree representation (messages, senders, implementors, ...)
> and further on. I know such a tool from Smalltalk/MT and it is really
> helpful to trace a message flow without running in the debugger.
> 
> See the attached screenshot, the best is to try it: 
> 
> In a latest Pharo 5.0 image (Pharo5.0 Latest update: #50314)
> you can evaluate:
> 
>  Gofer new
> url: 'http://smalltalkhub.com/mc/TorstenBergmann/MessageFlowBrowser/main';
> package: 'Tool-MessageFlowBrowser';
> load
> 
> to load it.
> 
> Then open whatever method in Nautilus and choose "Message Flow" from the 
> context
> menu. The nice thing is that you can dive into senders, implementors, 
> messages sent 
> deeper and deeper (or up again) and you do not open more and more windows but 
> stay 
> in a single window !!!
> 
> Alternatively you can start the tool from the playground:
> 
> MessageFlowBrowser openOn: #inspect "open the flow browser on a selector"
> 
> MessageFlowBrowser openOn: (Compiler>>#evaluate) "open the flow browser on a 
> method"
> 
> MessageFlowBrowser openOn: Object   "open the flow browser on a class"
> 
> 1 messageFlow.  "open the flow browser on the class of an 
> instance"
> 
> 
> If someone with GT knowledge and time could help to correct the syntax 
> highlighting 
> in the code pane this would be super cool (see method MessageFlowBrowser 
> #openOn:). 
> Also selection could be improved to show/highlight the messages sent directly
> in the code. Unfortunately I'm not so familar with the current code editors - 
> so
> any help is appreciated.
> 
> Repo is open for contribution. 
> 
> Thanks
> T.
> 
> 



Re: [Pharo-users] Observing changes of regular attributes

2015-09-09 Thread Marcus Denker
Hello,

The idea of Reflectivity is to be just that: a way to “hook” into code without 
changing the source… this is a similar use case like
the one described yesterday:

link := MetaLink new
metaObject: MyNotifyer;
selector: #notifyChangedVaNamed:;
arguments: #(name).

this is a link that when installed on an AssignmentNode, will call 
#notifyChangedVaNamed on a class MyNotifyer
with the name of the changed variable passed as an argument. (you can pass 
other things needed, one could
even have an Announcement as the metaObject.

To install this on all ivar assignments, do:

MyClass assignmentNodes do: [ :each | each variable isInstance ifTrue: [each 
link: link ]].

to get rid of the link:

link uninstall.

Now when code is recompiled (loaded), you need to re-install the links in those 
methods, it does not happen
automatically.

Marcus

> On 09 Sep 2015, at 18:18, Peter Uhnák  wrote:
> 
> Hi,
> 
> is there a mechanism for observing a change of regular variables?
> 
> Normally I would use ValueHolder (or fire announcements manually), but this 
> assumes I can change the code.
> 
> For example imagine a method of someone else's package
> ~~~
> FAMIXNamedEntity>>name: aString
> name := aString
> ~~~
> 
> I could simply override the method, but that's very brittle since if I were 
> to update the package it would load the "unmodified" version.
> 
> Can I somehow overload the assignment operator? Can I augment methods? Is 
> this even possible?
> 
> Thanks,
> Peter




Re: [Pharo-users] Observing changes of regular attributes

2015-09-09 Thread Thierry Goubier

Le 09/09/2015 21:00, Mariano Martinez Peck a écrit :

If you can live with only intercepting setters (not assigments) , then
you can run some code AFTER loading the code, to install some method
wrappers or Marea CompiledMethod proxy that intercept the execution of
the setter method and do whatever you want. In the worst case you simply
must re-run such script after reloading the code 


You can also use Jejak to trace assignments with the same approach (i.e. 
to reinstall the probes after loading a new version), but you'll have to 
adapt one of the Jejak rewriter for that (or filter the generated events 
to retrieve only the ones relevant to your instance variable).


By the way, Marcus, how do Metalinks behave in this scenario (i.e. 
reloading a new version of the code). Are they lost?


Thierry




On Wed, Sep 9, 2015 at 3:27 PM, stepharo > wrote:

Not yet :)

Le 9/9/15 18:18, Peter Uhnák a écrit :

Hi,

is there a mechanism for observing a change of regular variables?

Normally I would use ValueHolder (or fire announcements
manually), but this assumes I can change the code.

For example imagine a method of someone else's package
~~~
FAMIXNamedEntity>>name: aString
 name := aString
~~~

I could simply override the method, but that's very brittle
since if I were to update the package it would load the
"unmodified" version.

Can I somehow overload the assignment operator? Can I augment
methods? Is this even possible?

Thanks,
Peter






--
Mariano
http://marianopeck.wordpress.com





Re: [Pharo-users] Observing changes of regular attributes

2015-09-09 Thread Marcus Denker

> On 09 Sep 2015, at 21:26, Thierry Goubier  wrote:
> 
> Le 09/09/2015 21:00, Mariano Martinez Peck a écrit :
>> If you can live with only intercepting setters (not assigments) , then
>> you can run some code AFTER loading the code, to install some method
>> wrappers or Marea CompiledMethod proxy that intercept the execution of
>> the setter method and do whatever you want. In the worst case you simply
>> must re-run such script after reloading the code 
> 
> You can also use Jejak to trace assignments with the same approach (i.e. to 
> reinstall the probes after loading a new version), but you'll have to adapt 
> one of the Jejak rewriter for that (or filter the generated events to 
> retrieve only the ones relevant to your instance variable).
> 
> By the way, Marcus, how do Metalinks behave in this scenario (i.e. reloading 
> a new version of the code). Are they lost?
> 
Yes, re-applying links needs to be done by the user for now. I should add a 
framwork and example to make this easier.

Marcus