Re: [Pharo-users] SLICE-Issue-18901-Highlight-message-send-selector-on-mouse-over-NicolaiHess.4 introduces new bug?

2017-02-06 Thread Nicolai Hess
Hi Alistair,
the error messages from Rubric-Components, if there occured an error is
often misleading.

I added this act-on-move-functionality for highlighting message sends and I
forgot to respect to full TextAction hierarchy
(I only implemented the
actOnMove: anEvent for: target in: aParagraph editor: anEditor
method for TextLink and TextMethodLink and not for TextAction)

You can solve this by moving the implementation
actOnMove: anEvent for: target in: aParagraph editor: anEditor
"override in subclasses"
^ false

from TextLink, up to TextAction.


nicolai


2017-02-07 6:37 GMT+01:00 Alistair Grant :

> Hi All,
>
> I'm attempting to port some code that works in Pharo 5 to Pharo 6 and
> have hit a problem when attempting to inspect text.
>
> Inspecting the following:
>
>
> | text |
>
> text := Text fromString: 'Hello World'.
> text addAttribute: (TextAction new actOnClickBlock: [ self halt ])
> from: 1 to: 5.
> text.
>
>
> And then moving the mouse over the text causes the traceback
> included below in Pharo 6, but is fine in Pharo 5.
>
> I think the problem was introduced as part of
> SLICE-Issue-18901-Highlight-message-send-selector-on-
> mouse-over-NicolaiHess.4
> in RubAbstractTextArea>>mouseMove: where the line:
>
>self paragraph move: evt for: model controller: self editor.
>
> was added to the start of the method.
>
> I'm not familiar with this code, so it would be great if someone
> (Nicolai? :-)) who has a better understanding of the original intention
> can offer a suggested fix.
>
> Removing the addition appears to resolve the problem, although I expect
> it introduces other unwanted side effects, and the remainder of the
> method was also refactored.
>
> Thanks!
> Alistair
>
>
> RubCurrentLineBarDecorator(Object)>>doesNotUnderstand:
> #move:for:controller:
> [ super doesNotUnderstand: aMessage ] in
> RubCurrentLineBarDecorator(RubParagraphDecorator)>>doesNotUnderstand:
> #move:for:controller:
> BlockClosure>>cull:
> Context>>evaluateSignal:
> Context>>handleSignal:
> MessageNotUnderstood(Exception)>>signal
> RubExtraSelectionDecorator(Object)>>doesNotUnderstand:
> #move:for:controller:
> [ super doesNotUnderstand: aMessage ] in
> RubExtraSelectionDecorator(RubParagraphDecorator)>>doesNotUnderstand:
> #move:for:controller:
> BlockClosure>>cull:
> Context>>evaluateSignal:
> Context>>handleSignal:
> MessageNotUnderstood(Exception)>>signal
> RubOpeningClosingDelimiterDecorator(Object)>>doesNotUnderstand:
> #move:for:controller:
> [ super doesNotUnderstand: aMessage ] in
> RubOpeningClosingDelimiterDecorator(RubParagraphDecorator)>>
> doesNotUnderstand:
> #move:for:controller:
> BlockClosure>>cull:
> Context>>evaluateSignal:
> Context>>handleSignal:
> MessageNotUnderstood(Exception)>>signal
> TextAction(Object)>>doesNotUnderstand: #actOnMove:for:in:editor:
> [ :attribute |
> | target |
> "evaluate the attribute action"
> target := model ifNil: [ textArea ].
> (attribute
> actOnMove: anEvent
> for: target
> in: self
> editor: editor) == true
> ifTrue: [ ^ true ] ] in RubParagraph>>move:for:controller:
> BlockClosure>>cull:
> BlockClosure>>cull:cull:
> [ :attribute |
> | range boxes |
> "find the boxes for the current attribute range"
> range := self text
> rangeOf: attribute
> startingAt: startBlock stringIndex.
> boxes := self
> selectionRectsFrom: (self characterBlockForIndex: range first)
> to: (self characterBlockForIndex: range last + 1).
> (boxes
> detect: [ :each | each containsPoint: aClickPoint ]
> ifNone: [ nil ]) ifNotNil: [ aBlock cull: attribute cull: boxes ] ] in
> RubParagraph>>actionAttributesUnder:event:do:
> Array(SequenceableCollection)>>select:thenDo:
> RubParagraph>>actionAttributesUnder:event:do:
> RubParagraph>>move:for:controller:
> Message>>sendTo:
> [ aMessage sendTo: next ] in
> RubOpeningClosingDelimiterDecorator(RubParagraphDecorator)>>
> doesNotUnderstand:
> #move:for:controller:
> BlockClosure>>on:do:
> RubOpeningClosingDelimiterDecorator(RubParagraphDecorator)>>
> doesNotUnderstand:
> #move:for:controller:
> Message>>sendTo:
> [ aMessage sendTo: next ] in
> RubExtraSelectionDecorator(RubParagraphDecorator)>>doesNotUnderstand:
> #move:for:controller:
> BlockClosure>>on:do:
> RubExtraSelectionDecorator(RubParagraphDecorator)>>doesNotUnderstand:
> #move:for:controller:
> Message>>sendTo:
> [ aMessage sendTo: next ] in
> RubCurrentLineBarDecorator(RubParagraphDecorator)>>doesNotUnderstand:
> #move:for:controller:
> BlockClosure>>on:do:
> RubCurrentLineBarDecorator(RubParagraphDecorator)>>doesNotUnderstand:
> #move:for:controller:
> RubEditingArea(RubAbstractTextArea)>>mouseMove:
> RubEditingArea>>mouseMove:
> RubEditingArea(RubAbstractTextArea)>>handleMouseMove:
> MouseMoveEvent>>sentTo:
> RubEditingArea(Morph)>>handleEvent:
> MorphicEventDispatcher>>dispatchDefault:with:
> MorphicEventDispatcher>>handleMouseMove:
> MouseMoveEvent>>sentTo:
> [ ^ anEvent sentTo: self ] in MorphicEventDispatcher>>dispatchEvent:with:
> BlockClosure>>ensure:
> MorphicEventDispatc

