Re: [Pharo-users] [ANN] Release of the Spec book

2017-03-17 Thread Johan Fabry
Hi Phil,

yes this is correct, in the end we did not need to make any changes to that 
version so it is the 1.0 version.

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org <http://emailcharter.org/> .

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

> On 17 Mar 2017, at 10:44, p...@highoctane.be wrote:
> 
> The book PDF is dated Feb 2016. Is this correct?
> 
> Phil
> 
> On Fri, Mar 17, 2017 at 10:16 AM, Sven Van Caekenberghe <s...@stfx.eu 
> <mailto:s...@stfx.eu>> wrote:
> Great work from the two of you, as usual !
> 
> Thanks for the effort, it must have been a lot of work.
> 
> I immediately ordered a print copy for my growing Pharo book collection.
> 
> > On 17 Mar 2017, at 09:32, Johan Fabry <jfa...@dcc.uchile.cl 
> > <mailto:jfa...@dcc.uchile.cl>> wrote:
> >
> > Hi all,
> >
> > Stéphane and I are happy to announce the 1.0 release of the book on Spec, 
> > the UI framework for Pharo!!
> >
> > This book was needed because the existing documentation was not really 
> > user-friendly and dispersed. I gathered everything I could find, sorted, 
> > filtered and rewrote, in collaboration with Stef. This is the reference 
> > documentation of Spec for Pharo 5 and 6, as well as my Magnum Opus on Spec 
> > (I have other ones on other topics ;-) ). We hope it will be useful for you.
> >
> > A small overview of the content: This book first shows the basics of Spec 
> > and how it enables reuse of UIs. It then treats UI layout in detail before 
> > moving on to explaining the management of windows. Some of the more 
> > advanced widgets are also discussed as well as the dynamic features of 
> > Spec. Lastly, the book also contains a chapter with tips and tricks.
> >
> > You can download a pdf of the book at 
> > http://files.pharo.org/books/spec-tutorial/ 
> > <http://files.pharo.org/books/spec-tutorial/> and also buy a hardcopy here: 
> > http://www.lulu.com/shop/johan-fabry-and-stéphane-ducasse/the-spec-ui-framework/paperback/product-23040294.html
> >  
> > <http://www.lulu.com/shop/johan-fabry-and-st%C3%A9phane-ducasse/the-spec-ui-framework/paperback/product-23040294.html>
> >  It’s only 9.99EUR so so you can easily afford it, and moreover all 
> > proceedings of sales go the the Pharo association !
> >
> > --
> > Does this mail seem too brief? Sorry for that, I don’t mean to be rude! 
> > Please see http://emailcharter.org <http://emailcharter.org/> .
> >
> > Johan Fabry   -   http://pleiad.cl/~jfabry <http://pleiad.cl/~jfabry>
> > PLEIAD and RyCh labs  -  Computer Science Department (DCC)  -  University 
> > of Chile
> >
> >
> 
> 
> 
> 



[Pharo-users] [ANN] Release of the Spec book

2017-03-17 Thread Johan Fabry
Hi all,

Stéphane and I are happy to announce the 1.0 release of the book on Spec, the 
UI framework for Pharo!!

This book was needed because the existing documentation was not really 
user-friendly and dispersed. I gathered everything I could find, sorted, 
filtered and rewrote, in collaboration with Stef. This is the reference 
documentation of Spec for Pharo 5 and 6, as well as my Magnum Opus on Spec (I 
have other ones on other topics ;-) ). We hope it will be useful for you.

A small overview of the content: This book first shows the basics of Spec and 
how it enables reuse of UIs. It then treats UI layout in detail before moving 
on to explaining the management of windows. Some of the more advanced widgets 
are also discussed as well as the dynamic features of Spec. Lastly, the book 
also contains a chapter with tips and tricks.

You can download a pdf of the book at 
http://files.pharo.org/books/spec-tutorial/ and also buy a hardcopy here: 
http://www.lulu.com/shop/johan-fabry-and-stéphane-ducasse/the-spec-ui-framework/paperback/product-23040294.html
 It’s only 9.99EUR so so you can easily afford it, and moreover all proceedings 
of sales go the the Pharo association !

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org .

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




Re: [Pharo-users] [ANN] Pharo Sprint tomorrow, March 3

2017-03-02 Thread Johan Fabry

Whoops … many many apologies! This was supposed to go directly to Marcus. 
Jetlag is a b*tch.

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org .

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

> On 02 Mar 2017, at 10:11, Johan Fabry <jfa...@dcc.uchile.cl> wrote:
> 
> Marcus, I should be there between 10 and 10:30. I will call you when I 
> arrive, your number is still +33 6 17 43 75 42 ?
> 
> I will need to leave early though :-( I think 3PM at the latest … 
> 
> --
> Does this mail seem too brief? Sorry for that, I don’t mean to be rude! 
> Please see http://emailcharter.org .
> 
> Johan Fabry   -   http://pleiad.cl/~jfabry
> PLEIAD and RyCh labs  -  Computer Science Department (DCC)  -  University of 
> Chile
> 
>> On 02 Mar 2017, at 08:53, Marcus Denker <marcus.den...@inria.fr> wrote:
>> 
>> We will organize a Pharo sprint / Moose dojo March, 03, starting at
>> 
>> 10:00am. (Local Time Paris).
>> 
>> Goals of this sprint:
>> 
>>  • Clean issue tracker to prepare for release Pharo6
>>  • remove Pharo6 tag from not-important cases
>>  • Check Pharo5 Issues and pending back-ports
>> 
>> Remotely, you can join us on Slack. During the sprint, we will try to 
>> synchronize local and remote Pharo sprinters.
>> 
>> Known Local Sprint meetings:
>> 
>> Lille/France:
>>  It will be at the Inria Lille, Building B, third floor (RMoD offices). 
>> As the building is not open to the public, please contact us before if you 
>> plan to come.
>> 
>> Santiago/Chile:
>> 
>>  At DCC (https://www.dcc.uchile.cl), Universidad de Chile. Avenida 
>> Beauchef 851, edificio poniente, tercer piso, oficina 307, Santiago, Chile.
>>  Chile sprint will be 9:00 local time and finish at a lunch time (13:00).
>> 
>> 
>> https://association.pharo.org/event-2451866
>> 
>> 
>> 
> 




Re: [Pharo-users] [ANN] Pharo Sprint tomorrow, March 3

2017-03-02 Thread Johan Fabry
Marcus, I should be there between 10 and 10:30. I will call you when I arrive, 
your number is still +33 6 17 43 75 42 ?

I will need to leave early though :-( I think 3PM at the latest … 

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org .

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

> On 02 Mar 2017, at 08:53, Marcus Denker <marcus.den...@inria.fr> wrote:
> 
> We will organize a Pharo sprint / Moose dojo March, 03, starting at
> 
> 10:00am. (Local Time Paris).
> 
> Goals of this sprint:
> 
>   • Clean issue tracker to prepare for release Pharo6
>   • remove Pharo6 tag from not-important cases
>   • Check Pharo5 Issues and pending back-ports
> 
> Remotely, you can join us on Slack. During the sprint, we will try to 
> synchronize local and remote Pharo sprinters.
> 
> Known Local Sprint meetings:
> 
> Lille/France:
>   It will be at the Inria Lille, Building B, third floor (RMoD offices). 
> As the building is not open to the public, please contact us before if you 
> plan to come.
> 
> Santiago/Chile:
> 
>   At DCC (https://www.dcc.uchile.cl), Universidad de Chile. Avenida 
> Beauchef 851, edificio poniente, tercer piso, oficina 307, Santiago, Chile.
>   Chile sprint will be 9:00 local time and finish at a lunch time (13:00).
> 
> 
> https://association.pharo.org/event-2451866
> 
> 
> 




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

2017-02-05 Thread Johan Fabry

Thanks for the vote of confidence :-) but sadly due to my move I won’t be able 
to spend much time on Pharo in the near future :-(

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org .

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

> On 04 Feb 2017, at 18:45, serge.stinckw...@gmail.com wrote:
> 
> I guess we can find better qualified people about UI quality than me ;-)
> Doru or Johan are examples.
> 
> Envoyé de mon iPhone




Re: [Pharo-users] Pharo and WebAssembly

2017-01-06 Thread Johan Fabry
Hi Richard,

it seems to me you do not have a compete grasp of what it takes to have a given 
language cross-compile to WebAssembly. However, if you feel that this is so 
important for you, feel free to give it a go. 

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org .

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

> On 05 Jan 2017, at 23:52, horrido <horrido.hobb...@gmail.com> wrote:
> 
> Hey,  Rust can now target WebAssembly
> <https://blog.rust-lang.org/2016/12/22/Rust-1.14.html>  . Pharo must do the
> same!
> 
> 
> 
> --
> View this message in context: 
> http://forum.world.st/Pharo-and-WebAssembly-tp492.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
> 
> 




Re: [Pharo-users] Mutter system news

2016-12-31 Thread Johan Fabry

And I was just starting to wonder how far the weirdness would go ;-)

Although I don’t know how much further you can go after "emojis over cookies 
over cookie monsters over garbage gravity grave”. :-P

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org <http://emailcharter.org/> .

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

> On 31 Dec 2016, at 07:50, Marcus Denker <marcus.den...@inria.fr> wrote:
> 
> Indeed, this is completely incoherent and looks automatically generated.
> 
> I unsubscribed the address.
> 
>   Marcus
> 
>> On 29 Dec 2016, at 21:14, Stephane Ducasse <stepharo.s...@gmail.com 
>> <mailto:stepharo.s...@gmail.com>> wrote:
>> 
>> I suggest that we remove from the list this bot.
>> 
>> On Wed, Dec 28, 2016 at 8:30 PM, Charlie Robbats <charlie.robb...@gmail.com 
>> <mailto:charlie.robb...@gmail.com>> wrote:
>> 22 - priority queue vatting calls and send stacks: meta over emojis over 
>> cookies over cookie monsters over garbage gravity grave
>> 
>> 
>> 
>> On 12/28/2016 2:22 PM, Charlie Robbats wrote:
>> 19 - I am thinking about merging RS FEC with blockEn/Decoding with a 7-bit 
>> msgChunks into 8-bit blocks, or QoS determined. That along with non-secret 
>> 3-way finite field key agreement ratcheting and contract established 
>> scoping, would mean each transaction might be separately islolated from 
>> every other and the contract exchange includes trusted observation filtering 
>> capabilities, locally enforced through your prioritized trees of life, 
>> liberty & property, and also your knowledge of good and evil.



[Pharo-users] 6.0 vm crash in FreeTypeFace

2016-12-21 Thread Johan Fabry
Hi all,

I’d like to report a vm crash of the 6.0 vm in a 5.0 image on  MacOS El 
Capitan. It happened when running some tests, no Roassal stuff this time. 
Apparently the problem is in FreeTypeFace(FT2Handle)>pvtDestroyHandle 

VM: 201610211421 https://github.com/estebanlm/opensmalltalk-vm.git $ Date: Fri 
Oct 21 16:21:30 2016 +0200 $
Plugins: 201610211421 https://github.com/estebanlm/opensmalltalk-vm.git $

I do not know if this is a know problem so I am reporting it. Dump file in 
attachment



crash.dmp
Description: Binary data

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org .

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



Re: [Pharo-users] BioSmalltalk win ...almost

2016-12-01 Thread Johan Fabry

Yes, a +1 on the assessment of the paper. The research methodology does not 
really result in any representative or generalisable data, so the conclusions 
are unfounded. 

(I have no experience with the journal, but my gut tells me to stay away from 
it.)

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org .

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

> On 01 Dec 2016, at 12:56, Serge Stinckwich <serge.stinckw...@gmail.com> wrote:
> 
> For me this paper is crappy and this kind of journal not really good.
> So I'm not surprised,




Re: [Pharo-users] Ideas for a binary format for an image acting as an extension of the Pharo image

2016-11-09 Thread Johan Fabry

How about using the binary format of the VM itself? It’s a tested format that 
gives you instant compatibility with Pharo. I guess the VM people have 
documentation for it and could give you some pointers.

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org <http://emailcharter.org/> .

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

> On 09 Nov 2016, at 17:27, Dimitris Chloupis <kilon.al...@gmail.com> wrote:
> 
> So now that CPPBridge at least basic are sort out I have to figure out a 
> binary file format
> 
> The idea here is to implement an image format which will be part of the 
> memory of the Pharo process but will live outside the memory of the Pharo VM. 
> Lets call this CPPMemory will be stored to an image file, lets call it 
> CPPImage, like we do with the Pharo image and will store a shared state among 
> all other processes (Pharo or not) that connect to this shared memory 
> (CPPMemory) via accessing the file (CPPImage). So basically it will act as an 
> extension to the Pharo image. 
> 
> In the image file , objects will be stored obviously not in a byte-code 
> format but definitely in a byte format that will basically store the data of 
> this object using very basic primitives like character , integers and of 
> course bytes. 
> 
> Obviously each object will have to have an id as a header and also its size 
> in bytes and the size of each of its instance variables.
> 
> There will be also a global headers for the entire file with the list of the 
> objects included and probably a references to other CPP images that they will 
> be able to interconnect with each other like lego blocks.
> 
> Thats my vague idea, but I am open to suggestions and even links to articles 
> and documentation about what a binary format must have to be considered well 
> architectured.  Obviously I dont expect perfection because this is my first 
> binary file format but at least I am looking for advise for avoiding common 
> pitfalls. 



Re: [Pharo-users] Pharo desktop UI

2016-11-07 Thread Johan Fabry
I understand what you are asking, in previous versions of the documentation we 
had something like this. However this turned out to be a bad idea since this is 
too closely linked to the actual implementation. Making internal changes to the 
Spec interpreter means that this documentation also needs to be updated. We 
don’t have the resources for that, sadly this documentation became out of date 
and simply wrong so we had to remove it.

So for what you are asking the code is the only reference, sorry. 

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org <http://emailcharter.org/> .

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

> On 06 Nov 2016, at 18:23, vikenti <vikenti.pota...@gmail.com> wrote:
> 
> Maybe you can give some brief explanaition how to create Spec-compatible 
> custom UI control? (Like TextModel or ButtonModel, etc.) How to create model 
> class, corresponding adapter and how to process common and custom UI events 
> (mouse\keyboard\focus ordering\changing). 
> I think such guide should also be included in Spec booklet. 



Re: [Pharo-users] Pharo desktop UI

2016-11-06 Thread Johan Fabry
Hello Vikenti,

I think that you are using the SpecAdapter for morphs in ways it has never been 
tried or used. So the problems you are having reveal bugs in the SpecAdapter. 
Please file a bug report, and feel free to contribute a fix as well of course 
;-) (more about bugreports here: http://pharo.org/contribute )

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org <http://emailcharter.org/> .

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

> On 05 Nov 2016, at 21:37, vikenti <vikenti.pota...@gmail.com> wrote:
> 
> 
> New problem with Spec. 
> 
> Layout consists of menu and custom control (subclass of Morph created by 
> asSpecAdapter): 
> initializeWidgets 
> menu := self instantiate: MenuModel.  
> self setupMenu. 
> menu applyTo: self. 
> locationField := LocationFieldMorph new asSpecAdapter. 
> 
> defaultSpec 
>  
> ^ SpecLayout composed 
> newColumn: 
> [ :col | 
> col 
> add: #menu height: self toolbarHeight;
> add: #locationField 
> ] yourself 
> 
> My custom control doesn't automatically resize to fill the area reserved to 
> it by layout spec. 
> I've tried different existed controls instead of mine but didn't find any 
> solution. Some controls resized (TextModal) some didn't (Morph, 
> BorderedMorph, EllipseMorph). 
> 
> I did a dirty hack: in onDraw: of my custom control i set bounds: to aCanvas 
> clipRect and it works fine. 
> 
> drawOn: aCanvas 
> self bounds: aCanvas clipRect . 
>  other code  
> 
> But i think it is a wrong solution and there is somewhere a simple property 
> to setup ( or something like it ). 
> 
> Any ideas? 



Re: [Pharo-users] How to consume the MOOC?

2016-11-04 Thread Johan Fabry

For me, the easiest way is http://mooc.pharo.org ( which is linked from 
http://pharo.org/documentation )

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org <http://emailcharter.org/> .

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

> On 04 Nov 2016, at 08:11, Luke Gorrie <l...@snabb.co> wrote:
> 
> Howdy!
> 
> Just a question from a confused newbie: What is the easiest way to consume 
> the Pharo MOOC content in English?
> 
> I have tried to find the content a few times over the past few months but so 
> far I have hit a registration page / short trailer video / video in French. 
> (I keep hoping that a YouTube channel will appear that makes the videos easy 
> to follow in sequence on any device.)
> 
> Cheers!
> -Luke
> 
> 



Re: [Pharo-users] How does Boolean ifTrue work?

2016-11-03 Thread Johan Fabry


> On 03 Nov 2016, at 10:22, Dimitris Chloupis <kilon.al...@gmail.com> wrote:
> 
> I don't agree with you not agreeing with me, because I never said it would be 
> Smalltalk or Pharo (for those that think that Pharo is not Smalltalk).

OK but the original question was "Why don't Smalltalk or Smalltalklike 
languages have checked interfaces?” and my mail was an answer to that.


--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org <http://emailcharter.org/> .

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



Re: [Pharo-users] How does Boolean ifTrue work?

2016-11-03 Thread Johan Fabry

I don’t agree with that, if you implement static types or interfaces it’s no 
longer really Smalltalk. It would be (a variant of) Strongtalk 
http://www.bracha.org/nwst.html http://www.strongtalk.org/index.html

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org <http://emailcharter.org/> .

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

> On 03 Nov 2016, at 03:11, Dimitris Chloupis <kilon.al...@gmail.com> wrote:
> 
> Actually sorry Igor but you are wrong, you just defeated the purpose of 
> Smalltalk. To expose you to the internals. Of course you can implement 
> interfaces. You can even implement static types. You can do anything you 
> want. 
> 
> The compiler is written in Smalltalk after all.
> 
> On Wed, 2 Nov 2016 at 23:02, Igor Stasenko <siguc...@gmail.com 
> <mailto:siguc...@gmail.com>> wrote:
> 
> If you want to ensure that your class(es) comply with certain protocol, just 
> write a test that covers the protocol and checks that class instances will 
> understand messages you want it to understand.
> But there's no way to restrict your class to comply to whole protocol once at 
> a time, because tools made in a way, that you populating your class with 
> methods, each method is add individually and compiled separately, and the 
> only validation, the compiler is capable of is basically compliance with 
> smalltalk syntax. And it doesn't cares about higher lever requirement, like 
> whether your class turns to be 'valid' because of a method you just added, 
> ready to be used and for what. 
> Even more, there's no way to connect all those 'interface' formalisation 
> garbage rules with send sites (the place where you actually invoking one or 
> another method of one of potetial implementor of your interface), so it makes 
> no sense to do any (pre)validation on whatever class/object in a system in 
> order to check whether it conforms with it or not.
> That's " Why don't Smalltalk or Smalltalklike languages have checked 
> interfaces?"
> 
> -- 
> Best regards,
> Igor Stasenko.



Re: [Pharo-users] Pharo desktop UI

2016-11-02 Thread Johan Fabry

I’m happy that the documentation is of help to you!

Sorry but I don’t have an answer to your question at hand right now. Have a 
look at all the users of MenuModel and friends to see where they are used in 
the image, you should be able to get the examples you need.

HTH,

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org <http://emailcharter.org/> .

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

> On 02 Nov 2016, at 21:09, vikenti <vikenti.pota...@gmail.com> wrote:
> 
> One more question: how to add separator to the menu group? 
> either MenuGroupModel nor MenuItemModel has special selector but 
> autocompletion shows me "addSeparator", if i use it  - i get an error. 



Re: [Pharo-users] Pharo desktop UI

2016-11-02 Thread Johan Fabry
Hello Vikenti,

for writing UIs in Pharo the UI builder you should use is Spec. We have 
documentation online in the form of a book (which is a work in progress).I 
think it will answer many of your UI questions, have a look at 
http://files.pharo.org/books/spec-tutorial/ 

HTH,

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org .

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

> On 02 Nov 2016, at 18:43, vikenti <vikenti.pota...@gmail.com> wrote:
> 
> Hello, i'm newbie in Pharo, converted from Visual Works which is quite
> different from Pharo Smalltalk.
> I started to port my application (i've been working on for about three
> years) from VW (because of new personal user licensing limitations of Visual
> Works), but i have to solve some problems and need your advice.
> 
> These ase some of the most important problems:
> 1.  I need to rewrite the whole GUI from scratch. What UI framework to
> choose and where to get documentation? Please, don't send me to research
> code examples instead of docs - i do this during whole last week. The
> example should be complete and simple: one task - one example, all examples
> i've seen are either not applicable to real life or too complicated to
> understand.
> - I need simple window with menu (how to attach menu items to menu
> handlers - no answer in examples)
> - Toolbar with icons (how)
> - components (as i understand - Morphic subclasses, it is the simplest
> part)
> - when window opens i need handler to do some setup actions. Handler should
> fire after UI is built and my app's window is opened (how?)
> - i need another handler, which fires when you try to close Pharo or
> application's window. Handler must check whether to close window or not and
> do allow or not to close my application.
> - how to programmatically close window??
> 
> 2. The next task is to do some work on image load (i mean pharo image). I
> need some handler which fires immediately after image is loaded. How to
> include my handler in this chain My app saves data into the image so i
> need to manage this and auto-load _my_ application after startup.
> 
> 3. How to drag-n-drop from the host operation system into pharo application
> and vice versa? I need to drag-n-drop a list of files from\to file browser. 
> 
> 4. Application deployment. How to strip the unnecessary code from the image?
> I've heard there is "small image" to add all-i-need-to-run. Where i can
> download it and how to use it  
> 
> 
> 
> 
> 
> 
> 
> 
> 
> --
> View this message in context: 
> http://forum.world.st/Pharo-desktop-UI-tp4921212.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
> 
> 




Re: [Pharo-users] Keeping data with an application

2016-11-02 Thread Johan Fabry
There is a chapter in the Enterprise Pharo book on STON that may be of some 
help to you
https://ci.inria.fr/pharo-contribution/job/EnterprisePharoBook/lastSuccessfulBuild/artifact/book-result/STON/STON.html

The book also talks about other storage mechanisms, see 
http://files.pharo.org/books/enterprise-pharo/ 

HTH,

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org <http://emailcharter.org/> .

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

> On 02 Nov 2016, at 14:27, sergio ruiz <sergio@gmail.com> wrote:
> 
> Looks like I might stick with STON.. I am not really worried too much about 
> execution time or anything..
> 
> Need to look at one more thing..
> 
> If a user has say.. many stations.. meaning that they have an 
> OrderedCollection of Stations.. I need to check how that gets serialized, and 
> what happens when it gets pulled back in..
> 
> I will play with it this afternoon..
> 
> Thanks!
> 
> 
> On November 2, 2016 at 12:24:48 PM, p...@highoctane.be 
> <mailto:p...@highoctane.be> (p...@highoctane.be <mailto:p...@highoctane.be>) 
> wrote:
> 
>> Fuel is another option , though ston will be more readable because ston is 
>> text fluel is binary . SQLite is another one . You actually have a ton of 
>> options here. You can even make your own binary or text format if want , 
>> it's easy.
> 
> peace,
> sergio
> photographer, journalist, visionary
> 
> Public Key: http://bit.ly/29z9fG0 <http://bit.ly/29z9fG0>
> #BitMessage BM-NBaswViL21xqgg9STRJjaJaUoyiNe2dV
> http://www.Village-Buzz.com <http://www.village-buzz.com/>
> http://www.ThoseOptimizeGuys.com <http://www.thoseoptimizeguys.com/>
> http://www.coffee-black.com <http://www.coffee-black.com/>
> http://www.painlessfrugality.com <http://www.painlessfrugality.com/>
> http://www.twitter.com/sergio_101 <http://www.twitter.com/sergio_101>
> http://www.facebook.com/sergio101 <http://www.facebook.com/sergio101>


[Pharo-users] Pharo contribution Jenkins broken?

2016-10-27 Thread Johan Fabry
Hi all,

it seems that something is wrong with https://ci.inria.fr/pharo-contribution/ 
It’s failing a bunch of jobs with by running no tests, e.g. 
https://ci.inria.fr/pharo-contribution/job/LiveRobotProgramming/ 

Can this be fixed please?

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org .

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




Re: [Pharo-users] Final Project: AR.Drone communication API in Pharo

2016-10-24 Thread Johan Fabry
Excellent work :-)

