Re: [Pharo-users] 64 bit version

2014-04-02 Thread Andres Valloud
And in Windows land, "long" is 32 bits even for 64 bit apps... Even after you're done with the VM part, someone will have to go audit all the external interfaces and make sure they really follow the manual. On 4/1/14 21:24 , p...@highoctane.be wrote: How would that work? Would this be a 32 bi

Re: [Pharo-users] Question on style

2014-04-02 Thread Damien Cassou
Hi Nacho, On Wed, Apr 2, 2014 at 6:35 AM, nacho <0800na...@gmail.com> wrote: > Would you consider this good code? > Would you change something? or re-arrange the code? > Some random comments: - your class models 2 roles: a quadratric equation and an algorithm to find roots. And there are instan

Re: [Pharo-users] deep into pharo(esug 2013) translate to korean draft version.

2014-04-02 Thread Damien Cassou
On Wed, Apr 2, 2014 at 4:20 AM, peter yoo wrote: > http://trans.onionmixer.net/mediawiki/index.php?title=DeepintoPharo impressive. Thanks -- Damien Cassou http://damiencassou.seasidehosting.st "Success is the ability to go from one failure to another without losing enthusiasm." Winston Chur

Re: [Pharo-users] Rewiting code: doc?

2014-04-02 Thread p...@highoctane.be
Now I do have a ton of new symbols in autocompletion but no class has been renamed. 2.0 image... Le 2 avr. 2014 08:18, "Hernán Morales Durand" a écrit : > RBClassRegexRefactoring new > renameClasses; > replace: '^XX(.*)$' with: 'ZZ$1' ignoreCase: false; > execute. > > cheers, > > Hernán >

Re: [Pharo-users] deep into pharo(esug 2013) translate to korean draft version.

2014-04-02 Thread peter yoo
pdf version? but i dant hava LaTeX file. and may original version use LaTeX. but im using xetex. (because LaTeX ko-fint process so ugly in linux. but xetex is ok. same windows) wiki to pdf file can make. but ok? wiki-pdf look no beautiful.

[Pharo-users] Few questions about Spec (instance specific layout and skinning)

2014-04-02 Thread Thomas Bany
Hi ! First, I apologyse for the wall of text. I'm trying my hands at Spec and I have few questions: - How can I implement an instance-dependent layout ? Regarding the layout method lookup, the documentation states that it "starts on instance side, which allows a UI to have a more specific la

[Pharo-users] changes and sources file availability

2014-04-02 Thread Usman Bhatti
Hello, In Pharo 2.0, we could enforce the image not to look for sources and changes file at the startup with: SmalltalkImage checkChangesFileAvailability: false; checkSourcesFileAvailability: false. I could not found these selectors anymore in my Pharo 3.0 image. Clement mentioned

Re: [Pharo-users] deep into pharo(esug 2013) translate to korean draft version.

2014-04-02 Thread Damien Cassou
On Wed, Apr 2, 2014 at 11:59 AM, peter yoo wrote: > wiki to pdf file can make. but ok? wiki-pdf look no beautiful. maybe just tell us when you want us to put the url on our website and I will do it. You can email me privately to be sure. Thanks again, nice contribution -- Damien Cassou http:/

[Pharo-users] lasergame problem with Blankcell

2014-04-02 Thread Roelof Wobben
Hello, On the first part I have to make a class named BlankCell which is a subclass of TestCase. So far no problem. But when you are on the MirrorCell part BlankCell must be a subclass of Cell. But then the tests will fail because should: cannot be found. The manual says nothing about that

Re: [Pharo-users] lasergame problem with Blankcell

2014-04-02 Thread Camille Teruel
On 2 avr. 2014, at 13:21, Roelof Wobben wrote: > Hello, > > On the first part I have to make a class named BlankCell which is a subclass > of TestCase. > So far no problem. > But when you are on the MirrorCell part BlankCell must be a subclass of Cell. > But then the tests will fail because s

Re: [Pharo-users] lasergame problem with Blankcell