Re: [Pharo-users] Pharo Spur 64 VM

2017-02-06 Thread Esteban Lorenzano

> On 6 Feb 2017, at 21:41, Cyril Ferlicot D.  wrote:
> 
> Le 06/02/2017 à 21:31, Benoit St-Jean via Pharo-users a écrit :
> 
> 
> Hi!
> 
> IIRC, the windows VM will need some more time to be ready. Only Linux
> and OSX ones are usable at the moment.

^ this. 
as Cyril says, win 64bits vm is still not ready (and it will take some more 
time to be).

Esteban

> 
> -- 
> Cyril Ferlicot
> 
> http://www.synectique.eu
> 
> 2 rue Jacques Prévert 01,
> 59650 Villeneuve d'ascq France
> 




[Pharo-users] SLICE-Issue-18901-Highlight-message-send-selector-on-mouse-over-NicolaiHess.4 introduces new bug?

2017-02-06 Thread Alistair Grant
Hi All,

I'm attempting to port some code that works in Pharo 5 to Pharo 6 and
have hit a problem when attempting to inspect text.

Inspecting the following:


| text |

text := Text fromString: 'Hello World'.
text addAttribute: (TextAction new actOnClickBlock: [ self halt ])
from: 1 to: 5.
text.


And then moving the mouse over the text causes the traceback
included below in Pharo 6, but is fine in Pharo 5.

I think the problem was introduced as part of
SLICE-Issue-18901-Highlight-message-send-selector-on-mouse-over-NicolaiHess.4
in RubAbstractTextArea>>mouseMove: where the line:

   self paragraph move: evt for: model controller: self editor.

was added to the start of the method.

I'm not familiar with this code, so it would be great if someone
(Nicolai? :-)) who has a better understanding of the original intention
can offer a suggested fix.

Removing the addition appears to resolve the problem, although I expect
it introduces other unwanted side effects, and the remainder of the
method was also refactored.

