Storing System Settings using STON
Hi, we have a slice that introduce new storage solution for System Settings. See: https://pharo.fogbugz.com/f/cases/16681/Storing-System-Settings-using-STON You can load it using: Gofer it smalltalkhubUser: 'Pharo' project: 'Pharo50Inbox'; package: 'SLICE-Issue-16681-Storing-System-Settings-using-STON'; load. When you open the Setting Browser, you can see that every setting has new items in context menu: Thanks for reviewing it. Cheers, Juraj
Also you can save and load all settings using the buttons in top right corner
On 12 Oct 2015, at 21:45, Juraj Kubelka <juraj.kubelka@gmail.com> wrote:
Hi,
we have a slice that introduce new storage solution for System Settings. See: https://pharo.fogbugz.com/f/cases/16681/Storing-System-Settings-using-STON <https://pharo.fogbugz.com/f/cases/16681/Storing-System-Settings-using-STON>
You can load it using:
Gofer it smalltalkhubUser: 'Pharo' project: 'Pharo50Inbox'; package: 'SLICE-Issue-16681-Storing-System-Settings-using-STON'; load.
When you open the Setting Browser, you can see that every setting has new items in context menu:
<Screen Shot 2015-10-08 at 11.49.10.png>
Thanks for reviewing it. Cheers, Juraj
Cool! Could you send an example of the file contents? Stef Le 12/10/15 21:45, Juraj Kubelka a écrit :
Hi,
we have a slice that introduce new storage solution for System Settings. See: https://pharo.fogbugz.com/f/cases/16681/Storing-System-Settings-using-STON
You can load it using:
Gofer it smalltalkhubUser: 'Pharo' project: 'Pharo50Inbox'; package: 'SLICE-Issue-16681-Storing-System-Settings-using-STON'; load.
When you open the Setting Browser, you can see that every setting has new items in context menu:
Thanks for reviewing it. Cheers, Juraj
It is like that: [ StoredSetting { #settingNodeIdentifier : '#shoreLine#autoSubmit', #realValue : true }, StoredSetting { #settingNodeIdentifier : '#reIgnore', #realValue : Set [ ] } ]
On 15 Oct 2015, at 09:54, stepharo <stepharo@free.fr> wrote:
Cool!
Could you send an example of the file contents?
Stef
Le 12/10/15 21:45, Juraj Kubelka a écrit :
Hi,
we have a slice that introduce new storage solution for System Settings. See: https://pharo.fogbugz.com/f/cases/16681/Storing-System-Settings-using-STON <https://pharo.fogbugz.com/f/cases/16681/Storing-System-Settings-using-STON>
You can load it using:
Gofer it smalltalkhubUser: 'Pharo' project: 'Pharo50Inbox'; package: 'SLICE-Issue-16681-Storing-System-Settings-using-STON'; load.
When you open the Setting Browser, you can see that every setting has new items in context menu:
<Mail Attachment.png>
Thanks for reviewing it. Cheers, Juraj
Yuriy Tymchuk <yuriy.tymchuk@me.com> writes:
It is like that:
[ StoredSetting { #settingNodeIdentifier : '#shoreLine#autoSubmit', #realValue : true }, StoredSetting { #settingNodeIdentifier : '#reIgnore', #realValue : Set [ ] } ]
why not: { '#shoreLine#autoSubmit' : true, '#reIgnore' : Set [ ] } -- Damien Cassou http://damiencassou.seasidehosting.st "Success is the ability to go from one failure to another without losing enthusiasm." --Winston Churchill
First of all you can add additional data like a version of the project for which the setting should work. Secondly it depends how much do we want to stress the developers. Because you cannot serialize classes in STON. So either we store âStoredSettingâ and âStoredClassSettingâ where the second one knows that is has to convert a value to a class, or we force developers to do that. I late the second one more⦠Uko
On 15 Oct 2015, at 13:09, Damien Cassou <damien.cassou@inria.fr> wrote:
Yuriy Tymchuk <yuriy.tymchuk@me.com> writes:
It is like that:
[ StoredSetting { #settingNodeIdentifier : '#shoreLine#autoSubmit', #realValue : true }, StoredSetting { #settingNodeIdentifier : '#reIgnore', #realValue : Set [ ] } ]
why not:
{ '#shoreLine#autoSubmit' : true, '#reIgnore' : Set [ ] }
-- Damien Cassou http://damiencassou.seasidehosting.st
"Success is the ability to go from one failure to another without losing enthusiasm." --Winston Churchill
And there are more values that has to be treated differently, e.g. fonts, file paths, theme. Cheers, Juraj
On Oct 15, 2015, at 08:32, Yuriy Tymchuk <yuriy.tymchuk@me.com> wrote:
First of all you can add additional data like a version of the project for which the setting should work.
Secondly it depends how much do we want to stress the developers. Because you cannot serialize classes in STON. So either we store âStoredSettingâ and âStoredClassSettingâ where the second one knows that is has to convert a value to a class, or we force developers to do that. I late the second one moreâ¦
Uko
On 15 Oct 2015, at 13:09, Damien Cassou <damien.cassou@inria.fr> wrote:
Yuriy Tymchuk <yuriy.tymchuk@me.com> writes:
It is like that:
[ StoredSetting { #settingNodeIdentifier : '#shoreLine#autoSubmit', #realValue : true }, StoredSetting { #settingNodeIdentifier : '#reIgnore', #realValue : Set [ ] } ]
why not:
{ '#shoreLine#autoSubmit' : true, '#reIgnore' : Set [ ] }
-- Damien Cassou http://damiencassou.seasidehosting.st
"Success is the ability to go from one failure to another without losing enthusiasm." --Winston Churchill
...and developers can substitute their own protocol compatible classes and extend the settings being managed and/or customize the behavior upon certain triggers ... with the added benefit of being editable outside of an image ... .... been doing this for awhile in tODE:) Dale On 10/15/15 7:26 AM, Juraj Kubelka wrote:
And there are more values that has to be treated differently, e.g. fonts, file paths, theme.
Cheers, Juraj
On Oct 15, 2015, at 08:32, Yuriy Tymchuk <yuriy.tymchuk@me.com> wrote:
First of all you can add additional data like a version of the project for which the setting should work.
Secondly it depends how much do we want to stress the developers. Because you cannot serialize classes in STON. So either we store âStoredSettingâ and âStoredClassSettingâ where the second one knows that is has to convert a value to a class, or we force developers to do that. I late the second one moreâ¦
Uko
On 15 Oct 2015, at 13:09, Damien Cassou <damien.cassou@inria.fr> wrote:
Yuriy Tymchuk <yuriy.tymchuk@me.com> writes:
It is like that:
[ StoredSetting { #settingNodeIdentifier : '#shoreLine#autoSubmit', #realValue : true }, StoredSetting { #settingNodeIdentifier : '#reIgnore', #realValue : Set [ ] } ] why not:
{ '#shoreLine#autoSubmit' : true, '#reIgnore' : Set [ ] }
-- Damien Cassou http://damiencassou.seasidehosting.st
"Success is the ability to go from one failure to another without losing enthusiasm." --Winston Churchill
Le 15/10/15 11:58, Yuriy Tymchuk a écrit :
It is like that:
[ StoredSetting { #settingNodeIdentifier : '#shoreLine#autoSubmit', #realValue : true }, StoredSetting { #settingNodeIdentifier : '#reIgnore', #realValue : Set [ ] } ]
Thanks how do you know on which class it should be applied?
On 15 Oct 2015, at 09:54, stepharo <stepharo@free.fr <mailto:stepharo@free.fr>> wrote:
Cool!
Could you send an example of the file contents?
Stef
Le 12/10/15 21:45, Juraj Kubelka a écrit :
Hi,
we have a slice that introduce new storage solution for System Settings. See: https://pharo.fogbugz.com/f/cases/16681/Storing-System-Settings-using-STON
You can load it using:
Gofer it smalltalkhubUser: 'Pharo' project: 'Pharo50Inbox'; package: 'SLICE-Issue-16681-Storing-System-Settings-using-STON'; load.
When you open the Setting Browser, you can see that every setting has new items in context menu:
<Mail Attachment.png>
Thanks for reviewing it. Cheers, Juraj
Hi, It used the setting node id and searches for corresponding SettingNode. And that node knows how to set the value. Cheers, Juraj -- Juraj Kubelka 17. 10. 2015 v 15:29, stepharo <stepharo@free.fr>:
Le 15/10/15 11:58, Yuriy Tymchuk a écrit :
It is like that:
[ StoredSetting { #settingNodeIdentifier : '#shoreLine#autoSubmit', #realValue : true }, StoredSetting { #settingNodeIdentifier : '#reIgnore', #realValue : Set [ ] } ]
Thanks how do you know on which class it should be applied?
On 15 Oct 2015, at 09:54, stepharo <stepharo@free.fr> wrote:
Cool!
Could you send an example of the file contents?
Stef
Le 12/10/15 21:45, Juraj Kubelka a écrit :
Hi,
we have a slice that introduce new storage solution for System Settings. See: https://pharo.fogbugz.com/f/cases/16681/Storing-System-Settings-using-STON
You can load it using:
Gofer it smalltalkhubUser: 'Pharo' project: 'Pharo50Inbox'; package: 'SLICE-Issue-16681-Storing-System-Settings-using-STON'; load.
When you open the Setting Browser, you can see that every setting has new items in context menu:
<Mail Attachment.png>
Thanks for reviewing it. Cheers, Juraj
Here it is: ClassStoredSetting ThemeIconsStoredSetting LogicalFontStoredSetting StrikeFontSetStoredSetting StrikeFontStoredSetting FileLocatorStoredSetting AbsolutePathStoredSetting RelativePathStoredSetting Cheers, Juraj
On Oct 18, 2015, at 06:20, stepharo <stepharo@free.fr> wrote:
Can you past the full tree so that I understand?
Le 12/10/2015 19:45, Juraj Kubelka a écrit :
Hi,
we have a slice that introduce new storage solution for System Settings. See: https://pharo.fogbugz.com/f/cases/16681/Storing-System-Settings-using-STON
You can load it using:
Gofer it smalltalkhubUser: 'Pharo' project: 'Pharo50Inbox'; package: 'SLICE-Issue-16681-Storing-System-Settings-using-STON'; load.
When you open the Setting Browser, you can see that every setting has new items in context menu:
Thanks for reviewing it. Cheers, Juraj
Hi, Thank you for that. When I make store settings for the first time I have an exception on the write stream because the file doesn't exist. I had to create the folder 5.0 and an empty file to get it right. In Pharo 50392 on Linux. I join the stack: FileHandle>>streamError FileHandle>>writeStream FileSystem>>writeStreamOn: FileReference>>writeStream SystemSettingsPersistence>>writeStream SystemSettingsPersistence>>storeExactStoredSettings: SystemSettingsPersistence>>storeStoredSettings: SystemSettingsPersistence>>storeSettingNodes: SystemSettingsPersistence>>storeSettingNodes SettingTree>>storeSettingNodes SettingBrowser>>storeSettings PluggableButtonMorph>>performAction: [ :m | (m containsPoint: evt cursorPoint) ifTrue: [ m enabled ifTrue: [ m performAction: evt ] ] ] in PluggableButtonMorph>>mouseUp: in Block: [ :m | ... Array(SequenceableCollection)>>do: PluggableButtonMorph>>mouseUp: PluggableButtonMorph(Morph)>>handleMouseUp: MouseButtonEvent>>sentTo: PluggableButtonMorph(Morph)>>handleEvent: PluggableButtonMorph(Morph)>>handleFocusEvent: [ ActiveHand := self. ActiveEvent := anEvent. result := focusHolder handleFocusEvent: (anEvent transformedBy: (focusHolder transformedFrom: self)) ] in HandMorph>>sendFocusEvent:to:clear: in Block: [ ActiveHand := self.... BlockClosure>>on:do: WorldMorph(PasteUpMorph)>>becomeActiveDuring: HandMorph>>sendFocusEvent:to:clear: HandMorph>>sendEvent:focus:clear: HandMorph>>sendMouseEvent: HandMorph>>handleEvent: HandMorph>>processEvents [ :h | ActiveHand := h. h processEvents. ActiveHand := nil ] in WorldState>>doOneCycleNowFor: in Block: [ :h | ... Array(SequenceableCollection)>>do: WorldState>>handsDo: -- Cyril Ferlicot http://www.synectique.eu 165 Avenue Bretagne Lille 59000 France
Hi, thank you for the report. Fix in the inbox: https://pharo.fogbugz.com/f/cases/16816/Storing-System-Settings-produces-err... Cheers, Juraj
On Oct 19, 2015, at 07:09, Ferlicot D. Cyril <cyril.ferlicot@gmail.com> wrote:
Le 12/10/2015 19:45, Juraj Kubelka a écrit :
Hi,
we have a slice that introduce new storage solution for System Settings. See: https://pharo.fogbugz.com/f/cases/16681/Storing-System-Settings-using-STON
You can load it using:
Gofer it smalltalkhubUser: 'Pharo' project: 'Pharo50Inbox'; package: 'SLICE-Issue-16681-Storing-System-Settings-using-STON'; load.
When you open the Setting Browser, you can see that every setting has new items in context menu:
Thanks for reviewing it. Cheers, Juraj
Hi,
Thank you for that. When I make store settings for the first time I have an exception on the write stream because the file doesn't exist. I had to create the folder 5.0 and an empty file to get it right. In Pharo 50392 on Linux.
I join the stack:
FileHandle>>streamError FileHandle>>writeStream FileSystem>>writeStreamOn: FileReference>>writeStream SystemSettingsPersistence>>writeStream SystemSettingsPersistence>>storeExactStoredSettings: SystemSettingsPersistence>>storeStoredSettings: SystemSettingsPersistence>>storeSettingNodes: SystemSettingsPersistence>>storeSettingNodes SettingTree>>storeSettingNodes SettingBrowser>>storeSettings PluggableButtonMorph>>performAction: [ :m | (m containsPoint: evt cursorPoint) ifTrue: [ m enabled ifTrue: [ m performAction: evt ] ] ] in PluggableButtonMorph>>mouseUp: in Block: [ :m | ... Array(SequenceableCollection)>>do: PluggableButtonMorph>>mouseUp: PluggableButtonMorph(Morph)>>handleMouseUp: MouseButtonEvent>>sentTo: PluggableButtonMorph(Morph)>>handleEvent: PluggableButtonMorph(Morph)>>handleFocusEvent: [ ActiveHand := self. ActiveEvent := anEvent. result := focusHolder handleFocusEvent: (anEvent transformedBy: (focusHolder transformedFrom: self)) ] in HandMorph>>sendFocusEvent:to:clear: in Block: [ ActiveHand := self.... BlockClosure>>on:do: WorldMorph(PasteUpMorph)>>becomeActiveDuring: HandMorph>>sendFocusEvent:to:clear: HandMorph>>sendEvent:focus:clear: HandMorph>>sendMouseEvent: HandMorph>>handleEvent: HandMorph>>processEvents [ :h | ActiveHand := h. h processEvents. ActiveHand := nil ] in WorldState>>doOneCycleNowFor: in Block: [ :h | ... Array(SequenceableCollection)>>do: WorldState>>handsDo:
--
Cyril Ferlicot
165 Avenue Bretagne Lille 59000 France
participants (6)
-
Dale Henrichs -
Damien Cassou -
Ferlicot D. Cyril -
Juraj Kubelka -
stepharo -
Yuriy Tymchuk