2014-04-02 Thread Nicolai Hess
2014-04-02 13:21 GMT+02:00 Roelof Wobben : > Hello, > > On the first part I have to make a class named BlankCell which is a > subclass of TestCase. > So far no problem. > No, firstly, all cells are just subclasses of Object ( http://squeak.preeminent.org/tut2007/html/015.html). And in step http:

Re: [Pharo-users] lasergame problem with Blankcell

2014-04-02 Thread Mark Rizun
Hi, You probably misunderstood the task. On the first part I have to make a class named BlankCell which is a > subclass of TestCase. > You had to create the class *BlankCellTestCase* (not BlankCell) which is a subclass of *TestCase*. BlankCell and BlankCellTestCase are two different classes. -B

Re: [Pharo-users] lasergame problem with Blankcell

2014-04-02 Thread Roelof Wobben
Camille Teruel schreef op 2-4-2014 13:40: On 2 avr. 2014, at 13:21, Roelof Wobben wrote: Hello, On the first part I have to make a class named BlankCell which is a su

Re: [Pharo-users] lasergame problem with Blankcell

2014-04-02 Thread Roelof Wobben
Mark Rizun schreef op 2-4-2014 13:51: Hi, You probably misunderstood the task.  On the first part I have to make a class named BlankCell which is a su

Re: [Pharo-users] lasergame problem with Blankcell

2014-04-02 Thread Mark Rizun
> > And only on this method the test fail on should: > > testCellOnState > | cell | > cell := BlankCell new. > cell should: [ cell isOff ]. > cell shouldnt: [ cell isOn ]. > Yes it does, inasmuch on the bottom of this page ( http://squeak.preeminent.org/tut2007/html/017.htm

Re: [Pharo-users] lasergame problem with Blankcell

2014-04-02 Thread Roelof Wobben
Mark Rizun schreef op 2-4-2014 14:22: And only on this method the test fail on should: testCellOnState   | cell |   cell := BlankCell

Re: [Pharo-users] Question on style

2014-04-02 Thread nacho
Damien, Thanks a lot for your comments and the time taken to review the code. It makes a lot of sense what you said, and it's a great aid in learning to not only solve a given problem but also to do it with style and in a better Smalltalk way. I will refactor this to reflect your suggestions. I re

Re: [Pharo-users] Few questions about Spec (instance specific layout and skinning)

2014-04-02 Thread Benjamin
On 02 Apr 2014, at 12:10, Thomas Bany wrote: > Hi ! > > First, I apologyse for the wall of text. > > I'm trying my hands at Spec and I have few questions: > How can I implement an instance-dependent layout ? The usual solution is to have a method looking like this on instance side rebuildMyLay

Re: [Pharo-users] lasergame problem with Blankcell

2014-04-02 Thread Mark Rizun
Does this test fails to assert something or it throws you some error? 2014-04-02 15:27 GMT+03:00 Roelof Wobben : > Mark Rizun schreef op 2-4-2014 14:22: > > And only on this method the test fail on should: >> >> testCellOnState >> | cell | >> cell := BlankCell new. >> cell s

Re: [Pharo-users] lasergame problem with Blankcell

2014-04-02 Thread Roelof Wobben
Mark Rizun schreef op 2-4-2014 14:58: Does this test fails to assert something or it throws you some error? Like I said earlier it fails with this message: MessageNotUnderstood: BlankCell >> should. Which I find wierd because I use should: also on the other test methods off BlankCell and n

Re: [Pharo-users] lasergame problem with Blankcell

2014-04-02 Thread Mark Rizun
Could you give me the code of test that fails? 2014-04-02 16:05 GMT+03:00 Roelof Wobben : > Mark Rizun schreef op 2-4-2014 14:58: > > Does this test fails to assert something or it throws you some error? >> >> > Like I said earlier it fails with this message: > > MessageNotUnderstood: BlankCell

Re: [Pharo-users] lasergame problem with Blankcell

2014-04-02 Thread Roelof Wobben
Mark Rizun schreef op 2-4-2014 15:07: Could you give me the code of test that fails? I can but I did already. The code is : testCellOnState | cell | cell := BlankCell new. cell should: [ cell isOff ]. cell shouldnt: [ cell isOn ]. And this is a code which succeeced

Re: [Pharo-users] lasergame problem with Blankcell

2014-04-02 Thread Mark Rizun
The mistake is simple. You have to write as follows (just replace cell for self in two lines before should and shouldnt): testCellOnState | cell | cell := BlankCell new. self should: [ cell isOff ]. self shouldnt: [ cell isOn ]. 2014-04-02 16:12 GMT+03:00 Roelof Wobben

Re: [Pharo-users] Question on style

2014-04-02 Thread nacho
Well here is again, the refactored version. "The idea is to have a class to calculate quadratic equations. This second draft still only calculates real roots (leaving aside imaginary roots). But thanks to Damien Cassou I think it has a better style. A QuadraticEquation is a class used to solve Qu

[Pharo-users] Drag and drop items between list views

2014-04-02 Thread MartinW
Hi, i have to make a UI where users can sort items (sentences) into different collections by dragging and dropping them between list views. Is this possible with the widgets currently available in Pharo? M. -- View this message in context: http://forum.world.st/Drag-and-drop-items-between-list-

Re: [Pharo-users] lasergame problem with Blankcell

2014-04-02 Thread Roelof Wobben
Mark Rizun schreef op 2-4-2014 15:16: The mistake is simple. You have to write as follows (just replace cell for self in two lines before should and shouldnt): testCellOnState       | cell |  

Re: [Pharo-users] Drag and drop items between list views

2014-04-02 Thread Goubier Thierry
Hi Martin, yes, most list-like widgets can drag and drop. Feedback when inserting items in lists could be improved, however (i.e. you can drop on a list item, but I've never seen the feedback for dropping between list items). Thierry Le 02/04/2014 16:09, MartinW a écrit : Hi, i have to make

Re: [Pharo-users] lasergame problem with Blankcell

2014-04-02 Thread Mark Rizun
That is really wierd:) 2014-04-02 17:17 GMT+03:00 Roelof Wobben : > Mark Rizun schreef op 2-4-2014 15:16: > > The mistake is simple. You have to write as follows (just replace cell for > self in two lines before should and shouldnt): > > testCellOnState > | cell | > cell := BlankCe

Re: [Pharo-users] lasergame problem with Blankcell

2014-04-02 Thread Camille Teruel
On 2 avr. 2014, at 16:27, Mark Rizun wrote: > That is really wierd:) > > > 2014-04-02 17:17 GMT+03:00 Roelof Wobben : > Mark Rizun schreef op 2-4-2014 15:16: >> The mistake is simple. You have to write as follows (just replace cell for >> self in two lines before should and shouldnt): >> >>

Re: [Pharo-users] Question on style

2014-04-02 Thread Camille Teruel
Hi Nacho, I wouldn't throw an error because otherwise one must know beforehand that an equation is non-resolvable or must use #on:do: everywhere. Since that when you ask to resolve an equation you get back a collection of solutions, a non-resolvable equation could just return an empty collection

[Pharo-users] leansleft problem

2014-04-02 Thread Roelof Wobben
If I understood everything well on page 26 my Cell initialize must look like this: initialize super initialize. self initializeActiveSegments. self initializeExitSides. self leanleft. The Blankcell initialize must look like this : initialize super initialize. self initi

Re: [Pharo-users] leansleft problem

2014-04-02 Thread Nicolai Hess
2014-04-02 16:40 GMT+02:00 Roelof Wobben : > If I understood everything well on page 26 my Cell initialize must look > like this: > > initialize > super initialize. > self initializeActiveSegments. > self initializeExitSides. > self leanleft. > > The Blankcell initialize must look

Re: [Pharo-users] Drag and drop items between list views

2014-04-02 Thread MartinW
I tried the following, but i do not know what to do in the acceptDropBlock. It seems the receiver in the block is only an item in a list, but how do i get the receiving list/collection? What i want to achieve is that a user can drag the '1' from list1 to list2 and the resulting collections will the

Re: [Pharo-users] leansleft problem

2014-04-02 Thread Roelof Wobben
Nicolai Hess schreef op 2-4-2014 17:05: 2014-04-02 16:40 GMT+02:00 Roelof Wobben : If I understood everything well on page 26 my Cell initialize must look like this:

Re: [Pharo-users] Drag and drop items between list views

2014-04-02 Thread Goubier Thierry
Ok, look at that code: | collection1 collection2 list1 list2 | collection1 := #(1 2 3 4 5) asOrderedCollection. collection2 := #($a $b $c $d $e) asOrderedCollection. list1 := ListModel new. list1 items: collection1. list1 dragEnabled: true.

Re: [Pharo-users] Drag and drop items between list views

2014-04-02 Thread MartinW
Thank you. This is a step forward. The thing is i can't hardcode the collections. In the end product i don't have two but seven lists, so i must be able to detect in the acceptDropBlock which is the receiving collection/list. Goubier Thierry wrote > Ok, look at that code: > > | collection1

Re: [Pharo-users] leansleft problem

2014-04-02 Thread Ben Coman
Roelof Wobben wrote: If I understood everything well on page 26 my initialize methods must look like this: Cell >> initialize super initialize. self initializeActiveSegments. self initializeExitSides. self leanleft. BlankCell >> initialize super initialize. self initial

Re: [Pharo-users] Drag and drop items between list views

2014-04-02 Thread Goubier Thierry
Le 02/04/2014 17:40, MartinW a écrit : Thank you. This is a step forward. The thing is i can't hardcode the collections. In the end product i don't have two but seven lists, so i must be able to detect in the acceptDropBlock which is the receiving collection/list. I'll try to redo a halt in t

Re: [Pharo-users] Drag and drop items between list views

2014-04-02 Thread Goubier Thierry
Le 02/04/2014 17:40, MartinW a écrit : Thank you. This is a step forward. The thing is i can't hardcode the collections. In the end product i don't have two but seven lists, so i must be able to detect in the acceptDropBlock which is the receiving collection/list. Ok, the :source is your frie

Re: [Pharo-users] Question on style

2014-04-02 Thread nacho
Hi Nacho, I wouldn't throw an error because otherwise one must know beforehand that an equation is non-resolvable or must use #on:do: everywhere. Since that when you ask to resolve an equation you get back a collection of solutions, a non-resolvable equation could just return an empty collection,

Re: [Pharo-users] Question on style

2014-04-02 Thread Alain Busser
As solving an equation is basically giving the set of its solutions, I prefer to use a set to solve the equation.Instead of the OrederedCollection of course. It simplifies the algorithm if the discriminant is 0, because adding two times the same root yields a set with only one element, not the same

Re: [Pharo-users] Question on style

2014-04-02 Thread Camille Teruel
On 2 avr. 2014, at 18:45, nacho <0800na...@gmail.com> wrote: > > Hi Nacho, > > I wouldn't throw an error because otherwise one must know beforehand that an > equation is non-resolvable or must use #on:do: everywhere. > Since that when you ask to resolve an equation you get back a collection of

Re: [Pharo-users] Question on style

2014-04-02 Thread nacho
Alain, Very good idea. A Set it's much better than an OrderedCollection. Already changed that. Now when the solution is in both cases 0, it returns only (0) and not (0 0). And also intuitively I agree with you that the solutions of an equation are a set. Thanks! Nacho - Nacho Smalltalker ap

Re: [Pharo-users] Question on style

2014-04-02 Thread nacho
Camille, I now understood what you've said. It makes sense and I've changed it that way. The only thing I'm not happy with is that implementing: QuadraticEquation>>calculateRoots ^ self calculateRootsIfNone: [ self error: 'No real solution for the equation' ] Makes the debugger appear an

Re: [Pharo-users] Question on style

2014-04-02 Thread Alain Busser
Yes, and if there are no solution, you get an empty set instead of an error message. I find it more coherent, and simpler to use. On Wed, Apr 2, 2014 at 9:48 PM, nacho <0800na...@gmail.com> wrote: > Alain, > Very good idea. A Set it's much better than an OrderedCollection. Already > changed that

Re: [Pharo-users] Drag and drop items between list views

2014-04-02 Thread MartinW
First of all thank you for taking the time to explain all this to me! I already learned a lot about working with the spec widgets.. I still have a problem. The first version with the hardcoded collections did obviously change the original collections (that's the desired behaviour). Goubier Thierr

Re: [Pharo-users] Question on style

2014-04-02 Thread Ben Coman
nacho wrote: Camille, I now understood what you've said. It makes sense and I've changed it that way. The only thing I'm not happy with is that implementing: QuadraticEquation>>calculateRoots ^ self calculateRootsIfNone: [ self error: 'No real solution for the equation' ] Makes the deb

Re: [Pharo-users] Rewiting code: doc?

2014-04-02 Thread Hernán Morales Durand
2014-04-02 5:05 GMT-03:00 p...@highoctane.be : > Now I do have a ton of new symbols in autocompletion but no class has been > renamed. > > 2.0 image... > Works for me here in a clean 2.0 image.