Thanks!
Alistair


RubCurrentLineBarDecorator(Object)>>doesNotUnderstand: #move:for:controller:
[ super doesNotUnderstand: aMessage ] in
RubCurrentLineBarDecorator(RubParagraphDecorator)>>doesNotUnderstand:
#move:for:controller:
BlockClosure>>cull:
Context>>evaluateSignal:
Context>>handleSignal:
MessageNotUnderstood(Exception)>>signal
RubExtraSelectionDecorator(Object)>>doesNotUnderstand: #move:for:controller:
[ super doesNotUnderstand: aMessage ] in
RubExtraSelectionDecorator(RubParagraphDecorator)>>doesNotUnderstand:
#move:for:controller:
BlockClosure>>cull:
Context>>evaluateSignal:
Context>>handleSignal:
MessageNotUnderstood(Exception)>>signal
RubOpeningClosingDelimiterDecorator(Object)>>doesNotUnderstand:
#move:for:controller:
[ super doesNotUnderstand: aMessage ] in
RubOpeningClosingDelimiterDecorator(RubParagraphDecorator)>>doesNotUnderstand:
#move:for:controller:
BlockClosure>>cull:
Context>>evaluateSignal:
Context>>handleSignal:
MessageNotUnderstood(Exception)>>signal
TextAction(Object)>>doesNotUnderstand: #actOnMove:for:in:editor:
[ :attribute |
| target |
"evaluate the attribute action"
target := model ifNil: [ textArea ].
(attribute
actOnMove: anEvent
for: target
in: self
editor: editor) == true
ifTrue: [ ^ true ] ] in RubParagraph>>move:for:controller:
BlockClosure>>cull:
BlockClosure>>cull:cull:
[ :attribute |
| range boxes |
"find the boxes for the current attribute range"
range := self text
rangeOf: attribute
startingAt: startBlock stringIndex.
boxes := self
selectionRectsFrom: (self characterBlockForIndex: range first)
to: (self characterBlockForIndex: range last + 1).
(boxes
detect: [ :each | each containsPoint: aClickPoint ]
ifNone: [ nil ]) ifNotNil: [ aBlock cull: attribute cull: boxes ] ] in
RubParagraph>>actionAttributesUnder:event:do:
Array(SequenceableCollection)>>select:thenDo:
RubParagraph>>actionAttributesUnder:event:do:
RubParagraph>>move:for:controller:
Message>>sendTo:
[ aMessage sendTo: next ] in
RubOpeningClosingDelimiterDecorator(RubParagraphDecorator)>>doesNotUnderstand:
#move:for:controller:
BlockClosure>>on:do:
RubOpeningClosingDelimiterDecorator(RubParagraphDecorator)>>doesNotUnderstand:
#move:for:controller:
Message>>sendTo:
[ aMessage sendTo: next ] in
RubExtraSelectionDecorator(RubParagraphDecorator)>>doesNotUnderstand:
#move:for:controller:
BlockClosure>>on:do:
RubExtraSelectionDecorator(RubParagraphDecorator)>>doesNotUnderstand:
#move:for:controller:
Message>>sendTo:
[ aMessage sendTo: next ] in
RubCurrentLineBarDecorator(RubParagraphDecorator)>>doesNotUnderstand:
#move:for:controller:
BlockClosure>>on:do:
RubCurrentLineBarDecorator(RubParagraphDecorator)>>doesNotUnderstand:
#move:for:controller:
RubEditingArea(RubAbstractTextArea)>>mouseMove:
RubEditingArea>>mouseMove:
RubEditingArea(RubAbstractTextArea)>>handleMouseMove:
MouseMoveEvent>>sentTo:
RubEditingArea(Morph)>>handleEvent:
MorphicEventDispatcher>>dispatchDefault:with:
MorphicEventDispatcher>>handleMouseMove:
MouseMoveEvent>>sentTo:
[ ^ anEvent sentTo: self ] in MorphicEventDispatcher>>dispatchEvent:with:
BlockClosure>>ensure:
MorphicEventDispatcher>>dispatchEvent:with:
RubEditingArea(Morph)>>processEvent:using:
MorphicEventDispatcher>>dispatchDefault:with:
MorphicEventDispatcher>>handleMouseMove:
MouseMoveEvent>>sentTo:
[ ^ anEvent sentTo: self ] in MorphicEventDispatcher>>dispatchEvent:with:
BlockClosure>>ensure:
MorphicEventDispatcher>>dispatchEvent:with:
TransformWithLayoutMorph(Morph)>>processEvent:using:
MorphicEventDispatcher>>dispatchDefault:with:
MorphicEventDispatcher>>handleMouseMove:
MouseMoveEvent>>sentTo:
[ ^ anEvent sentTo: self ] in MorphicEventDispatcher>>dispatchEvent:with:
BlockClosure>>ensure:
MorphicEventDispatcher>>dispatchEvent:with:
RubTextScrollPane(Morph)>>processEvent:using:
MorphicEventDispatcher>>dispatchDefault:with:
MorphicEventDispatcher>>handleMouseMove:
MouseMoveEvent>>sentTo:
[ ^ anEvent sentTo: self ] in MorphicEventDispatcher>>dispatchEvent:with:
BlockClosure>>ens

