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.plan...@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.nierstr...@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

http://pharobyexample.org/

Cheers,
- on

Attachment: Blob-AlainPlantec.1.mcz
Description: Binary data

Reply via email to