I just have one extra question: can you tell us where the LRP code for both 
examples is published?

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org <http://emailcharter.org/> .

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

> On 24 Oct 2016, at 12:22, Carolina Hernández <carola...@gmail.com> wrote:
> 
> Hi!
> Earlier this year I told you about the communication API for controlling the 
> AR.Drone 2.0 from Pharo I was developing as part of my final degree project. 
> Today I want to share with you its final version. As before, the code is 
> hosted in: http://smalltalkhub.com/#!/~CaroHernandez/ArDronePharo 
> <http://smalltalkhub.com/#!/~CaroHernandez/ArDronePharo>
> 
> I made two demo videos: 
> http://bit.ly/ARDroneLRP1 <http://bit.ly/ARDroneLRP1>
> http://bit.ly/ARDroneLRP2 <http://bit.ly/ARDroneLRP2>
> 
> In each demo the drone flies autonomously according to the location of tags 
> detected by its cameras. The demos are programmed using a live programming 
> language called LRP. This language was developed by members of my university. 
> Here you can find more about LRP: https://pleiad.cl/research/software/lrp 
> <https://pleiad.cl/research/software/lrp>
> 
> The code was tested and developed under ubuntu 12.04 and Pharo 5.0. 
> I hope you like it! :-)
> 
> Cheers
> Caro



Re: [Pharo-users] What is the correct way to go around implementing a GUI feature in Pharo?

2016-10-23 Thread Johan Fabry

Building a small window with these menus and/or buttons is straightforward in 
Spec. Have a look at the Spec GUI documentation book (a work in progress):
https://ci.inria.fr/pharo-contribution/view/Books/job/BuildingUIWithSpec/lastSuccessfulBuild/artifact/book-result/SpecBooklet.pdf

Individual chapters are also available:
https://ci.inria.fr/pharo-contribution/view/Books/job/BuildingUIWithSpec/lastSuccessfulBuild/artifact/book-result/

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org .

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

> On 23 Oct 2016, at 01:53, CodeDmitry <dimamakh...@gmail.com> wrote:
> 
> I want to have a bootstrap-like navbar at the top of my pharo GUI to store
> commonly accessed features/custom hierarchies of menus.
> 
> My first thought is that I should spend a bunch of time playing with Morphs
> and invent my own MVC(models being the state managed by the menu, views
> being the controls(morphs), and controllers being asynchronous blocks of
> code that are invoked when events occur).
> 
> Are there any good resources that teach how to go around doing stuff like
> this, or do I have to reinvent it myself by researching how Pharo GUI works
> internally, and figure out how to do this by successful incremental
> experiments?
> 
> 
> 
> 
> 
> --
> View this message in context: 
> http://forum.world.st/What-is-the-correct-way-to-go-around-implementing-a-GUI-feature-in-Pharo-tp4919772.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
> 
> 




Re: [Pharo-users] CodeGenerator, your opinions?

2016-10-19 Thread Johan Fabry

Sorry, I did not catch this thread before.

If you are looking for a terse way to describe state machines, you may want to 
have a look at LRP, a live programming language for nested state machines (for 
robotics), implemented in Pharo. It seems to have what you are talking about in 
your mail. It is made for robotics, but in the end can be used for a lot more 
stuff since it has a clean integration with Pharo.

The URL of LRP is http://pleiad.cl/LRP If you have any questions, feel free to 
ask!

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org .

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

> On 19 Oct 2016, at 00:44, Otto Behrens <o...@finworks.biz> wrote:
> 
> I just meant some syntactically terse way of expressing a state
> machine so that one can see the logic clearly. Representing a state
> machine in a graphical way is ideal. We did this once, but the problem
> is to make the state machine definition resilient to refactorings and
> changes to the code. What I mean is that compiling something into code
> is a one way thing; to keep it maintained, one would like to "reverse
> compile" and draw the state machine from code.
> 
> A "correct" DSL would be something like a Harel state diagram, which
> should be able to express most requirements.




Re: [Pharo-users] Nao robot with Pharo and LRP

2016-10-18 Thread Johan Fabry

Excellent work ! :-)

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org <http://emailcharter.org/> .

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

> On 18 Oct 2016, at 06:09, Miguel Campusano <mcamp...@dcc.uchile.cl> wrote:
> 
> Hello,
> I've been working on an API for the Nao Robot [1] in Pharo. You can find an 
> early demo of how it works in Pharo:
> https://www.youtube.com/watch?v=z8jopUfLWtQ 
> <https://www.youtube.com/watch?v=z8jopUfLWtQ>
> 
> Moreover, I built a communication bridge between the Nao and LRP [2]. LRP is 
> a live programming language for robotic behaviors. You can see a working demo 
> of the nao moving via LRP here:
> https://www.youtube.com/watch?v=q1jGDtaW41U 
> <https://www.youtube.com/watch?v=q1jGDtaW41U>
> 
> I want to emphasize how easy and fun can be to program a robot with a live 
> environment. Looking at the robot and see how immediately changes its 
> behavior whenever you send a command, that is cool!
> 
> You can find the API here (I have to write the documentation on how to use 
> it):
> http://www.smalltalkhub.com/#!/~mcamp/NaoSocket 
> <http://www.smalltalkhub.com/#!/~mcamp/NaoSocket>
> 
> This is a work in progress. The Nao has several features that I'm planning to 
> incorporate in the API when they are needed. 
> 
> To make this work I use TCP sockets to communicate with the robot. For the 
> Nao, there is a documentation on how the robot communicates via binary 
> packages, but the documentation lacks a lot of information that I managed to 
> figure it out by reading the binary information (thanks gtInspector for that) 
> and understanding how the robot works.
> 
> [1] https://www.ald.softbankrobotics.com/en/cool-robots/nao 
> <https://www.ald.softbankrobotics.com/en/cool-robots/nao>
> [2] pleiad.cl/lrp <http://pleiad.cl/lrp>


Re: [Pharo-users] The Ultimate Smalltalk Tutorial

2016-10-14 Thread Johan Fabry
Hi Horrido,

did you have a look at the Pharo Mooc? http://files.pharo.org/mooc/ it has 
exactly the same target audience and also covers Seaside. 

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org .

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

> On 14 Oct 2016, at 08:04, horrido <horrido.hobb...@gmail.com> wrote:
> 
> GoFundMe for the Ultimate Smalltalk Tutorial
> <https://www.gofundme.com/the-ultimate-smalltalk-tutorial-2u3k3sc>  . The
> plan is to create a complete and full-featured tutorial showing how to write
> a Seaside application using Pharo. The tutorial is aimed at rank beginners
> who know absolutely nothing about programming and who need a great deal more
> hand-holding than Prof Stef. It will provide an alternative to JavaScript
> bootcamps that are gobbling up programming beginners at a prodigious rate.
> This is quite a substantial undertaking.
> 
> Thank you.
> 
> 
> 
> --
> View this message in context: 
> http://forum.world.st/The-Ultimate-Smalltalk-Tutorial-tp4918859.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
> 
> 




Re: [Pharo-users] pillar: how to link to different parts?

2016-09-30 Thread Johan Fabry

Yes, we do this in the Enterprise Pharo book.

For example there is a link to NeoJSON in the STON chapter 
https://ci.inria.fr/pharo-contribution/job/EnterprisePharoBook/lastSuccessfulBuild/artifact/book-result/STON/STON.html

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org .

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

> On Sep 30, 2016, at 15:45, Tudor Girba <tu...@tudorgirba.com> wrote:
> 
> Hi,
> 
> I am playing with Pillar, and I am now would like to link different chapters 
> to one another. For example, in the old Pier book support, we could write 
> something like:
> 
>   *ref:../anotherchapter/section*
> 
> and this would result in a rendering like:
>   
>Section 15.3 (with a link)
> 
> Is there a support already in place for this in Pillar?
> 
> Cheers,
> Doru
> 
> 
> --
> www.tudorgirba.com
> www.feenk.com
> 
> "Every successful trip needs a suitable vehicle."
> 
> 
> 
> 
> 
> 
> 




Re: [Pharo-users] Spec: Class pop list code completion

2016-09-22 Thread Johan Fabry
Hi Brad,

AFAIK there is nothing prebuilt, you will have to roll your own.

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org .

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

> On Sep 22, 2016, at 16:04, Brad Selfridge <bsselfri...@gmail.com> wrote:
> 
> Is there a way in Spec to pop a list widget that contains class names when
> entering a partial class name in a test field, (like GTPlayground does)?   
> 
> p.s. I do not want to go down the Glamour route. 
> 
> 
> 
> -
> Brad Selfridge
> --
> View this message in context: 
> http://forum.world.st/Spec-Class-pop-list-code-completion-tp4916672.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
> 
> 




Re: [Pharo-users] Get implementors list window from Spotter

2016-09-21 Thread Johan Fabry

> On Sep 21, 2016, at 01:14, Tudor Girba <tu...@tudorgirba.com> wrote:
> 
>> Speaking for myself, I honestly would not think about clicking on the ? icon 
>> to expect these kinds of instructions. I cannot say exactly why, I only have 
>> a feeling that the ? does not transmit to me that there are ‘power user’ 
>> tips, and I expect a ? icon to just tell me basic things. 
> 
> Thanks for the feedback. Still, my question remains: is the help explanatory 
> enough or do we need to improve it?

After reading through everything, I think it’s actually too long. There is too 
much information and it is structured as a story. You could read all of this 
once (although I think many people will give up after a few pages), but there 
is no way to remember all of this information.

My suggestion is to add something like a quick reference card (remember those?) 
for Spotter. For example like 
http://marc-abramowitz.com/archives/2006/04/10/emacs-22-reference-card/ This 
has to be manually curated, something like the ‘Extensions installed in the 
image’ is not right because again it’s too much info and not ordered in 
sequence of importance. Then add a button to the UI so that this can be shown 
when needed.

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org .

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




Re: [Pharo-users] Get implementors list window from Spotter

2016-09-20 Thread Johan Fabry

Sorry, I don’t mean to sound like a smartass, but apparently the data shows 
that this is not sufficient. Otherwise people would not ask on the mailing 
list, like Esteban did originally (and as I remember other people asking).

Speaking for myself, I honestly would not think about clicking on the ? icon to 
expect these kinds of instructions. I cannot say exactly why, I only have a 
feeling that the ? does not transmit to me that there are ‘power user’ tips, 
and I expect a ? icon to just tell me basic things. 

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org .

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

> On Sep 20, 2016, at 17:04, Tudor Girba <tu...@tudorgirba.com> wrote:
> 
> We tried to address this with the help? Please let me know if some parts need 
> updates or more explanations.
> 
> Doru
> 
>> On Sep 20, 2016, at 9:03 PM, Johan Fabry <jfa...@dcc.uchile.cl> wrote:
>> 
>> 
>> I repeat my comment from before: The discoverability of UI of Spotter is 
>> much too low. Please please please add a bit of explanation to the spotter 
>> window to show all these cool things with the hashtags and the keyboard 
>> shortcuts. There is *no way* for a normal Pharo user to discover this.
>> 
>> --
>> Does this mail seem too brief? Sorry for that, I don’t mean to be rude! 
>> Please see http://emailcharter.org .
>> 
>> Johan Fabry   -   http://pleiad.cl/~jfabry
>> PLEIAD and RyCh labs  -  Computer Science Department (DCC)  -  University of 
>> Chile
>> 
>>> On Sep 20, 2016, at 15:19, Tudor Girba <tu...@tudorgirba.com> wrote:
>>> 
>>> You can also press do:
>>> mySelector Cmd+m
>>> 
>>> Cheers,
>>> Doru
>>> 
>>> 
>>>> On Sep 20, 2016, at 8:18 PM, Esteban Lorenzano <esteba...@gmail.com> wrote:
>>>> 
>>>> mySelector #impl
>>>> 
>>>>> On 20 Sep 2016, at 20:00, Esteban A. Maringolo <emaring...@gmail.com> 
>>>>> wrote:
>>>>> 
>>>>> Hi,
>>>>> 
>>>>> How can I open the implementors list from Spotter?
>>>>> 
>>>>> I want to browse through the code of the different implementors as I
>>>>> do by selecting a selector and searching an implementor (or Ctr+M).
>>>>> 
>>>>> Regards,
>>>>> 
>>>>> Esteban A. Maringolo
>>>>> 
>>>> 
>>>> 
>>> 
>>> --
>>> www.tudorgirba.com
>>> www.feenk.com
>>> 
>>> "Quality cannot be an afterthought."
>>> 
>>> 
>>> 
>> 
>> 
> 
> --
> www.tudorgirba.com
> www.feenk.com
> 
> "Being happy is a matter of choice."
> 
> 
> 
> 
> 
> 




Re: [Pharo-users] Get implementors list window from Spotter

2016-09-20 Thread Johan Fabry

I repeat my comment from before: The discoverability of UI of Spotter is much 
too low. Please please please add a bit of explanation to the spotter window to 
show all these cool things with the hashtags and the keyboard shortcuts. There 
is *no way* for a normal Pharo user to discover this.

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org .

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

> On Sep 20, 2016, at 15:19, Tudor Girba <tu...@tudorgirba.com> wrote:
> 
> You can also press do:
> mySelector Cmd+m
> 
> Cheers,
> Doru
> 
> 
>> On Sep 20, 2016, at 8:18 PM, Esteban Lorenzano <esteba...@gmail.com> wrote:
>> 
>> mySelector #impl
>> 
>>> On 20 Sep 2016, at 20:00, Esteban A. Maringolo <emaring...@gmail.com> wrote:
>>> 
>>> Hi,
>>> 
>>> How can I open the implementors list from Spotter?
>>> 
>>> I want to browse through the code of the different implementors as I
>>> do by selecting a selector and searching an implementor (or Ctr+M).
>>> 
>>> Regards,
>>> 
>>> Esteban A. Maringolo
>>> 
>> 
>> 
> 
> --
> www.tudorgirba.com
> www.feenk.com
> 
> "Quality cannot be an afterthought."
> 
> 
> 




Re: [Pharo-users] [ANN] Pillar 4.0.0

2016-09-14 Thread Johan Fabry
Hi Doru,

it looks like there’s a problem with copySupport.mk, I had the same problem 
with the Spec booklet. The file is using Linux only syntax for the cp command. 
This was fixed for the Spec booklet after I raised an issue there, but it seems 
the fix was not propagated everywhere it needs to be. Have a look at 
https://github.com/SquareBracketAssociates/BuildingUIWithSpec/blob/master/copySupport.mk
 and try to update your copySupport, it may fix your problem.

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org .

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