Re: [Pharo-users] Persisting data in the Image

2017-02-06 Thread Ben Coman
On Tue, Feb 7, 2017 at 4:07 AM, Sven Van Caekenberghe  wrote:
>
>
> > On 6 Feb 2017, at 20:20, sergio ruiz  wrote:
> >
> > Is it enough to create a collection on a class to persist data and keep it 
> > away from the GC?
> >
> > something like:
> >
> > class Person>>people
> >   ^ 
> >
> > where add: and remove: would remove them from the collection..
>
> You need to put the collection in a class variable (or in some global 
> variable).
>
>

You may also find these interesting...
http://onsmalltalk.com/simple-image-based-persistence-in-squeak/
http://smalltalkhub.com/#!/~TorstenBergmann/SimplePersistence
cheers -ben



Re: [Pharo-users] Pharo Spur 64 VM

2017-02-06 Thread Cyril Ferlicot D.
Le 06/02/2017 à 21:31, Benoit St-Jean via Pharo-users a écrit :


Hi!

IIRC, the windows VM will need some more time to be ready. Only Linux
and OSX ones are usable at the moment.

-- 
Cyril Ferlicot

http://www.synectique.eu

2 rue Jacques Prévert 01,
59650 Villeneuve d'ascq France



signature.asc
Description: OpenPGP digital signature


[Pharo-users] Pharo Spur 64 VM

2017-02-06 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
Is this normal, I could not find the Spur 64bit VM for Windows on the Pharo 
file server? It is available for Mac & Linux but there's no file in the "win" 
directory. tia--- End Message ---


Re: [Pharo-users] Persisting data in the Image

2017-02-06 Thread sergio ruiz
Got it.. not just a method..

Thanks!


On February 6, 2017 at 3:08:37 PM, Sven Van Caekenberghe (s...@stfx.eu) wrote:

You need to put the collection in a class variable (or in some global 
variable). 

peace,
sergio
photographer, journalist, visionary

Public Key: http://bit.ly/29z9fG0
#BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV
http://www.Village-Buzz.com
http://www.ThoseOptimizeGuys.com
http://www.coffee-black.com
http://www.painlessfrugality.com
http://www.twitter.com/sergio_101
http://www.facebook.com/sergio101

signature.asc
Description: Message signed with OpenPGP using AMPGpg


Re: [Pharo-users] Persisting data in the Image

2017-02-06 Thread Sven Van Caekenberghe

> On 6 Feb 2017, at 20:20, sergio ruiz  wrote:
> 
> Is it enough to create a collection on a class to persist data and keep it 
> away from the GC?
> 
> something like:
> 
> class Person>>people
>   ^ 
> 
> where add: and remove: would remove them from the collection..

