Re: [Pharo-dev] saving an image on windows and opening it on mac problems

2017-04-26 Thread Martin Dias
Hi Andrei,

Could you tell me what's your "EpMonitor current sessionStore baseLocator" ?

By default it's a FileLocator, but maybe you personalized it and setted a
FileReference. FileLocators don't have a WindowsStore but FileReference do.

The OmSessionStore is part of Epicea, and has a startUp: that executes the
#ensureCreateDirectory. Well, maybe it shouldn't be done on start up but
when a change happens... I should try this.

Martín

On Wed, Apr 26, 2017 at 3:40 PM, H. Hirzel  wrote:

> What about loading some TTF fonts into the image?
>
> --Hannes
>
> On 4/26/17, p...@highoctane.be  wrote:
> > I'd say that one should clear all fonts being loaded, refresh the list of
> > available fonts because they are on another location (and this should
> > happen even moving from windows to windows), and switch back to a default
> > font that is sure to be available.
> >
> > I got an issue with the "hack" font because the new version changed the
> > file names of the fonts and the system died.
> >
> > That should already solve some problems.
> >
> > Phil
> >
> > On Wed, Apr 26, 2017 at 5:10 PM, Andrei Chis  >
> > wrote:
> >
> >> Any hints about how to handle Freetype fonts?
> >> Right now I'm getting also some segmentation faults when opening on mac
> >> an
> >> image saved on windows, that seem related to Freetype fonts.
> >>
> >> On Wed, Apr 26, 2017 at 5:04 PM, p...@highoctane.be  >
> >> wrote:
> >>
> >>> You will also face serious fun with Freetype fonts.
> >>>
> >>> Phil
> >>>
> >>> On Wed, Apr 26, 2017 at 3:06 PM, Andrei Chis
> >>> 
> >>> wrote:
> >>>
>  Hi all,
> 
>  I saw that there are a few issues about images saved on an operating
>  system not working when opened on other operating systems:
>  - https://pharo.fogbugz.com/f/cases/19852/Unable-to-open-ima
>  ge-in-OSX-after-it-has-been-updated-in-Windows
>  - https://pharo.fogbugz.com/f/cases/19869/Infinite-loop-on-m
>  ac-when-opening-an-image-saved-on-windows
>  - https://pharo.fogbugz.com/f/cases/19272/Image-freezes-on-L
>  inux-if-it-was-previously-saved-on-Windows
>  - http://forum.world.st/Image-freezes-on-Linux-if-it-was-pre
>  viously-saved-on-Windows-td4903258.html
> 
>  I gave the fix in case 19869 a try and with it I can save an image on
>  windows and open it on mac, however, there are some side effects.
>  First several folders having the following name are created in the
>  image
>  folder:
> 
>  '\Users\andrei\test-image'
>  '\Users\andrei\test-image\pharo-local\'
>  '\Users\andrei\test-image\pharo-local\ombu-sessions'
> 
>  Second, I can only open the image on man once. The second time I get
>  the
>  following stack:
> 
>  [31mPrimitiveFailed: primitive #createDirectory: in WindowsStore
> failed
>  [0mWindowsStore(Object)>>primitiveFailed:
>  WindowsStore(Object)>>primitiveFailed
>  WindowsStore(DiskStore)>>createDirectory:
>  WindowsStore(FileSystemStore)>>ensureCreateDirectory:
>  WindowsStore(FileSystemStore)>>ensureCreateDirectory:
>  WindowsStore(FileSystemStore)>>ensureCreateDirectory:
>  WindowsStore(FileSystemStore)>>ensureCreateDirectory:
>  WindowsStore(FileSystemStore)>>ensureCreateDirectory:
>  WindowsStore(FileSystemStore)>>ensureCreateDirectory:
>  FileSystem>>ensureCreateDirectory:
>  FileReference>>ensureCreateDirectory
>  OmSessionStore>>resetWithStoreNamed:
>  OmSessionStore>>resetWithNextStoreName
>  OmSessionStore>>store
>  WeakMessageSend>>value
>  WeakMessageSend>>cull:
>  WeakMessageSend>>cull:cull:
>  [ action cull: arg1 cull: announcer ] in
> LegacyWeakSubscription(WeakAnn
>  ouncementSubscription)>>deliver: in Block: [ action cull: arg1 cull:
>  announcer ]
>  BlockClosure>>on:do:
>  BlockClosure>>on:fork:
>  LegacyWeakSubscription(WeakAnnouncementSubscription)>>deliver:
>  [ tmp4 deliver: arg1 ] in SubscriptionRegistry>>deliver:
> to:startingAt:
>  in Block: [ tmp4 deliver: arg1 ]
>  BlockClosure>>ifCurtailed:
>  SubscriptionRegistry>>deliver:to:startingAt:
>  SubscriptionRegistry>>deliver:to:
>  SubscriptionRegistry>>deliver:
>  SystemAnnouncer(Announcer)>>announce:
>  SystemAnnouncer>>announce:
>  SystemAnnouncer>>snapshotDone:
>  SessionManager>>snapshot:andQuit:
>  [0m
> 
>  So it seems that OmSessionStore is not reset and holds a reference to
> a
>  the windows path which it tries to create.
> 
>  Cheers,
>  Andrei
> 
> 
> 
> 
> 
> >>>
> >>
> >
>
>


Re: [Pharo-dev] saving an image on windows and opening it on mac problems

2017-04-26 Thread H. Hirzel
What about loading some TTF fonts into the image?

--Hannes

On 4/26/17, p...@highoctane.be  wrote:
> I'd say that one should clear all fonts being loaded, refresh the list of
> available fonts because they are on another location (and this should
> happen even moving from windows to windows), and switch back to a default
> font that is sure to be available.
>
> I got an issue with the "hack" font because the new version changed the
> file names of the fonts and the system died.
>
> That should already solve some problems.
>
> Phil
>
> On Wed, Apr 26, 2017 at 5:10 PM, Andrei Chis 
> wrote:
>
>> Any hints about how to handle Freetype fonts?
>> Right now I'm getting also some segmentation faults when opening on mac
>> an
>> image saved on windows, that seem related to Freetype fonts.
>>
>> On Wed, Apr 26, 2017 at 5:04 PM, p...@highoctane.be 
>> wrote:
>>
>>> You will also face serious fun with Freetype fonts.
>>>
>>> Phil
>>>
>>> On Wed, Apr 26, 2017 at 3:06 PM, Andrei Chis
>>> 
>>> wrote:
>>>
 Hi all,

 I saw that there are a few issues about images saved on an operating
 system not working when opened on other operating systems:
 - https://pharo.fogbugz.com/f/cases/19852/Unable-to-open-ima
 ge-in-OSX-after-it-has-been-updated-in-Windows
 - https://pharo.fogbugz.com/f/cases/19869/Infinite-loop-on-m
 ac-when-opening-an-image-saved-on-windows
 - https://pharo.fogbugz.com/f/cases/19272/Image-freezes-on-L
 inux-if-it-was-previously-saved-on-Windows
 - http://forum.world.st/Image-freezes-on-Linux-if-it-was-pre
 viously-saved-on-Windows-td4903258.html

 I gave the fix in case 19869 a try and with it I can save an image on
 windows and open it on mac, however, there are some side effects.
 First several folders having the following name are created in the
 image
 folder:

 '\Users\andrei\test-image'
 '\Users\andrei\test-image\pharo-local\'
 '\Users\andrei\test-image\pharo-local\ombu-sessions'

 Second, I can only open the image on man once. The second time I get
 the
 following stack:

 [31mPrimitiveFailed: primitive #createDirectory: in WindowsStore failed
 [0mWindowsStore(Object)>>primitiveFailed:
 WindowsStore(Object)>>primitiveFailed
 WindowsStore(DiskStore)>>createDirectory:
 WindowsStore(FileSystemStore)>>ensureCreateDirectory:
 WindowsStore(FileSystemStore)>>ensureCreateDirectory:
 WindowsStore(FileSystemStore)>>ensureCreateDirectory:
 WindowsStore(FileSystemStore)>>ensureCreateDirectory:
 WindowsStore(FileSystemStore)>>ensureCreateDirectory:
 WindowsStore(FileSystemStore)>>ensureCreateDirectory:
 FileSystem>>ensureCreateDirectory:
 FileReference>>ensureCreateDirectory
 OmSessionStore>>resetWithStoreNamed:
 OmSessionStore>>resetWithNextStoreName
 OmSessionStore>>store
 WeakMessageSend>>value
 WeakMessageSend>>cull:
 WeakMessageSend>>cull:cull:
 [ action cull: arg1 cull: announcer ] in LegacyWeakSubscription(WeakAnn
 ouncementSubscription)>>deliver: in Block: [ action cull: arg1 cull:
 announcer ]
 BlockClosure>>on:do:
 BlockClosure>>on:fork:
 LegacyWeakSubscription(WeakAnnouncementSubscription)>>deliver:
 [ tmp4 deliver: arg1 ] in SubscriptionRegistry>>deliver:to:startingAt:
 in Block: [ tmp4 deliver: arg1 ]
 BlockClosure>>ifCurtailed:
 SubscriptionRegistry>>deliver:to:startingAt:
 SubscriptionRegistry>>deliver:to:
 SubscriptionRegistry>>deliver:
 SystemAnnouncer(Announcer)>>announce:
 SystemAnnouncer>>announce:
 SystemAnnouncer>>snapshotDone:
 SessionManager>>snapshot:andQuit:
 [0m

 So it seems that OmSessionStore is not reset and holds a reference to a
 the windows path which it tries to create.

 Cheers,
 Andrei





>>>
>>
>



Re: [Pharo-dev] Traits methods flattened

2017-04-26 Thread Nicolai Hess
2017-04-25 19:08 GMT+02:00 Hilaire :

> Can you produce tests exposing these fails?
>

|set|
set := Set new.
Smalltalk allClassesAndTraits select:[:tc | tc traitComposition notEmpty]
thenDo:[:b | |tc nonLocal| tc:= b traits.
nonLocal :=
b localMethods select:[:m |
tc anySatisfy:[:t | t methods contains:[:tm|
((tm selector = m selector and:[tm bytecode = m bytecode])
and:[tm literals allButLast = m literals allButLast])]]].
nonLocal notEmpty ifTrue:[set addAll:( nonLocal)]].

MessageBrowser browse:set




>
> Hilaire
>
>
> Le 25/04/2017 à 10:47, Nicolai Hess a écrit :
> > Keep in mind.
> > 1. the way new trait methods are handled is still wrong
> >if non-local methods (methods from  a trait) aren't added to the
> > rpackage when creating the user of this trait, why are  new trait
> > methods "flattened" into this package
> > 2. we already have some "corrupted" (flattened) packages in the image.
> > (some methods of users of Traits are copied from the trait).
> > For example,
> > traits using the trait GLMBrickExtensionTrait or
> > test case traits using other traits (TRemoveForMultiplenessTest /
> > TRemoveTest, TDictionaryCopyingTest/TCloneTest)
> >
>
> --
> Dr. Geo
> http://drgeo.eu
>
>
>
>


Re: [Pharo-dev] Commenting the Session Manager

2017-04-26 Thread Ben Coman
eh! sorry, thats  way too confusing to leave alone.
I meant... I'm not sure I properly understand.

On Thu, Apr 27, 2017 at 12:17 AM, Ben Coman  wrote:

> I'm sure I properly understand, you mean to change the behaviour rather
> than the comment?
> My naive understanding and intuition is the current behaviour is fine.
> What do you see wrong with it?
>
> cheers -ben
>
> On Wed, Apr 26, 2017 at 11:46 PM, Guillermo Polito <
> guillermopol...@gmail.com> wrote:
>
>> Hi Ben, true.
>>
>> This happens because of this line:
>>
>> "create a new session object if we're booting"
>> isImageStarting ifTrue: [ self installNewSession ].
>>
>> in SessionManager>>snapshot:andQuit:
>>
>> I'd say we should not change this now, but we should fix it for pharo 7.
>>
>> On Tue, Apr 18, 2017 at 6:15 PM, Ben Coman  wrote:
>>
>>> hi Guille,
>>>
>>> Thanks very much for that detailed write up.  I have one concern about
>>> the [bracketed] text...
>>>A new session starts when the image starts [or when the image is
>>> saved].
>>>A session ends when the image quits [or it is saved].
>>>
>>> Doing the following in a playground...
>>> s1 := SessionManager default currentSession.
>>> "Save image without quitting"
>>> s2 := SessionManager default currentSession.
>>> "Save and quit image, then after reloading..."
>>> s3 := SessionManager default currentSession.
>>> s1 == s2.  "==> true"
>>> s2 == s3.  "==> false"
>>>
>>> So it seems a new session does not start when the image is saved.
>>> With that in minds, can you review my proposed modifications...
>>> https://www.diffchecker.com/FUWg5J8t
>>>
>>> cheers -ben
>>>
>>> On Thu, Apr 13, 2017 at 5:41 PM, Guillermo Polito <
>>> guillermopol...@gmail.com> wrote:
>>>
 Hi all,

 I took some minutes to write down a class comment for the
 SessionManager class. There was an issue asking for it:

 https://pharo.fogbugz.com/f/cases/19463/Improve-SessionManag
 er-class-comment

 Since it is an important topic, and sometimes too low level for some
 people, I'd like to have some feedback. Is it well explained? Is there
 something that is key for you and is missing?

 I know that the comment is not exhaustive, it can be iterated and
 enhanced, but we can have a nice first version of it for the release.

 Thanks,
 Guille

 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


 I am the object responsible of managing how sessions work in Pharo.
 A session defines the boundaries of work in the image.

 A new session starts when the image starts or when the image is saved.
 A session ends when the image quits or it is saved.
 There is only one active session at a single point of time.
 Saving the image causes the active to stop, and starts a new session.

>>>
>>>
>>>
>>>
>>>

 The current active session is hold by myself, the singleton session
 manager. It can be accessed by doing:

   SessionManager default currentSession.

 The most important responsibility of the session manager is to manage
 how resources and services in the image are started up and shut down at the
 beginning and end of a session respectively. For example, when the image
 starts, several initialization routines should be executed to make sure
 that the image has access to the graphic drivers, the standard input/output
 file descriptors and so on.

 Such initialization happens in the #snapshot:andQuit: method.
 #snapshot:andQuit: will:
  - stop current session
  - save current image if requested
  - quit if requested
  - start a new session

 When a session is started, all elements registered in the startup list
 are started up.
 When a session is stopped, all elements registered in the shutdown list
 are shut down.

 # Managing Startup and Shutdown lists

 The startup and shutdown lists can be accessed through the messages:

 SessionManager default startupList.
 SessionManager default shutdownList.

 In general terms, the shutdown list is the startup list reversed.

 Upon a startup [shutdown], all elements in the startup list are sent
 the message #startup: [#shutdown:] with a boolean as argument that
 indicates wether the image is being saved [closed].

 Internally, startup and shutdown lists are prioritised. Priorities are
 managed by startup categories. By default the session manager includes the
 following categories in decreasing priority order:

 - System
 - Network
 - Graphical User Interface
 - Tools
 - User

 Categories can be accessed as follows:

 SessionManager default categoryNamed: aName.

 New categories can be registered in the system using the messages:

 SessionManager default createCategory: 

Re: [Pharo-dev] Commenting the Session Manager

2017-04-26 Thread Ben Coman
I'm sure I properly understand, you mean to change the behaviour rather
than the comment?
My naive understanding and intuition is the current behaviour is fine.
What do you see wrong with it?

cheers -ben

On Wed, Apr 26, 2017 at 11:46 PM, Guillermo Polito <
guillermopol...@gmail.com> wrote:

> Hi Ben, true.
>
> This happens because of this line:
>
> "create a new session object if we're booting"
> isImageStarting ifTrue: [ self installNewSession ].
>
> in SessionManager>>snapshot:andQuit:
>
> I'd say we should not change this now, but we should fix it for pharo 7.
>
> On Tue, Apr 18, 2017 at 6:15 PM, Ben Coman  wrote:
>
>> hi Guille,
>>
>> Thanks very much for that detailed write up.  I have one concern about
>> the [bracketed] text...
>>A new session starts when the image starts [or when the image is
>> saved].
>>A session ends when the image quits [or it is saved].
>>
>> Doing the following in a playground...
>> s1 := SessionManager default currentSession.
>> "Save image without quitting"
>> s2 := SessionManager default currentSession.
>> "Save and quit image, then after reloading..."
>> s3 := SessionManager default currentSession.
>> s1 == s2.  "==> true"
>> s2 == s3.  "==> false"
>>
>> So it seems a new session does not start when the image is saved.
>> With that in minds, can you review my proposed modifications...
>> https://www.diffchecker.com/FUWg5J8t
>>
>> cheers -ben
>>
>> On Thu, Apr 13, 2017 at 5:41 PM, Guillermo Polito <
>> guillermopol...@gmail.com> wrote:
>>
>>> Hi all,
>>>
>>> I took some minutes to write down a class comment for the SessionManager
>>> class. There was an issue asking for it:
>>>
>>> https://pharo.fogbugz.com/f/cases/19463/Improve-SessionManag
>>> er-class-comment
>>>
>>> Since it is an important topic, and sometimes too low level for some
>>> people, I'd like to have some feedback. Is it well explained? Is there
>>> something that is key for you and is missing?
>>>
>>> I know that the comment is not exhaustive, it can be iterated and
>>> enhanced, but we can have a nice first version of it for the release.
>>>
>>> Thanks,
>>> Guille
>>>
>>> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>>>
>>>
>>> I am the object responsible of managing how sessions work in Pharo.
>>> A session defines the boundaries of work in the image.
>>>
>>> A new session starts when the image starts or when the image is saved.
>>> A session ends when the image quits or it is saved.
>>> There is only one active session at a single point of time.
>>> Saving the image causes the active to stop, and starts a new session.
>>>
>>
>>
>>
>>
>>
>>>
>>> The current active session is hold by myself, the singleton session
>>> manager. It can be accessed by doing:
>>>
>>>   SessionManager default currentSession.
>>>
>>> The most important responsibility of the session manager is to manage
>>> how resources and services in the image are started up and shut down at the
>>> beginning and end of a session respectively. For example, when the image
>>> starts, several initialization routines should be executed to make sure
>>> that the image has access to the graphic drivers, the standard input/output
>>> file descriptors and so on.
>>>
>>> Such initialization happens in the #snapshot:andQuit: method.
>>> #snapshot:andQuit: will:
>>>  - stop current session
>>>  - save current image if requested
>>>  - quit if requested
>>>  - start a new session
>>>
>>> When a session is started, all elements registered in the startup list
>>> are started up.
>>> When a session is stopped, all elements registered in the shutdown list
>>> are shut down.
>>>
>>> # Managing Startup and Shutdown lists
>>>
>>> The startup and shutdown lists can be accessed through the messages:
>>>
>>> SessionManager default startupList.
>>> SessionManager default shutdownList.
>>>
>>> In general terms, the shutdown list is the startup list reversed.
>>>
>>> Upon a startup [shutdown], all elements in the startup list are sent the
>>> message #startup: [#shutdown:] with a boolean as argument that indicates
>>> wether the image is being saved [closed].
>>>
>>> Internally, startup and shutdown lists are prioritised. Priorities are
>>> managed by startup categories. By default the session manager includes the
>>> following categories in decreasing priority order:
>>>
>>> - System
>>> - Network
>>> - Graphical User Interface
>>> - Tools
>>> - User
>>>
>>> Categories can be accessed as follows:
>>>
>>> SessionManager default categoryNamed: aName.
>>>
>>> New categories can be registered in the system using the messages:
>>>
>>> SessionManager default createCategory: aCategoryName.
>>> SessionManager default createCategory: aCategoryName after:
>>> anotherCategoryName.
>>>
>>> Finally, to subscribe some resource handler to the startup shutdown
>>> lists, we need to subscribe a handler, subclass of AbstractSessionHandler.
>>> The most common handler implementation so far is the
>>> 

Re: [Pharo-dev] saving an image on windows and opening it on mac problems

2017-04-26 Thread p...@highoctane.be
I'd say that one should clear all fonts being loaded, refresh the list of
available fonts because they are on another location (and this should
happen even moving from windows to windows), and switch back to a default
font that is sure to be available.

I got an issue with the "hack" font because the new version changed the
file names of the fonts and the system died.

That should already solve some problems.

Phil

On Wed, Apr 26, 2017 at 5:10 PM, Andrei Chis 
wrote:

> Any hints about how to handle Freetype fonts?
> Right now I'm getting also some segmentation faults when opening on mac an
> image saved on windows, that seem related to Freetype fonts.
>
> On Wed, Apr 26, 2017 at 5:04 PM, p...@highoctane.be 
> wrote:
>
>> You will also face serious fun with Freetype fonts.
>>
>> Phil
>>
>> On Wed, Apr 26, 2017 at 3:06 PM, Andrei Chis 
>> wrote:
>>
>>> Hi all,
>>>
>>> I saw that there are a few issues about images saved on an operating
>>> system not working when opened on other operating systems:
>>> - https://pharo.fogbugz.com/f/cases/19852/Unable-to-open-ima
>>> ge-in-OSX-after-it-has-been-updated-in-Windows
>>> - https://pharo.fogbugz.com/f/cases/19869/Infinite-loop-on-m
>>> ac-when-opening-an-image-saved-on-windows
>>> - https://pharo.fogbugz.com/f/cases/19272/Image-freezes-on-L
>>> inux-if-it-was-previously-saved-on-Windows
>>> - http://forum.world.st/Image-freezes-on-Linux-if-it-was-pre
>>> viously-saved-on-Windows-td4903258.html
>>>
>>> I gave the fix in case 19869 a try and with it I can save an image on
>>> windows and open it on mac, however, there are some side effects.
>>> First several folders having the following name are created in the image
>>> folder:
>>>
>>> '\Users\andrei\test-image'
>>> '\Users\andrei\test-image\pharo-local\'
>>> '\Users\andrei\test-image\pharo-local\ombu-sessions'
>>>
>>> Second, I can only open the image on man once. The second time I get the
>>> following stack:
>>>
>>> [31mPrimitiveFailed: primitive #createDirectory: in WindowsStore failed
>>> [0mWindowsStore(Object)>>primitiveFailed:
>>> WindowsStore(Object)>>primitiveFailed
>>> WindowsStore(DiskStore)>>createDirectory:
>>> WindowsStore(FileSystemStore)>>ensureCreateDirectory:
>>> WindowsStore(FileSystemStore)>>ensureCreateDirectory:
>>> WindowsStore(FileSystemStore)>>ensureCreateDirectory:
>>> WindowsStore(FileSystemStore)>>ensureCreateDirectory:
>>> WindowsStore(FileSystemStore)>>ensureCreateDirectory:
>>> WindowsStore(FileSystemStore)>>ensureCreateDirectory:
>>> FileSystem>>ensureCreateDirectory:
>>> FileReference>>ensureCreateDirectory
>>> OmSessionStore>>resetWithStoreNamed:
>>> OmSessionStore>>resetWithNextStoreName
>>> OmSessionStore>>store
>>> WeakMessageSend>>value
>>> WeakMessageSend>>cull:
>>> WeakMessageSend>>cull:cull:
>>> [ action cull: arg1 cull: announcer ] in LegacyWeakSubscription(WeakAnn
>>> ouncementSubscription)>>deliver: in Block: [ action cull: arg1 cull:
>>> announcer ]
>>> BlockClosure>>on:do:
>>> BlockClosure>>on:fork:
>>> LegacyWeakSubscription(WeakAnnouncementSubscription)>>deliver:
>>> [ tmp4 deliver: arg1 ] in SubscriptionRegistry>>deliver:to:startingAt:
>>> in Block: [ tmp4 deliver: arg1 ]
>>> BlockClosure>>ifCurtailed:
>>> SubscriptionRegistry>>deliver:to:startingAt:
>>> SubscriptionRegistry>>deliver:to:
>>> SubscriptionRegistry>>deliver:
>>> SystemAnnouncer(Announcer)>>announce:
>>> SystemAnnouncer>>announce:
>>> SystemAnnouncer>>snapshotDone:
>>> SessionManager>>snapshot:andQuit:
>>> [0m
>>>
>>> So it seems that OmSessionStore is not reset and holds a reference to a
>>> the windows path which it tries to create.
>>>
>>> Cheers,
>>> Andrei
>>>
>>>
>>>
>>>
>>>
>>
>


Re: [Pharo-dev] Commenting the Session Manager

2017-04-26 Thread Guillermo Polito
Hi Ben, true.

This happens because of this line:

"create a new session object if we're booting"
isImageStarting ifTrue: [ self installNewSession ].

in SessionManager>>snapshot:andQuit:

I'd say we should not change this now, but we should fix it for pharo 7.

On Tue, Apr 18, 2017 at 6:15 PM, Ben Coman  wrote:

> hi Guille,
>
> Thanks very much for that detailed write up.  I have one concern about the
> [bracketed] text...
>A new session starts when the image starts [or when the image is saved].
>A session ends when the image quits [or it is saved].
>
> Doing the following in a playground...
> s1 := SessionManager default currentSession.
> "Save image without quitting"
> s2 := SessionManager default currentSession.
> "Save and quit image, then after reloading..."
> s3 := SessionManager default currentSession.
> s1 == s2.  "==> true"
> s2 == s3.  "==> false"
>
> So it seems a new session does not start when the image is saved.
> With that in minds, can you review my proposed modifications...
> https://www.diffchecker.com/FUWg5J8t
>
> cheers -ben
>
> On Thu, Apr 13, 2017 at 5:41 PM, Guillermo Polito <
> guillermopol...@gmail.com> wrote:
>
>> Hi all,
>>
>> I took some minutes to write down a class comment for the SessionManager
>> class. There was an issue asking for it:
>>
>> https://pharo.fogbugz.com/f/cases/19463/Improve-SessionManag
>> er-class-comment
>>
>> Since it is an important topic, and sometimes too low level for some
>> people, I'd like to have some feedback. Is it well explained? Is there
>> something that is key for you and is missing?
>>
>> I know that the comment is not exhaustive, it can be iterated and
>> enhanced, but we can have a nice first version of it for the release.
>>
>> Thanks,
>> Guille
>>
>> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>>
>>
>> I am the object responsible of managing how sessions work in Pharo.
>> A session defines the boundaries of work in the image.
>>
>> A new session starts when the image starts or when the image is saved.
>> A session ends when the image quits or it is saved.
>> There is only one active session at a single point of time.
>> Saving the image causes the active to stop, and starts a new session.
>>
>
>
>
>
>
>>
>> The current active session is hold by myself, the singleton session
>> manager. It can be accessed by doing:
>>
>>   SessionManager default currentSession.
>>
>> The most important responsibility of the session manager is to manage how
>> resources and services in the image are started up and shut down at the
>> beginning and end of a session respectively. For example, when the image
>> starts, several initialization routines should be executed to make sure
>> that the image has access to the graphic drivers, the standard input/output
>> file descriptors and so on.
>>
>> Such initialization happens in the #snapshot:andQuit: method.
>> #snapshot:andQuit: will:
>>  - stop current session
>>  - save current image if requested
>>  - quit if requested
>>  - start a new session
>>
>> When a session is started, all elements registered in the startup list
>> are started up.
>> When a session is stopped, all elements registered in the shutdown list
>> are shut down.
>>
>> # Managing Startup and Shutdown lists
>>
>> The startup and shutdown lists can be accessed through the messages:
>>
>> SessionManager default startupList.
>> SessionManager default shutdownList.
>>
>> In general terms, the shutdown list is the startup list reversed.
>>
>> Upon a startup [shutdown], all elements in the startup list are sent the
>> message #startup: [#shutdown:] with a boolean as argument that indicates
>> wether the image is being saved [closed].
>>
>> Internally, startup and shutdown lists are prioritised. Priorities are
>> managed by startup categories. By default the session manager includes the
>> following categories in decreasing priority order:
>>
>> - System
>> - Network
>> - Graphical User Interface
>> - Tools
>> - User
>>
>> Categories can be accessed as follows:
>>
>> SessionManager default categoryNamed: aName.
>>
>> New categories can be registered in the system using the messages:
>>
>> SessionManager default createCategory: aCategoryName.
>> SessionManager default createCategory: aCategoryName after:
>> anotherCategoryName.
>>
>> Finally, to subscribe some resource handler to the startup shutdown
>> lists, we need to subscribe a handler, subclass of AbstractSessionHandler.
>> The most common handler implementation so far is the ClassSessionHandler,
>> that allows to subscribe a class for startup and shutdown, keeping
>> backwards compatibility to the old startup mechanism.
>>
>> ClassSessionHandler forClassNamed: aClassName
>>
>> We can register a session handler as follows
>>
>> SessionManager default
>> register: (ClassSessionHandler forClassNamed: self name)
>> inCategory: SessionManager default systemCategory.
>> Or alternatively, by talking to the corresponding 

Re: [Pharo-dev] Updated tech talk archive

2017-04-26 Thread Ben Coman
If Pharo 6 makes it out the door before the end of May, consider swapping
Roassal & Pharo7developmentMethod.
cheers -ben

On Wed, Apr 26, 2017 at 10:31 PM, marcus.den...@inrira.fr <
marcus.den...@inria.fr> wrote:

> Good idea!
>
> Pharo Tech talk Jun has no topic yet, so we could use that.
>
> Marcus
>
> On 26 Apr 2017, at 16:18, Ben Coman  wrote:
>
> Thanks Marcus.
> I see the schedule here... https://association.pharo.org/events
> doesn't mention Pharo 7 development process.
> I think that will be useful to have a presentation.
> Maybe a special-edition TechTalk aligned shortly after Pharo 6 Release?
>
> cheers -ben
>
> On Wed, Apr 26, 2017 at 7:09 PM, marcus.den...@inrira.fr <
> marcus.den...@inria.fr> wrote:
>
>> http://pharo.org/TechTalk
>>
>> Now has a link to the recoding of yesterday
>>
>> Marcus
>>
>
>
>


Re: [Pharo-dev] calling methods directly on traits

2017-04-26 Thread Peter Uhnak
Ah, right. Well, one less dead-end to worry about. :)

Thanks,
Peter

On Wed, Apr 26, 2017 at 04:20:07PM +0200, Guillermo Polito wrote:
> Traits are instances as classes are instances :)
> 
> On Wed, Apr 26, 2017 at 3:22 PM, Peter Uhnak  wrote:
> 
> > But trait is already instance, no? (instance of Trait class)
> > Or is that like an instance of an instance?
> >
> > On Wed, Apr 26, 2017 at 03:03:42PM +0200, Guillermo Polito wrote:
> > > Hi,
> > >
> > > No, it's the same as in classes. If methods are on the instance side, you
> > > cannot call them unless you instantiate the class.
> > >
> > > Guille
> > >
> > > On Wed, Apr 26, 2017 at 2:24 PM, Peter Uhnak  wrote:
> > >
> > > > Hi,
> > > >
> > > > would it be possible to somehow call a method directly on a trait?
> > > >
> > > > e.g.
> > > >
> > > > Trait named: #TMyTrait.
> > > >
> > > > then add method
> > > >
> > > > TMyTrait>>twelve
> > > > ^ 12
> > > >
> > > >
> > > > and then I could do `TMyTrait twelve "-> 12"`.
> > > >
> > > > Note that I cannot use Class-side of a regular class, because of name
> > > > clashes with system (Class, ClassDescription, ...) selectors.
> > > >
> > > > Thanks,
> > > > Peter
> > > >
> > > >
> >
> >



[Pharo-dev] OmSessionStore and SnapshotDone event (was: saving an image on windows and opening it on mac problems)

2017-04-26 Thread Andrei Chis
Hi,

OmSessionStore registers an action (OmSessionStore>>#store) when the
event SnapshotDone is triggered.
However this event is triggered immediately when an image is opened after
being saved, before the file system was reset.
This means that OmSessionStore>>#store is called before the file system is
reset.
Hence, if you save an image on windows and open it on mac you run into
issues as OmSessionStore>>#store performs file operations that will work
with a WindowsStore instead of a MacStore.

Does OmSessionStore need to register to SnapshotDone events?
When the image is opened OmSessionStore>>#store will be called anyway as
OmSessionStore registers a start-up action.

Cheers,
Andrei


Re: [Pharo-dev] saving an image on windows and opening it on mac problems

2017-04-26 Thread Andrei Chis
Any hints about how to handle Freetype fonts?
Right now I'm getting also some segmentation faults when opening on mac an
image saved on windows, that seem related to Freetype fonts.

On Wed, Apr 26, 2017 at 5:04 PM, p...@highoctane.be 
wrote:

> You will also face serious fun with Freetype fonts.
>
> Phil
>
> On Wed, Apr 26, 2017 at 3:06 PM, Andrei Chis 
> wrote:
>
>> Hi all,
>>
>> I saw that there are a few issues about images saved on an operating
>> system not working when opened on other operating systems:
>> - https://pharo.fogbugz.com/f/cases/19852/Unable-to-open-ima
>> ge-in-OSX-after-it-has-been-updated-in-Windows
>> - https://pharo.fogbugz.com/f/cases/19869/Infinite-loop-on-m
>> ac-when-opening-an-image-saved-on-windows
>> - https://pharo.fogbugz.com/f/cases/19272/Image-freezes-on-L
>> inux-if-it-was-previously-saved-on-Windows
>> - http://forum.world.st/Image-freezes-on-Linux-if-it-was-pre
>> viously-saved-on-Windows-td4903258.html
>>
>> I gave the fix in case 19869 a try and with it I can save an image on
>> windows and open it on mac, however, there are some side effects.
>> First several folders having the following name are created in the image
>> folder:
>>
>> '\Users\andrei\test-image'
>> '\Users\andrei\test-image\pharo-local\'
>> '\Users\andrei\test-image\pharo-local\ombu-sessions'
>>
>> Second, I can only open the image on man once. The second time I get the
>> following stack:
>>
>> [31mPrimitiveFailed: primitive #createDirectory: in WindowsStore failed
>> [0mWindowsStore(Object)>>primitiveFailed:
>> WindowsStore(Object)>>primitiveFailed
>> WindowsStore(DiskStore)>>createDirectory:
>> WindowsStore(FileSystemStore)>>ensureCreateDirectory:
>> WindowsStore(FileSystemStore)>>ensureCreateDirectory:
>> WindowsStore(FileSystemStore)>>ensureCreateDirectory:
>> WindowsStore(FileSystemStore)>>ensureCreateDirectory:
>> WindowsStore(FileSystemStore)>>ensureCreateDirectory:
>> WindowsStore(FileSystemStore)>>ensureCreateDirectory:
>> FileSystem>>ensureCreateDirectory:
>> FileReference>>ensureCreateDirectory
>> OmSessionStore>>resetWithStoreNamed:
>> OmSessionStore>>resetWithNextStoreName
>> OmSessionStore>>store
>> WeakMessageSend>>value
>> WeakMessageSend>>cull:
>> WeakMessageSend>>cull:cull:
>> [ action cull: arg1 cull: announcer ] in LegacyWeakSubscription(WeakAnn
>> ouncementSubscription)>>deliver: in Block: [ action cull: arg1 cull:
>> announcer ]
>> BlockClosure>>on:do:
>> BlockClosure>>on:fork:
>> LegacyWeakSubscription(WeakAnnouncementSubscription)>>deliver:
>> [ tmp4 deliver: arg1 ] in SubscriptionRegistry>>deliver:to:startingAt:
>> in Block: [ tmp4 deliver: arg1 ]
>> BlockClosure>>ifCurtailed:
>> SubscriptionRegistry>>deliver:to:startingAt:
>> SubscriptionRegistry>>deliver:to:
>> SubscriptionRegistry>>deliver:
>> SystemAnnouncer(Announcer)>>announce:
>> SystemAnnouncer>>announce:
>> SystemAnnouncer>>snapshotDone:
>> SessionManager>>snapshot:andQuit:
>> [0m
>>
>> So it seems that OmSessionStore is not reset and holds a reference to a
>> the windows path which it tries to create.
>>
>> Cheers,
>> Andrei
>>
>>
>>
>>
>>
>


crash.dmp
Description: Binary data


Re: [Pharo-dev] saving an image on windows and opening it on mac problems

2017-04-26 Thread p...@highoctane.be
You will also face serious fun with Freetype fonts.

Phil

On Wed, Apr 26, 2017 at 3:06 PM, Andrei Chis 
wrote:

> Hi all,
>
> I saw that there are a few issues about images saved on an operating
> system not working when opened on other operating systems:
> - https://pharo.fogbugz.com/f/cases/19852/Unable-to-open-
> image-in-OSX-after-it-has-been-updated-in-Windows
> - https://pharo.fogbugz.com/f/cases/19869/Infinite-loop-on-
> mac-when-opening-an-image-saved-on-windows
> - https://pharo.fogbugz.com/f/cases/19272/Image-freezes-on-
> Linux-if-it-was-previously-saved-on-Windows
> - http://forum.world.st/Image-freezes-on-Linux-if-it-was-
> previously-saved-on-Windows-td4903258.html
>
> I gave the fix in case 19869 a try and with it I can save an image on
> windows and open it on mac, however, there are some side effects.
> First several folders having the following name are created in the image
> folder:
>
> '\Users\andrei\test-image'
> '\Users\andrei\test-image\pharo-local\'
> '\Users\andrei\test-image\pharo-local\ombu-sessions'
>
> Second, I can only open the image on man once. The second time I get the
> following stack:
>
> [31mPrimitiveFailed: primitive #createDirectory: in WindowsStore failed
> [0mWindowsStore(Object)>>primitiveFailed:
> WindowsStore(Object)>>primitiveFailed
> WindowsStore(DiskStore)>>createDirectory:
> WindowsStore(FileSystemStore)>>ensureCreateDirectory:
> WindowsStore(FileSystemStore)>>ensureCreateDirectory:
> WindowsStore(FileSystemStore)>>ensureCreateDirectory:
> WindowsStore(FileSystemStore)>>ensureCreateDirectory:
> WindowsStore(FileSystemStore)>>ensureCreateDirectory:
> WindowsStore(FileSystemStore)>>ensureCreateDirectory:
> FileSystem>>ensureCreateDirectory:
> FileReference>>ensureCreateDirectory
> OmSessionStore>>resetWithStoreNamed:
> OmSessionStore>>resetWithNextStoreName
> OmSessionStore>>store
> WeakMessageSend>>value
> WeakMessageSend>>cull:
> WeakMessageSend>>cull:cull:
> [ action cull: arg1 cull: announcer ] in LegacyWeakSubscription(
> WeakAnnouncementSubscription)>>deliver: in Block: [ action cull: arg1
> cull: announcer ]
> BlockClosure>>on:do:
> BlockClosure>>on:fork:
> LegacyWeakSubscription(WeakAnnouncementSubscription)>>deliver:
> [ tmp4 deliver: arg1 ] in SubscriptionRegistry>>deliver:to:startingAt: in
> Block: [ tmp4 deliver: arg1 ]
> BlockClosure>>ifCurtailed:
> SubscriptionRegistry>>deliver:to:startingAt:
> SubscriptionRegistry>>deliver:to:
> SubscriptionRegistry>>deliver:
> SystemAnnouncer(Announcer)>>announce:
> SystemAnnouncer>>announce:
> SystemAnnouncer>>snapshotDone:
> SessionManager>>snapshot:andQuit:
> [0m
>
> So it seems that OmSessionStore is not reset and holds a reference to a
> the windows path which it tries to create.
>
> Cheers,
> Andrei
>
>
>
>
>


Re: [Pharo-dev] Updated tech talk archive

2017-04-26 Thread marcus.den...@inrira.fr
Good idea! 

Pharo Tech talk Jun has no topic yet, so we could use that.

Marcus

> On 26 Apr 2017, at 16:18, Ben Coman  wrote:
> 
> Thanks Marcus. 
> I see the schedule here... https://association.pharo.org/events 
> 
> doesn't mention Pharo 7 development process. 
> I think that will be useful to have a presentation.
> Maybe a special-edition TechTalk aligned shortly after Pharo 6 Release?
> 
> cheers -ben
> 
> On Wed, Apr 26, 2017 at 7:09 PM, marcus.den...@inrira.fr 
>   > wrote:
> http://pharo.org/TechTalk 
> 
> Now has a link to the recoding of yesterday
> 
>   Marcus
> 



Re: [Pharo-dev] calling methods directly on traits

2017-04-26 Thread Guillermo Polito
Traits are instances as classes are instances :)

On Wed, Apr 26, 2017 at 3:22 PM, Peter Uhnak  wrote:

> But trait is already instance, no? (instance of Trait class)
> Or is that like an instance of an instance?
>
> On Wed, Apr 26, 2017 at 03:03:42PM +0200, Guillermo Polito wrote:
> > Hi,
> >
> > No, it's the same as in classes. If methods are on the instance side, you
> > cannot call them unless you instantiate the class.
> >
> > Guille
> >
> > On Wed, Apr 26, 2017 at 2:24 PM, Peter Uhnak  wrote:
> >
> > > Hi,
> > >
> > > would it be possible to somehow call a method directly on a trait?
> > >
> > > e.g.
> > >
> > > Trait named: #TMyTrait.
> > >
> > > then add method
> > >
> > > TMyTrait>>twelve
> > > ^ 12
> > >
> > >
> > > and then I could do `TMyTrait twelve "-> 12"`.
> > >
> > > Note that I cannot use Class-side of a regular class, because of name
> > > clashes with system (Class, ClassDescription, ...) selectors.
> > >
> > > Thanks,
> > > Peter
> > >
> > >
>
>


Re: [Pharo-dev] Updated tech talk archive

2017-04-26 Thread Ben Coman
Thanks Marcus.
I see the schedule here... https://association.pharo.org/events
doesn't mention Pharo 7 development process.
I think that will be useful to have a presentation.
Maybe a special-edition TechTalk aligned shortly after Pharo 6 Release?

cheers -ben

On Wed, Apr 26, 2017 at 7:09 PM, marcus.den...@inrira.fr <
marcus.den...@inria.fr> wrote:

> http://pharo.org/TechTalk
>
> Now has a link to the recoding of yesterday
>
> Marcus
>


Re: [Pharo-dev] saving an image on windows and opening it on mac problems

2017-04-26 Thread nacho
Yesterday I had exactly the same problem. Worked with an image in Windows
during the morning and in the evening tried to open it on my mac with no
success.
The error I had was indeed a path problem. The image was trying to resolve a
path in windows.
I eventually got the image running but with limited usage. I couldn't open
the playground.
I ran some test -especially onf FileSystem and saw that a lot of them not
passed.
So had to re-build the image I was working on from latest.
Now I'm opening that image in a Windows machine with no problems so
far...let's see what happens in the evening.
Cheers
Nacho




-
Nacho
Smalltalker apprentice.
Buenos Aires, Argentina.
--
View this message in context: 
http://forum.world.st/saving-an-image-on-windows-and-opening-it-on-mac-problems-tp4944215p4944229.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.



Re: [Pharo-dev] calling methods directly on traits

2017-04-26 Thread Peter Uhnak
But trait is already instance, no? (instance of Trait class)
Or is that like an instance of an instance?

On Wed, Apr 26, 2017 at 03:03:42PM +0200, Guillermo Polito wrote:
> Hi,
> 
> No, it's the same as in classes. If methods are on the instance side, you
> cannot call them unless you instantiate the class.
> 
> Guille
> 
> On Wed, Apr 26, 2017 at 2:24 PM, Peter Uhnak  wrote:
> 
> > Hi,
> >
> > would it be possible to somehow call a method directly on a trait?
> >
> > e.g.
> >
> > Trait named: #TMyTrait.
> >
> > then add method
> >
> > TMyTrait>>twelve
> > ^ 12
> >
> >
> > and then I could do `TMyTrait twelve "-> 12"`.
> >
> > Note that I cannot use Class-side of a regular class, because of name
> > clashes with system (Class, ClassDescription, ...) selectors.
> >
> > Thanks,
> > Peter
> >
> >



[Pharo-dev] saving an image on windows and opening it on mac problems

2017-04-26 Thread Andrei Chis
Hi all,

I saw that there are a few issues about images saved on an operating system
not working when opened on other operating systems:
-
https://pharo.fogbugz.com/f/cases/19852/Unable-to-open-image-in-OSX-after-it-has-been-updated-in-Windows
-
https://pharo.fogbugz.com/f/cases/19869/Infinite-loop-on-mac-when-opening-an-image-saved-on-windows
-
https://pharo.fogbugz.com/f/cases/19272/Image-freezes-on-Linux-if-it-was-previously-saved-on-Windows
-
http://forum.world.st/Image-freezes-on-Linux-if-it-was-previously-saved-on-Windows-td4903258.html

I gave the fix in case 19869 a try and with it I can save an image on
windows and open it on mac, however, there are some side effects.
First several folders having the following name are created in the image
folder:

'\Users\andrei\test-image'
'\Users\andrei\test-image\pharo-local\'
'\Users\andrei\test-image\pharo-local\ombu-sessions'

Second, I can only open the image on man once. The second time I get the
following stack:

[31mPrimitiveFailed: primitive #createDirectory: in WindowsStore failed
[0mWindowsStore(Object)>>primitiveFailed:
WindowsStore(Object)>>primitiveFailed
WindowsStore(DiskStore)>>createDirectory:
WindowsStore(FileSystemStore)>>ensureCreateDirectory:
WindowsStore(FileSystemStore)>>ensureCreateDirectory:
WindowsStore(FileSystemStore)>>ensureCreateDirectory:
WindowsStore(FileSystemStore)>>ensureCreateDirectory:
WindowsStore(FileSystemStore)>>ensureCreateDirectory:
WindowsStore(FileSystemStore)>>ensureCreateDirectory:
FileSystem>>ensureCreateDirectory:
FileReference>>ensureCreateDirectory
OmSessionStore>>resetWithStoreNamed:
OmSessionStore>>resetWithNextStoreName
OmSessionStore>>store
WeakMessageSend>>value
WeakMessageSend>>cull:
WeakMessageSend>>cull:cull:
[ action cull: arg1 cull: announcer ] in
LegacyWeakSubscription(WeakAnnouncementSubscription)>>deliver: in Block: [
action cull: arg1 cull: announcer ]
BlockClosure>>on:do:
BlockClosure>>on:fork:
LegacyWeakSubscription(WeakAnnouncementSubscription)>>deliver:
[ tmp4 deliver: arg1 ] in SubscriptionRegistry>>deliver:to:startingAt: in
Block: [ tmp4 deliver: arg1 ]
BlockClosure>>ifCurtailed:
SubscriptionRegistry>>deliver:to:startingAt:
SubscriptionRegistry>>deliver:to:
SubscriptionRegistry>>deliver:
SystemAnnouncer(Announcer)>>announce:
SystemAnnouncer>>announce:
SystemAnnouncer>>snapshotDone:
SessionManager>>snapshot:andQuit:
[0m

So it seems that OmSessionStore is not reset and holds a reference to a the
windows path which it tries to create.

Cheers,
Andrei


Re: [Pharo-dev] calling methods directly on traits

2017-04-26 Thread Guillermo Polito
Hi,

No, it's the same as in classes. If methods are on the instance side, you
cannot call them unless you instantiate the class.

Guille

On Wed, Apr 26, 2017 at 2:24 PM, Peter Uhnak  wrote:

> Hi,
>
> would it be possible to somehow call a method directly on a trait?
>
> e.g.
>
> Trait named: #TMyTrait.
>
> then add method
>
> TMyTrait>>twelve
> ^ 12
>
>
> and then I could do `TMyTrait twelve "-> 12"`.
>
> Note that I cannot use Class-side of a regular class, because of name
> clashes with system (Class, ClassDescription, ...) selectors.
>
> Thanks,
> Peter
>
>


Re: [Pharo-dev] spec ui as morph

2017-04-26 Thread Stephane Ducasse
I really hope that we will be able to remove the adapter with brick


On Wed, Apr 26, 2017 at 12:38 PM, Peter Uhnak  wrote:

> #buildWithSpec returns the SpecModel's Morph, which is what you want.
>
> `model spec instance`, which is the same as calling `model widget` returns
> the model's Adapter; but don't use the former, I will remove it in Pharo 7.
>
> If you want retrieve the morph from Spec after it was built, then
>
> yourModel widget "-> Adapter"
> yourModel widget widget "-> Morph"
>
> Peter
>
> On Wed, Apr 26, 2017 at 12:23:03PM +0200, Nicolai Hess wrote:
> > 2017-04-26 12:00 GMT+02:00 Christophe Demarey <
> christophe.dema...@inria.fr>:
> >
> > > thanks but the result is not a morph.
> > >
> >
> > Are you sure ?
> >
> > (TextModel new text: Morph comment; buildWithSpec) openInHand -> a Morph
> >
> >
> > > Should I use yourModel buildWithSpec  spec instance?
> > >
> > > > Le 26 avr. 2017 à 11:55, Esteban Lorenzano  a
> > > écrit :
> > > >
> > > > yourModel buildWithSpec.
> > > >
> > > > Esteban
> > > >
> > > >> On 26 Apr 2017, at 11:51, Christophe Demarey <
> > > christophe.dema...@inria.fr> wrote:
> > > >>
> > > >> Hi,
> > > >>
> > > >> Does anyone know how to embed a UI component made with Spec into a
> UI
> > > expecting a morph?
> > > >> It looks like the only way to build a spec UI is to open it with
> > > #openWithSpec that will always embed the component in a window.
> > > >>
> > > >> Thanks,
> > > >> Christophe
> > > >
> > >
> > >
> > >
>
>


[Pharo-dev] calling methods directly on traits

2017-04-26 Thread Peter Uhnak
Hi,

would it be possible to somehow call a method directly on a trait?

e.g.

Trait named: #TMyTrait.

then add method

TMyTrait>>twelve
^ 12


and then I could do `TMyTrait twelve "-> 12"`.

Note that I cannot use Class-side of a regular class, because of name clashes 
with system (Class, ClassDescription, ...) selectors.

Thanks,
Peter



[Pharo-dev] [pharo-project/pharo-core] 8d6c09: 50772

2017-04-26 Thread GitHub
  Branch: refs/heads/5.0
  Home:   https://github.com/pharo-project/pharo-core
  Commit: 8d6c095bda8026b36cb51d1fe4fe3fa0e9e933d7
  
https://github.com/pharo-project/pharo-core/commit/8d6c095bda8026b36cb51d1fe4fe3fa0e9e933d7
  Author: Jenkins Build Server 
  Date:   2017-04-26 (Wed, 26 Apr 2017)

  Changed paths:
M 
RPackage-Core.package/RPackage.class/instance/private/importProtocol_forClass_.st
R ScriptLoader50.package/ScriptLoader.class/instance/pharo - 
scripts/script50771.st
A ScriptLoader50.package/ScriptLoader.class/instance/pharo - 
scripts/script50772.st
R ScriptLoader50.package/ScriptLoader.class/instance/pharo - 
updates/update50771.st
A ScriptLoader50.package/ScriptLoader.class/instance/pharo - 
updates/update50772.st
M 
ScriptLoader50.package/ScriptLoader.class/instance/public/commentForCurrentUpdate.st

  Log Message:
  ---
  50772
19974 backport Traits methods flattened (case 19938)
https://pharo.fogbugz.com/f/cases/19974

http://files.pharo.org/image/50/50772.zip




[Pharo-dev] [pharo-project/pharo-core]

2017-04-26 Thread GitHub
  Branch: refs/tags/50772
  Home:   https://github.com/pharo-project/pharo-core


[Pharo-dev] Updated tech talk archive

2017-04-26 Thread marcus.den...@inrira.fr
http://pharo.org/TechTalk 

Now has a link to the recoding of yesterday

Marcus

Re: [Pharo-dev] spec ui as morph

2017-04-26 Thread Peter Uhnak
#buildWithSpec returns the SpecModel's Morph, which is what you want.

`model spec instance`, which is the same as calling `model widget` returns the 
model's Adapter; but don't use the former, I will remove it in Pharo 7.

If you want retrieve the morph from Spec after it was built, then

yourModel widget "-> Adapter"
yourModel widget widget "-> Morph"

Peter

On Wed, Apr 26, 2017 at 12:23:03PM +0200, Nicolai Hess wrote:
> 2017-04-26 12:00 GMT+02:00 Christophe Demarey :
> 
> > thanks but the result is not a morph.
> >
> 
> Are you sure ?
> 
> (TextModel new text: Morph comment; buildWithSpec) openInHand -> a Morph
> 
> 
> > Should I use yourModel buildWithSpec  spec instance?
> >
> > > Le 26 avr. 2017 à 11:55, Esteban Lorenzano  a
> > écrit :
> > >
> > > yourModel buildWithSpec.
> > >
> > > Esteban
> > >
> > >> On 26 Apr 2017, at 11:51, Christophe Demarey <
> > christophe.dema...@inria.fr> wrote:
> > >>
> > >> Hi,
> > >>
> > >> Does anyone know how to embed a UI component made with Spec into a UI
> > expecting a morph?
> > >> It looks like the only way to build a spec UI is to open it with
> > #openWithSpec that will always embed the component in a window.
> > >>
> > >> Thanks,
> > >> Christophe
> > >
> >
> >
> >



Re: [Pharo-dev] spec ui as morph

2017-04-26 Thread Nicolai Hess
2017-04-26 12:00 GMT+02:00 Christophe Demarey :

> thanks but the result is not a morph.
>

Are you sure ?

(TextModel new text: Morph comment; buildWithSpec) openInHand -> a Morph


> Should I use yourModel buildWithSpec  spec instance?
>
> > Le 26 avr. 2017 à 11:55, Esteban Lorenzano  a
> écrit :
> >
> > yourModel buildWithSpec.
> >
> > Esteban
> >
> >> On 26 Apr 2017, at 11:51, Christophe Demarey <
> christophe.dema...@inria.fr> wrote:
> >>
> >> Hi,
> >>
> >> Does anyone know how to embed a UI component made with Spec into a UI
> expecting a morph?
> >> It looks like the only way to build a spec UI is to open it with
> #openWithSpec that will always embed the component in a window.
> >>
> >> Thanks,
> >> Christophe
> >
>
>
>


Re: [Pharo-dev] spec ui as morph

2017-04-26 Thread Christophe Demarey
thanks but the result is not a morph.
Should I use yourModel buildWithSpec  spec instance?

> Le 26 avr. 2017 à 11:55, Esteban Lorenzano  a écrit :
> 
> yourModel buildWithSpec.
> 
> Esteban
> 
>> On 26 Apr 2017, at 11:51, Christophe Demarey  
>> wrote:
>> 
>> Hi,
>> 
>> Does anyone know how to embed a UI component made with Spec into a UI 
>> expecting a morph?
>> It looks like the only way to build a spec UI is to open it with 
>> #openWithSpec that will always embed the component in a window.
>> 
>> Thanks,
>> Christophe
> 




Re: [Pharo-dev] spec ui as morph

2017-04-26 Thread Esteban Lorenzano
yourModel buildWithSpec.

Esteban

> On 26 Apr 2017, at 11:51, Christophe Demarey  
> wrote:
> 
> Hi,
> 
> Does anyone know how to embed a UI component made with Spec into a UI 
> expecting a morph?
> It looks like the only way to build a spec UI is to open it with 
> #openWithSpec that will always embed the component in a window.
> 
> Thanks,
> Christophe



[Pharo-dev] spec ui as morph

2017-04-26 Thread Christophe Demarey
Hi,

Does anyone know how to embed a UI component made with Spec into a UI expecting 
a morph?
It looks like the only way to build a spec UI is to open it with #openWithSpec 
that will always embed the component in a window.

Thanks,
Christophe


[Pharo-dev] [pharo-project/pharo-core] 9fe373: 60471

2017-04-26 Thread GitHub
  Branch: refs/heads/6.0
  Home:   https://github.com/pharo-project/pharo-core
  Commit: 9fe3731eefd435ce2be74c6d18648c40732c6295
  
https://github.com/pharo-project/pharo-core/commit/9fe3731eefd435ce2be74c6d18648c40732c6295
  Author: Jenkins Build Server 
  Date:   2017-04-26 (Wed, 26 Apr 2017)

  Changed paths:
M 
ConfigurationOfEpicea.package/ConfigurationOfEpicea.class/instance/tags/stable_.st
A 
ConfigurationOfEpicea.package/ConfigurationOfEpicea.class/instance/versions/version820_.st
A 
ConfigurationOfEpicea.package/ConfigurationOfEpicea.class/instance/versions/version821_.st
R Epicea.package/EpAndFilter.class/README.md
R Epicea.package/EpAndFilter.class/class/instance creation/withAll_.st
R Epicea.package/EpAndFilter.class/definition.st
R Epicea.package/EpAndFilter.class/instance/accessing/subFilters.st
R Epicea.package/EpAndFilter.class/instance/accessing/subFilters_.st
R Epicea.package/EpAndFilter.class/instance/comparing/=.st
R Epicea.package/EpAndFilter.class/instance/comparing/hash.st
R Epicea.package/EpAndFilter.class/instance/filtering/accepts_.st
R 
Epicea.package/EpBehaviorCategoryChange.class/instance/accessing/realClassAffected.st
A Epicea.package/EpBehaviorChange.class/instance/testing/doesOverride_.st
R Epicea.package/EpBehaviorChange.class/instance/testing/doesShadow_.st
A Epicea.package/EpBehaviorCommentChange.class/class/instance 
creation/newWithBehavior_oldComment_newComment_oldStamp_newStamp_.st
M Epicea.package/EpBehaviorCommentChange.class/class/instance 
creation/newWith_.st
A 
Epicea.package/EpBehaviorCommentChange.class/instance/initialization/initializeWithBehavior_oldComment_newComment_oldStamp_newStamp_.st
R 
Epicea.package/EpBehaviorCommentChange.class/instance/initialization/initializeWith_.st
R 
Epicea.package/EpBehaviorNameChange.class/instance/accessing/realClassAffected.st
M Epicea.package/EpCategoryChange.class/class/instance creation/named_.st
A Epicea.package/EpCategoryChange.class/class/instance 
creation/named_packageName_.st
A 
Epicea.package/EpCategoryChange.class/class/private/packageNameFromCategoryName_.st
R 
Epicea.package/EpCategoryChange.class/instance/initialization/initializeNamed_.st
A 
Epicea.package/EpCategoryChange.class/instance/initialization/initializeNamed_packageName_.st
R 
Epicea.package/EpCategoryChange.class/instance/initialization/packageNameFromCategoryName_.st
A Epicea.package/EpCategoryChange.class/instance/testing/doesOverride_.st
R Epicea.package/EpCategoryChange.class/instance/testing/doesShadow_.st
M Epicea.package/EpCategoryRename.class/class/instance 
creation/oldName_newName_.st
A Epicea.package/EpCategoryRename.class/class/instance 
creation/oldName_newName_packageName_.st
A 
Epicea.package/EpCategoryRename.class/instance/accessing/initializeOldName_newName_packageName_.st
M 
Epicea.package/EpCategoryRename.class/instance/accessing/newCategoryName.st
M 
Epicea.package/EpCategoryRename.class/instance/accessing/oldCategoryName.st
R 
Epicea.package/EpCategoryRename.class/instance/accessing/oldCategoryName_.st
R 
Epicea.package/EpClassAddition.class/instance/accessing/realClassAffected.st
A Epicea.package/EpClassChange.class/instance/testing/doesOverride_.st
R Epicea.package/EpClassChange.class/instance/testing/doesShadow_.st
R 
Epicea.package/EpClassRemoval.class/instance/accessing/realClassAffected.st
M 
Epicea.package/EpClassRemoval.class/instance/initialization/initializeClassRemoved_.st
A Epicea.package/EpClassRemoval.class/instance/testing/doesOverride_.st
A Epicea.package/EpCodeChange.class/instance/testing/doesOverride_.st
R Epicea.package/EpCodeChange.class/instance/testing/doesShadow_.st
A Epicea.package/EpEvent.class/instance/testing/isEpRefactoring.st
R Epicea.package/EpFilter.class/README.md
R Epicea.package/EpFilter.class/definition.st
R Epicea.package/EpFilter.class/instance/filtering/accepts_.st
A 
Epicea.package/EpMethodChange.class/instance/accessing/methodAffectedProtocol.st
A Epicea.package/EpMethodChange.class/instance/testing/doesOverride_.st
R Epicea.package/EpMethodChange.class/instance/testing/doesShadow_.st
M Epicea.package/EpMonitor.class/instance/announcement 
handling/behaviorRemoved_.st
M Epicea.package/EpMonitor.class/instance/announcement 
handling/categoryAdded_.st
M Epicea.package/EpMonitor.class/instance/announcement 
handling/classAdded_.st
M Epicea.package/EpMonitor.class/instance/announcement 
handling/classRemoved_.st
M Epicea.package/EpMonitor.class/instance/announcement 
handling/protocolRemoved_.st
M Epicea.package/EpMonitor.class/instance/announcement 
handling/traitAdded_.st
M Epicea.package/EpMonitor.class/instance/announcement 
handling/traitModified_.st
M Epicea.package/EpMonitor.class/instance/announcement 
handling/traitRemoved_.st

[Pharo-dev] [pharo-project/pharo-core] 625bfb: 60470

2017-04-26 Thread GitHub
  Branch: refs/heads/6.0
  Home:   https://github.com/pharo-project/pharo-core
  Commit: 625bfb8fea9c0c6c875b0c4edb5c0934c956251d
  
https://github.com/pharo-project/pharo-core/commit/625bfb8fea9c0c6c875b0c4edb5c0934c956251d
  Author: Jenkins Build Server 
  Date:   2017-04-26 (Wed, 26 Apr 2017)

  Changed paths:
M AST-Core.package/RBProgramNode.class/instance/querying/bestNodeFor_.st
M Polymorph-Widgets.package/UITheme.class/class/accessing/current_.st
R ScriptLoader60.package/ScriptLoader.class/instance/pharo - 
scripts/script60469.st
A ScriptLoader60.package/ScriptLoader.class/instance/pharo - 
scripts/script60470.st
R ScriptLoader60.package/ScriptLoader.class/instance/pharo - 
updates/update60469.st
A ScriptLoader60.package/ScriptLoader.class/instance/pharo - 
updates/update60470.st
M 
ScriptLoader60.package/ScriptLoader.class/instance/public/commentForCurrentUpdate.st
M TravisIntegrationHelp.package/TravisIntegrationHelp.class/README.md
M 
TravisIntegrationHelp.package/TravisIntegrationHelp.class/class/accessing/bookName.st
M 
TravisIntegrationHelp.package/TravisIntegrationHelp.class/class/accessing/pages.st
M 
TravisIntegrationHelp.package/TravisIntegrationHelp.class/class/pages/introduction.st
A 
TravisIntegrationHelp.package/TravisIntegrationHelp.class/class/pages/matrix.st
M 
TravisIntegrationHelp.package/TravisIntegrationHelp.class/class/pages/moreInformation.st
M 
TravisIntegrationHelp.package/TravisIntegrationHelp.class/class/pages/step01.st
M 
TravisIntegrationHelp.package/TravisIntegrationHelp.class/class/pages/step02.st
M 
TravisIntegrationHelp.package/TravisIntegrationHelp.class/class/pages/step03.st
M 
TravisIntegrationHelp.package/TravisIntegrationHelp.class/class/pages/step04.st
M 
TravisIntegrationHelp.package/TravisIntegrationHelp.class/class/pages/step05.st

  Log Message:
  ---
  60470
19958 Find and Replace dialog uses black text color in dark theme
https://pharo.fogbugz.com/f/cases/19958

19963 Improvement of TravisIntegrationHelp
https://pharo.fogbugz.com/f/cases/19963

19977 Menu failure on right click in code pane when coming from MessageBrowser
https://pharo.fogbugz.com/f/cases/19977

http://files.pharo.org/image/60/60470.zip