> On Sep 14, 2016, at 18:40, Tudor Girba <tu...@tudorgirba.com> wrote:
> 
> Hi,
> 
> Ok, I found this document:
> https://ci.inria.fr/pharo-contribution/job/EnterprisePharoBook/lastSuccessfulBuild/artifact/book-result/PillarChap/Pillar.html
> 
> And now I tried this:
> 
>   wget --no-check-certificate 
> https://raw.githubusercontent.com/pillar-markup/pillar/master/download.sh
>   chmod +x download.sh
>   ./download.sh
>   ./pillar archetype book
> 
> and I got the book template. But, I do not know how to compile the book. I 
> tried
> 
>   make
> 
> or 
>   make book
> 
> but I get:
> 
> make
> mkdir -p ./book-result
> find . -type d -path ./book-result -prune -o -wholename "*/figures" -exec cp 
> {} --parents -r ./book-result \;
> cp: ./Chapters/Chapter1/figures is a directory (not copied).
> cp: --parents: No such file or directory
> cp: -r: No such file or directory
> cp: ./figures is a directory (not copied).
> cp: --parents: No such file or directory
> cp: -r: No such file or directory
> cp: ./support/figures is a directory (not copied).
> cp: --parents: No such file or directory
> cp: -r: No such file or directory
> cp -r support/ ./book-result
> cp .latexmkrc ./book-result
> cp: .latexmkrc: No such file or directory
> make: *** [copySupport] Error 1
> 
> 
> I must be doing something wrong, but I do not know what. I am on a Mac 10.11 
> and I am using bash. Could someone point me in the right direction?
> 
> Cheers,
> Doru
> 
> 
>> On Sep 14, 2016, at 10:49 PM, Tudor Girba <tu...@tudorgirba.com> wrote:
>> 
>> Hi,
>> 
>> Where can I find the new template system for Pillar?
>> 
>> Cheers,
>> Doru
>> 
>> 
>>> On Jul 22, 2016, at 3:41 PM, Thibault ARLOING <thibault.arlo...@hotmail.fr> 
>>> wrote:
>>> 
>>> Hello,
>>> 
>>> I'm happy to announce the latest release of Pillar.
>>> This release has been possible because of the hard work of Damien Cassou, 
>>> Cyril Ferlicot, Yann Dubois, Thibault Arloing and Lukas Komarek.
>>> What did it bring and what are the largest changes ?
>>> 
>>> • Huge cleaning of code and Dependencies
>>> • Many bug fixes
>>> • Huge refactoring of internal parts
>>> • Extract phase management into an external project 
>>> (LightPhaser)
>>> • Transformers and Phases are all Pipes
>>> Remove Compilation cycle
>>> • Remove template handling from Pillar
>>> • Remove generation of pillarpostExport.sh
>>> • Pillar now exports files to JSON format 
>>> • Command for pillar archetypes "./pillar archetype book", book can be 
>>> replaced by other archetype names (see Pillar documentation)
>>> • Possibility to load an archetype with a Makefile to compile pillar 
>>> files
>>> Features
>>> • Check phase to check syntax
>>> • EPub exporter for e-books (use pillar archetypes for this)
>>> • Semantic links to Youtube and Wikipedia
>>> • Citations for LaTeX
>>> • Structures (see Pillar documentation)
>>> • Footnotes for HTML, Markdown, LaTeX and AsciiDoc
>>> • Improvement of parsing configuration failure message
>>> Major changes
>>> • Metadata field in configuration to separate data from configuration 
>>> properties
>>> • Support files in configuration does no longer exists
>>> • "disableTransformers" property is now named "disabledPhases"
>>> • AsciiDoc file extension is now ".asciidoc"
>>> • Pillar now manages one input file, not a collection of input files 
>>> anymore
>>> • Parameter inputFiles is now replaced by inputFile
>>> The documentation of Pillar will be update as soon as possible to fit those 
>>> changes.
>>> 
>>> Cheers,
>>> 
>>> Thibault
>> 
>> --
>> www.tudorgirba.com
>> www.feenk.com
>> 
>> "Sometimes the best solution is not the best solution."
>> 
> 
> --
> www.tudorgirba.com
> www.feenk.com
> 
> "It's not how it is, it is how we see it."
> 
> 
> 




[Pharo-users] Pharo users count / estimate ?

2016-09-14 Thread Johan Fabry
Hi all,

for some silly report that I need to write I wanted to add an estimate of how 
many people worldwide use Pharo. I tried to find number of downloads of e.g. 
Pharo 5 to use that as a basis for estimation but I could not find this info 
online. Does the Pharo team have any usable statistics that can be shared ?

TIA
--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org .

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




Re: [Pharo-users] Spec - Display an ICON without dropping to Morphic

2016-09-12 Thread Johan Fabry
Hi Brad,

all forms can be shown as part of a Spec UI. There’s the ImageModel for that. 
For example, supposing you have an ‘icon’ instance variable in your UI, add to 
initializeWidgets:

icon := self newImage.
icon image: (#thumbsUp asIcon).

HTH

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org .

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

> On Sep 12, 2016, at 15:40, Brad Selfridge <bsselfri...@gmail.com> wrote:
> 
> I want to create a MessagePrompter widget that will display either and error,
> warning, or information message. I want to display a different icon
> associated with each message type. Is there a way to do this in Spec without
> having to drop down into Morphic? 
> 
> I do NOT want to have to learn Morphic. It's taking me enough time trying
> work my way through Spec. 
> 
> 
> 
> -
> Brad Selfridge
> --
> View this message in context: 
> http://forum.world.st/Spec-Display-an-ICON-without-dropping-to-Morphic-tp4915253.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
> 
> 




Re: [Pharo-users] SpecBooklet: Strange behavior of ProtocolBrowser

2016-09-08 Thread Johan Fabry

Thanks for your kind words and also for the report of the issues, I will take 
care of that ASAP!

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org .

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

> On Sep 8, 2016, at 11:24, Matteo <matte...@yahoo.it> wrote:
> 
> Hi Jhoan,
> 
>   Does static typing could fix these kind of bugs?
>   [hahaha, just kidding ;) ]
> 
> 
>   About the SpecBooklet, for now there's only 3 (really) small issues:
> 
> at page 3 --> the phrase "You could can use the rest..." should be fixed;
> 
> at page 5 --> to let the code work I had to substitute "self iconNamed:
> #thumbsUp" with "(Smalltalk ui icons iconNamed: #thumbsUp)",and so on
> for the other buttons. Is it a problem of my image?
> 
> at page 14 --> there's a " ' " missing from the "instanceVariableNames:"
> of the #ProtocolMethodList subclassing message.
> 
> 
>   Just a note to say that I'm very happy with the SpecBooklet: it would
> be **very** difficult to figure out how to effectively use Spec by
> simply reading the code.
> 
>   Further it is really well written, and contains a lot of
> useful/fundamental information: evidence of the great effort the Authors
> have spent to write it.
> 
> Congrats for the very good job!
> 
> thanks,
> Matteo
> 
> 
> 
> 
> 
> On 08/09/16 15:28, Johan Fabry wrote:
>> Hi Matteo,
>> 
>> glad to be of help. And sorry but these kinds of concurrency bugs are the 
>> hardest to catch, there is no straightforward solution.
>> 
>> --
>> Does this mail seem too brief? Sorry for that, I don’t mean to be rude! 
>> Please see http://emailcharter.org .
>> 
>> Johan Fabry   -   http://pleiad.cl/~jfabry
>> PLEIAD and RyCh labs  -  Computer Science Department (DCC)  -  University of 
>> Chile
>> 
>>> On Sep 8, 2016, at 10:13, Matteo <matte...@yahoo.it> wrote:
>>> 
>>> thanks Jhoan for the explanation!
>>> Do you know some technique to intercept this kind bug? (...or to avoid
>>> them?)
>>> 
>>> thanks
>>> Matteo
>> 
> 
> 




Re: [Pharo-users] SpecBooklet: Strange behavior of ProtocolBrowser

2016-09-08 Thread Johan Fabry
Hi Matteo,

glad to be of help. And sorry but these kinds of concurrency bugs are the 
hardest to catch, there is no straightforward solution.

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org .

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

> On Sep 8, 2016, at 10:13, Matteo <matte...@yahoo.it> wrote:
> 
> thanks Jhoan for the explanation!
> Do you know some technique to intercept this kind bug? (...or to avoid
> them?)
> 
> thanks
> Matteo




Re: [Pharo-users] [ANN] Territorial Re-Licensing

2016-09-08 Thread Johan Fabry

Dory, can your mail be put on the Pharo web page, the contributions part? It 
seems that with a bit of polishing it would fit in well there, and this way 
future discussions can point to that page.

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org .

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

> On Sep 8, 2016, at 06:40, Tudor Girba <tu...@tudorgirba.com> wrote:
> 
> Hi Offray,
> 
> I am sorry you feel down.
> 
> The wording of Stef did appear strong. However, please keep in mind that 
> email is a terrible medium for expressing and transmitting feelings. I would 
> kindly ask you to reconsider the emails and focus on the content and you will 
> see that the wording was not about the external project but about the 
> decisions that relate to the licensing of Pharo itself. As Esteban and I 
> clarified, Pharo is MIT and will remain MIT. There is a long history of why 
> this is so and a huge amount of effort to make it clean MIT. To keep it clean 
> we have to be aware of the implications of another kind of a license, and our 
> clarifications were about how we, those that work on the main Pharo code, 
> will not touch a GPL code and that this might have a counter productive 
> impact on the originator of the code in question (due to a lack of engagement 
> from other people).
> 
> Please also keep in mind that we do not want to prevent people from choosing 
> their own licenses. The decision of the license belongs exclusively to the 
> creators of the code. We are only looking for the interests of the core of 
> Pharo to make sure that you will continue to have whatever options you choose 
> on top of it. And you will always be free to choose what you want for your 
> projects.
> 
> Just a note about other licenses you mentioned: in the context of Pharo, LGPL 
> has the same effect as GPL given that there is no concept of binary 
> reusability in our system. So, for that purpose, we also do not touch LGPL.
> 
> A final point: when someone says that "we decided something a long time ago”, 
> it is easy to take it as a “this is it, just take it”, but that would be a 
> bit unfair. A more fair alternative is to understand that time is scarce and 
> sometimes we just do not have the available energy to provide all 
> clarifications on demand right at that point.
> 
> Please let’s focus on building things together, even if there are 
> misunderstandings or seaming differences in opinion. We need everyone’s 
> energy.
> 
> Cheers,
> Doru
> 
> 
>> On Sep 8, 2016, at 9:53 AM, Offray Vladimir Luna Cárdenas 
>> <offray.l...@mutabit.com> wrote:
>> 
>> Nice to know something good came out after taking all the heat. In my case I 
>> learn about licensing with the reasons behind and not "just take it!"...
>> My sources of information, the main spec.st site, made my mistake about dual 
>> license a valid misinterpretation and even the idea that there are other 
>> non-viral licenses: LGPL, 3 clause BSD, public domain that can integrated in 
>> a MIT licensed project, with the rationale behind [1], seems a good thing to 
>> make explicit
>> [1] http://etoileos.com/dev/licensing/
>> Kind of down though, after seeing how a community leader can go after other 
>> people who don't share his views/knowledge and is just trying to contribute, 
>> understand and be part of the community. Today would be a slow day for me in 
>> Smalltak... maybe is time to take a walk a leave it for a time.
>> 
>> Cheers,
>> 
>> Offray
>> 
>> On 08/09/16 06:00, Hernán Morales Durand wrote:
>>> 
>>> I consider GNU AGPL v3 a fair license choice which protects somehow 
>>> authors. After some talks with friends today, I began to consider it 
>>> useless for a niche community like Smalltalk *and* solo projects. I then 
>>> read all your mails, many posts in other communities, and finally asked for 
>>> advices. Conclusion: The ideal license option for me was not yet invented.
>>> 
>>> Now about parasite behavior and easy living for freeloaders.
>>> 
>>> - I doubt Smalltalkers are in position for doing anything valuable against 
>>> parasites. GPL scares a niche community. All of us having MIT code 
>>> published can be stealed and we have no legal options to defend our 
>>> work/authorship. That should be addressed one day.
>>> 
>>> - However, I would like one day to read people releasing software under 
>>> whatever license they want and not to be pointed them. That's a matter

Re: [Pharo-users] SpecBooklet: Strange behavior of ProtocolBrowser

2016-09-08 Thread Johan Fabry

Thanks Stef ! There will be a new chapter for you to review soon ;-)

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org .

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

> On Sep 8, 2016, at 04:39, stepharo <steph...@free.fr> wrote:
> 
> Johan
> 
> 
> let me know if there is anything that I should do.
> 
> 
> Stef
> 




Re: [Pharo-users] SpecBooklet: Strange behavior of ProtocolBrowser

2016-09-07 Thread Johan Fabry
Excellent, you found a bug in my code!

What happens is that when one item is selected in a list, in the other list the 
currently selected item is de-selected. This causes *both* blocks 
(whenAPIChanged: and whenEventChanged:) to be executed, and depending on what 
order they are executed the behavior is different. (A classical concurrent 
programming problem.) This order apparently changes depending on how many 
windows you have open, et cetera, I guess because of how the announcement 
system is implemented. 

So, yes the easiest solution is to remove both ifNil: […] lines. The UI will 
not work as cleanly, but it is a quick fix. Alternatively, and a bit more 
complicated, is to check if the selection in the other list is also empty 
before setting the text to the empty string. 

For the sake of the example, I will simply remove  both ifNil: […] lines from 
the documentation.

Thanks for reporting this, and if you have further issues do not hesitate to 
tell us!

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org .

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

> On Sep 7, 2016, at 19:51, Matteo <matte...@yahoo.it> wrote:
> 
> Hello Johan,
>I've coded all the examples manually, changing the names to avoid
> any conflict with the ProtocolBrowser "bundled" in the Pharo 5 image
> (i.e. instead of "ProtocolBrowser" I've named my class as "ProtcolFlipper").
> But the result is the same.
> 
> Things improve if all the "ifNil: [ text text: '' ]" get removed from
> the ProtcolFlipper>>initializePresenter method.
> Obviously the text pane is no more "cleaned" when deselecting an "api"
> or "api-event" row.
> 
> I've tried to substitute the "ifNil: [ text text: '' ]" with "ifNil: [
> text text: 'api' ] and ifNil: [ text text: 'api-events' ] , respectively
> on the "api" and "event" instances, in the ProtocolBrowser >>
> initializePresenter method.
> In this way I found that "ifNil:" message is sent improperly, i.e. when
> a "api-event" row is selected then the message "ifNil:" of the "api"
> instance is triggered, and vice-versa.
> In some way this is correct: when a "api-event" row is selected then
> none of the "api" rows are selected...
> 
> However I'm puzzled by the fact that the behavior seems random: creating
> 3 instances I can get 3 different behaviors.
> 
> have you never experienced this?
> 
> Maybe I'll check again my code...
> 
> thanks,
> Matteo




Re: [Pharo-users] SpecBooklet: Strange behavior of ProtocolBrowser

2016-09-07 Thread Johan Fabry
Hello Matteo,

are you using the ProtocolBrowser class that comes default with Pharo 5? (In 
the Spec-Examples package). This is different from what is in the booklet, the 
code in Pharo 5 is not up to date. For now, you should define a new protocol 
browser class (MyProtocolBrowser for example) and the other classes that are in 
that section. Sorry for that...

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org <http://emailcharter.org/> .

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

> On Sep 7, 2016, at 18:57, Matteo via Pharo-users 
> <pharo-users@lists.pharo.org> wrote:
> 
> 
> From: Matteo <matte...@yahoo.it>
> Subject: SpecBooklet: Strange behavior of ProtocolBrowser
> Date: September 7, 2016 at 18:56:08 GMT-3
> To: pharo-users@lists.pharo.org
> 
> 
> Hi,
> I'm playing with the ProtocolBrowser class, as coded in the
> "SpecBooklet.pdf" document (release of the 3rd August 2016).
> I'm using Pharo 5.
> 
> I'm experiencing a strange behavior of the  ProtocolBrowser instance:
>   -if I open a ProtocolBrowser instance, and I click on a "api"   item, I
> do not get any code in the text pane.
>   -If I open another ProtocolBrowser instance then I do not see any code,
> even in the "api" protocol than the "api-events" one.
>   -If I open a further instance then the widget works correctly, showing
> the "api" or "api-events" code in the text pane.
> 
> Please note that the ProtocolBrowser is instantiated as follow:
>   (ProtocolBrowsernew)  openWithSpec
> 
> Could my Pharo image be faulty?
> Is there some problem with ProtocolBrowser>>initializePresenter?
> 
> Thanks,
> Matteo Bellotto
> 
> 
> 
> 
> 



Re: [Pharo-users] Spec: InputWidget question

2016-09-07 Thread Johan Fabry
Apologies for not being clear in my mail. The key is that the UI is being 
opened as a dialog box, generating the OK and Cancel buttons. All this logic is 
explained in the section "Opening a dialog box and its configuration options”. 
This also talks about configuring what to do when these buttons are clicked.


--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org .

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

> On Sep 7, 2016, at 18:07, Brad Selfridge <bsselfri...@gmail.com> wrote:
> 
> Read the chapter. Being new to Spec, I'm still confused because I don't see
> clear evidence in the chapter that would fix the problems that are occurring
> in the InputWidget. 
> 
> I did, however, read your documentation referring to the TextFieldInputModel
> example. After reading that, I created a TextPrompterWidget, (which is a
> direct copy of InputWidget). I changed the super class to
> DynamicComposableModel. I modified the "initializeWidgets" method, removed
> the "OK" method, and made a few other small modifications and got the widget
> to work as expected. I DID have to open the widget with "openDialogWithSpec"
> as that was the only way to auto-magically get the OK-Cancel toolbar widget.
> I'd share my code if you want. 
> 
> 
> 
> -
> Brad Selfridge
> --
> View this message in context: 
> http://forum.world.st/Spec-InputWidget-question-tp4914439p4914673.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
> 
> 




Re: [Pharo-users] Spec: InputWidget question

2016-09-07 Thread Johan Fabry
Hi Brad,

the magic of the OK and Cancel buttons is due to the opening of the UI with 
openDialogWithSpec (instead of openWithSpec).

There is info on that in the Spec documentation, in the ‘Managing Windows’ 
chapter (which I finished last week :-) ). You can find a pdf of that chapter 
here: 
https://ci.inria.fr/pharo-contribution/view/Books/job/BuildingUIWithSpec/lastSuccessfulBuild/artifact/book-result/ManagingWindow/ManagingWindow.pdf

HTH
--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org .

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

> On Sep 6, 2016, at 18:14, Brad Selfridge <bsselfri...@gmail.com> wrote:
> 
> I've been trying for several days to get the Spec InputWidget to work as
> expected. I've been running the "example2" example.  If you enter text in
> the input field and press the "enter" key, then the input text is returned.
> But, if you click the "Ok" button rather than "enter" key, then the input
> text field is empty. I've tried to dig into why, but I stymied. 
> 
> Can someone please help me with this? 
> 
> 
> 
> -
> Brad Selfridge
> --
> View this message in context: 
> http://forum.world.st/Spec-InputWidget-question-tp4914439.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
> 
> 




Re: [Pharo-users] Spec Widget positioning

2016-08-18 Thread Johan Fabry

I’m sorry it is a bit hard to catch your meaning without having all the context.