You need to put the collection in a class variable (or in some global variable).

> 
> peace,
> sergio
> photographer, journalist, visionary
> 
> Public Key: http://bit.ly/29z9fG0
> #BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV
> http://www.Village-Buzz.com
> http://www.ThoseOptimizeGuys.com
> http://www.coffee-black.com
> http://www.painlessfrugality.com
> http://www.twitter.com/sergio_101
> http://www.facebook.com/sergio101




[Pharo-users] Persisting data in the Image

2017-02-06 Thread sergio ruiz
Is it enough to create a collection on a class to persist data and keep it away 
from the GC?

something like:

class Person>>people
^ 

where add: and remove: would remove them from the collection..




peace,
sergio
photographer, journalist, visionary

Public Key: http://bit.ly/29z9fG0
#BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV
http://www.Village-Buzz.com
http://www.ThoseOptimizeGuys.com
http://www.coffee-black.com
http://www.painlessfrugality.com
http://www.twitter.com/sergio_101
http://www.facebook.com/sergio101

signature.asc
Description: Message signed with OpenPGP using AMPGpg


Re: [Pharo-users] Slack Invites doesn't work correctly

2017-02-06 Thread mldavis
Super, thank you Marcus.  Esteban Maringolo has also already fixed the url in 
the book. (see the attachment)



Thank you very much,



mike



From: denker [mailto:marcus.den...@inria.fr]
Sent: Monday, February 6, 2017 5:36 AM
To: mlda...@chaparralwest.com; Any question about pharo is welcome 

Subject: Re: [Pharo-users] Slack Invites doesn't work correctly



Hi,



The slack invite is now using a widget on the site



http://pharo.org/community



(there has been already a pull request to fix in the book and point to the 
website)



On 4 Feb 2017, at 03:00, mlda...@chaparralwest.com 
  wrote:



