[Pharo-project] Draft chapter on Settings Framework for PBE2 now online
Hi Folks, There is now a draft chapter on the Settings Framework for "Pharo by Example 2" available for review: https://gforge.inria.fr/frs/download.php/28243/Settings.pdf http://pharobyexample.org/ Cheers, - on
thanks oscar! It will force us (alain and me) to have a look at it during our coding week at Roscoff. :) Stef On Feb 8, 2011, at 10:33 AM, Oscar Nierstrasz wrote:
Hi Folks,
There is now a draft chapter on the Settings Framework for "Pharo by Example 2" available for review:
https://gforge.inria.fr/frs/download.php/28243/Settings.pdf
Cheers, - on
Hi Oscar, I would like to build my own application settings in a separated Settings browser, can I use <myAppSettings> like the <systemsettings> pragma? any example code how to do it? Cheers, 2011/2/8 Oscar Nierstrasz <oscar.nierstrasz@gmail.com>:
Hi Folks,
There is now a draft chapter on the Settings Framework for "Pharo by Example 2" available for review:
https://gforge.inria.fr/frs/download.php/28243/Settings.pdf
Cheers, - on
Hi Hernan, First you have to declare your own keyword. To do that, extend SettingTreeBuilder for your application by adding a #myAppSettings method. SettingTreeBuilder>>myAppSettings <settingPragmaProcessor> "Process a <myAppSettings> pragma" currentPragma methodClass theNonMetaClass perform: currentPragma selector with: self. Then you can use <myAppSettings> as you do with <systemsettings> for the settings declarations. In order to open the SettingBrowser, just indicate the keywords you want: (SettingBrowser browse: #('myAppSettings' 'systemsettings')) or (SettingBrowser browse: #('myAppSettings' )) I will update the settings chapter with that. Cheers Alain Le 20/06/2011 00:18, Hernán Morales Durand a écrit :
Hi Oscar,
I would like to build my own application settings in a separated Settings browser, can I use<myAppSettings> like the<systemsettings> pragma? any example code how to do it?
Cheers,
2011/2/8 Oscar Nierstrasz<oscar.nierstrasz@gmail.com>:
Hi Folks,
There is now a draft chapter on the Settings Framework for "Pharo by Example 2" available for review:
https://gforge.inria.fr/frs/download.php/28243/Settings.pdf
Cheers, - on
Thanks alain! Great idea! On Jun 20, 2011, at 8:36 AM, Alain Plantec wrote:
Hi Hernan,
First you have to declare your own keyword. To do that, extend SettingTreeBuilder for your application by adding a #myAppSettings method.
SettingTreeBuilder>>myAppSettings <settingPragmaProcessor> "Process a <myAppSettings> pragma" currentPragma methodClass theNonMetaClass perform: currentPragma selector with: self.
Then you can use <myAppSettings> as you do with <systemsettings> for the settings declarations. In order to open the SettingBrowser, just indicate the keywords you want: (SettingBrowser browse: #('myAppSettings' 'systemsettings')) or (SettingBrowser browse: #('myAppSettings' ))
I will update the settings chapter with that. Cheers Alain
Le 20/06/2011 00:18, Hernán Morales Durand a écrit :
Hi Oscar,
I would like to build my own application settings in a separated Settings browser, can I use<myAppSettings> like the<systemsettings> pragma? any example code how to do it?
Cheers,
2011/2/8 Oscar Nierstrasz<oscar.nierstrasz@gmail.com>:
Hi Folks,
There is now a draft chapter on the Settings Framework for "Pharo by Example 2" available for review:
https://gforge.inria.fr/frs/download.php/28243/Settings.pdf
Cheers, - on
In fact, settingPragmaProcessor was contributed by Andreas Raab to facilitate squeak preferences/Pharo settings compatibility :) Alain Le 20/06/2011 11:41, Stéphane Ducasse a écrit :
Thanks alain! Great idea!
On Jun 20, 2011, at 8:36 AM, Alain Plantec wrote:
Hi Hernan,
First you have to declare your own keyword. To do that, extend SettingTreeBuilder for your application by adding a #myAppSettings method.
SettingTreeBuilder>>myAppSettings <settingPragmaProcessor> "Process a<myAppSettings> pragma" currentPragma methodClass theNonMetaClass perform: currentPragma selector with: self.
Then you can use<myAppSettings> as you do with<systemsettings> for the settings declarations. In order to open the SettingBrowser, just indicate the keywords you want: (SettingBrowser browse: #('myAppSettings' 'systemsettings')) or (SettingBrowser browse: #('myAppSettings' ))
I will update the settings chapter with that. Cheers Alain
Le 20/06/2011 00:18, Hernán Morales Durand a écrit :
Hi Oscar,
I would like to build my own application settings in a separated Settings browser, can I use<myAppSettings> like the<systemsettings> pragma? any example code how to do it?
Cheers,
2011/2/8 Oscar Nierstrasz<oscar.nierstrasz@gmail.com>:
Hi Folks,
There is now a draft chapter on the Settings Framework for "Pharo by Example 2" available for review:
https://gforge.inria.fr/frs/download.php/28243/Settings.pdf
Cheers, - on
Hi Alain, Thank you for the nice answer. One thing that you may like to adapt is the hard-coded reference in #nodeList, because is preventing in #buildPragma: to understand #myAppSettings, after evaluating SettingBrowser browse: #('myAppSettings' ) SettingTree>>nodeList | builder | ^ nodeList ifNil: [ builder := SettingTreeBuilder new. self pragmasDo: [:p | builder buildPragma: p]. nodeList := builder nodeList. nodeList do: [:n | n model: self]. self checkForUnknownParent. self checkForUnknownTarget. self nodeList] or maybe there is another way to specify my own tree builder? (using Pharo1.2beta #12272) 2011/6/20 Alain Plantec <alain.plantec@yahoo.com>:
Hi Hernan,
First you have to declare your own keyword. To do that, extend SettingTreeBuilder for your application by adding a #myAppSettings method.
SettingTreeBuilder>>myAppSettings <settingPragmaProcessor> Â Â "Process a <myAppSettings> pragma" Â Â currentPragma methodClass theNonMetaClass perform: currentPragma selector with: self.
Then you can use <myAppSettings> as you do with <systemsettings> for the settings declarations. In order to open the SettingBrowser, just indicate the keywords you want: (SettingBrowser browse: #('myAppSettings' Â 'systemsettings')) or (SettingBrowser browse: #('myAppSettings' ))
I will update the settings chapter with that. Cheers Alain
Le 20/06/2011 00:18, Hernán Morales Durand a écrit :
Hi Oscar,
I would like to build my own application settings in a separated Settings browser, can I use<myAppSettings> Â like the<systemsettings> pragma? any example code how to do it?
Cheers,
2011/2/8 Oscar Nierstrasz<oscar.nierstrasz@gmail.com>:
Hi Folks,
There is now a draft chapter on the Settings Framework for "Pharo by Example 2" available for review:
https://gforge.inria.fr/frs/download.php/28243/Settings.pdf
Cheers, - on
Hi Hernan, I've checked with #12272 and it works even with this version. but you must extends SettingTreeBuilder with your own pragma keyword method (with the <settingPragmaProcessor>), not SettingTree. A example package is attached. open the settingBrowser with: SettingBrowser browse: #('blobsettings') hope it helps. Alain Le 21/06/2011 01:59, Hernán Morales Durand a écrit :
Hi Alain,
Thank you for the nice answer. One thing that you may like to adapt is the hard-coded reference in #nodeList, because is preventing in #buildPragma: to understand #myAppSettings, after evaluating SettingBrowser browse: #('myAppSettings' )
SettingTree>>nodeList | builder | ^ nodeList ifNil: [ builder := SettingTreeBuilder new. self pragmasDo: [:p | builder buildPragma: p]. nodeList := builder nodeList. nodeList do: [:n | n model: self]. self checkForUnknownParent. self checkForUnknownTarget. self nodeList]
or maybe there is another way to specify my own tree builder? (using Pharo1.2beta #12272)
2011/6/20 Alain Plantec<alain.plantec@yahoo.com>:
Hi Hernan,
First you have to declare your own keyword. To do that, extend SettingTreeBuilder for your application by adding a #myAppSettings method.
SettingTreeBuilder>>myAppSettings <settingPragmaProcessor> "Process a<myAppSettings> pragma" currentPragma methodClass theNonMetaClass perform: currentPragma selector with: self.
Then you can use<myAppSettings> as you do with<systemsettings> for the settings declarations. In order to open the SettingBrowser, just indicate the keywords you want: (SettingBrowser browse: #('myAppSettings' 'systemsettings')) or (SettingBrowser browse: #('myAppSettings' ))
I will update the settings chapter with that. Cheers Alain
Le 20/06/2011 00:18, Hernán Morales Durand a écrit :
Hi Oscar,
I would like to build my own application settings in a separated Settings browser, can I use<myAppSettings> like the<systemsettings> pragma? any example code how to do it?
Cheers,
2011/2/8 Oscar Nierstrasz<oscar.nierstrasz@gmail.com>:
Hi Folks,
There is now a draft chapter on the Settings Framework for "Pharo by Example 2" available for review:
https://gforge.inria.fr/frs/download.php/28243/Settings.pdf
Cheers, - on
participants (4)
-
Alain Plantec -
Hernán Morales Durand -
Oscar Nierstrasz -
Stéphane Ducasse