I think that what you need is to remove the width: 200 argument to the second 
column creation. In fact you don’t need to add a row there since there is only 
one widget. So in summary, I would try it with the following:
newColumn: [ col2 | col2 add: #descriptorName]; 

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org .

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

> On Aug 18, 2016, at 15:10, Brad Selfridge <bsselfri...@gmail.com> wrote:
> 
> Ok, I've tried several ways of making this work, but I haven't hit the magic
> button yet. Here is my layout example: 
> 
> defaultSpec
>   
> 
>   ^SpecLayout composed
>   newRow: [ :row1 | 
>   row1
>   newColumn: [ :col1 | 
>   col1 newRow: [ :row2 | 
>   row2 add: #openButton; add: 
> #createButton]] width: 160;
>   newColumn: [ :col2 |
>   col2 newRow: [ :row3 | 
>   row3 add: #descriptorName]] 
> width: 200; 
>   newColumn: [ :col3 | 
>   col3 newRow: [ :row4 | 
>   row4 add: #saveButton; add: 
> #abandonButton]] width: 160]
>   height: self toolbarHeight 
>   yourself
> 
> This is the closest that I can get to what I want. The two left hand buttons
> are fixed width and are attached to the left side of the row. The two right
> hand buttons are fixed width and are attached to the right side of the row.
> The center textInputField is attached to the left side of its' column. When
> I try to float it in its' column, it simply disappears. 
> 
> When the view is expanded and contracted, the buttons stay attached as
> desired. 
> 
> I don't know how to float the textInputField column to expand and contract
> while leaving the left and right button columns to remain fixed. 
> 
> 
> 
> 
> -
> Brad Selfridge
> --
> View this message in context: 
> http://forum.world.st/Spec-Widget-positioning-tp4911599p4911779.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
> 
> 




Re: [Pharo-users] Spec Widget positioning

2016-08-17 Thread Johan Fabry

I do not think so. The chapter is already big and should contain the solution 
Brad is looking for. Let’s see if he is satisfied, as a case study :-)

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org <http://emailcharter.org/> .

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

> On Aug 17, 2016, at 16:46, stepharo <steph...@free.fr> wrote:
> 
> Johan 
> 
> do you think that this example should be added to the layout chapter?
> 
> Stef
> 
> 



Re: [Pharo-users] Spec Widget positioning

2016-08-17 Thread Johan Fabry

A small comment with regard to the Spec booklet: Some chapters have not yet 
been worked on, but the layout chapter is done so I heartily recommend it!

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org <http://emailcharter.org/> .

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

> On Aug 17, 2016, at 16:10, Peter Uhnák <i.uh...@gmail.com> wrote:
> 
> Hi,
> 
> you normally control the (relative) sizes through the layout, e.g.
> 
> ui := DynamicComposableModel new.
> 
> ui instantiateModels: #(text TextInputFieldModel btn1 ButtonModel btn2 
> ButtonModel).
> 
> ui btn1 label: 'Button 1'.
> ui btn2 label: 'Button 2'.
> 
> layout := SpecColumnLayout composed
>   newRow: [ :row |
>   row
>   add: #text;
>   add: #btn1 width: 60;
>   add: #btn2 width: 60
>   ] height: ComposableModel toolbarHeight;
>   newRow: [ :row | ].
> 
> ui openWithSpecLayout: layout.
> 
> If you want want more details, I suggest you read the Spec Booklet 
> https://ci.inria.fr/pharo-contribution/view/Books/job/BuildingUIWithSpec/lastSuccessfulBuild/artifact/book-result/SpecBooklet.pdf
>  
> <https://ci.inria.fr/pharo-contribution/view/Books/job/BuildingUIWithSpec/lastSuccessfulBuild/artifact/book-result/SpecBooklet.pdf>
> 
> A lot of effort has been put into it recently to update it, so it should be 
> up-to-date.
> 
> Peter
> 
> On Wed, Aug 17, 2016 at 8:53 PM, Brad Selfridge <bsselfri...@gmail.com 
> <mailto:bsselfri...@gmail.com>> wrote:
> I'm trying to build a toolbar widget that contains two fixed width buttons, a
> variable width textInputBox followed by two more fixed width buttons. I'm
> not sure how to mix fixed and variable width widgets.
> 
> Can someone give me an idea on how to do this?
> 
> Thanks,
> 
> 
> 
> -
> Brad Selfridge
> --
> View this message in context: 
> http://forum.world.st/Spec-Widget-positioning-tp4911599.html 
> <http://forum.world.st/Spec-Widget-positioning-tp4911599.html>
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
> 
> 



Re: [Pharo-users] Pharo on a Mac

2016-08-15 Thread Johan Fabry
Hi Bart,

cursor navigation and support for the magic mouse or magic trackpad are not 
well implemented in Pharo, sadly. It’s a known issue for a long time (sadly) 
and I at least am not aware of any solution. I would very much appreciate one, 
but it is a case of not enough manpower and the community having other 
priorities.

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org .

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

> On Aug 11, 2016, at 08:59, Bart Venckeleer <bart.venckel...@gmail.com> wrote:
> 
> Hi all, 20 years ago I wrote an application in SmallTalk-V that I'm porting
> now to Pharo since Smalltalk-V doesn't run 64-bit systems. I run Pharo on a
> Mac and what I experience is a bit annoying and I hope one of you already
> solved the issues.
> 
> In fact there are two things that bother me:
> 
> 1. The typical cursor navigation doesn't work. Normally on a Mac:
> cmd  moves the cursor to the beginning of a line,
> cmd  moves the cursor to the end of the line,
> option  moves the cursor one word to the left, 
> option  moves the cursor one word to the right,
> ...
> and of course it can be combined with shift to make selections.
> 
> In Pharo I can't do that and it slows down coding.
> 
> 2. There are problems with the Magic Mouse and it is very annoying when
> browsing code.
> Whenever you touch the mouse surface to scroll horizontally it generates
> shift  or shift  events which causes text to be
> selected without it being the intension.
> 
> Is there a solution for this?
> Thanks for helping me :-)
> 
> Cheers, Bart
> 
> 
> 
> --
> View this message in context: 
> http://forum.world.st/Pharo-on-a-Mac-tp4910484.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
> 
> 




Re: [Pharo-users] MOOC for English learners

2016-08-15 Thread Johan Fabry
I did not know the videos were online. This is really great!

Now the only thing missing is adding to the weekly itemized list the link to 
the exact videos+subtitle files, instead of just a videos list. This will help 
the confused students a lot :-)

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org .

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

> On Aug 15, 2016, at 15:09, Offray Vladimir Luna Cárdenas 
> <offray.l...@mutabit.com> wrote:
> 
> Hi Gour,
> 
> All videos have English subtitles available. See at [1] and follow the 
> "videos" link, where you'll find the English subtitles. Is a superb course 
> and it clarified a lot for me and made curious about other stuff.
> 
> [1] http://files.pharo.org/mooc/
> 
> Cheers,
> 
> Offray
> 
> 
> On 15/08/16 12:17, Gour wrote:
>> Hello,
>> 
>> after being interested in Pharo some months ago, in the meantime I was
>> exploring some alternatives like Racket and Red (open-sources successor
>> of Rebol) both of which can be suitable for writing multi-platform
>> desktop GUI apps...but now want to spend some more time exploring Pharo
>> and I'm glad to see existance of MOOC course, but wonder if all the
>> videos are planned to be annotated with English subtitles making the
>> whole course suitable for non-French self-learners?
>> 
>> 
>> Sincerely,
>> Gour
>> 
> 
> 
> 




Re: [Pharo-users] Spec Numeric Input

2016-08-03 Thread Johan Fabry
Hi Brad,

there is not default processor for that, but you can get notified when text is 
entered or accepted. Perform your own validation logic there and set the 
content of the field to whatever is appropriate.

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org .

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

> On Aug 3, 2016, at 12:07, Brad Selfridge <bsselfri...@gmail.com> wrote:
> 
> Is there a way to  enforce numeric text input field in Spec? 
> 
> 
> 
> -
> Brad Selfridge
> --
> View this message in context: 
> http://forum.world.st/Spec-Numeric-Input-tp4909464.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
> 
> 




Re: [Pharo-users] Spec: Capturing changes in a text morph

2016-07-26 Thread Johan Fabry

No, this is not in initializePresenter, since this is called only once, when 
the window is opened. Instead, you need to do this every time that the widget 
is changed. So in your code where you change the widget to a new one, I guess 
this is changeBody: , you need to configure this new widget.

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org .

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

> On Jul 26, 2016, at 16:08, Offray Vladimir Luna Cárdenas 
> <offray.l...@mutabit.com> wrote:
> 
> Thanks Johan for your quick answer.
> 
> Your hypothesis is right and the contents of (4) are cleaned by a new widget 
> when I click at the tree (2). I'm looking at my code and documentation, but I 
> can't find properly how to implement your recommendation. I imagine is 
> somewhere in initializePresenter, but I can't find the place... sorry I would 
> like to be more helpful on getting help... :-/.
> 
> Any hint of how this code should look like and where it goes? "body 
> whenTextChanged: aBlock" on initializePresenter seems doing nothing.
> 
> Cheers,
> 
> Offray
> 
> 
> On 26/07/16 11:19, Johan Fabry wrote:
>> I think the problem is that when you click on an item in the tree (2), the 
>> contents of (4) is changed to a new widget. As a result the configuration 
>> that you did in initializePresenter is lost. What you should do is when you 
>> change the contents of (4) also configure this new widget with a 
>> whenTextChanged: block. I think that will solve your problem.
>> 
>> --
>> Does this mail seem too brief? Sorry for that, I don’t mean to be rude! 
>> Please see http://emailcharter.org .
>> 
>> Johan Fabry   -   http://pleiad.cl/~jfabry
>> PLEIAD and RyCh labs  -  Computer Science Department (DCC)  -  University of 
>> Chile
>> 
>>> On Jul 25, 2016, at 18:12, Offray Vladimir Luna Cárdenas 
>>> <offray.l...@mutabit.com> wrote:
>>> 
>>> Hi,
>>> 
>>> I'm migrating my grafoscopio interface from I'm trying to capture some 
>>> changes in a text morph that is part of a Spec interface. The interface is 
>>> split in 4 parts, as you can see at [a]: (1) a main menu, (2) a tree, (3) a 
>>> node header input text and (4) a text morph. When you click any node on the 
>>> tree (2) the name of the node, called the header is shown in (3) and the 
>>> node contents, called the body are shown at (4). If you made a change in 
>>> the header (pressing enter) it's reflected back to the main tree. And the 
>>> node's body is changed for a text morph [b] or a and embedded playground 
>>> [c] according to tags in the node. So the reading part is working and I 
>>> have some partial support for persistence, at least for node headers.
>>> 
>>> [a] https://offray.withknown.com/2016/grafoscopio-notebook-interface
>>> [b] https://offray.withknown.com/2016/grafoscopio-text-node
>>> [c] https://offray.withknown.com/2016/grafoscopio-code-node
>>> 
>>> Now I would like to extend the persistence for node's body content, so when 
>>> any changes happens in the (4) panel, be it a text panel or a playground, 
>>> it is stored in a similar way to what is happening with node headers and 
>>> the (3) panel, but I'm unsuccessful trying to capture those changes.
>>> 
>>> My initializeWidgets and initializePresenter are implemented this way:
>>> 
>>> =
>>> 
>>> GrafoscopioNotebook>>initializeWidgets
>>> 
>>>windowMainMenu := self newWindowMainMenu.
>>>tree := TreeModel new.
>>>body := self newText.
>>>header := self newTextInput.
>>> 
>>>body disable.
>>>body text: '<-- Select a node in the left panel'.
>>> 
>>>tree
>>>childrenBlock: [:node | node children];
>>>displayBlock: [:node | node title ].
>>> 
>>> =
>>> 
>>> initializePresenter
>>> 
>>>tree whenSelectedItemsChanged: [ :arg |
>>>arg isEmpty ifFalse: [self changeBody: arg ]].
>>>header whenTextChanged: [ :arg |
>>>Transcript show: arg.
>>>(tree selectedItem content header) = arg
>>>ifFalse: [
>>>(tree selectedItem) content header: arg.
>>>tree roots: tree roots]].
>>>body whenTextIsAccepted: [ :arg |
>>>Transcript show: arg
>>>]
>>> 
>>> =
>>> 
>>> I'm capturing properly the changes in text with whenTextChanged on the 
>>> header but using the same message on body or whenTextIsAccepted doesn't 
>>> produce any change on the trascript, and of course I can't update the any 
>>> tree/node contents properly.
>>> 
>>> Any advice on how to solve this will be greatly appreciated. If can happen 
>>> soon in this week even better, because we could show this to our 
>>> hackathon/workshop attendees.
>>> 
>>> Cheers,
>>> 
>>> Offray
>>> 
>>> 
>>> 
>> 
>> 
> 
> 
> 




Re: [Pharo-users] Spec: Capturing changes in a text morph

2016-07-26 Thread Johan Fabry

I think the problem is that when you click on an item in the tree (2), the 
contents of (4) is changed to a new widget. As a result the configuration that 
you did in initializePresenter is lost. What you should do is when you change 
the contents of (4) also configure this new widget with a whenTextChanged: 
block. I think that will solve your problem.

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org .

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

> On Jul 25, 2016, at 18:12, Offray Vladimir Luna Cárdenas 
> <offray.l...@mutabit.com> wrote:
> 
> Hi,
> 
> I'm migrating my grafoscopio interface from I'm trying to capture some 
> changes in a text morph that is part of a Spec interface. The interface is 
> split in 4 parts, as you can see at [a]: (1) a main menu, (2) a tree, (3) a 
> node header input text and (4) a text morph. When you click any node on the 
> tree (2) the name of the node, called the header is shown in (3) and the node 
> contents, called the body are shown at (4). If you made a change in the 
> header (pressing enter) it's reflected back to the main tree. And the node's 
> body is changed for a text morph [b] or a and embedded playground [c] 
> according to tags in the node. So the reading part is working and I have some 
> partial support for persistence, at least for node headers.
> 
> [a] https://offray.withknown.com/2016/grafoscopio-notebook-interface
> [b] https://offray.withknown.com/2016/grafoscopio-text-node
> [c] https://offray.withknown.com/2016/grafoscopio-code-node
> 
> Now I would like to extend the persistence for node's body content, so when 
> any changes happens in the (4) panel, be it a text panel or a playground, it 
> is stored in a similar way to what is happening with node headers and the (3) 
> panel, but I'm unsuccessful trying to capture those changes.
> 
> My initializeWidgets and initializePresenter are implemented this way:
> 
> =
> 
> GrafoscopioNotebook>>initializeWidgets
> 
>windowMainMenu := self newWindowMainMenu.
>tree := TreeModel new.
>body := self newText.
>header := self newTextInput.
> 
>body disable.
>body text: '<-- Select a node in the left panel'.
> 
>tree
>childrenBlock: [:node | node children];
>displayBlock: [:node | node title ].
> 
> =
> 
> initializePresenter
> 
>tree whenSelectedItemsChanged: [ :arg |
>arg isEmpty ifFalse: [self changeBody: arg ]].
>header whenTextChanged: [ :arg |
>Transcript show: arg.
>(tree selectedItem content header) = arg
>ifFalse: [
>(tree selectedItem) content header: arg.
>tree roots: tree roots]].
>body whenTextIsAccepted: [ :arg |
>Transcript show: arg
>]
> 
> =
> 
> I'm capturing properly the changes in text with whenTextChanged on the header 
> but using the same message on body or whenTextIsAccepted doesn't produce any 
> change on the trascript, and of course I can't update the any tree/node 
> contents properly.
> 
> Any advice on how to solve this will be greatly appreciated. If can happen 
> soon in this week even better, because we could show this to our 
> hackathon/workshop attendees.
> 
> Cheers,
> 
> Offray
> 
> 
> 




Re: [Pharo-users] [Pharo-dev] [ANN] file dialog replacement experiment

2016-07-16 Thread Johan Fabry

This is excellent !!!

We should change the default file browser to be this one !

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org <http://emailcharter.org/> .

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

> On Jul 16, 2016, at 13:05, Peter Uhnák <i.uh...@gmail.com> wrote:
> 
> Couple more updates:
> 
> > If you truncate, you could put the full, non truncated path in a pop over, 
> > that would be a cheap way to solve that problem, no ? In any case, in my 
> > testing there was enough space.
> 
> Fixed
> 
> > Maybe also add a trailing / to indicate that it represents the directory 
> > and not the selection ?
> 
> Fixed
> 
> > the path is initially blank, it only fills when I start clicking.
> 
> Fixed
> 
> > And related to github filetree, what is the proper way to get a new version 
> > once you loaded the code ?
> 
> What seems to work is to delete github-cache folder in image directory and 
> unload both file-dialog and BaselineOfFileDialog packages, and then reexecute 
> the load script again.
> As this is really stupid, I'll have to ask Thierry or someone.
> 
> And couple of more fixes based on Torsten's feedback:
> 
> 1. the Open/Cancel buttons are swapped on Windows
> 2. the FileSystem bookmark has been replaced with available disks on Windows 
> (C:, D:, ...)
> 3. Added basic entry completion when saving; note that Dark Theme and the 
> EntryCompletion popup do not like each other --- this has to be fixed inside 
> Pharo.
> 
> 
> ​
> 
> One more thing I want to add really soon: clicking on a file would open a 
> GTInspector on the side (as part of the window), so you can see the preview 
> of text/image/etc
> 
> Peter
> 
> On Sat, Jul 16, 2016 at 2:25 PM, Peter Uhnák <i.uh...@gmail.com 
> <mailto:i.uh...@gmail.com>> wrote:
> 
> 
> On Fri, Jul 15, 2016 at 2:00 PM, Sven Van Caekenberghe <s...@stfx.eu 
> <mailto:s...@stfx.eu>> wrote:
> 
>> On 14 Jul 2016, at 23:49, Peter Uhnák <i.uh...@gmail.com 
>> <mailto:i.uh...@gmail.com>> wrote:
>> 
>> Hi Sven,
>> 
>> What I am missing in the UI is some indication of the path that leads to the 
>> current selected file. Right now, I am wondering where exactly I am, I feel 
>> a bit lost (this is of course from the technical standpoint of a path in a 
>> tree). This could be done with a popup, a trail, a pop-over.
>> 
>> I've added this couple of days ago (as I was missing this too), I just 
>> forgot to push the update to github (one downside compared to smalltalkhub 
>> :)).
>> 
>> The only problem is that the image directory name is usually really long 
>> (the longest I have is 110 characters as it includes the build's name), so 
>> it doesn't exactly fit in.
>> There is some shortening happening based on the window's width but it's not 
>> perfect.
> 
> I had another look. Yes, this is cool. 
> 
> If you truncate, you could put the full, non truncated path in a pop over, 
> that would be a cheap way to solve that problem, no ? In any case, in my 
> testing there was enough space.
> 
> If Spec supports it, then it should be easy.
>  
> 
> Maybe also add a trailing / to indicate that it represents the directory and 
> not the selection ?
> 
> Originally I wanted to make it bold, but again, Spec doesn't support Text 
> properly; trailing slash might be a compromise for now
>  
> 
> 
> 
> Also when I tested it, using
> 
>  FDOpenFileDialog new openModal.
> 
> the path is initially blank, it only fills when I start clicking.
> 
> That's a bug, I'll fix that.
>  
> 
> BTW, could it be that FDMorphicUIManager becomes default automatically ?
> 
> That seems quite aggressive, I don't feel it's stable enough… I could add 
> something like #load, and #loadDefault to the load script… but then you might 
> as well execute the beDefault. I'm not sure yet.
>  
> 
> And related to github filetree, what is the proper way to get a new version 
> once you loaded the code ?
> 
> I don't know, but it should be the same as with any other (e.g. smalltalkhub) 
> project, since it's both monticello, no? I've never done this, so I don't 
> know. (Usually when I am updating I look at the individual commits because I 
> want to know what has changed.)
> 
> Peter
> 



Re: [Pharo-users] A Management Software Building Library in Pharo

2016-07-11 Thread Johan Fabry

> On Jul 11, 2016, at 20:51, lionelakue <lionela...@gmail.com> wrote:
> 
> 
> jfabry wrote
>> to build user interfaces I recommend that you use Spec. Many user
>> interfaces in the standard Pharo image are written using it. I am
>> currently writing documentation for it, here is the introductory chapter:
> 
> Thanks.
> Sound very interesting, Johan. Can you give me a link where I can get the
> library?

Hi Lionel,

Spec is standard in Pharo, there is nothing extra you need to download to use 
it. Enjoy!

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org .

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




Re: [Pharo-users] Spec vs Brick vs Glamour vs Morphic vs WTF?

2016-07-06 Thread Johan Fabry
Hi Brad,

to clarify the situation: Spec is the standard UI framework for Pharo, and the 
plan is that it will stay this way. Morphic/Brick/Block/… are (or will be) a 
layer underneath that, which ideally you would not need care about. 

The documentation of Spec is not up to date right now, and hard to find. But 
the good news is that I am working on it this very week (and next week). Please 
hang tight for a few more days, I will publicly release a work-in-progress 
documentation soon. For now, you can have a look at the youtube video of my 
presentation at the Pharo days 2 years ago: 
https://www.youtube.com/watch?v=OL23s9ZUIR0 it should already point you in the 
right direction.

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org .

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

> On Jul 6, 2016, at 11:14, Brad Selfridge <bsselfri...@gmail.com> wrote:
> 
> So, once Brick/Bloc become public, will it become the default UI framework?
> What happens to Spec and Glamour when/if that happens? 
> 
> 
> 
> -
> Brad Selfridge
> --
> View this message in context: 
> http://forum.world.st/Spec-vs-Brick-vs-Glamour-vs-Morphic-vs-WTF-tp4905178p4905207.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
> 
> 




Re: [Pharo-users] Styling a Pharo UI application

2016-07-02 Thread Johan Fabry
Hi Tommaso,

thanks for the explanation! I did not mean to point fingers at you for 
complaining, I was just trying to figure out what the problem was. So thanks 
again for sharing.

This is indeed not yet possible, and it would be cool to have it working. 
However there is a workaround since you can take any Morph and embed it in a 
Spec UI. For example:

initializeWidgets
| … textMorph … |
[… do a lot of other stuff …]

textMorph := LabelMorph newLabel:’asdf’.
textMorph color: Color red.
text :=  textMorph asSpecAdapter.

Voila, a label with red text.

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org <http://emailcharter.org/> .

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

> On Jun 30, 2016, at 07:56, Tommaso Dal Sasso <tommaso.dalsa...@gmail.com 
> <mailto:tommaso.dalsa...@gmail.com>> wrote:
> 
> I was not complaining about Spec, just reporting my experience with the 
> various UI toolkits in Pharo as a relatively newbie to this area of Pharo.
> 
> Anyway, as I wrote in my first email, I had difficulties with Spec to go 
> beyond building a standard interface, especially in performing text 
> manipulation (font size) or coloring the background of a string, or 
> encapsulating pieces of text in frames. I tried to understand how to do that, 
> but there is very little documentation on the matter, and the main answer I 
> got was "be prepared to use Morphic".
> 
> Trying to understand how to access the properties of the elements I found 
> several comments like:
> 
> [talking about font size in Spec]
> On 03/10/15 09:24, stepharo wrote:
> > I think that this part has been completely forgotten by spec.
> > Normally the layout should take into account the size of the label and font
> > and I do not see why we could not specify the color and other attributes we 
> > want to have but we did not work on this point.
> > Now we will have to see that in the context of Brick skin.
> >
> > Stef
> 
> Don't get me wrong, I like Spec, it is just unclear to me if it wants to be 
> the default toolkit to build widgets in Pharo (in this case it should 
> probably access more properties of Morphic), or if wants to be completely 
> engine-agnostic, therefore preferring abstraction over expressiveness.
> 
> Tommaso
> 
> 



Re: [Pharo-users] Spec Documentation case 18653

2016-07-01 Thread Johan Fabry

I will take care of this next week when I am in Lille.

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org .

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

> On Jul 1, 2016, at 04:37, Marion Noirbent 
> <ms.noirb...@etudiant.univ-lille1.fr> wrote:
> 
> I have create the case 18653 Spec documentation to integrate the
> comments of classes.
> I have create a slice with the comments I have wroten and save it in the
> inbox.
> But the slice is not complete because there are lot of things I didn't
> understand about Spec.
> I haven't resolve the case.
> 
> Now I would like :
> - someone review what I have done
> - someone complete what I couldn't do
> - someone resolve the case when it will be ready
> 
> The text behind indicates the work needed on all classes I have modified.
> 
> For my part, I will try to resolves some critics and create some tests.
> 
> 
> 
> Le 01/07/2016 09:14, stepharo a écrit :
>> Thanks marion
>> 
>> Do not send zipped files because people will not save and unzip
>> attachments.
>> 
>> So I'm trying to understand what you mean?
>> 
>> Did you create some issues on fogzbug?
>> 
>> What has been published in 18653?
>> 
>> What do you want from us?
>> 
>> What is the next step?
>> 
>> 
>> 
>> Some of examples refered in the documentation can be found in the
>> package Spec-BuildUIWithSpec. It contains examples in the book "Building
>> UI with Spec" but it is not finished, so it could change a lot
>> (structure, adding content, refactoring others examples, ...) but
>> refered examples should be stable.
>> 
>> 
>> REFACTOR
>> 
>> 
>> * Package
>> I have moved what wasn't really widgets from Spec-core-widget to
>> Spec-core-widget-support or Spec-core-support.
>> 
>> * AbstractFormButtonModel
>> I have create the abstract class AbstractFormButtonModel to remove code
>> duplication beetween CheckboxModel and RadioButtonModel.
>> 
>> * TextInputFieldModel
>> I have removed the instance variable alwaysAccept that didn't have
>> accessors and was not initialized.
>> 
>> 
>> DOCUMENTATION
>> =
>> 
>> Spec-core
>> -
>> 
>> * ComposableModel
>> The documentation is split in three part. There is two todo.
>> 
>> I haven't found how work hide and windowIcon: , I don't know build a
>> window accepting cancelled to test it.
>> 
>> 
>> * AbstractWidgetModel
>> One todo (3 elements)
>> I haven't found how work defaultColor and color.
>> 
>> borderWidth and borderColor have strange behaviour, it seems depend of
>> its subclass (even if it not define again). ButtonModel don't make it
>> appear but it work with the checkbox.
>> 
>> Reproduce :
>> 
>> | button checkBox |
>> button := ButtonModel new.
>> button
>>openWithSpec;
>>label: 'Click me';
>>borderWidth: 5;
>>borderColor: Color red.
>> 
>> checkBox := CheckBoxModel new.
>> checkBox
>>label: 'Click me';
>>openWithSpec;
>>borderWidth: 5;
>>borderColor: Color red.
>> 
>> Result : borderWidthborderColor.png
>> I have try to put it in a ComposableModel too.
>> 
>> 
>> * DynamicComposableModel
>> One todo (2 elements)
>> 
>> 
>> Spec-Core-Support
>> -
>> 
>> * SpecFocusOrder
>> No todo, need review.
>> 
>> 
>> Spec-Core-Widgets-Support
>> -
>> 
>> * AbstractFormButtonModel
>> No todo, need review.
>> 
>> * RadioButtonGroup
>> One todo (1 element)
>> 
>> 
>> Spec-core-widget
>> 
>> 
>> * ButtonModel
>> One todo
>> 
>> * CheckboxModel
>> One todo (3 elements)
>> I haven't found how work labelOnLeft and labelOnRight, and labelClickable.
>> 
>> * ImageModel
>> No todo, need review.
>> 
>> * LabelModel
>> One todo (1 element)
>> 
>> * ListModel
>> One todo
>> 
>> * IconListModel
>> One todo (1 element)
>> 
>> * MenuGroupModel
>> One todo
>> 
>> * MenuItemModel
>> One todo
>> 
>> * MenuModel
>> One todo
>> 
>> * RadioButtonGroupModel
>> One todo (1 element)
>> I have previously create this class from RadioButtonGroup (renaming it)
>> so there is code duplication between them.
>> 
>> * RadioButtonModel
>> No todo, need review.
>> 
>> * SliderModel
>> One todo (1 element)
>> 
>> * TextModel
>> The biggest todo
>> I have try to comment some parts in ScrollSyncExample to try scrollValue
>> but the scroll keep working.
>> 
>> * TextInputFieldModel
>> One todo
>> 
>> 
>> 
> 
> 




Re: [Pharo-users] Styling a Pharo UI application

2016-06-25 Thread Johan Fabry
Tommaso,

can you give some concrete examples of what it is that you wanted to do to 
refine your application and that was really hard (or impossible) to do with 
Spec?

As long as we do not know what is wrong, we cannot fix it.

As long as we do not know what important things are wrong, we cannot prioritize.

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org <http://emailcharter.org/> .

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

> On Jun 25, 2016, at 15:54, Tommaso Dal Sasso <tommaso.dalsa...@gmail.com> 
> wrote:
> 
> The beauty that I am looking for as a developer for has to do with the code 
> and the API. I consider important how fast I am able to prototype a working 
> example --in this Spec is excellent-- and how much I can extend the code to 
> refine my application --in this Spec is really hard to use--.



Re: [Pharo-users] Styling a Pharo UI application

2016-06-25 Thread Johan Fabry


> On Jun 24, 2016, at 19:00, Yuriy Tymchuk <yuriy.tymc...@me.com> wrote:

[…]

> I know that we don’t have designers to inverted something cool, but what GT 
> teem did is they took Google material design guidelines and implemented 
> widgets in Pharo, so if I use them it will be pleasant to the user’s eye. 
> Otherwise we are saying how cool Pharo is and how good we are, but a random 
> Android developer can build nicer interface because they have this sexy 
> widgets.

Just to understand: are you saying that a better set of underlying widgets for 
Spec would solve the ‘ugliness’ issue for you? Because, fundamentally this 
should be doable. (Now we would need somebody to actually do it, that’s another 
question :-/ )


> And yes, in the end for me the big turn off with Spec is the direct example 
> with Tommaso. You know that something is wrong, so you want to change the 
> size of a font. And then you ask on the mailing list and it turns out that 
> it’s not that easy and you have to either hack something, or submit patch to 
> Spec… In the end I’ve decided to use plain morphic because at least there I 
> can change whatever I want.

So, again to understand: you want to be able to change the font size of any 
widget from within the application, ignoring the System preference settings?

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org <http://emailcharter.org/> .

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



Re: [Pharo-users] Styling a Pharo UI application

2016-06-24 Thread Johan Fabry
Hi Uko,

just wondering: for you, what makes Spec UI’s ugly? And also, what are the 
features that are missing that require magic? I don’t understand your example 
either, sorry :-(

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org <http://emailcharter.org/> .

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

> On Jun 24, 2016, at 17:50, Yuriy Tymchuk <yuriy.tymc...@me.com> wrote:
> 
> But when you take Spec and build a UI it is ugly. And it is very painful to 
> change it. You cannot say `model title size: model title size * 1.5`, you 
> have to do some magic. 



[Pharo-users] How can an image know it is running headless?

2016-06-22 Thread Johan Fabry
Hi all,

I would like to know how to know if the image is running in headless mode. Is 
there an expression I can run in my code to establish that?

TIA,

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org .

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




Re: [Pharo-users] GUI Applications

2016-06-06 Thread Johan Fabry
Hi Sergio,

the standard way to build UIs in Pharo is by using Spec. There is a video of me 
presenting it at the Pharo Days 2015 that gives you a first overview 
https://www.youtube.com/watch?v=OL23s9ZUIR0=youtu.be=PL4actYd6bfnz98ngrKALwwStl3C3odEKG

There is also written documentation that is being updated now, so not really 
ready yet. One option is a paper of ours which is a bit out of date but still 
useful: https://hal.inria.fr/hal-00759030/document

HTH,

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org .

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

> On Jun 6, 2016, at 15:59, sergio ruiz <sergio@gmail.com> wrote:
> 
> is there one GUI framework that is being used more than the others, or that 
> is more mature?
> 
> Thanks!
> 




Re: [Pharo-users] One comment to new Pharo5 debugger

2016-06-06 Thread Johan Fabry

That looks really great ! It solves the practical problem and, for me, also 
addresses the conceptual issues that Doru has.

Doru, what do you think of this solution? The buttons are still connected to 
the stack, they are just below the stack instead of on top.

I also don’t see why a ‘Stack’ label is necessary, so it makes sense to me to 
remove it to gain some space.

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org <http://emailcharter.org/> .

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

> On Jun 4, 2016, at 13:36, Gabriel Cotelli <g.cote...@gmail.com> wrote:
> 
> Well I put the buttons on the left on purpose because in the case you're 
> debugging source code the content tends to be on the left half of the screen. 
>  So this keeps the actions close to the decision on what to use.


Re: [Pharo-users] Porting to Solaris 11

2016-06-02 Thread Johan Fabry

Solaris 11 wow, that sounds like big iron. Can you share some specifics of the 
project?

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org <http://emailcharter.org/> .

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

> On Jun 2, 2016, at 10:08, aglynn42 <aglyn...@gmail.com> wrote:
> 
> I'm currently porting the Pharo VM to Solaris 11 for a specific project 
> (Sparc and x86). I was wondering how many users prefer the stack VM, as for 
> my own purposes the JIT is better (better concurrency when not using OS 
> functions on a 128 thread machine, which is the deployment target). However 
> since it wouldn't be that much extra work to port the stack VM, if there is 
> interest I will do that as well. thanks Andrew Glynn 
> View this message in context: Porting to Solaris 11 
> <http://forum.world.st/Porting-to-Solaris-11-tp4898818.html>
> Sent from the Pharo Smalltalk Users mailing list archive 
> <http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html> at Nabble.com.



Re: [Pharo-users] One comment to new Pharo5 debugger

2016-05-27 Thread Johan Fabry

I think the reason not to change, is not a difficulty in implementation but a 
design view that is different from yours and mine. And from Sabine’s. And  from 
Stef’s. And maybe from other persons too …

Just to say that I think this should have been discussed more.

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org <http://emailcharter.org/> .

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

> On May 27, 2016, at 05:39, Denis Kudriashov <dionisi...@gmail.com> wrote:
> 
> I am wondering. Why people from GT team not do this? I was think it not easy.
> 
> Anyway change following method to remove buttons from top pane:
> 
> "protocol: building actions"
> stackDebuggingActionsPragmas
> 
>   ^ #(  )



Re: [Pharo-users] One comment to new Pharo5 debugger

2016-05-26 Thread Johan Fabry
Yes, and there was also some discussion on the Pharo-users mailing list. 
Apparently the same comments more or less ...

I give a big +1 on moving the buttons down, so that they are between the stack 
and the code pane. I still don’t understand why they need to be so far away 
from the code pane, it makes much more sense above the code pane + we save on 
mouse movements.

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org <http://emailcharter.org/> .

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

> On May 26, 2016, at 04:37, Christophe Demarey <christophe.dema...@inria.fr> 
> wrote:
> 
> Hi Sabine,
> 
> this point was also « discussed » (no answer) here: 
> http://forum.world.st/gtdebugger-debug-actions-buttons-td4874316.html 
> <http://forum.world.st/gtdebugger-debug-actions-buttons-td4874316.html>
> Yes, the new buttons are counter-productive and there is even no setting to 
> have them usable …
> You can still with to the SpecDebugger through settings
> 
> 
>> Le 25 mai 2016 à 22:49, Peter Uhnák <i.uh...@gmail.com 
>> <mailto:i.uh...@gmail.com>> a écrit :
>> 
>> Hi,
>> 
>> yes, this question was raised before, but there are some disagreements over 
>> how it should be, so it may take some time 
>> http://forum.world.st/GTDebugger-shortcuts-usability-td4890316.html 
>> <http://forum.world.st/GTDebugger-shortcuts-usability-td4890316.html>
>> 
>> You can also use a startup script to reassign them, such as this one. 
>> https://github.com/peteruhnak/pharo-scripts/blob/master/config/5.0/uniformDebugger.st
>>  
>> <https://github.com/peteruhnak/pharo-scripts/blob/master/config/5.0/uniformDebugger.st>
>> But a startup script is a temporary solution.
>> 
>> On Wed, May 25, 2016 at 9:43 PM, Sabine Manaa <manaa.sab...@gmail.com 
>> <mailto:manaa.sab...@gmail.com>> wrote:
>> Hi,
>> 
>> today I moved to Pharo5. It is great to get feedback and solutions for
>> problems so quickly. It is a pleasure to work with Pharo and to have the
>> community. I am grateful for having this.
>> 
>> I have one comment. I don't want to complain, I can use it but I was
>> wondering about the new position and size of the debugger buttons.
>> 
>> There is a longer distance now from code text pane to the buttons - I see
>> this as disadvantage to earlier versions of Pharo from the user experience.
>> The buttons are a lot of smaller - same disadvantage - both if you use the
>> mouse.
>> 
>> Ok, after seeing that, I thought "Sabine, you should use keyboard shortcuts
>> here, too" (I use much of them but interesting - til now not in the
>> debugger).
>> 
>> Then I saw the shortcuts for
>> Proceed cmd+r
>> Restart cmd-shift-a
>> Into cmd-e
>> over cmd-shift-o
>> through cmd-shift-t
>> 
>> especially into, over and through have so different key combinations, two
>> with shift, one without shift. When I debug, I often use for example
>> into-into-over-over-over-throuhg-through--into-into etc...and with the
>> combinations cmd-e and cmd-shit-e, it is more "finger-work". It would be
>> better to have all those shortcuts with or all shortcuts without shift. And
>> the letters not so far away at the keyboard (e-o-t)
>> 
>> This is only my opinion and my first impression after one day with Pharo5. I
>> am sure, after a few days, I forgot that this was uncomfortable because I
>> have the shortcuts coming automatically into my fingers.
>> 
>> Regards
>> Sabine
>> 
>> 
>> 
>> 
>> 
>> 
>> --
>> View this message in context: 
>> http://forum.world.st/One-comment-to-new-Pharo5-debugger-tp4897390.html 
>> <http://forum.world.st/One-comment-to-new-Pharo5-debugger-tp4897390.html>
>> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com 
>> <http://nabble.com/>.
>> 
>> 
> 



Re: [Pharo-users] Spec layout

2016-05-17 Thread Johan Fabry
Hi Marion,

the class side message of defaultSpec is generally meant to be used if you use 
a fixed number of widgets, so you can put the reference to the name of each 
widget there (in cour case #buttons). For variable number of widgets you should 
have a look at the dynamic features of Spec.

That being said, It looks like what you really want to use is a Radio Button 
Group. Have a look at RadioButtonGroupExample.

HTH

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please 
see http://emailcharter.org .

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

> On May 17, 2016, at 13:48, Marion Noirbent 
> <ms.noirb...@etudiant.univ-lille1.fr> wrote:
> 
> Hi,
> I'm trying to create a widget whith Spec, managing a collection of 
> RadioButton. But I have a problem with defaultSpec (the accessor of the 
> collection is the methods "buttons") :
> 
> If i put defaultSpec on class side, i can't acces the collection of the 
> instance. (the following code iterate on the string)
> 
> defaultSpec
>   
>   ^ SpecLayout composed
>   newColumn: [ :column | #buttons do: [ :item | column add: item 
> ] ];
>   yourself
> 
> If i put it on instance side, the lookup don't find it (in the book Building 
> UI with Spec, it said the lookup begin by the instance side and it allow to 
> have specific UI, in part about layout)
> 
> defaultSpec
>   
>   ^ SpecLayout composed
>   newColumn: [ :column | self buttons do: [ :item | column add: 
> item ] ];
>   yourself
> 
> Any idea ?
> 
> Marion Noirbent,
> 
> 




Re: [Pharo-users] Semaphore wait and signal

2016-05-10 Thread Johan Fabry
Hi Vince,

some of your problem may be in the Transcript buffering some of its output. It 
is best to add a ; flush to the end of all your printing, e.g. Transcript show: 
'waiting...'; cr ; flush.

HTH

> On May 10, 2016, at 07:31, Vince Refiti <vin...@gmail.com> wrote:
> 
> Hello
> 
> I am playing around with Semaphore, and wrote the following:
> 
> | coll count sem |
> coll := Array withAll: (1 to: 100).
> count := 0.
> sem := Semaphore new.
> coll do: [ :each |
> count := count + 1.
> (count >= 5)
> ifTrue: [ 
> Transcript show: 'waiting...'; cr.
> sem wait ].
> 
> [ [ 2 seconds asDelay wait.
>  Transcript show: each printString, ' ', count printString; cr ] 
> ensure: [  
> count := count -1.
> sem signal ] ] fork ]
> 
> The output is:
> 
> waiting...
> 1  End of statement list encountered ->5
> 2 4
> 3 3
> 4 2
> waiting...
> waiting...
> waiting...
> waiting...
> 5 8
> 6 7
> 7 6
> 8 5
> 9 4
> 10 3
> 11 2
> waiting...
> waiting...
> waiting...
> waiting...
> waiting...
> waiting...
> waiting...
> 12 11
> 13 10
> 14 9
> 15 8
> 16 7
> 17 6
> 18 5
> 19 4
> 20 3
> 21 2
> waiting...
> waiting...
> waiting...
> waiting...
> waiting...
> waiting...
> waiting...
> waiting...
> waiting...
> waiting...
> 22 14
> 23 13
> 24 12
> 25 11
> 26 10
> 27 9
> 28 8
> 29 7
> 30 6
> 31 5
> 32 4
> 33 3
> 34 2
> waiting...
> waiting...
> waiting...
> waiting...
> waiting...
> waiting...
> waiting...
> waiting...
> waiting...
> waiting...
> waiting...
> waiting...
> waiting...
> 35 17
> 36 16
> 37 15
> 38 14
> 39 13
> 40 12
> 41 11
> 42 10
> 43 9
> 44 8
> 45 7
> 46 6
> 47 5
> 48 4
> 49 3
> 50 2
> waiting...
> waiting...
> waiting...
> waiting...
> waiting...
> waiting...
> waiting...
> waiting...
> waiting...
> waiting...
> waiting...
> waiting...
> waiting...
> waiting...
> waiting...
> waiting...
> 51 20
> 52 19
> 53 18
> 54 17
> 55 16
> 56 15
> 57 14
> 58 13
> 59 12
> 60 11
> 61 10
> 62 9
> 63 8
> 64 7
> 65 6
> 66 5
> 67 4
> 68 3
> 69 2
> waiting...
> waiting...
> waiting...
> waiting...
> waiting...
> waiting...
> waiting...
> waiting...
> waiting...
> waiting...
> waiting...
> waiting...
> waiting...
> waiting...
> waiting...
> waiting...
> waiting...
> waiting...
> waiting...
> 70 23
> waiting...
> 71 23
> 72 22
> 73 21
> 74 20
> 75 19
> 76 18
> 77 17
> waiting...
> waiting...
> waiting...
> waiting...
> waiting...
> waiting...
> waiting...
> 78 23
> 79 22
> 80 21
> 81 20
> 82 19
> 83 18
> 84 17
> 85 16
> 86 15
> 87 14
> 88 13
> 89 12
> 90 11
> 91 10
> 92 9
> 93 8
> 94 7
> 95 6
> 96 5
> 97 4
> 98 3
> 99 2
> 100 1
> 
> I was expecting 'waiting...' to alternate with the 'each-count' lines. Also 
> the entire statement paused for 2 seconds, spat out some lines, then waited a 
> little longer, and then finished.
> 
> Can someone please explain this pattern?
> 
> Thanks, Vince



---> 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] How to construct a multi-part file reference

2016-05-08 Thread Johan Fabry
Hi Nicolai,

I don’t know if it works with both separators, but it’s simple and works on 
MacOS at least, so that’s good enough for me now. Thanks for pointing it out to 
me !

> On May 8, 2016, at 11:53, Nicolai Hess <nicolaih...@gmail.com> wrote:
> 
> 
> 
> 2016-05-07 0:33 GMT+02:00 Johan Fabry <jfa...@dcc.uchile.cl 
> <mailto:jfa...@dcc.uchile.cl>>:
> Hi all,
> 
> I have a question about the filesystem that I could not resolve using the 
> documentation. The problem is as follows: I have a file reference that is 2 
> separate strings that I need to join into one complete file ref but I don’t 
> know how because I don’t know what the platform’s file separator is.
> 
> For example, on a unix-like OS I get ‘/home/jfabry’ as one part and 
> ‘test/code/foo.txt’ as the other part, and I need to construct a 
> FileReference to ‘/home/jfabry/test/code/foo.txt’.On M$ I guess this would be 
> 'C:\users\jfabry' and ‘test\code\foo.txt’, so I need to construct 
> FileReference to  'C:\users\jfabry\test\code\foo.txt’
> 
> And the bingo question is: what do I do if I both strings use different kinds 
> of separators?
> 
> I  think
> 
> ‘/home/jfabry’ asFileReference resolve: ‘test/code/foo.txt’
> 
> works on both platform, with both separators, no?
> 
> 
>  
> 
> TIA,
> 
> ---> Save our in-boxes! http://emailcharter.org <http://emailcharter.org/> 
> <---
> 
> Johan Fabry   -   http://pleiad.cl/~jfabry <http://pleiad.cl/~jfabry>
> PLEIAD and RyCh labs  -  Computer Science Department (DCC)  -  University of 
> Chile
> 
> 
> 



---> 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] How to construct a multi-part file reference

2016-05-08 Thread Johan Fabry
Hi Udo,

that’s a very detailed explanation, thanks for taking the time to write it!

> On May 7, 2016, at 05:46, Udo Schneider <udo.schnei...@homeaddress.de> wrote:
> 
> Hi Johan,
> 
> I remember running into similar problems because I didn't understand the 
> FileSystem philosophy ... and dealing with strings and concatenating them is 
> so much easier, right? :-)
> 
> After reading the chapter on FileSystem several times over and over again the 
> IMHO most important part of it to get the grasp of FileSystem is on page 13 
> (http://pharobooks.gforge.inria.fr/PharoByExampleTwo-Eng/latest/FileSystem.pdf):
> 
> "
> FileReference = FileSystem + Path
> Paths and filesystems are the lowest level of the FileSystem API. A 
> FileReference combines a path and a filesystem into a single object which 
> provides a simpler protocol for working with files as we show in the previous 
> section. References implement the path protocol with methods like /, parent 
> and resolve:.
> "
> 
> So in your example ‘/home/jfabry’ and ‘test/code/foo.txt’ are just (relative) 
> path strings. They do not reference anything outside of the context of a 
> filesystem. The hard part for me to understand was the fact that a path may 
> not be unique. The same path might reference different files in different 
> filesystems.
> This is especially strange coming from a *nix background where there is only 
> one filesystem.
> But even on Windows one could argue that the OS nowadays only knows one 
> filesystem: You can reference any file via a UNC path ... drives, shares, 
> partitions, URIs and other filesystems are simply aliases into the UNC space.
> The nice thing of the FileSystem API is it's ability to transparently use 
> files in-Memory, archives, FTP, WebDav, S3 ... . All from within Pharo with 
> the same consistent API. E.g. if you have the FileSystemNetwork 
> (http://smalltalkhub.com/#!/~UdoSchneider/FileSystemNetwork) installed you 
> can do something like:
> 
> 
> 
> "Obtain a FTP FileSystem"
> fs := FileSystem ftp: 'ftp://ftp.2600.com'.
> 
> "Get working directory"
> wd := fs workingDirectory .
> 
> "Print the following expression!"
> (wd /  'pub' / 'publications' / 'n0way') children.
> (wd /  'pub' / 'publications' / 'n0way' / 'README') contents.
> 
> "Open a FileList on the FileSystem"
> FileList openOn: wd.
> 
> "Remember to close if you are finished!"
> fs close.
> 
> 
> 
> 
> So to make a long story short: Both your strings contain paths. So we have to 
> convert them into Paths and somehow combine them with a FileSystem to get a 
> valid FileReference:
> 
> 
> 
> "I changed the second string to demonstrate dealing with different delimiters"
> dirString := '/home/jfabry'.
> fileString := 'test\code\foo.txt'.
> 
> "Convert path strings to Paths"
> dirPath := Path from: dirString delimiter: $/.
> filePath := Path from: fileString delimiter: $\.
> "Please note the Paths do not reference anything. We have no FileSystem 
> context yet"
> 
> "The FileSystem our Paths will be resolved within"
> diskFs := FileSystem disk.
> 
> "FileReference for the root directory in the FS"
> rootRef := diskFs root.
> 
> "Resolve our Paths in the Context of the Reference"
> dirRef := rootRef resolve: dirPath.
> fileRef := dirRef resolve: filePath. "File @ /home/jfabry/test/code/foo.txt"
> 
> "Please note the fileRef printString. 'File' denotes the FileSystem - not the 
> fact that this is a file! Then you have the path after the at sign"
> 
> 
> 
> 
> 
> I hope this helps.
> 
> Final advice: In Pharo you should *never never never* assume that a Path is 
> "enough" to reference a file. You will always need the context (it's 
> FileSystem) as well. And that's exactly what a FileReference (see above) is. 
> So if you only have a Path it's questionable to assume that you can simply 
> combine it with a DiskFileSystem to get a valid reference. What if the Path 
> references a file in a ZIP in-Memory archive? Trying to access the Path on 
> disk will yield no result. So always always always store/pass a FileReference 
> if possible
> I did run into that issue in the past with archive/net FileSystems where some 
> dev tools at one point extracted the Path from the FileReference and passed 
> them arround. Down the stack some other methods needed the file contents. 
> Because only the Path was passed they assumed they could retrieve the 
> contents by simply combining it with a DiskFileSystem ... and boom!
> 
> 
> CU,
> 
> Udo
> 
> 
> On 07/

[Pharo-users] How to construct a multi-part file reference

2016-05-06 Thread Johan Fabry
Hi all,

I have a question about the filesystem that I could not resolve using the 
documentation. The problem is as follows: I have a file reference that is 2 
separate strings that I need to join into one complete file ref but I don’t 
know how because I don’t know what the platform’s file separator is.

For example, on a unix-like OS I get ‘/home/jfabry’ as one part and 
‘test/code/foo.txt’ as the other part, and I need to construct a FileReference 
to ‘/home/jfabry/test/code/foo.txt’.On M$ I guess this would be 
'C:\users\jfabry' and ‘test\code\foo.txt’, so I need to construct FileReference 
to  'C:\users\jfabry\test\code\foo.txt’

And the bingo question is: what do I do if I both strings use different kinds 
of separators?

TIA,

---> 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] Documentation about Pharo Launcher?

2016-05-03 Thread Johan Fabry
Hola,

A thought: you can probably just open an image of a working version of yours 
and do a save-as inside the bundle or zip, overwriting the image that is there.

> On May 3, 2016, at 14:03, Offray Vladimir Luna Cárdenas 
> <offray.l...@mutabit.com> wrote:
> 
> Hi Johan,
> 
> At this moment I would like the quickest alternative, and maybe what you 
> propose is the path to follow. I have downloaded the Windows and Mac bundles. 
> I imagine that creating my own variant would mean to change the pharo binary, 
> image, sources and changes file in each of them to provide the versions that 
> support the development version of Moose 6, that I'm using now.
> 
> After that I'll try  a better approach using Pharo Launcher.
> 
> Cheers,
> 
> Offray
> 
> On 03/05/16 09:55, Johan Fabry wrote:
>> Maybe a silly question, but why don’t you make a 1-file download like the 
>> default options provided for Pharo 4.0 on http://pharo.org/download For 
>> example, on MacOS it gives you an .app file that you just double-click.
>> 
>>> On May 3, 2016, at 11:43, Offray Vladimir Luna Cárdenas 
>>> <offray.l...@mutabit.com> wrote:
>>> 
>>> Hi Ben,
>>> 
>>> I mean for others to use. My idea is to use PharoLauncher to package and 
>>> execute an image with preloaded stuff. I will check the suggestions of 
>>> Cédrick and Serge.
>>> 
>>> Thanks,
>>> 
>>> Offray
>>> 
>>> On 03/05/16 05:30, Ben Coman wrote:
>>>> On Tue, May 3, 2016 at 8:14 AM, Offray Vladimir Luna Cárdenas
>>>> <offray.l...@mutabit.com> wrote:
>>>>> Hi all.
>>>>> 
>>>>> I would like to made one of my images available through Pharo Launcher.
>>>>> Anyone knows where I can find documentation about this? I can't find
>>>>> anything on the StHub page for the project.
>>>>> 
>>>>> Thanks,
>>>>> 
>>>>> Offray
>>>>> 
>>>> Do you mean for your own use? Or so others can download them using
>>>> PharoLauncher?
>>>> cheers -ben
>>>> 
>>>> 
>>> 
>>> 
>> 
>> 
>> ---> Save our in-boxes! http://emailcharter.org <---
>> 
>> Johan Fabry   -   http://pleiad.cl/~jfabry
>> PLEIAD and RyCh labs  -  Computer Science Department (DCC)  -  University of 
>> Chile
>> 
>> 
>> 
> 
> 
> 



---> 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] Documentation about Pharo Launcher?

