Pharo-dev
By thread
pharo-dev@lists.pharo.org
By month
Messages by month
- ----- 2026 -----
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
November 2013
- 97 participants
- 1846 messages
Re: [Pharo-dev] New configuration for XMLWriter!
by Stéphane Ducasse
Strange I do not understand why it happened.
On Nov 28, 2013, at 6:35 AM, Tudor Girba <tudor(a)tudorgirba.com> wrote:
> Hi,
>
> The problem was that configuration of xml writer was referring to the old repository. Stephan and Diego fixed it in the meantime.
>
> Doru
>
>
> On Mon, Nov 25, 2013 at 8:38 PM, Stéphane Ducasse <stephane.ducasse(a)inria.fr> wrote:
> I published the package. It was probably in my package cache.
> Let me know if this is working.
>
>
> On Nov 25, 2013, at 10:41 AM, Tudor Girba <tudor(a)tudorgirba.com> wrote:
>
>> Hi Stef,
>>
>> ConfigurationOfXMLWriter does not work. The moose build fails because XML-Writer-Core-monty.5 does not seem to exist:
>>
>> FAILED->XML-Writer-Core-monty.5 [31mCould not resolve: XML-Writer-Core [XML-Writer-Core-monty.5] in /builds/workspace/moose-5.0/package-cache http://smalltalkhub.com/mc/Pharo/XMLWriter/main/
>>
>> I did not have time to look into the problem. Could you take a look?
>>
>> Doru
>>
>>
>>
>> On Sun, Nov 24, 2013 at 6:29 PM, Stéphane Ducasse <stephane.ducasse(a)inria.fr> wrote:
>> Hi guys
>>
>> I created a new configuration based on the work on monty for the XMLWriter. Please test and let us know.
>> In PharoExtras/XMLWriter and available via the configurationBrowser.
>>
>> Thanks Monty
>>
>> Stef
>> Working on the new configurationOfXMLParserâ¦.
>>
>>
>>
>> --
>> www.tudorgirba.com
>>
>> "Every thing has its own flow"
>
>
>
>
> --
> www.tudorgirba.com
>
> "Every thing has its own flow"
Nov. 29, 2013
Re: [Pharo-dev] Coordinates problem with Athens and Morphic while coding Hyperion
by Igor Stasenko
On 28 November 2013 22:49, kilon alios <kilon.alios(a)gmail.com> wrote:
> well I could ask you to give me access to those files , that would be a
> good start ;)
>
> I am so new to this google drive thing
>
> hehe.. me too.. apperently it doesn't wants to just attach files,
and need multiple more clicks to enable weird sharing, like sending a copy
is not
good enough :)
>
> On Thu, Nov 28, 2013 at 10:08 PM, Igor Stasenko <siguctua(a)gmail.com>wrote:
>
>>
>> BezierMorph.st.gz<https://docs.google.com/file/d/0B7dd-52sqS20SW9JMUxZREh1ZkJEc1UwZkNiYy1jbnZ…>
>>
>> Morphic-BezierCurve.st<https://docs.google.com/file/d/0B7dd-52sqS20LW5XV2NwaFpPeEJudFFGZ3ZsZFBxZC0…>
>>
>> On 28 November 2013 16:54, kilon alios <kilon.alios(a)gmail.com> wrote:
>>
>>> absolutely, more code mean deeper understanding how to be more dangerous
>>> as a coder
>>>
>>
>> here it is.. it took me some effort to find it, buried under piles of
>> other things.
>> i don't know which one is latest/working, and don't ask me how it works
>> .. it was long ago i was young and sky was blue :)
>>
>>
>> On Thu, Nov 28, 2013 at 4:16 PM, Igor Stasenko <siguctua(a)gmail.com>wrote:
>>
>>>
>>>
>>>
>>> On 28 November 2013 13:52, kilon alios <kilon.alios(a)gmail.com> wrote:
>>>
>>>> thats all I got I am afraid right now. A simple editing of a straight
>>>> line, but I am learning athens, roassal, morphic so it takes time. Its my
>>>> first with everything and my very first project with pharo. I am not aiming
>>>> for something super sophisticated, bezier lines, gradients, bitmaps etc
>>>> simple stuff but I am having so much fun with this project I wont give up
>>>> until I have it finished. :)
>>>>
>>>>
>>> btw, if you want, i got somewhere code for Bezier curve editing (in
>>> morphic)..
>>> it is not fully working, but at least something you can look at:
>>> - if i remember you can add control points and move them around.
>>>
>>>
>>>
>>>>
>>>> On Thu, Nov 28, 2013 at 2:30 PM, Alexandre Bergel <
>>>> alexandre.bergel(a)me.com> wrote:
>>>>
>>>>> Do you have more screenshots of Hyperion?
>>>>>
>>>>> Alexandre
>>>>> --
>>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>>>> Alexandre Bergel http://www.bergel.eu
>>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>>>
>>>>>
>>>>>
>>>>> On Nov 28, 2013, at 7:49 AM, kilon alios <kilon.alios(a)gmail.com>
>>>>> wrote:
>>>>>
>>>>> > Ok I have verified and indeed its not an Athens problem. My bad. The
>>>>> position of the morph is reported at 5@30 and the not the correct 0(a)0.So it looks like Morphic for some strange reason it offsets it.
>>>>> >
>>>>> > I knew about translateBy but I did not know about restoreAfter. so
>>>>> thank you.
>>>>> >
>>>>> > I prefer my version of the code because it makes clearer what I am
>>>>> trying to do. However ideally because I am drawing a box inside another box
>>>>> the best way would be to follow your approach and scale the second box
>>>>> using one shape instead of two I am currently doing. But thats the price I
>>>>> am paying from not knowing exactly how to do this.
>>>>> >
>>>>> > Also trying to painstakingly find the correct transform and scale
>>>>> values requires A LOT of testing . This is why I find a vector editor for
>>>>> Athens and Pharo absolutely essential. No coding can beat designing via
>>>>> mouse.
>>>>> >
>>>>> > On the other hand I could use Inkscape and import the svg to Athens
>>>>> , which what I am about to research. Designing all GUI elements by code is
>>>>> a very bad idea, but no less a learning experience.
>>>>> >
>>>>> > I will most probably move to Roassal too.
>>>>> >
>>>>> > As always thanks for the help.
>>>>> >
>>>>> >
>>>>> > On Thu, Nov 28, 2013 at 12:29 PM, Igor Stasenko <siguctua(a)gmail.com>
>>>>> wrote:
>>>>> > well, by default the athens canvas coordinate system matches morphic
>>>>> one..
>>>>> > but you know, it always hard to be sure, especially if you perform
>>>>> any local coordinate transformations before that morph has any chance to
>>>>> draw itself..
>>>>> >
>>>>> > You can figure this out easily: draw something at 0@0 and see where
>>>>> it is.
>>>>> > then draw something at morph's x@y position and see it too.
>>>>> >
>>>>> > btw, you know you don't have to create same paths over and over.
>>>>> > you can easily put static parts out of regularly (and costly)
>>>>> evaluated code:
>>>>> >
>>>>> > shape := canvas cacheAt: self "morph" ifAbsentPut: [
>>>>> > aCanvas createPath: [:path |
>>>>> > path relative.
>>>>> > " no move-to here *** path moveTo: ((self position x )+5)@(self
>>>>> position y);"
>>>>> > lineTo: 20@0;
>>>>> > cwArcTo: 5@5 angle: 45;
>>>>> > lineTo: 0@20;
>>>>> > cwArcTo: (-5)@5 angle: 45;
>>>>> > lineTo: (-20)@0;
>>>>> > cwArcTo: (-5)@(-5) angle: 45;
>>>>> > lineTo: 0@(-20);
>>>>> > cwArcTo: 5@(-5) angle: 45.
>>>>> > ].
>>>>> > ].
>>>>> >
>>>>> > "and here we're using coordinate transform to translate origin point
>>>>> to
>>>>> > given position, so it will be the starting point (0@0) of our shape"
>>>>> >
>>>>> > canvas pathTransform restoreAfter: [
>>>>> > canvas pathTransform translateBy:((self position x )+5)@(self
>>>>> position y).
>>>>> > canvas drawShape: shape.
>>>>> > ]
>>>>> >
>>>>> > by analogy you can cache all static pieces, just do something:
>>>>> >
>>>>> > shapes := canvas cacheAt: self ifAbsentPut: [ self
>>>>> constructStaticShapesOn: aCanvas ]
>>>>> >
>>>>> > where #constructStaticShapesOn: must answer an array of them.
>>>>> >
>>>>> >
>>>>> > On 28 November 2013 11:12, kilon alios <kilon.alios(a)gmail.com>
>>>>> wrote:
>>>>> > wow you guys are fast at replying :)
>>>>> >
>>>>> > I did
>>>>> >
>>>>> >
>>>>> > self changeProportionalLayout.
>>>>> > editButton := HypEditButton new .
>>>>> > editButton position: 0@0.
>>>>> > self addMorph: editButton fullFrame: #(0 0 0 0 0 0 100 100).
>>>>> >
>>>>> > I am afraid Igor I still see no change with your code.
>>>>> >
>>>>> > I like to note here, that when I first created the editButton as
>>>>> morph , it indeed placed it in correct place. A 0@0 placed it in top
>>>>> left corner as expected. But I did overide its DrawOn: with an empty
>>>>> method and used my own method to render it with Athens. So it looks like
>>>>> the problem is Athens related and not Morphic related or maybe a
>>>>> disagreement between Morphic and Athens.
>>>>> >
>>>>> > just for the record here is the code I use to render the
>>>>> HypEditButton morph
>>>>> >
>>>>> > render:aCanvas
>>>>> > |shape1 shape2 shape3 editButtonColor |
>>>>> > shape1 := aCanvas createPath: [:path |
>>>>> > path relative .
>>>>> >
>>>>> > path moveTo: ((self position x )+5)@(self position y);
>>>>> > lineTo: 20@0;
>>>>> > cwArcTo: 5@5 angle: 45;
>>>>> > lineTo: 0@20;
>>>>> > cwArcTo: (-5)@5 angle: 45;
>>>>> > lineTo: (-20)@0;
>>>>> > cwArcTo: (-5)@(-5) angle: 45;
>>>>> > lineTo: 0@(-20);
>>>>> > cwArcTo: 5@(-5) angle: 45.
>>>>> > ].
>>>>> >
>>>>> > shape2 := aCanvas createPath: [:path |
>>>>> > path relative .
>>>>> >
>>>>> > path moveTo: ((self position x +7))@((self position y
>>>>> +3));
>>>>> > lineTo: 18@0;
>>>>> > cwArcTo: 2@2 angle: 45;
>>>>> > lineTo: 0@20;
>>>>> > cwArcTo: (-2)@2 angle: 45;
>>>>> > lineTo: (-20)@0;
>>>>> > cwArcTo: (-2)@(-2) angle: 45;
>>>>> > lineTo: 0@(-20);
>>>>> > cwArcTo: 4@(-2) angle: 45.
>>>>> > ].
>>>>> > shape3 := aCanvas createPath: [:path |
>>>>> > path relative .
>>>>> >
>>>>> > path moveTo: ((self position x +15))@((self position y
>>>>> +10));
>>>>> >
>>>>> > cwArcTo: 5@5 angle: 90;
>>>>> > cwArcTo: (-5)@5 angle: 90;
>>>>> > cwArcTo: (-5)@(-5) angle: 90;
>>>>> > cwArcTo: 5@(-5) angle: 90.
>>>>> >
>>>>> >
>>>>> > ].
>>>>> >
>>>>> > ( editMode = true) ifTrue: [ editButtonColor := Color green]
>>>>> ifFalse: [ editButtonColor := Color red ].
>>>>> > (aCanvas setStrokePaint: editButtonColor) width: 1.
>>>>> >
>>>>> > aCanvas drawShape: shape1 .
>>>>> > aCanvas drawShape: shape2.
>>>>> > aCanvas setPaint: (editButtonColor alpha: 0.3 ).
>>>>> > aCanvas drawShape: shape3.
>>>>> >
>>>>> >
>>>>> >
>>>>> >
>>>>> >
>>>>> >
>>>>> > On Thu, Nov 28, 2013 at 12:03 PM, Igor Stasenko <siguctua(a)gmail.com>
>>>>> wrote:
>>>>> >
>>>>> >
>>>>> >
>>>>> > On 28 November 2013 10:59, kilon alios <kilon.alios(a)gmail.com>
>>>>> wrote:
>>>>> > just tried it, I see no change
>>>>> >
>>>>> > try:
>>>>> > self changeProportionalLayout
>>>>> >
>>>>> > editButton := HypEditButton new .
>>>>> > self addMorph: editButton fullFrame: #(0 0 0 0 0 0 100 100).
>>>>> >
>>>>> >
>>>>> > On Thu, Nov 28, 2013 at 11:54 AM, Benjamin <
>>>>> Benjamin.VanRyseghem.Pharo(a)gmail.com> wrote:
>>>>> > Can you try to do something like
>>>>> >
>>>>> > self changeProportionalLayout
>>>>> > before adding the morph ?
>>>>> >
>>>>> > Ben
>>>>> >
>>>>> > On 28 Nov 2013, at 10:51, kilon alios <kilon.alios(a)gmail.com> wrote:
>>>>> >
>>>>> >> So I have found some strange problems with my vector editor ,
>>>>> Hyperion.
>>>>> >>
>>>>> >> Hyperion is a Morph openInWindow. Code can be found in the class
>>>>> side of Hyperion>>open.
>>>>> >>
>>>>> >> The coordinate system when detecting events (mouseOver, mouseUp
>>>>> and mouseDown events of the Hyperion instance) looks like it takes to
>>>>> account also beyond the morph as coordinates as a result events happening
>>>>> at the top right edge of the morph where Hyperion is rendered is 6@30(
>>>>> which is the size of the window's title bar plus its borders). Thats ok, I
>>>>> have taken these offsets to account when computing the position of the
>>>>> mouse. I guess it uses the global coordinated and not the local coordinates
>>>>> of the morph.
>>>>> >>
>>>>> >> I am adding a button to control the edit mode of a line, when in
>>>>> edit mode handles for line's control points are shown and those handles can
>>>>> be dragged around to control the shape of the line , when off edit mode,
>>>>> the line will be able to be drag around (not implemented yet).
>>>>> >>
>>>>> >> My problem is that when I add that button as morph to the existing
>>>>> morph of Hyperion in 0@0 , it actually appears in 0@30 in local
>>>>> coordinated of the Hyperion moprh which in global coordinates it 6@60( 0@0+ 6@30+ 0@30= 6@60).
>>>>> Why is that ?
>>>>> >>
>>>>> >> I have no clue why I am getting an offset of 0@30 in local
>>>>> coordinates of the Hyperion morph.
>>>>> >>
>>>>> >> here is the picture showing a) how it looks like b) the code that
>>>>> set the position c) transcript showing mouse coordinates when clicked in
>>>>> the top left corner of Hyperion morph
>>>>> >> Hyperion coordinates problem.JPG
>>>>> >>
>>>>> >> if anyone wants to try the code himself the repo is here
>>>>> >>
>>>>> >> http://www.smalltalkhub.com/#!/~kilon/Hyperion
>>>>> >>
>>>>> >> To sum up, to place that button on top left, I will have to
>>>>> position it 0@(-30) which for me makes no sense at all.
>>>>> >>
>>>>> >> Please note that everything is rendered with Athens.
>>>>> >>
>>>>> >> Maybe I have messed up the code myself somewhere but I have looked
>>>>> it again and again I cant find a problem with my code.
>>>>> >
>>>>> >
>>>>> >
>>>>> >
>>>>> >
>>>>> > --
>>>>> > Best regards,
>>>>> > Igor Stasenko.
>>>>> >
>>>>> >
>>>>> >
>>>>> >
>>>>> > --
>>>>> > Best regards,
>>>>> > Igor Stasenko.
>>>>> >
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>>
>>> --
>>> Best regards,
>>> Igor Stasenko.
>>>
>>
>>
>>
>>
>> --
>> Best regards,
>> Igor Stasenko.
>>
>
>
--
Best regards,
Igor Stasenko.
Nov. 29, 2013
Re: [Pharo-dev] Coordinates problem with Athens and Morphic while coding Hyperion
by kilon alios
well I could ask you to give me access to those files , that would be a
good start ;)
I am so new to this google drive thing
On Thu, Nov 28, 2013 at 10:08 PM, Igor Stasenko <siguctua(a)gmail.com> wrote:
>
> BezierMorph.st.gz<https://docs.google.com/file/d/0B7dd-52sqS20SW9JMUxZREh1ZkJEc1UwZkNiYy1jbnZ…>
>
> Morphic-BezierCurve.st<https://docs.google.com/file/d/0B7dd-52sqS20LW5XV2NwaFpPeEJudFFGZ3ZsZFBxZC0…>
>
> On 28 November 2013 16:54, kilon alios <kilon.alios(a)gmail.com> wrote:
>
>> absolutely, more code mean deeper understanding how to be more dangerous
>> as a coder
>>
>
> here it is.. it took me some effort to find it, buried under piles of
> other things.
> i don't know which one is latest/working, and don't ask me how it works ..
> it was long ago i was young and sky was blue :)
>
>
> On Thu, Nov 28, 2013 at 4:16 PM, Igor Stasenko <siguctua(a)gmail.com> wrote:
>
>>
>>
>>
>> On 28 November 2013 13:52, kilon alios <kilon.alios(a)gmail.com> wrote:
>>
>>> thats all I got I am afraid right now. A simple editing of a straight
>>> line, but I am learning athens, roassal, morphic so it takes time. Its my
>>> first with everything and my very first project with pharo. I am not aiming
>>> for something super sophisticated, bezier lines, gradients, bitmaps etc
>>> simple stuff but I am having so much fun with this project I wont give up
>>> until I have it finished. :)
>>>
>>>
>> btw, if you want, i got somewhere code for Bezier curve editing (in
>> morphic)..
>> it is not fully working, but at least something you can look at:
>> - if i remember you can add control points and move them around.
>>
>>
>>
>>>
>>> On Thu, Nov 28, 2013 at 2:30 PM, Alexandre Bergel <
>>> alexandre.bergel(a)me.com> wrote:
>>>
>>>> Do you have more screenshots of Hyperion?
>>>>
>>>> Alexandre
>>>> --
>>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>>> Alexandre Bergel http://www.bergel.eu
>>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>>
>>>>
>>>>
>>>> On Nov 28, 2013, at 7:49 AM, kilon alios <kilon.alios(a)gmail.com> wrote:
>>>>
>>>> > Ok I have verified and indeed its not an Athens problem. My bad. The
>>>> position of the morph is reported at 5@30 and the not the correct 0(a)0.So it looks like Morphic for some strange reason it offsets it.
>>>> >
>>>> > I knew about translateBy but I did not know about restoreAfter. so
>>>> thank you.
>>>> >
>>>> > I prefer my version of the code because it makes clearer what I am
>>>> trying to do. However ideally because I am drawing a box inside another box
>>>> the best way would be to follow your approach and scale the second box
>>>> using one shape instead of two I am currently doing. But thats the price I
>>>> am paying from not knowing exactly how to do this.
>>>> >
>>>> > Also trying to painstakingly find the correct transform and scale
>>>> values requires A LOT of testing . This is why I find a vector editor for
>>>> Athens and Pharo absolutely essential. No coding can beat designing via
>>>> mouse.
>>>> >
>>>> > On the other hand I could use Inkscape and import the svg to Athens ,
>>>> which what I am about to research. Designing all GUI elements by code is a
>>>> very bad idea, but no less a learning experience.
>>>> >
>>>> > I will most probably move to Roassal too.
>>>> >
>>>> > As always thanks for the help.
>>>> >
>>>> >
>>>> > On Thu, Nov 28, 2013 at 12:29 PM, Igor Stasenko <siguctua(a)gmail.com>
>>>> wrote:
>>>> > well, by default the athens canvas coordinate system matches morphic
>>>> one..
>>>> > but you know, it always hard to be sure, especially if you perform
>>>> any local coordinate transformations before that morph has any chance to
>>>> draw itself..
>>>> >
>>>> > You can figure this out easily: draw something at 0@0 and see where
>>>> it is.
>>>> > then draw something at morph's x@y position and see it too.
>>>> >
>>>> > btw, you know you don't have to create same paths over and over.
>>>> > you can easily put static parts out of regularly (and costly)
>>>> evaluated code:
>>>> >
>>>> > shape := canvas cacheAt: self "morph" ifAbsentPut: [
>>>> > aCanvas createPath: [:path |
>>>> > path relative.
>>>> > " no move-to here *** path moveTo: ((self position x )+5)@(self
>>>> position y);"
>>>> > lineTo: 20@0;
>>>> > cwArcTo: 5@5 angle: 45;
>>>> > lineTo: 0@20;
>>>> > cwArcTo: (-5)@5 angle: 45;
>>>> > lineTo: (-20)@0;
>>>> > cwArcTo: (-5)@(-5) angle: 45;
>>>> > lineTo: 0@(-20);
>>>> > cwArcTo: 5@(-5) angle: 45.
>>>> > ].
>>>> > ].
>>>> >
>>>> > "and here we're using coordinate transform to translate origin point
>>>> to
>>>> > given position, so it will be the starting point (0@0) of our shape"
>>>> >
>>>> > canvas pathTransform restoreAfter: [
>>>> > canvas pathTransform translateBy:((self position x )+5)@(self
>>>> position y).
>>>> > canvas drawShape: shape.
>>>> > ]
>>>> >
>>>> > by analogy you can cache all static pieces, just do something:
>>>> >
>>>> > shapes := canvas cacheAt: self ifAbsentPut: [ self
>>>> constructStaticShapesOn: aCanvas ]
>>>> >
>>>> > where #constructStaticShapesOn: must answer an array of them.
>>>> >
>>>> >
>>>> > On 28 November 2013 11:12, kilon alios <kilon.alios(a)gmail.com> wrote:
>>>> > wow you guys are fast at replying :)
>>>> >
>>>> > I did
>>>> >
>>>> >
>>>> > self changeProportionalLayout.
>>>> > editButton := HypEditButton new .
>>>> > editButton position: 0@0.
>>>> > self addMorph: editButton fullFrame: #(0 0 0 0 0 0 100 100).
>>>> >
>>>> > I am afraid Igor I still see no change with your code.
>>>> >
>>>> > I like to note here, that when I first created the editButton as
>>>> morph , it indeed placed it in correct place. A 0@0 placed it in top
>>>> left corner as expected. But I did overide its DrawOn: with an empty
>>>> method and used my own method to render it with Athens. So it looks like
>>>> the problem is Athens related and not Morphic related or maybe a
>>>> disagreement between Morphic and Athens.
>>>> >
>>>> > just for the record here is the code I use to render the
>>>> HypEditButton morph
>>>> >
>>>> > render:aCanvas
>>>> > |shape1 shape2 shape3 editButtonColor |
>>>> > shape1 := aCanvas createPath: [:path |
>>>> > path relative .
>>>> >
>>>> > path moveTo: ((self position x )+5)@(self position y);
>>>> > lineTo: 20@0;
>>>> > cwArcTo: 5@5 angle: 45;
>>>> > lineTo: 0@20;
>>>> > cwArcTo: (-5)@5 angle: 45;
>>>> > lineTo: (-20)@0;
>>>> > cwArcTo: (-5)@(-5) angle: 45;
>>>> > lineTo: 0@(-20);
>>>> > cwArcTo: 5@(-5) angle: 45.
>>>> > ].
>>>> >
>>>> > shape2 := aCanvas createPath: [:path |
>>>> > path relative .
>>>> >
>>>> > path moveTo: ((self position x +7))@((self position y
>>>> +3));
>>>> > lineTo: 18@0;
>>>> > cwArcTo: 2@2 angle: 45;
>>>> > lineTo: 0@20;
>>>> > cwArcTo: (-2)@2 angle: 45;
>>>> > lineTo: (-20)@0;
>>>> > cwArcTo: (-2)@(-2) angle: 45;
>>>> > lineTo: 0@(-20);
>>>> > cwArcTo: 4@(-2) angle: 45.
>>>> > ].
>>>> > shape3 := aCanvas createPath: [:path |
>>>> > path relative .
>>>> >
>>>> > path moveTo: ((self position x +15))@((self position y
>>>> +10));
>>>> >
>>>> > cwArcTo: 5@5 angle: 90;
>>>> > cwArcTo: (-5)@5 angle: 90;
>>>> > cwArcTo: (-5)@(-5) angle: 90;
>>>> > cwArcTo: 5@(-5) angle: 90.
>>>> >
>>>> >
>>>> > ].
>>>> >
>>>> > ( editMode = true) ifTrue: [ editButtonColor := Color green] ifFalse:
>>>> [ editButtonColor := Color red ].
>>>> > (aCanvas setStrokePaint: editButtonColor) width: 1.
>>>> >
>>>> > aCanvas drawShape: shape1 .
>>>> > aCanvas drawShape: shape2.
>>>> > aCanvas setPaint: (editButtonColor alpha: 0.3 ).
>>>> > aCanvas drawShape: shape3.
>>>> >
>>>> >
>>>> >
>>>> >
>>>> >
>>>> >
>>>> > On Thu, Nov 28, 2013 at 12:03 PM, Igor Stasenko <siguctua(a)gmail.com>
>>>> wrote:
>>>> >
>>>> >
>>>> >
>>>> > On 28 November 2013 10:59, kilon alios <kilon.alios(a)gmail.com> wrote:
>>>> > just tried it, I see no change
>>>> >
>>>> > try:
>>>> > self changeProportionalLayout
>>>> >
>>>> > editButton := HypEditButton new .
>>>> > self addMorph: editButton fullFrame: #(0 0 0 0 0 0 100 100).
>>>> >
>>>> >
>>>> > On Thu, Nov 28, 2013 at 11:54 AM, Benjamin <
>>>> Benjamin.VanRyseghem.Pharo(a)gmail.com> wrote:
>>>> > Can you try to do something like
>>>> >
>>>> > self changeProportionalLayout
>>>> > before adding the morph ?
>>>> >
>>>> > Ben
>>>> >
>>>> > On 28 Nov 2013, at 10:51, kilon alios <kilon.alios(a)gmail.com> wrote:
>>>> >
>>>> >> So I have found some strange problems with my vector editor ,
>>>> Hyperion.
>>>> >>
>>>> >> Hyperion is a Morph openInWindow. Code can be found in the class
>>>> side of Hyperion>>open.
>>>> >>
>>>> >> The coordinate system when detecting events (mouseOver, mouseUp and
>>>> mouseDown events of the Hyperion instance) looks like it takes to account
>>>> also beyond the morph as coordinates as a result events happening at the
>>>> top right edge of the morph where Hyperion is rendered is 6@30( which
>>>> is the size of the window's title bar plus its borders). Thats ok, I have
>>>> taken these offsets to account when computing the position of the mouse. I
>>>> guess it uses the global coordinated and not the local coordinates of the
>>>> morph.
>>>> >>
>>>> >> I am adding a button to control the edit mode of a line, when in
>>>> edit mode handles for line's control points are shown and those handles can
>>>> be dragged around to control the shape of the line , when off edit mode,
>>>> the line will be able to be drag around (not implemented yet).
>>>> >>
>>>> >> My problem is that when I add that button as morph to the existing
>>>> morph of Hyperion in 0@0 , it actually appears in 0@30 in local
>>>> coordinated of the Hyperion moprh which in global coordinates it 6@60( 0@0+ 6@30+ 0@30= 6@60).
>>>> Why is that ?
>>>> >>
>>>> >> I have no clue why I am getting an offset of 0@30 in local
>>>> coordinates of the Hyperion morph.
>>>> >>
>>>> >> here is the picture showing a) how it looks like b) the code that
>>>> set the position c) transcript showing mouse coordinates when clicked in
>>>> the top left corner of Hyperion morph
>>>> >> Hyperion coordinates problem.JPG
>>>> >>
>>>> >> if anyone wants to try the code himself the repo is here
>>>> >>
>>>> >> http://www.smalltalkhub.com/#!/~kilon/Hyperion
>>>> >>
>>>> >> To sum up, to place that button on top left, I will have to position
>>>> it 0@(-30) which for me makes no sense at all.
>>>> >>
>>>> >> Please note that everything is rendered with Athens.
>>>> >>
>>>> >> Maybe I have messed up the code myself somewhere but I have looked
>>>> it again and again I cant find a problem with my code.
>>>> >
>>>> >
>>>> >
>>>> >
>>>> >
>>>> > --
>>>> > Best regards,
>>>> > Igor Stasenko.
>>>> >
>>>> >
>>>> >
>>>> >
>>>> > --
>>>> > Best regards,
>>>> > Igor Stasenko.
>>>> >
>>>>
>>>>
>>>>
>>>
>>
>>
>> --
>> Best regards,
>> Igor Stasenko.
>>
>
>
>
>
> --
> Best regards,
> Igor Stasenko.
>
Nov. 28, 2013
Re: [Pharo-dev] How to update Deep into Pharo Chapter
by Gabriel Cotelli
I commited a new file (GOC-ExceptionExclusions.tex) in the Exceptions
folder with a short subsection explaining the use. Feel free to review and
improve it before inclusion in the main file. Probably the better insertion
point is just after the ExceptionSet explanation.
For testing the latex compilation I temporally put a "\input" in the main
file (this isn't commited).
Regards, Gabriel
On Wed, Nov 27, 2013 at 3:45 AM, Stéphane Ducasse <stephane.ducasse(a)inria.fr
> wrote:
> Yes
> It would be good that you put some comments so that I can read it fast.
>
> Stef
> On Nov 26, 2013, at 11:07 PM, Gabriel Cotelli <g.cotelli(a)gmail.com> wrote:
>
> Thanks Damien,
> What is the expected workflow?
> I checkout the latex code, made the changes and then commit?
>
>
> On Tue, Nov 26, 2013 at 4:30 PM, Damien Cassou <damien.cassou(a)gmail.com>wrote:
>
>> On Tue, Nov 26, 2013 at 6:34 PM, Gabriel Cotelli <g.cotelli(a)gmail.com>
>> wrote:
>> > Done. Username: gcotelli
>>
>>
>> done
>>
>> --
>> Damien Cassou
>> http://damiencassou.seasidehosting.st
>>
>> "Success is the ability to go from one failure to another without
>> losing enthusiasm."
>> Winston Churchill
>>
>>
>
>
Nov. 28, 2013
StackSimulator somewhat running in Pharo2.
by phil@highoctane.be
Here is a picture of it.
ObjectMemory and the StackVM are there.
Lots of cleaning to do, but we'll make it.
Next step: find out why the Display isn't rendered properly.
StartUp problem?
Phil
Nov. 28, 2013
Re: [Pharo-dev] Coordinates problem with Athens and Morphic while coding Hyperion
by Igor Stasenko
â
BezierMorph.st.gz<https://docs.google.com/file/d/0B7dd-52sqS20SW9JMUxZREh1ZkJEc1UwZkNiYy1jbnZ…>
ââ
Morphic-BezierCurve.st<https://docs.google.com/file/d/0B7dd-52sqS20LW5XV2NwaFpPeEJudFFGZ3ZsZFBxZC0…>
â
On 28 November 2013 16:54, kilon alios <kilon.alios(a)gmail.com> wrote:
> absolutely, more code mean deeper understanding how to be more dangerous
> as a coder
>
here it is.. it took me some effort to find it, buried under piles of other
things.
i don't know which one is latest/working, and don't ask me how it works ..
it was long ago i was young and sky was blue :)
On Thu, Nov 28, 2013 at 4:16 PM, Igor Stasenko <siguctua(a)gmail.com> wrote:
>
>
>
> On 28 November 2013 13:52, kilon alios <kilon.alios(a)gmail.com> wrote:
>
>> thats all I got I am afraid right now. A simple editing of a straight
>> line, but I am learning athens, roassal, morphic so it takes time. Its my
>> first with everything and my very first project with pharo. I am not aiming
>> for something super sophisticated, bezier lines, gradients, bitmaps etc
>> simple stuff but I am having so much fun with this project I wont give up
>> until I have it finished. :)
>>
>>
> btw, if you want, i got somewhere code for Bezier curve editing (in
> morphic)..
> it is not fully working, but at least something you can look at:
> - if i remember you can add control points and move them around.
>
>
>
>>
>> On Thu, Nov 28, 2013 at 2:30 PM, Alexandre Bergel <
>> alexandre.bergel(a)me.com> wrote:
>>
>>> Do you have more screenshots of Hyperion?
>>>
>>> Alexandre
>>> --
>>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>>> Alexandre Bergel http://www.bergel.eu
>>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>>
>>>
>>>
>>> On Nov 28, 2013, at 7:49 AM, kilon alios <kilon.alios(a)gmail.com> wrote:
>>>
>>> > Ok I have verified and indeed its not an Athens problem. My bad. The
>>> position of the morph is reported at 5@30 and the not the correct 0(a)0.So it looks like Morphic for some strange reason it offsets it.
>>> >
>>> > I knew about translateBy but I did not know about restoreAfter. so
>>> thank you.
>>> >
>>> > I prefer my version of the code because it makes clearer what I am
>>> trying to do. However ideally because I am drawing a box inside another box
>>> the best way would be to follow your approach and scale the second box
>>> using one shape instead of two I am currently doing. But thats the price I
>>> am paying from not knowing exactly how to do this.
>>> >
>>> > Also trying to painstakingly find the correct transform and scale
>>> values requires A LOT of testing . This is why I find a vector editor for
>>> Athens and Pharo absolutely essential. No coding can beat designing via
>>> mouse.
>>> >
>>> > On the other hand I could use Inkscape and import the svg to Athens ,
>>> which what I am about to research. Designing all GUI elements by code is a
>>> very bad idea, but no less a learning experience.
>>> >
>>> > I will most probably move to Roassal too.
>>> >
>>> > As always thanks for the help.
>>> >
>>> >
>>> > On Thu, Nov 28, 2013 at 12:29 PM, Igor Stasenko <siguctua(a)gmail.com>
>>> wrote:
>>> > well, by default the athens canvas coordinate system matches morphic
>>> one..
>>> > but you know, it always hard to be sure, especially if you perform any
>>> local coordinate transformations before that morph has any chance to draw
>>> itself..
>>> >
>>> > You can figure this out easily: draw something at 0@0 and see where
>>> it is.
>>> > then draw something at morph's x@y position and see it too.
>>> >
>>> > btw, you know you don't have to create same paths over and over.
>>> > you can easily put static parts out of regularly (and costly)
>>> evaluated code:
>>> >
>>> > shape := canvas cacheAt: self "morph" ifAbsentPut: [
>>> > aCanvas createPath: [:path |
>>> > path relative.
>>> > " no move-to here *** path moveTo: ((self position x )+5)@(self
>>> position y);"
>>> > lineTo: 20@0;
>>> > cwArcTo: 5@5 angle: 45;
>>> > lineTo: 0@20;
>>> > cwArcTo: (-5)@5 angle: 45;
>>> > lineTo: (-20)@0;
>>> > cwArcTo: (-5)@(-5) angle: 45;
>>> > lineTo: 0@(-20);
>>> > cwArcTo: 5@(-5) angle: 45.
>>> > ].
>>> > ].
>>> >
>>> > "and here we're using coordinate transform to translate origin point to
>>> > given position, so it will be the starting point (0@0) of our shape"
>>> >
>>> > canvas pathTransform restoreAfter: [
>>> > canvas pathTransform translateBy:((self position x )+5)@(self
>>> position y).
>>> > canvas drawShape: shape.
>>> > ]
>>> >
>>> > by analogy you can cache all static pieces, just do something:
>>> >
>>> > shapes := canvas cacheAt: self ifAbsentPut: [ self
>>> constructStaticShapesOn: aCanvas ]
>>> >
>>> > where #constructStaticShapesOn: must answer an array of them.
>>> >
>>> >
>>> > On 28 November 2013 11:12, kilon alios <kilon.alios(a)gmail.com> wrote:
>>> > wow you guys are fast at replying :)
>>> >
>>> > I did
>>> >
>>> >
>>> > self changeProportionalLayout.
>>> > editButton := HypEditButton new .
>>> > editButton position: 0@0.
>>> > self addMorph: editButton fullFrame: #(0 0 0 0 0 0 100 100).
>>> >
>>> > I am afraid Igor I still see no change with your code.
>>> >
>>> > I like to note here, that when I first created the editButton as morph
>>> , it indeed placed it in correct place. A 0@0 placed it in top left
>>> corner as expected. But I did overide its DrawOn: with an empty method and
>>> used my own method to render it with Athens. So it looks like the problem
>>> is Athens related and not Morphic related or maybe a disagreement between
>>> Morphic and Athens.
>>> >
>>> > just for the record here is the code I use to render the HypEditButton
>>> morph
>>> >
>>> > render:aCanvas
>>> > |shape1 shape2 shape3 editButtonColor |
>>> > shape1 := aCanvas createPath: [:path |
>>> > path relative .
>>> >
>>> > path moveTo: ((self position x )+5)@(self position y);
>>> > lineTo: 20@0;
>>> > cwArcTo: 5@5 angle: 45;
>>> > lineTo: 0@20;
>>> > cwArcTo: (-5)@5 angle: 45;
>>> > lineTo: (-20)@0;
>>> > cwArcTo: (-5)@(-5) angle: 45;
>>> > lineTo: 0@(-20);
>>> > cwArcTo: 5@(-5) angle: 45.
>>> > ].
>>> >
>>> > shape2 := aCanvas createPath: [:path |
>>> > path relative .
>>> >
>>> > path moveTo: ((self position x +7))@((self position y
>>> +3));
>>> > lineTo: 18@0;
>>> > cwArcTo: 2@2 angle: 45;
>>> > lineTo: 0@20;
>>> > cwArcTo: (-2)@2 angle: 45;
>>> > lineTo: (-20)@0;
>>> > cwArcTo: (-2)@(-2) angle: 45;
>>> > lineTo: 0@(-20);
>>> > cwArcTo: 4@(-2) angle: 45.
>>> > ].
>>> > shape3 := aCanvas createPath: [:path |
>>> > path relative .
>>> >
>>> > path moveTo: ((self position x +15))@((self position y
>>> +10));
>>> >
>>> > cwArcTo: 5@5 angle: 90;
>>> > cwArcTo: (-5)@5 angle: 90;
>>> > cwArcTo: (-5)@(-5) angle: 90;
>>> > cwArcTo: 5@(-5) angle: 90.
>>> >
>>> >
>>> > ].
>>> >
>>> > ( editMode = true) ifTrue: [ editButtonColor := Color green] ifFalse:
>>> [ editButtonColor := Color red ].
>>> > (aCanvas setStrokePaint: editButtonColor) width: 1.
>>> >
>>> > aCanvas drawShape: shape1 .
>>> > aCanvas drawShape: shape2.
>>> > aCanvas setPaint: (editButtonColor alpha: 0.3 ).
>>> > aCanvas drawShape: shape3.
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > On Thu, Nov 28, 2013 at 12:03 PM, Igor Stasenko <siguctua(a)gmail.com>
>>> wrote:
>>> >
>>> >
>>> >
>>> > On 28 November 2013 10:59, kilon alios <kilon.alios(a)gmail.com> wrote:
>>> > just tried it, I see no change
>>> >
>>> > try:
>>> > self changeProportionalLayout
>>> >
>>> > editButton := HypEditButton new .
>>> > self addMorph: editButton fullFrame: #(0 0 0 0 0 0 100 100).
>>> >
>>> >
>>> > On Thu, Nov 28, 2013 at 11:54 AM, Benjamin <
>>> Benjamin.VanRyseghem.Pharo(a)gmail.com> wrote:
>>> > Can you try to do something like
>>> >
>>> > self changeProportionalLayout
>>> > before adding the morph ?
>>> >
>>> > Ben
>>> >
>>> > On 28 Nov 2013, at 10:51, kilon alios <kilon.alios(a)gmail.com> wrote:
>>> >
>>> >> So I have found some strange problems with my vector editor ,
>>> Hyperion.
>>> >>
>>> >> Hyperion is a Morph openInWindow. Code can be found in the class side
>>> of Hyperion>>open.
>>> >>
>>> >> The coordinate system when detecting events (mouseOver, mouseUp and
>>> mouseDown events of the Hyperion instance) looks like it takes to account
>>> also beyond the morph as coordinates as a result events happening at the
>>> top right edge of the morph where Hyperion is rendered is 6@30( which
>>> is the size of the window's title bar plus its borders). Thats ok, I have
>>> taken these offsets to account when computing the position of the mouse. I
>>> guess it uses the global coordinated and not the local coordinates of the
>>> morph.
>>> >>
>>> >> I am adding a button to control the edit mode of a line, when in edit
>>> mode handles for line's control points are shown and those handles can be
>>> dragged around to control the shape of the line , when off edit mode, the
>>> line will be able to be drag around (not implemented yet).
>>> >>
>>> >> My problem is that when I add that button as morph to the existing
>>> morph of Hyperion in 0@0 , it actually appears in 0@30 in local
>>> coordinated of the Hyperion moprh which in global coordinates it 6@60 (
>>> 0@0 + 6@30 + 0@30 = 6@60). Why is that ?
>>> >>
>>> >> I have no clue why I am getting an offset of 0@30 in local
>>> coordinates of the Hyperion morph.
>>> >>
>>> >> here is the picture showing a) how it looks like b) the code that set
>>> the position c) transcript showing mouse coordinates when clicked in the
>>> top left corner of Hyperion morph
>>> >> Hyperion coordinates problem.JPG
>>> >>
>>> >> if anyone wants to try the code himself the repo is here
>>> >>
>>> >> http://www.smalltalkhub.com/#!/~kilon/Hyperion
>>> >>
>>> >> To sum up, to place that button on top left, I will have to position
>>> it 0@(-30) which for me makes no sense at all.
>>> >>
>>> >> Please note that everything is rendered with Athens.
>>> >>
>>> >> Maybe I have messed up the code myself somewhere but I have looked it
>>> again and again I cant find a problem with my code.
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > --
>>> > Best regards,
>>> > Igor Stasenko.
>>> >
>>> >
>>> >
>>> >
>>> > --
>>> > Best regards,
>>> > Igor Stasenko.
>>> >
>>>
>>>
>>>
>>
>
>
> --
> Best regards,
> Igor Stasenko.
>
--
Best regards,
Igor Stasenko.
Nov. 28, 2013
Re: [Pharo-dev] Stopping Zinc
by Sven Van Caekenberghe
On 28 Nov 2013, at 17:35, Sebastian Sastre <sebastian(a)flowingconcept.com> wrote:
> This is how I start Zinc
>
> (ZnServer startDefaultOn: self port)
> delegate: self makeDispatcher;
> register;
> yourself
the #register is too much (the default server is registered automatically), the server will be added twice to #managedServers which leads to the same instance being stopped/started twice, which probably does no harm, but it should not be done.
> and that screenshot was taken after
> 1. starting Zinc
OK, see remark above.
> 2. using a little the app (which has a custom dispatcher that has a couple of handlers, one is a websocket handler)
There might of course be some error in your code ;-)
A repeatable bug report requires no use of custom code.
> 3. stopping with the code you see in the workspace
If you start like you do above, just ZnServer stopDefault is enough.
> 4. also this: 5 timesRepeat:[Smalltalk garbageCollect].
Yeah, that is a good idea, typically you should also wait at least the connection time out time (30s by default).
> so I typically have to go manually to cmd-t those processes hanging there
Please try to say #logToTranscript to your server, it will report many details of connections opening/closing, with a special tag to identify each thread.
> <Screen Shot 2013-11-28 at 2.29.31 PM.png>
I see you are on the latest Mac OS X 10.9, using #20625, this definitively should work.
If I have time later tonight, I will try to run a similar scenario.
Note that running the unit tests creates many, many servers and afterwards everything cleans up.
> On Nov 28, 2013, at 2:21 PM, Sven Van Caekenberghe <sven(a)stfx.eu> wrote:
>
>>
>> On 28 Nov 2013, at 17:13, Sebastian Sastre <sebastian(a)flowingconcept.com> wrote:
>>
>>> sure..
>>>
>>> Of course the inconvenience is not in saving the image with processes hanging around but in opening it in an unusable state
>>>
>>> Building fresh ones for production is great but for development is too impractical
>>>
>>> =/
>>
>> If your server is managed (by being the default one, or being registered explicitly) it will be stopped on image save and started again when the image comes up. If that should fail, please try to give a repeatable bug report, using a standard image only.
>>
>> Alternatively, stopping the servers manually should work as well. If that should fail, that is a bug too.
>>
>> What platform are you on, what Pharo version, latest Zinc ?
>>
>>> On Nov 28, 2013, at 12:27 PM, Sven Van Caekenberghe <sven(a)stfx.eu> wrote:
>>>
>>>> Hi Sebastian,
>>>>
>>>> CC-ing to the mailing list because this is generally useful.
>>>>
>>>> On 28 Nov 2013, at 14:11, Sebastian Sastre <sebastian(a)flowingconcept.com> wrote:
>>>>
>>>>> Hi Sven,
>>>>>
>>>>> how are you? all good over there?
>>>>>
>>>>> quick question:
>>>>>
>>>>> should this be enough to stop Zinc?
>>>>>
>>>>> ZnServer managedServers do:[:e| e stop].
>>>>>
>>>>> ZnServer default ifNotNil:[
>>>>> ZnServer default delegate stop].
>>>>>
>>>>> ZnServer stopDefault.
>>>>>
>>>>> I ask because after using it for a while the image still have processes ZnManagingMultiThreadedServer related
>>>>>
>>>>> Do you have some kind of best practice to shut it down?
>>>>>
>>>>> sebastian
>>>>>
>>>>> o/
>>>>>
>>>>> PS: The typical case is that you are developing and you make some changes and want to save the image clean (without anything but the default processes)
>>>>>
>>>>> Now I'm manually terminating some after stopping all (using that code up there) because if I don't do that I have ~50% chances to save an image that will open absolutely frozen (forcing me to go back one commit and reload some packages)
>>>>
>>>> Once you get started with Zinc there is no stopping it ;-)
>>>>
>>>> The default server (#startDefaultOn: and #defaultOn:) gets registered automatically. Registered servers get stopped on image shutdown and get restarted on image startup. There can only be one default server.
>>>>
>>>> Servers created otherwise (#on: #startOn:) do not get registered automatically. You have to do that explicitly using #register. Then theyâll get the behaviour described above.
>>>>
>>>> The default server class is ZnManagingMultiThreadedServer which will close its open connections when stopping. However, the HTTP worker processes (one per open connection) do not get terminated explicitly. This will happen when their main loop notices the connection is gone (by receiving an error, typically a ConnectionTimedOut or PrimitiveFailure on reading the next incoming request), after which they will clean up and terminate naturally.
>>>>
>>>> This is the theory, there are some platform differences (Mac, Windows, Linux). On Mac I never have trouble with managed server hanging in my development image, but YMMV.
>>>>
>>>> Now, my best practice advice for deployment is to use cleanly built images (very easy to do using the ZeroConf âconfig' handler that loads your Metacello Configuration) and then start your servers in your startup script (where you can do all other configurations, like setting ports, username/passwords, other hosts). Then use some monitoring tool like monit to check on the server(s) and kill/restart when needed.
>>>>
>>>> HTH,
>>>>
>>>> Sven
>>>>
>>>> PS: The following introduction article explains the deploy mechanism that I prefer (in simple terms): http://zn.stfx.eu/zn/build-and-deploy-1st-webapp/
>>>>
>>>
>>>
>>
>>
>
Nov. 28, 2013
Re: [Pharo-dev] Registering for issue tracker
by Mark Bestley
On 28/11/2013 16:29, btc(a)openinworld.com wrote:
> I've added some concise info on what worked for me for user
> registration to the issue tracker. Rather than clutter up the
> account list with a test-user, could someone yet to register try out
> the three steps...
>
> https://pharo.fogbugz.com/
>
They look OK I actually registered yesterday just before this thread started
However I was making detailed notes and these are the 3 steps I used.
(My notes are not complimentary about this process. It is convoluted
compared with other sites but as we now have written notes rather than a
video -
that I had to change browsers to play I think I would have been less
annoyed just following the text)
Ben thanks for making it much more obvious what to do,
--
Mark
Nov. 28, 2013
Re: [Pharo-dev] [pharo-project/pharo-core] ba3c45: 30606
by Esteban Lorenzano
yes... is a last moment addition.
It allows you to do cherry-picking commits, and we thought it can be useful
for committing instant-bugfixes while working on other stuff.
Esteban
ps: btw, I'm having some problems to declare the beta, because versionner
(who needs to be in image too) refuses to pass the tests while integrating
(but passes otherwise).
On Thu, Nov 28, 2013 at 5:34 PM, Sven Van Caekenberghe <sven(a)stfx.eu> wrote:
>
> On 28 Nov 2013, at 17:30, GitHub <noreply(a)github.com> wrote:
>
> > 12264 Komitter
> > https://pharo.fogbugz.com/f/cases/12264
>
> What is Komitter ?
> Why do we need it ?
>
> It seems to go into Pharo 3.0 without anyone having heard of it, at least
> I didnât.
>
> Sven
>
Nov. 28, 2013
Re: [Pharo-dev] Stopping Zinc
by Sebastian Sastre
This is how I start Zinc
(ZnServer startDefaultOn: self port)
delegate: self makeDispatcher;
register;
yourself
and that screenshot was taken after
1. starting Zinc
2. using a little the app (which has a custom dispatcher that has a couple of handlers, one is a websocket handler)
3. stopping with the code you see in the workspace
4. also this: 5 timesRepeat:[Smalltalk garbageCollect].
so I typically have to go manually to cmd-t those processes hanging there
On Nov 28, 2013, at 2:21 PM, Sven Van Caekenberghe <sven(a)stfx.eu> wrote:
>
> On 28 Nov 2013, at 17:13, Sebastian Sastre <sebastian(a)flowingconcept.com> wrote:
>
>> sure..
>>
>> Of course the inconvenience is not in saving the image with processes hanging around but in opening it in an unusable state
>>
>> Building fresh ones for production is great but for development is too impractical
>>
>> =/
>
> If your server is managed (by being the default one, or being registered explicitly) it will be stopped on image save and started again when the image comes up. If that should fail, please try to give a repeatable bug report, using a standard image only.
>
> Alternatively, stopping the servers manually should work as well. If that should fail, that is a bug too.
>
> What platform are you on, what Pharo version, latest Zinc ?
>
>> On Nov 28, 2013, at 12:27 PM, Sven Van Caekenberghe <sven(a)stfx.eu> wrote:
>>
>>> Hi Sebastian,
>>>
>>> CC-ing to the mailing list because this is generally useful.
>>>
>>> On 28 Nov 2013, at 14:11, Sebastian Sastre <sebastian(a)flowingconcept.com> wrote:
>>>
>>>> Hi Sven,
>>>>
>>>> how are you? all good over there?
>>>>
>>>> quick question:
>>>>
>>>> should this be enough to stop Zinc?
>>>>
>>>> ZnServer managedServers do:[:e| e stop].
>>>>
>>>> ZnServer default ifNotNil:[
>>>> ZnServer default delegate stop].
>>>>
>>>> ZnServer stopDefault.
>>>>
>>>> I ask because after using it for a while the image still have processes ZnManagingMultiThreadedServer related
>>>>
>>>> Do you have some kind of best practice to shut it down?
>>>>
>>>> sebastian
>>>>
>>>> o/
>>>>
>>>> PS: The typical case is that you are developing and you make some changes and want to save the image clean (without anything but the default processes)
>>>>
>>>> Now I'm manually terminating some after stopping all (using that code up there) because if I don't do that I have ~50% chances to save an image that will open absolutely frozen (forcing me to go back one commit and reload some packages)
>>>
>>> Once you get started with Zinc there is no stopping it ;-)
>>>
>>> The default server (#startDefaultOn: and #defaultOn:) gets registered automatically. Registered servers get stopped on image shutdown and get restarted on image startup. There can only be one default server.
>>>
>>> Servers created otherwise (#on: #startOn:) do not get registered automatically. You have to do that explicitly using #register. Then theyâll get the behaviour described above.
>>>
>>> The default server class is ZnManagingMultiThreadedServer which will close its open connections when stopping. However, the HTTP worker processes (one per open connection) do not get terminated explicitly. This will happen when their main loop notices the connection is gone (by receiving an error, typically a ConnectionTimedOut or PrimitiveFailure on reading the next incoming request), after which they will clean up and terminate naturally.
>>>
>>> This is the theory, there are some platform differences (Mac, Windows, Linux). On Mac I never have trouble with managed server hanging in my development image, but YMMV.
>>>
>>> Now, my best practice advice for deployment is to use cleanly built images (very easy to do using the ZeroConf âconfig' handler that loads your Metacello Configuration) and then start your servers in your startup script (where you can do all other configurations, like setting ports, username/passwords, other hosts). Then use some monitoring tool like monit to check on the server(s) and kill/restart when needed.
>>>
>>> HTH,
>>>
>>> Sven
>>>
>>> PS: The following introduction article explains the deploy mechanism that I prefer (in simple terms): http://zn.stfx.eu/zn/build-and-deploy-1st-webapp/
>>>
>>
>>
>
>
Nov. 28, 2013