CONTENTS DELETED
The author has deleted this message.
|
Also you can save and load all settings using the buttons in top right corner
|
In reply to this post by Juraj Kubelka-5
Cool!
Could you send an example of the file contents? Stef Le 12/10/15 21:45, Juraj Kubelka a
écrit :
Hi, |
It is like that: [ StoredSetting { #settingNodeIdentifier : '#shoreLine#autoSubmit', #realValue : true }, StoredSetting { #settingNodeIdentifier : '#reIgnore', #realValue : Set [ ] } ]
|
Yuriy Tymchuk <[hidden email]> 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 <[hidden email]> wrote: > > > Yuriy Tymchuk <[hidden email]> 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 > |
CONTENTS DELETED
The author has deleted this message.
|
...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 <[hidden email]> 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 <[hidden email]> wrote: >>> >>> >>> Yuriy Tymchuk <[hidden email]> 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 >>> >> > |
In reply to this post by Uko2
Le 15/10/15 11:58, Yuriy Tymchuk a
écrit :
Thanks how do you know on which class it should be applied?
|
CONTENTS DELETED
The author has deleted this message.
|
Can you past the full tree so that I understand?
|
In reply to this post by Juraj Kubelka-5
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 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 signature.asc (836 bytes) Download Attachment |
CONTENTS DELETED
The author has deleted this message.
|
In reply to this post by stepharo
CONTENTS DELETED
The author has deleted this message.
|
Free forum by Nabble | Edit this page |