2016-05-03 Thread Johan Fabry

> On May 3, 2016, at 12:08, Peter Uhnák <i.uh...@gmail.com> wrote:
> 
> 
> 
> On Tue, May 3, 2016 at 4:55 PM, Johan Fabry <jfa...@dcc.uchile.cl 
> <mailto:jfa...@dcc.uchile.cl>> wrote:
> 
> Maybe a silly question, but why don’t you make a 1-file download like the 
> default options provided for Pharo 4.0 on http://pharo.org/download 
> <http://pharo.org/download> For example, on MacOS it gives you an .app file 
> that you just double-click.
> 
> How does that play with Pharo Launcher? Can you add arbitrary images and 
> Pharo Launcher will just manage them?

No idea, sorry. This is an alternative to Pharo Launcher, I do not know how 
(if?) it would combine with the launcher.

---> 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] Documentation about Pharo Launcher?

2016-05-03 Thread Johan Fabry

Maybe a silly question, but why don’t you make a 1-file download like the 
default options provided for Pharo 4.0 on http://pharo.org/download For 
example, on MacOS it gives you an .app file that you just double-click.

> On May 3, 2016, at 11:43, Offray Vladimir Luna Cárdenas 
> <offray.l...@mutabit.com> wrote:
> 
> Hi Ben,
> 
> I mean for others to use. My idea is to use PharoLauncher to package and 
> execute an image with preloaded stuff. I will check the suggestions of 
> Cédrick and Serge.
> 
> Thanks,
> 
> Offray
> 
> On 03/05/16 05:30, Ben Coman wrote:
>> On Tue, May 3, 2016 at 8:14 AM, Offray Vladimir Luna Cárdenas
>> <offray.l...@mutabit.com> wrote:
>>> Hi all.
>>> 
>>> I would like to made one of my images available through Pharo Launcher.
>>> Anyone knows where I can find documentation about this? I can't find
>>> anything on the StHub page for the project.
>>> 
>>> Thanks,
>>> 
>>> Offray
>>> 
>> Do you mean for your own use? Or so others can download them using
>> PharoLauncher?
>> cheers -ben
>> 
>> 
> 
> 
> 



