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