In the milestone release of Pharo By Example 5: “Pharo is also active on Slack 
- a platform for chat based on IRC (http:

//  pharoproject.slack.com), just ask for an 
invitation at   http://slackinvites.pharo.org. 
Everybody is welcomed.”



However,   http://slackinvites.pharo.org goes 
to what appears to be an invalid page.  How can a user get access to Pharo on 
slack?







  _


 

This email has been checked for viruses by Avast antivirus software.
  www.avast.com





---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
--- Begin Message ---
Somebody decided to use the, better suited, domain slackinvites.pharo.org 
  but didn't notify me, so that domain wasn't 
handled by my company server that currently runs the invite program.

I now added that domain to the nginx sites, and it is working (please confirm 
from your side).

Regards,

Esteban A. Maringolo

2017-02-06 9:35 GMT-03:00 denker mailto:marcus.den...@inria.fr> >:


Hi,

The slack invite is now using a widget on the site

http://pharo.org/community

(there has been already a pull request to fix in the book and point to the 
website)


On 4 Feb 2017, at 03:00, mlda...@chaparralwest.com 
  wrote:

In the milestone release of Pharo By Example 5: “Pharo is also active on Slack 
- a platform for chat based on IRC (http:
//pharoproject.slack.com  ), just ask for an 
invitation at http://slackinvites.pharo.  org. 
Everybody is welcomed.”
 
However, http://slackinvites.  pharo.org goes 
to what appears to be an invalid page.  How can a user get access to Pharo on 
slack?
 


  _  

   
This email has been checked for viruses by Avast antivirus software. 
www.avast.com  



--- End Message ---


Re: [Pharo-users] Slack Invites doesn't work correctly

2017-02-06 Thread mldavis
Perfect, thank you so much.  Tested in Windows 10 from both Microsoft Edge and 
Internet Explorer 11.



Regards,



mike



From: Esteban A. Maringolo [mailto:emaring...@gmail.com]
Sent: Monday, February 6, 2017 10:45 AM
To: Any question about pharo is welcome 
Cc: mlda...@chaparralwest.com
Subject: Re: [Pharo-users] Slack Invites doesn't work correctly



Somebody decided to use the, better suited, domain slackinvites.pharo.org 
  but didn't notify me, so that domain wasn't 
handled by my company server that currently runs the invite program.



I now added that domain to the nginx sites, and it is working (please confirm 
from your side).



Regards,




Esteban A. Maringolo



2017-02-06 9:35 GMT-03:00 denker mailto:marcus.den...@inria.fr> >:

Hi,



The slack invite is now using a widget on the site



http://pharo.org/community



(there has been already a pull request to fix in the book and point to the 
website)



On 4 Feb 2017, at 03:00, mlda...@chaparralwest.com 
  wrote:



In the milestone release of Pharo By Example 5: “Pharo is also active on Slack 
- a platform for chat based on IRC (http:

//  pharoproject.slack.com), just ask for an 
invitation at   http://slackinvites.pharo.org. 
Everybody is welcomed.”



However,   http://slackinvites.pharo.org goes 
to what appears to be an invalid page.  How can a user get access to Pharo on 
slack?







  _


 

This email has been checked for viruses by Avast antivirus software.
  www.avast.com







---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


Re: [Pharo-users] Slack Invites doesn't work correctly

2017-02-06 Thread Esteban A. Maringolo
Somebody decided to use the, better suited, domain slackinvites.pharo.org
but didn't notify me, so that domain wasn't handled by my company server
that currently runs the invite program.

I now added that domain to the nginx sites, and it is working (please
confirm from your side).

Regards,

Esteban A. Maringolo

2017-02-06 9:35 GMT-03:00 denker :

> Hi,
>
> The slack invite is now using a widget on the site
>
> http://pharo.org/community
>
> (there has been already a pull request to fix in the book and point to the
> website)
>
> On 4 Feb 2017, at 03:00, mlda...@chaparralwest.com wrote:
>
> In the milestone release of Pharo By Example 5: “Pharo is also active on
> Slack - a platform for chat based on IRC (http:
> //pharoproject.slack.com), just ask for an invitation at
> http://slackinvites.pharo.org. Everybody is welcomed.”
>
> However, http://slackinvites.pharo.org goes to what appears to be an
> invalid page.  How can a user get access to Pharo on slack?
>
>
>
> --
> [image: Avast logo] 
>
> This email has been checked for viruses by Avast antivirus software.
> www.avast.com 
>
>
>


Re: [Pharo-users] Slack Invites doesn't work correctly

2017-02-06 Thread denker
Hi,

The slack invite is now using a widget on the site

http://pharo.org/community 

(there has been already a pull request to fix in the book and point to the 
website)

> On 4 Feb 2017, at 03:00, mlda...@chaparralwest.com wrote:
> 
> In the milestone release of Pharo By Example 5: “Pharo is also active on 
> Slack - a platform for chat based on IRC (http:
> //pharoproject.slack.com ), just ask for an 
> invitation at http://slackinvites.pharo.org . 
> Everybody is welcomed.”
>  
> However, http://slackinvites.pharo.org  goes 
> to what appears to be an invalid page.  How can a user get access to Pharo on 
> slack?
>  
> 
> 
>  
> This email has been checked for viruses by Avast antivirus software. 
> www.avast.com 


Re: [Pharo-users] WCAG color contrast rules - was: Re: These beautiful tooltips

2017-02-06 Thread Cyril Ferlicot D.
On 04/02/2017 18:26, stepharong wrote:
> It would be nice to have a palette class with some nice defaults. 
> Cyril could you package what you have in MDL out of MDL so that we can
> add it to Pharo?
> 
> Stef
> 

I extracted it here:

https://github.com/DuneSt/MaterialColors

In the future I would like to add some utilities methods for example to
choose the font color from the background color following MaterialDesign
recommendations. Like that we would not have to care about the
readability of a font color if the background changes. (Following
https://material.io/guidelines/style/color.html#color-color-schemes)


-- 
Cyril Ferlicot

http://www.synectique.eu

2 rue Jacques Prévert 01,
59650 Villeneuve d'ascq France



signature.asc
Description: OpenPGP digital signature