---> 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] GTPlayground/Inspector stacked vertically

2016-04-29 Thread Johan Fabry

> On Apr 29, 2016, at 09:03, Peter Uhnák <i.uh...@gmail.com> wrote:
> 
> On Fri, Apr 29, 2016 at 1:49 PM, Johan Fabry <jfa...@dcc.uchile.cl 
> <mailto:jfa...@dcc.uchile.cl>> wrote:
> 
> For this specific case you may want to use the SpecEasel which is an example 
> of the of the Roassal2Spec package. You can change the layout of the boxes 
> there by changing the defaultSpec method at class side (but some minimal Spec 
> knowledge is required).
> 
> Well I certainly have enough knowledge to change a layout, but the lacking 
> code support (mainly syntax highlighting) is a real pain (certainly worse 
> than having a large window).
> But at least I can add it to my todo and see if it can be improved…

Ah well, the SpecEasel was a quick example not meant to be used intensively, 
which is why there is no syntax highlighting. If you change the text widget for 
a Rubric one and you configure it to be for Smalltalk (there is a setting for 
that) you should get syntax highlighting and all other bells and whistles for 
free.


---> 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] GTPlayground/Inspector stacked vertically

2016-04-29 Thread Johan Fabry

For this specific case you may want to use the SpecEasel which is an example of 
the of the Roassal2Spec package. You can change the layout of the boxes there 
by changing the defaultSpec method at class side (but some minimal Spec 
knowledge is required).

> On Apr 29, 2016, at 04:48, Peter Uhnák <i.uh...@gmail.com> wrote:
> 
> Hi,
> 
> how technically complex it would be to stack the panes in the Playground on 
> top of each other, instead of side by side?
> 
> Right now I waste half of my screen just for one line just so I can get a 
> reasonably sized visualization.
> 
> 
> ​
> Instead I would like to have something like this, even if it was limited to 
> just two panes.
> 
> 
> ​
> 
> (Or the other way around, code at the bottom, visu at the top, doesn't 
> matter.)
> 
> Of course it would probably have to be resizable (I wouldn't want to have the 
> same problem, just vertically.
> 
> And yes, I can just inspect the results, but that's quite annoying as it 
> opens yet another window which I have to close all the time.
> 
> Peter



---> 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] remove unused variables

2016-04-21 Thread Johan Fabry

This was changed somewhere in November by Marcus and Miguel, and it was 
intentional, as part of the work on annotations on the AST that enabled 
breakpoints. (Breakpoints use the same highlighting mechanism).

> On Apr 21, 2016, at 18:52, Peter Uhnák <i.uh...@gmail.com> wrote:
> 
> The editor used to inform when there was an unused local variable and offered 
> to remove it.
> 
> Is it possible to get this behavior back, or is it a feature regression with 
> the "new" (this changed some time ago) editor?
> 
> Thanks,
> Peter



---> 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] SpecGenerator: easy CRUD applications with Spec

2016-04-12 Thread Johan Fabry

That’s a cool idea and great to see it in action!

One suggestion though: how about adding titles to the editor windows, to help 
the user in what he/she is filling in.

> On Apr 12, 2016, at 17:05, Stephan Eggermont <step...@stack.nl> wrote:
> 
> Sometimes you just want to quickly create an application
> for data entry, without spending too much time constructing
> forms and lists. Wouldn't it be great if you could build
> something while talking to a client, and directly show
> the results?
> 
> SpecGenerator helps you with this.
> 
> It needs the SelectEntity widget that you can get by
> loading Ancestry from the catalog, and can be found
> on smalltalkhub in StephanEggermont/SpecGenerator
> 
> https://vimeo.com/162589115
> 
> Stephan
> 
> 
> 
> 



---> 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] New project: AR.Drone communication API in Pharo

2016-04-12 Thread Johan Fabry

I forgot to ask, will this work with a PS2 joystick? We have one available in 
the robotics lab that we can use for that.

> On Apr 12, 2016, at 02:41, Carolina Hernández <carola...@gmail.com> wrote:
> 
> Hi Ronnie, that's is really nice!
> 
> I'm talking to you in private 
> 
> 2016-04-10 7:05 GMT-03:00 Ronie Salgado <ronies...@gmail.com 
> <mailto:ronies...@gmail.com>>:
> Ok, I made a cleanup on the OSWindow joystick support. I also added the 
> OSWindowGenericRenderer interface which is implemented by a thin wrapper 
> around the SDL2 renderer interface. I have tested this on Linux using a XBox 
> 360 controller (using SDL2 GameController interface) and a PS2 controller via 
> an USB adapter (using SDL2 Joystick interface). Later I will test it on 
> Windows and Mac.
> 
> =
> Here is the demo: 
> https://www.youtube.com/watch?v=lABfEmToHLQ=youtu.be 
> <https://www.youtube.com/watch?v=lABfEmToHLQ=youtu.be>
> 
> OSWindowJoystickExample new open.
> 
> Xbox 360/mapped controls
> Left stick: move character
> X button: shoot
> Start: reset
> 
> =
> 
> I also added a simple examples using the OSWindowGenericRenderer:
> 
> OSWindowGenericRendererDrawingExample new open.
> 
> =
> 
> I also modified the OSSDL2Driver >> #isSuitable method to not call the 
> hasPlugin method. The plugin seems to be unnecessary according to several 
> posts, and I am too lazy for fixing it. I guess that this should be 
> eventually integrated into Pharo 5 after some reviewing. Before that, the 
> latest version of OSWindow should be loaded manually. For that, the packages 
> should be loaded in the following order:
> 
> OSWindow-Core
> OSWindow-SDL2
> OSWindow-SDL2-Examples
> 
> After that, the following doIt is required in a playground to start receiving 
> events:
> 
> SDL2Constants initialize.
> SDL_Event initialize
> 
> Best regards,
> Ronie
> 
> 2016-04-10 3:15 GMT-03:00 p...@highoctane.be <mailto:p...@highoctane.be> 
> <p...@highoctane.be <mailto:p...@highoctane.be>>:
> There is joystick support in 4.0, but not in Unix (plugin looks pretty empty).
> 
> Smalltalk vm listBuiltinModules select: [ :each | each beginsWith: 'Joystick' 
> ].
> 
> JoystickTabletPlugin VMMaker-oscog-nice13154.314
> 
> So, it is all in the InputEventSensor
> 
> Check for senders of primReadJoystick:
> 
> --> joystickXY:, joystickButtons: ...
> 
> Phil
> 
> 
> On Sun, Apr 10, 2016 at 1:18 AM, Stephan Eggermont <step...@stack.nl 
> <mailto:step...@stack.nl>> wrote:
> On 09-04-16 15:24, Carolina Hernández wrote:
> I couldn't find any direct way to use a joystick in Pharo, if someone knows
> about one, I'd like to integrate it to my code.
> https://github.com/Geal/Squeak-VM/tree/master/platforms/Mac%20OS/plugins/JoystickTabletPlugin
>  
> <https://github.com/Geal/Squeak-VM/tree/master/platforms/Mac%20OS/plugins/JoystickTabletPlugin>
> 
> Refers to a joystick plugin for squeak. I don't know if that is in the 
> current distribution
> (it doesn't seem to be), so you might ask on the vm-dev list about it. I 
> haven't looked
> at it, so it could be for a RS-232 based joystick instead of something more 
> useful with
> a modern pc.
> 
> Can't SDL2 be used with a joystick?
> 
> Stephan
> 
> 
> 
> 
> 
> 
> 
> 



---> 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] New project: AR.Drone communication API in Pharo

