Storing System Settings using STON

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

Storing System Settings using STON

Juraj Kubelka-5
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Storing System Settings using STON

Uko2
Also you can save and load all settings using the buttons in top right corner


On 12 Oct 2015, at 21:45, Juraj Kubelka <[hidden email]> 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 

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

Reply | Threaded
Open this post in threaded view
|

Re: Storing System Settings using STON

stepharo
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,

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

Reply | Threaded
Open this post in threaded view
|

Re: Storing System Settings using STON

Uko2
It is like that:

[
StoredSetting {
#settingNodeIdentifier : '#shoreLine#autoSubmit',
#realValue : true
},
StoredSetting {
#settingNodeIdentifier : '#reIgnore',
#realValue : Set [ ]
}
]

On 15 Oct 2015, at 09:54, stepharo <[hidden email]> 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


Reply | Threaded
Open this post in threaded view
|

Re: Storing System Settings using STON

Damien Cassou-2

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

Reply | Threaded
Open this post in threaded view
|

Re: Storing System Settings using STON

Uko2
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
>


Reply | Threaded
Open this post in threaded view
|

Re: Storing System Settings using STON

Juraj Kubelka-5
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Storing System Settings using STON

Dale Henrichs-3
...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
>>>
>>
>


Reply | Threaded
Open this post in threaded view
|

Re: Storing System Settings using STON

stepharo
In reply to this post by Uko2


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 <[hidden email]> 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



Reply | Threaded
Open this post in threaded view
|

Re: Storing System Settings using STON

Juraj Kubelka-5
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Storing System Settings using STON

stepharo
Can you past the full tree so that I understand?




Reply | Threaded
Open this post in threaded view
|

Re: Storing System Settings using STON

CyrilFerlicot
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
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


signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Storing System Settings using STON

Juraj Kubelka-5
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Storing System Settings using STON

Juraj Kubelka-5
In reply to this post by stepharo
CONTENTS DELETED
The author has deleted this message.