application specific settings browser - praise and a question

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

application specific settings browser - praise and a question

MartinW
I managed very quickly to make an application specific settings browser using the Pharo Settings Framework (PharoBoids is more fun now: http://smalltalkhub.com/#!/~MartinWalk/Boids). The PBE2 chapter and the in-image-help are very good :)

I just came across one problem (and found the solution on the mailinglist):

----------
If you want a package specific keyword, then your package must add a sepecific method to SettingTreeBuilder.
for drgeosettings if should be:

SettingTreeBuilder>>  drgeosettings
    <settingPragmaProcessor> 
     "Process a<drgeosettings>  pragma"

     currentPragma methodClass theNonMetaClass perform: currentPragma
selector with: self.
----------

and the short solution:
----------
SettingTreeBuilder>>drgeosettings
   ^ self systemsettings
----------

What is the reason for this need to define a specific method? Would it be possible to have one method for all the different pragmas? Is there some useful customisation that can be done in this specific method?