2016-04-12 Thread Johan Fabry

> On Apr 12, 2016, at 00:52, Carolina Hernández <carola...@gmail.com> wrote:
> 
> Hi Krish
> Thanks for all your comments.

I agree with Krish that the code is well done, plus the documentation is very 
complete, I like that a lot!

> About the #initialize method, I think you are right, and some code 
> refactoring would solve it.

Yes, I would move both block definitions to their separate methods, that should 
make the code more readable. 

> Also, about the #takeOff method, maybe the comments are not so explicative, 
> but it just sends the take off command until the drone is actually flying. In 
> practice, it sends it twice and then stops. The logic for the land command is 
> very similar. They are designed that way to ensure the drone will take off or 
> land after only one call of the corresponding method. 

For me at least the comment in takeOff is clear.

> Thanks for your advice on avoiding Float and Integer overrides, it would be 
> cleaner to include the methods in the ARDrone package.

Indeed, I think it would be better to have these on ARDCommandManager, as it is 
the only place they are used and furthermore don’t rely on private state of 
Float or Integer.

---> 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] New project: AR.Drone communication API in Pharo

2016-04-12 Thread Johan Fabry
Hola Hernan,

Carolina is doing cool work, which is why I pushed her to make this 
announcement and video :-) 

I first want to get LRP working with the drone (more on LRP also on 
http://pleiad.cl/LRP <http://pleiad.cl/LRP> ). The philosophy of LRP is to do 
as much as possible on real hardware for a fast development cycle, so 
simulation of the drone is a very low priority right now.

Carolina told me there are more features inside the drone, for augmented 
reality stuff if I remember correctly. So we will first investigate that to see 
if we can get more features inside LRP, because that sounds really cool.

> On Apr 12, 2016, at 00:27, Carolina Hernández <carola...@gmail.com> wrote:
> 
> Hi Hernán, not for now, since my main goal is to make possible to program 
> behaviors for the drone using the language LRP (Live Robot Programming). 
> However, since I am using a spiral development method, I may consider it in a 
> further stage. Thanks for the suggestion!
> 
> Caro
> 
> About LRP:
> http://pleiad.dcc.uchile.cl/papers/2014/fabryAl-iberamia14.pdf 
> <http://pleiad.dcc.uchile.cl/papers/2014/fabryAl-iberamia14.pdf>
> 
> 2016-04-09 10:58 GMT-03:00 Hernán Morales Durand <hernan.mora...@gmail.com 
> <mailto:hernan.mora...@gmail.com>>:
> Hi Carolina,
> 
> Thank you for sharing.
> Do you plan to support gazebo or tum_simulator in your API?
> 
> Hernán
> 
> http://gazebosim.org/ <http://gazebosim.org/>
> http://wiki.ros.org/tum_simulator <http://wiki.ros.org/tum_simulator>
> 
> 
> 2016-04-09 10:24 GMT-03:00 Carolina Hernández <carola...@gmail.com 
> <mailto:carola...@gmail.com>>:
> Hi, my name is Carolina Hernandez and I'm a Computer Engineering student at 
> the University of Chile.
> As part of my final degree project, I'm creating a communication API for 
> controlling the Parrot AR.Drone 2.0 from Pharo. I've just released an early 
> version. The code is hosted in Smalltalkhub:
> http://smalltalkhub.com/#!/~CaroHernandez/ArDronePharo 
> <http://smalltalkhub.com/#!/~CaroHernandez/ArDronePharo>
> 
> I also made a video of a test flight, where the AR.Drone is controlled using 
> the API and keyboard:
> https://www.youtube.com/watch?v=d8rERiBoD0o 
> <https://www.youtube.com/watch?v=d8rERiBoD0o>
> 
> I couldn't find any direct way to use a joystick in Pharo, if someone knows 
> about one, I'd like to integrate it to my code.
> 
> Development and tests have been done in Pharo 4.0 and ubuntu 12.04
> Comments are welcome!
> 
> Caro
> 
> 



---> 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] Spec ListModel synchronization

2016-03-30 Thread Johan Fabry
Hi Bob,

to answer your 2 questions briefly:

Yes, Spec is here to stay for good, and the idea is that it can compose any 
kind of widgets, so with a bridge to OSWindow-SDL2 that should work as well.

When changing items in the list, you need to inform the widget of that. To do 
that you need to call the updateList method on your ListModel instance. So in 
your example:

aList add: 1.
aListModel updateList.

HTH,

> On Mar 30, 2016, at 13:19, Rob Rothwell <r.j.rothw...@gmail.com> wrote:
> 
> Hello,
> 
> It's been a while since I tried out Pharo.  I always struggled with Morphic 
> UI's, but I noticed Spec and there seemed to be enough examples floating 
> around that I thought I'd give it another try.
> 
> Is Spec "here to stay?"  Is it worthwhile to figure it out?  It seems like 
> with the developing possibilities of OSWindow-SDL2, one might use Spec to 
> compose native widgets as well.
> 
> My main question is about synchronizing domain changes with a Spec UI.
> 
> For example, if I create an empty list of items:
> 
> aList := OrderedCollection new.
> 
> And create and open a ListModel that uses that list:
> 
> aListModel := ListModel new
> items: aList;
> openWithSpec;
> yourself.
> 
> I get a nice empty list.
> 
> If I add an item to my list:
> 
> aList add: 1.
> 
> Then I need to update the list with another:
> 
> aListModel items: aList.
> 
> To see it show up.
> 
> Alternatively (this seems wrong), I can add an item to the ListModel 
> listItems directly:
> 
> aListModel items: (aListModel listItems add: 1; yourself).
> 
> Is that basically what you need to do to maintain synchronization between 
> your domain list and the Spec UI representation of that list, or am I missing 
> something?
> 
> Thank you,
> 
> Rob



---> 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] patterns for representing enumerations/constants

2016-03-23 Thread Johan Fabry

Exactly the solution that I thought of :-)

> On Mar 23, 2016, at 16:51, Esteban A. Maringolo <emaring...@gmail.com> wrote:
> 
> 2016-03-23 16:31 GMT-03:00 Peter Uhnák <i.uh...@gmail.com>:
>>> I would do something like:
>>> 
>>> Color named: #red.
>>> Color named: #blue.
>> 
>> 
>> That idea crossed my mind (it would be good for serialization from some
>> external data), but how would you as user/programmer know what to put in
>> there?
>> The idea of enums is that you have a predetermined set of predetermined
>> values, so this
>> 
>>> Pros are that there is no endless lists of methods at class side
>> 
>> 
>> is actually a con, because the user doesn't know them.
>> 
>> Everyone knows red and blue, but nobody remembers to the letter
>> domain-specific props (in fact half of the class-side colors you wouldn't
>> guess you could use named).
>> 
>> BormParticipantRole class selectors "#(#Approves #Undefined #Performs
>> #Initiates #IsResponsible #Acquires #Cooperates #IsInformed #Consults)"
>> BormParticipantType class selectors "#(#Organization #System #Person)"
>> 
>> But maybe Color was wrong example because the set can be very large
>> (although the set of options is also limited if you consider some
>> standards).
> 
> 
> You can have something at the class side that return the colors name,
> using this example, by returning the keys of such dictionary.
> 
> Something like
> 
> YourClass class>>#colors
> 
>   ^Colors ifNil: [Colors := Dictionary new at: #red put: ...; at:
> #blue put: ..; yourself]
> 
> Then you can have
> 
> YourClass class>>#colorsConstants
>  ^self colors keys asSortedCollection
> 
> Regards
> 
> Esteban A. Maringolo
> 
> 



---> 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] patterns for representing enumerations/constants

2016-03-23 Thread Johan Fabry
I would do something like:

Color named: #red.
Color named: #blue.

et cetera.

the implementation of named: is a dictionary lookup.

Color class>>named: aSymbol
^self colors at: aSymbol

And the colors dictionary is a class instance variable that is lazily 
initialized by its accessor.

Pros are that there is no endless lists of methods at class side, and by using 
the accessor with lazy init there is no risk for the class instance variable to 
be nil because of class initialization weirdness. (Not that there is a bug with 
it, but I am not happy with my  understanding of when this happens.)

> On Mar 23, 2016, at 13:41, Peter Uhnák <i.uh...@gmail.com> wrote:
> 
> Hi,
> 
> as this probably doesn't have one solution I am interested in your approach, 
> if you have any.
> 
> The problem is that often you want to create instances (or just return 
> constants) in some particular domain, e.g.
> 
> Color red.
> Color blue.
> 
> Unfortunately this doesn't scale, because putting unary methods on the 
> class-side is a good way to break your image.



---> 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] [Pharo-dev] RTAnchorConstraint

2016-03-10 Thread Johan Fabry

> On Mar 10, 2016, at 12:08, Alexandre Bergel <alexandre.ber...@me.com> wrote:
> 
>> 
>> There is no other solution? Alex, do you have any idea?
> 
> To which problem?

Copy-paste from original mail:

anchor constraints: they do not play well with layouts and animations. Try the 
code below (adapted from the example to use the layout and animation of LRP ) 
and you will see that the circles keep spinning around, they never stop. I 
think it would be better for them to stop ;-)

| v lbls es e1 e2 a1 a2 layout stepping|
v := RTView new.
lbls := RTLabel new elementsOn: #(#First #Second).
es := RTEllipse new
size: 30;
borderColor: Color black;
elementsOn: #(#source #dest).
v
addAll: lbls;
addAll: es.
es @ RTDraggable.
es @ RTLabeled.
e1 := RTArrowedLine new
withContinuousCircleAttachPoint;
color: Color black;
edgeFrom: es first to: es second.
v add: e1.
e2 := RTArrowedLine new
withContinuousCircleAttachPoint;
color: Color black;
edgeFrom: es second to: es first.
v add: e2.
a1 := RTAnchorConstraint new.
a1 anchorShape size: 10.
a1 guideLine color: Color red.
a1
element: lbls first;
edge: e1;
balance: 0.2;
minDistance: 10;
build.
(a2 := RTAnchorConstraint new)
element: lbls second;
edge: e2;
balance: 0.2;
minDistance: 10;
build.
layout := RTForceBasedLayout new
charge: -450; length: 100; 
doNotUseProgressBar; applyOn: es; 
yourself.
layout initialLayout: RTSugiyamaLayout new. 
stepping := RTSpringLayoutStepping new 
view: v; layout: layout;
afterBlock: [ v canvas camera 
focusOnCenter].
v addAnimation: stepping.   
^ v


---> 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] RTAnchorConstraint

2016-03-10 Thread Johan Fabry

> On Mar 9, 2016, at 18:51, Peter Uhnák <i.uh...@gmail.com> wrote:
> 
> 
> 
> On Wed, Mar 9, 2016 at 10:02 PM, Johan Fabry <jfa...@dcc.uchile.cl 
> <mailto:jfa...@dcc.uchile.cl>> wrote:
> Heh, also a funny feature of your anchor constraints: they do not play well 
> with layouts and animations. Try the code below (adapted from the example to 
> use the layout and animation of LRP ) and you will see that the circles keep 
> spinning around, they never stop. I think it would be better for them to stop 
> ;-)
> 
> can't help myself :)
> 
> https://youtu.be/PGNiXGX2nLU?t=1m <https://youtu.be/PGNiXGX2nLU?t=1m>
Hehe, good one :-)  https://youtu.be/uo0o8eQWfcI ! :-P

>  
>   stepping := RTSpringLayoutStepping new 
>   view: v; layout: layout;
>   afterBlock: [ v canvas camera 
> focusOnCenter].
> 
> The problem is that RTSpringLayoutStepping>>view sets in effect the layout on 
> all elements in the view, which obviously won't work since they'll start 
> competing.
> 
> I'm not sure right now how to address it, but try this
> 
>   stepping := RTSpringLayoutStepping new 
>   view: RTView new; layout: 
> layout;
>   nodes: es;
>   afterBlock: [ v canvas camera 
> focusOnCenter].

Sorry, I don’t know enough of the internals to understand what’s going on. The 
solution is not a solution for me, because it effectively removes the 
animation, we only see the the resulting layout. There is no other solution? 
Alex, do you have any idea?

> Ah right, thanks. I've extracted the class from my code and I have different 
> removal mechanism...
> Please try the latest version, it should be fixed there.

Fixed, thanks! 

But now there is a new bug RTAnchorConstraint>>computeExtraDistance that I 
cannot reliably reproduce, I only have a stack trace, sorry:

Array(Object)>>errorSubscriptBounds:
Array(Object)>>at:
Array(SequenceableCollection)>>first
Array(SequenceableCollection)>>anyOne
Array(Collection)>>max
RTAnchorConstraint>>computeExtraDistance
[ :crossings | 
element
translateBy:
aSegment vector normal
* (minDistance + self computeExtraDistance) negated ] 
in RTAnchorConstraint>>moveAwayFromSegment:
BlockClosure>>cull:
Set(Collection)>>ifNotEmpty:
RTAnchorConstraint>>moveAwayFromSegment:
RTAnchorConstraint>>moveElement
RTAnchorConstraint>>update
[ self update ] in RTAnchorConstraint>>build
BlockClosure>>cull:
BlockClosure>>cull:cull:
TRTranslationCallback>>shape:step:
[ :c | 
c isTranslationCallback
ifTrue: [ c shape: self step: aStep ] ] in 
TREllipseShape(TRCallableObject)>>triggerCallbacksForStep:
OrderedCollection>>do:
TREllipseShape(TRCallableObject)>>triggerCallbacksForStep:
TREllipseShape(TRAbstractBoxShape)>>fromRectangle:
TREllipseShape(TRAbstractBoxShape)>>fromRectangle:color:
RTEllipse>>updateFor:trachelShape:
RTEllipse(RTShape)>>updateFor:
RTElement(RTShapedObject)>>update


---> 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] Re: Re: Call for action for Roassal

2016-03-09 Thread Johan Fabry
Heh, also a funny feature of your anchor constraints: they do not play well 
with layouts and animations. Try the code below (adapted from the example to 
use the layout and animation of LRP ) and you will see that the circles keep 
spinning around, they never stop. I think it would be better for them to stop 
;-)

| v lbls es e1 e2 a1 a2 layout stepping|
v := RTView new.
lbls := RTLabel new elementsOn: #(#First #Second).
es := RTEllipse new
size: 30;
borderColor: Color black;
elementsOn: #(#source #dest).
v
addAll: lbls;
addAll: es.
es @ RTDraggable.
es @ RTLabeled.
e1 := RTArrowedLine new
withContinuousCircleAttachPoint;
color: Color black;
edgeFrom: es first to: es second.
v add: e1.
e2 := RTArrowedLine new
withContinuousCircleAttachPoint;
color: Color black;
edgeFrom: es second to: es first.
v add: e2.
a1 := RTAnchorConstraint new.
a1 anchorShape size: 10.
a1 guideLine color: Color red.
a1
element: lbls first;
edge: e1;
balance: 0.2;
minDistance: 10;
build.
(a2 := RTAnchorConstraint new)
element: lbls second;
edge: e2;
balance: 0.2;
minDistance: 10;
build.
layout := RTForceBasedLayout new
charge: -450; length: 100; 
doNotUseProgressBar; applyOn: es; 
yourself.
layout initialLayout: RTSugiyamaLayout new. 
stepping := RTSpringLayoutStepping new 
view: v; layout: layout;
afterBlock: [ v canvas camera 
focusOnCenter].
v addAnimation: stepping.   
^ v

> On Mar 9, 2016, at 17:56, Johan Fabry <jfa...@dcc.uchile.cl> wrote:
> 
> 
>> On Mar 7, 2016, at 11:34, Peter Uhnák <i.uh...@gmail.com 
>> <mailto:i.uh...@gmail.com>> wrote:
>> 
>> I've just commited RTAnchorConstraint to latest Roassal, see class-side 
>> example there.
>> 
> I have been trying it, and there is a first version that works now, thanks!
> 
> I even have a bug report for you … before, when I removed the edge, the label 
> was also removed automatically. Now this is no longer the case. :-(
> 
> ---> Save our in-boxes! http://emailcharter.org <http://emailcharter.org/> 
> <---
> 
> Johan Fabry   -   http://pleiad.cl/~jfabry <http://pleiad.cl/~jfabry>
> PLEIAD and RyCh labs  -  Computer Science Department (DCC)  -  University of 
> Chile
> 
> ___
> Moose-dev mailing list
> moose-...@list.inf.unibe.ch
> https://www.list.inf.unibe.ch/listinfo/moose-dev



---> 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] Re: Call for action for Roassal

2016-03-09 Thread Johan Fabry

> On Mar 7, 2016, at 11:34, Peter Uhnák <i.uh...@gmail.com> wrote:
> 
> I've just commited RTAnchorConstraint to latest Roassal, see class-side 
> example there.
> 
I have been trying it, and there is a first version that works now, thanks!

I even have a bug report for you … before, when I removed the edge, the label 
was also removed automatically. Now this is no longer the case. :-(

---> 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] SelectEntity, a new widget for Spec

2016-03-08 Thread Johan Fabry

That looks very cool, how about adding it to the standard distribution?

> On Mar 7, 2016, at 16:21, Stephan Eggermont <step...@stack.nl> wrote:
> 
> When using data entry applications,
> we often have to select one entity out of a large list.
> Spec provides the entryCompletion option for text fields for that.
> That works well for small lists
> When the number of different entities grows large however,
> or when we want to be able to add a new entity,
> the traditional solution is to combine an entry completion field
> with a button that opens a dialog. This is what SelectEntity provides.
> In addition, it supports limiting the choices shown based on
> the context in which the field is shown.
> 
> https://vimeo.com/158063568
> 
> I've created a small demo application that can be found on smalltalkhub:
> 
> Gofer it
>smalltalkhubUser: 'StephanEggermont'
>project:'Ancestry';
>package: 'Ancestry';
>load.
> 
> It can be started with:
> 
> ANPersonList new openWithSpec.
> 
> Stephan
> 
> Thanks to Peter Uhnak for the design comments & debugging
> 
> 
> 
> 



---> 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] Re: Call for action for Roassal

2016-03-08 Thread Johan Fabry

Excellent, thanks a lot! I will take a look at that tomorrow.

> On Mar 7, 2016, at 11:34, Peter Uhnák <i.uh...@gmail.com> wrote:
> 
> Hi Johan,
> 
> I've just commited RTAnchorConstraint to latest Roassal, see class-side 
> example there.
> 
> I've been using it for my class diagrams where it works quite well, however 
> class diagrams are usually orthogonal-ish, which makes it a bit nicer.
>  
> 
> The Anchor will avoid intersecting it's own line, and one of the end shapes 
> (it should both but apparently I have a bug there...).
> It doesn't look at other lines, however you can specify on which side it 
> should be.
> 
> (You can also put the node label inside the circle with  `el @ (RTLabelled 
> new center)` but you probably know that.)
> 
> ​
> I have also a global edge labeling layout which produces good placement… but 
> it's slow as hell… I need to write a fast flow alogrithm…
> 
> Also the Anchor currently doesn't work with self-edges. On the other hand 
> Roassal doesn't have self-edges yet so it shouldn't be a problem. :)
> 
> Peter
> 
> 
> On Mon, Mar 7, 2016 at 2:34 PM, Johan Fabry <jfa...@dcc.uchile.cl 
> <mailto:jfa...@dcc.uchile.cl>> wrote:
> 
> Better late than never :-) (working on the holidays backlog)
> 
> I only have one request: better positioning on labels of nodes and edges. For 
> example see the image: three of the four labels are badly positioned because 
> the bounding box of their text is intersected by one or more edges.
> 
> 
> I know that to solve this generally is hard, but for simple cases like this 
> it should be possible. 
> 
> Ah, and it should work well with animations and dragging of course ;-)
> 
>> On Feb 24, 2016, at 05:51, Alexandre Bergel <alexandre.ber...@me.com 
>> <mailto:alexandre.ber...@me.com>> wrote:
>> 
>> Dear community,
>> 
>> As you may have seen, Roassal has entered a stabilization phase. The book 
>> AgileVisualization.com <http://agilevisualization.com/> will soon be 
>> released. After its release, Roassal will go over a new development phase. 
>> In order to prepare it, I am asking this question:
>> 
>>  What are the 3 aspects you would like to see improved in Roassal?
>> 
>> You can answer publicly or by sending private messages.
>> 
>> Kind regards,
>> Alexandre
>> -- 
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu <http://www.bergel.eu/>
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>> 
>> 
>> 
>> _______
>> Moose-dev mailing list
>> moose-...@list.inf.unibe.ch <mailto:moose-...@list.inf.unibe.ch>
>> https://www.list.inf.unibe.ch/listinfo/moose-dev 
>> <https://www.list.inf.unibe.ch/listinfo/moose-dev>
>> 
> 
> 
> 
> ---> Save our in-boxes! http://emailcharter.org <http://emailcharter.org/> 
> <---
> 
> Johan Fabry   -   http://pleiad.cl/~jfabry <http://pleiad.cl/~jfabry>
> PLEIAD and RyCh labs  -  Computer Science Department (DCC)  -  University of 
> Chile
> 
> 
> ___
> Moose-dev mailing list
> moose-...@list.inf.unibe.ch <mailto:moose-...@list.inf.unibe.ch>
> https://www.list.inf.unibe.ch/listinfo/moose-dev 
> <https://www.list.inf.unibe.ch/listinfo/moose-dev>
> 
> 



---> 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] Call for action for Roassal

2016-03-07 Thread Johan Fabry

Better late than never :-) (working on the holidays backlog)

I only have one request: better positioning on labels of nodes and edges. For 
example see the image: three of the four labels are badly positioned because 
the bounding box of their text is intersected by one or more edges.


I know that to solve this generally is hard, but for simple cases like this it 
should be possible. 

Ah, and it should work well with animations and dragging of course ;-)

> On Feb 24, 2016, at 05:51, Alexandre Bergel <alexandre.ber...@me.com> wrote:
> 
> Dear community,
> 
> As you may have seen, Roassal has entered a stabilization phase. The book 
> AgileVisualization.com will soon be released. After its release, Roassal will 
> go over a new development phase. In order to prepare it, I am asking this 
> question:
> 
>   What are the 3 aspects you would like to see improved in Roassal?
> 
> You can answer publicly or by sending private messages.
> 
> Kind regards,
> Alexandre
> -- 
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
> 
> 
> 
> ___
> Moose-dev mailing list
> moose-...@list.inf.unibe.ch
> https://www.list.inf.unibe.ch/listinfo/moose-dev
> 



---> 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] Is there a way to display Spec widgets in a ListModel?

2016-03-02 Thread Johan Fabry

For me, a list should just hold ‘dumb’ items where the kinds of actions you can 
do are limited to e.g. a simple context menu. Otherwise if you need complex 
actions or multiple nested widgets et cetera, the ListModel implementation and 
API will become too complicated.

I instead think that what you want is something that should be taken care of by 
dynamic spec:
(1) you make a ComposableModel subclass that holds all the widgets for one item 
of your list, 
(2) you make your own ‘list widget’ that uses dynamic spec to dynamically 
add/remove instances of (1) in a one column layout.

Note that I have never tried this. As far as I understand, this should mostly 
work. When there will be a need for a vertical scrollbar I don’t think it will 
appear. If this is the case, dynamic spec should be extended with this support.

I think that in general, dynamic spec and layouting of widgets could benefit of 
some work. But this is a complex topic and I do not have the time to tackle it, 
sadly.

> On Mar 2, 2016, at 17:44, Julien Delplanque <jul...@tamere.eu> wrote:
> 
> This: [1] is what I would like to do.
> I found it in  an old thread: [2] but it is a prototype. I wondered if there 
> was an object able to do it in the framework :-)...
> 
> Julien
> 
> Links:
> [1]: http://ijintek.fr/wiki/doku.php?id=spec_examples#listview_example
> [2]: http://forum.world.st/Spec-question-td4741608.html#a4747231
> 
> On 02/03/16 21:31, Johan Fabry wrote:
>> I never tried anything like this, I do not think it is possible.
>> 
>> What you are trying to do seems strange to me, what is the use case you want 
>> to implement?
>> 
>>> On Mar 2, 2016, at 17:06, Julien Delplanque <jul...@tamere.eu> wrote:
>>> 
>>> Hi everyone,
>>> 
>>> I can't find how to display Spec widgets in a ListModel, is it possible?
>>> 
>>> I would like to have a list model holding, at each row, a TextModel and a 
>>> ButtonModel.
>>> 
>>> Thanks in advance,
>>> 
>>> Julien
>>> 
>>> 
>> 
>> 
>> ---> Save our in-boxes! http://emailcharter.org <---
>> 
>> Johan Fabry   -   http://pleiad.cl/~jfabry
>> PLEIAD and RyCh labs  -  Computer Science Department (DCC)  -  University of 
>> Chile
>> 
>> 
> 
> 
> 



---> 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] Is there a way to display Spec widgets in a ListModel?

2016-03-02 Thread Johan Fabry

I never tried anything like this, I do not think it is possible.

What you are trying to do seems strange to me, what is the use case you want to 
implement?

> On Mar 2, 2016, at 17:06, Julien Delplanque <jul...@tamere.eu> wrote:
> 
> Hi everyone,
> 
> I can't find how to display Spec widgets in a ListModel, is it possible?
> 
> I would like to have a list model holding, at each row, a TextModel and a 
> ButtonModel.
> 
> Thanks in advance,
> 
> Julien
> 
> 



---> 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] CMD/CTRL-B for browsing?

2016-03-02 Thread Johan Fabry

I am a co-heretic with Doru.

In domain-specific languages built on top of Pharo you are faced exactly with 
what Doru is saying. I see these issues in my work on Live Robot Programming 
(and stuff before that). The proposed change to Spotter would be a good 
solution to keep all browsing options. 

> On Mar 2, 2016, at 10:40, Tudor Girba <tu...@tudorgirba.com> wrote:
> 
> Hi,
> 
> Hmm.
> 
> I understand that what I will say is heresy, but this behavior is really not 
> wanted :). At least by me.
> 
> Let me explain.
> 
> The reason why we use a different font for code is exactly to document where 
> the code related behavior is expected. If we have code related shortcuts 
> everywhere, two things happen:
> - we impose code shortcuts everywhere, even in pieces of text that should 
> have nothing to do with code.
> - we either have them present in contextual menus, or we do not document 
> their existence. Either situations are not nice.
> 
> I understand that this is how things worked for 20 years, but it is a 
> limiting behavior that does not allow us to build new tools easily. I know 
> that people use those text editors to enter some name and then press a 
> shortcut to browse, but now we have Spotter that can do the same thing a 
> little better.
> 
> Here is the alternative:
> - whenever we have a selected piece of text, and we press Shift+Enter, we get 
> that piece of text in Spotter filled by default
> - then using the shortcuts, we can browse what we want
> 
> This is not yet implemented, but I think it can prove to become a new reflex 
> that will solve the problems uniformly without imposing hardcoded shortcuts 
> everywhere.
> 
> Please feel free to shoot :)
> 
> Cheers,
> Doru
> 


---> 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] A Spec widget to hold non-editable multi-lines text?

2016-02-24 Thread Johan Fabry
Hello Julien,

have you tried configuring it with enabled: false ?

> On Feb 24, 2016, at 13:24, Julien Delplanque <jul...@tamere.eu> wrote:
> 
> Hello,
> 
> I wonder if there is a Spec widget to hold non-editable multi-line text?
> 
> There is TextInputFieldModel but the text is editable.
> 
> Thanks in advance,
> 
> Julien
> 
> 



---> 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] Simple question about Spec

2016-02-04 Thread Johan Fabry

Yes, please do that! I would do it myself but I’m on holiday this month and not 
allowed to touch the computer much ;-)

> On Feb 4, 2016, at 09:10, Stephan Eggermont <step...@stack.nl> wrote:
> 
> On 04-02-16 08:28, Julien Delplanque wrote:
>> To match my needs, I simply added an extension to WindowModel with the
>> message #activate.
> 
> Just create an issue and fix it in place and put a slice in the inbox.
> You will not be the only one needing it.
> 
> Stephan
> 
> 
> 
> 



---> 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] Another question about Spec

2016-02-04 Thread Johan Fabry

I don’t know the details of drag and drop, but it seems that you get the source 
widget as well as an argument of the block. From there you can get the 
selectedItem, which should be the one that you are dragging I suppose. Can you 
confirm that this works?

> On Feb 4, 2016, at 04:38, Julien Delplanque <jul...@tamere.eu> wrote:
> 
> Hey,
> 
> I use drag and drop between two lists in a project and I read this tutorial 
> [1] to learn how to do it.
> 
> My question is: Is there a way to have another object than a String as 
> passengers in #acceptDropBlock: (I get passengers the same way as in the 
> tutorial i.e sending #passenger to transfer object) like the objects really 
> in the list? Because if I use #displayBlock: it became difficult to be sure I 
> retrieve the object I dropped in the source list...
> 
> Thanks in advance,
> 
> Julien
> 
> [1]: http://spec.st/docs/drag_n_drop/
> 
> 



---> 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] Scrollbar in Spec layout

2016-02-04 Thread Johan Fabry

If I understand correctly, you are adding a lot of labels dynamically to the 
window, and you want a scrollbar to appear to the window, correct?

I am afraid that this scenario is not supported by Spec. Instead you should use 
a list and add items there. Then you will get the scroll bar for free. Note 
that you can configure the list so that nothing can be selected, so the visual 
look will be more or less the same. 

HTH,

> On Feb 3, 2016, at 09:49, LE Xuan Sang <xsang...@gmail.com> wrote:
> 
> Hello,
> 
> Here goes an example snapshot of my problem.
> 
> Cheer,
> 
> Sang
> 
> 
>> Date: Wed, 3 Feb 2016 16:59:01 +0800
>> From: Ben Coman <b...@openinworld.com>
>> To: Any question about pharo is welcome <pharo-users@lists.pharo.org>
>> Subject: Re: [Pharo-users] Scrollbar in Spec layout
>> Message-ID:
>>  <caprobtmem_aydpocfrptcqga3xx7mmdo67w5bmghsc50q69...@mail.gmail.com>
>> Content-Type: text/plain; charset=UTF-8
>> 
>> On Wed, Feb 3, 2016 at 4:45 PM, LE Xuan Sang <xsang...@gmail.com> wrote:
>>> Hello,
>>> 
>>> I use Spec (Pharo 4) to develop my GUI application.  In my Spec layout, one 
>>> of the columns has a large amount of rows (dynamic content indeed). So i 
>>> need it to be scrollable. Does anyone knows how to add a scrollbar to that 
>>> column?
>>> 
>>> Thanks,
>>> 
>>> LE Sang
>> 
>> I'm not sure if I'm the one to help you, but could you post a snapshot?
>> cheers -ben
>> 
>> 
> 



---> 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] Updated Pharo by Example

2016-01-18 Thread Johan Fabry

I may be old-fashioned, but I think that there is nothing wrong with using 
mailman for a list for developers. 

> On Jan 18, 2016, at 13:24, Offray Vladimir Luna Cárdenas <off...@riseup.net> 
> wrote:
> 
> 
> 
> On 18/01/16 03:59, David Allouche wrote:
>> Send an email to pharo-users-requ...@lists.pharo.org 
>> <mailto:pharo-users-requ...@lists.pharo.org> with subject "unsubscribe" from 
>> the subscribed address.
>> 
>> mailto:pharo-users-requ...@lists.pharo.org?subject=unsubscribe 
>> <mailto:pharo-users-requ...@lists.pharo.org?subject=unsubscribe>
>> 
>> To all: it would be nice to switch away from Mailman to something mere 
>> mortals can use. It's not 2000 any more.
>> 
>> 
> 
> But please... let's not make it google groups. The way google hides you can 
> subscribe *without* having a Google account seems to "business and data 
> cropping oriented" to say the least.
> 
> Cheers,
> 
> Offray



---> 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] Spec: Populating a playground with a particular content (was Re: Spec: Binding widgets how to)

2016-01-16 Thread Johan Fabry

Ah this is actually a Glamour question: If I have a GTPlayground, how do I set 
its content programmatically? I have been able to do it with something like the 
following:

| play |
“play is the GTPlayground instance"
play := (GTPlayground new openOn: GTPlayPage new) model.
play entity saveContent: '42'.
play update.

I don’t know if this is the officially approved way of doing it, maybe the 
Glamour crew can enlighten us.

> On Jan 14, 2016, at 18:34, Nicolai Hess <nicolaih...@gmail.com> wrote:
> 
> but if I try running the interface with this I get: "MessageNotUnderstood: 
> GlamourPresentationModel>>content:", so I think that something more is needed 
> to create Playgrounds in the Spec-Glamour that are pre-populated with content.
> 
> How can I create a playground inside a Spec-Glamour interface that is already 
> populated with a given content?
> 
> 
> I would expect (content is the GlamourPresentationModel)
> 
> content glmPres codePresentation text: 'new text'.
> 
> but it does not work.



---> 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] Spec: Populating a playground with a particular content (was Re: Spec: Binding widgets how to)

2016-01-16 Thread Johan Fabry

Ah, sorry for the confusion, for the sake of the example I oversimplified 
things. Let’s say that I have a GTPlayground instance that has been around for 
some time, and then I want to change its content. What should I do?

| play |
“play is the GTPlayground instance"
play := (GTPlayground new openOn: GTPlayPage new) model.

“… lots of things happen … the world turns … sun and moon go up and down … "

play entity saveContent: '42'.
play update.

Still like this ?

> On Jan 16, 2016, at 12:27, Tudor Girba <tu...@tudorgirba.com> wrote:
> 
> Here is a simpler way:
> GTPlayground new openOn: (GTPlayPage new content: '42’)
> 
> Cheers,
> Doru
> 
>> On Jan 16, 2016, at 4:23 PM, Johan Fabry <jfa...@dcc.uchile.cl> wrote:
>> 
>> 
>> Ah this is actually a Glamour question: If I have a GTPlayground, how do I 
>> set its content programmatically? I have been able to do it with something 
>> like the following:
>> 
>> | play |
>> “play is the GTPlayground instance"
>> play := (GTPlayground new openOn: GTPlayPage new) model.
>> play entity saveContent: '42'.
>> play update.
>> 
>> I don’t know if this is the officially approved way of doing it, maybe the 
>> Glamour crew can enlighten us.
>> 
>>> On Jan 14, 2016, at 18:34, Nicolai Hess <nicolaih...@gmail.com> wrote:
>>> 
>>> but if I try running the interface with this I get: "MessageNotUnderstood: 
>>> GlamourPresentationModel>>content:", so I think that something more is 
>>> needed to create Playgrounds in the Spec-Glamour that are pre-populated 
>>> with content.
>>> 
>>> How can I create a playground inside a Spec-Glamour interface that is 
>>> already populated with a given content?
>>> 
>>> 
>>> I would expect (content is the GlamourPresentationModel)
>>> 
>>> content glmPres codePresentation text: 'new text'.
>>> 
>>> but it does not work.
>> 
>> 
>> 
>> ---> Save our in-boxes! http://emailcharter.org <---
>> 
>> Johan Fabry   -   http://pleiad.cl/~jfabry
>> PLEIAD and RyCh labs  -  Computer Science Department (DCC)  -  University of 
>> Chile
>> 
> 
> --
> www.tudorgirba.com
> www.feenk.com
> 
> "Problem solving efficiency grows with the abstractness level of problem 
> understanding."
> 
> 
> 
> 
> 
> 



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

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




[Pharo-users] Pharo 5 new vm crash on window resize

2016-01-16 Thread Johan Fabry
Hi all,

this just happened to me: I opened a new image (today’s build), resized it and 
the VM segfaulted. I am on MacOS. crash.dmp is in attachment. I have been 
unable to reproduce, sadly. Is this a known issue or should I add a new bug 
report ?




crash.dmp
Description: Binary data


---> 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] Spec: Populating a playground with a particular content (was Re: Spec: Binding widgets how to)

2016-01-16 Thread Johan Fabry

Well that’s actually much easier. :-) What you need to do is to use the 
presentationClass:startOn: API method.

| ui |
ui := GlamourPresentationModel new.
ui presentationClass: GTPlayground startOn: (GTPlayPage new saveContent: '42').
ui openWithSpec

I just realized that this was not clear from the examples in the class comment. 
I have updated the class comment to reflect this.

I hope this resolves all your issues!

> On Jan 16, 2016, at 14:24, Offray Vladimir Luna Cárdenas <off...@riseup.net> 
> wrote:
> 
> Hi,
> 
> I'm still kind of lost here. If I try with these approaches I get a *new* 
> GTPlayground window populated with content, instead of an embedded one. How 
> can I made this GTPlayPage one that is embedded in a spec glamour interface, 
> like the one in the minimalist example: a dictionary with two keys/values: 
> one which is shown as text and other that is shown as a playground, both 
> populated with the content in the dict values and both, embedded in a widget 
> instead of on separate windows. Is this possible with the current 
> Spec-Glamour implementation?, if not how can be it extended to make this 
> happen?
> 
> Thanks,
> 
> Offray
> 
> On 16/01/16 10:36, Johan Fabry wrote:
>> Ah, sorry for the confusion, for the sake of the example I oversimplified 
>> things. Let’s say that I have a GTPlayground instance that has been around 
>> for some time, and then I want to change its content. What should I do?
>> 
>> | play |
>> “play is the GTPlayground instance"
>> play := (GTPlayground new openOn: GTPlayPage new) model.
>> 
>> “… lots of things happen … the world turns … sun and moon go up and down … "
>> 
>> play entity saveContent: '42'.
>> play update.
>> 
>> Still like this ?
>> 



---> 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] Pharo Docs website broken

2016-01-11 Thread Johan Fabry

I better understand the reason for existence of pharodocs, thanks! I also 
understand that you want to keep it.

BUT: please keep in mind that having bad documentation is actually worse than 
not having any documentation at all. So ideally you would regenerate the site 
tonight before you go to sleep. :-)
 
> On Jan 11, 2016, at 10:41, Esteban Lorenzano <esteba...@gmail.com> wrote:
> 
> well… maintenance is (usually) just run the generation process. 
> Some months ago Guille made a simplified version and I was thinking on just 
> load it and execute it… they go to sleep :)
> 
> the reasons for pharodocs to be there are not so important and nothing will 
> change a lot if removed. But I would keep it anyway, if possible. 
> 
> Esteban
> 
>> On 11 Jan 2016, at 14:37, Johan Fabry <jfa...@dcc.uchile.cl 
>> <mailto:jfa...@dcc.uchile.cl>> wrote:
>> 
>> I never used Pharodoc, I don’t really see the point. And apparently I am not 
>> alone. So, I have a provocative question: why don’t you just remove it?
>> 
>> It is broken now and it will take energy to fix, and this energy can be much 
>> better spent elsewhere. Plus it will take maintenance time and energy at 
>> some point in the future, it is probable that it will break again at some 
>> point, since the www behaves like this. Just get rid of this burden.



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

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



  1   2   3   4   >