Opening SettingBrowser on custom settings

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

Opening SettingBrowser on custom settings

laura
Hi all,

Say that i wanted to open a SettingBrowser showing only the settings defined by 'SystemSystemSettings class >> systemSettingOn:' . How could i do that? 

There is a method 'SettingBrowser >> browse:' . Based on it's comment i tried adding to systemSettingOn: the pragma <banana>, and then sending ' SettingBrowser browse:#('banana') ' but it didn't work.

Best,
Laura
Reply | Threaded
Open this post in threaded view
|

Re: Opening SettingBrowser on custom settings

Pharo Smalltalk Users mailing list

Le 8 avr. 2015 à 18:34, Laura Risani <[hidden email]> a écrit :

Hi all,

Say that i wanted to open a SettingBrowser showing only the settings defined by 'SystemSystemSettings class >> systemSettingOn:' . How could i do that? 

There is a method 'SettingBrowser >> browse:' . Based on it's comment i tried adding to systemSettingOn: the pragma <banana>, and then sending ' SettingBrowser browse:#('banana') ' but it didn't work.

Hello Laura,

try this:

SettingTreeBuilder>>banana
<settingPragmaProcessor>
"Process a <banana> pragma »
"banana just works as a regular setting"
^ self systemsettings

then define your banana settings:

BananaSetting class>>myBananaSettingOn: aBuilder
<banana>
(aBuilder group: #Banana)

then try:
SettingBrowser browse: #('banana’)





Best,
Laura

Reply | Threaded
Open this post in threaded view
|

Re: Opening SettingBrowser on custom settings

Nicolai Hess
In reply to this post by laura


2015-04-08 18:34 GMT+02:00 Laura Risani <[hidden email]>:
Hi all,

Say that i wanted to open a SettingBrowser showing only the settings defined by 'SystemSystemSettings class >> systemSettingOn:' . How could i do that? 

There is a method 'SettingBrowser >> browse:' . Based on it's comment i tried adding to systemSettingOn: the pragma <banana>, and then sending ' SettingBrowser browse:#('banana') ' but it didn't work.

Most (all?) settings use the pragma <systemsettings>, that means you can not filter by the pragma keyword, to only get the settings for one subcategory in the default settings.
But if the settings you want to display are all from one Package, you can browse only settings from that package:

(SettingBrowser new setViewedPackageNames: 'Settings-System')
        open;
        expandAll

 

Best,
Laura

Reply | Threaded
Open this post in threaded view
|

Re: Opening SettingBrowser on custom settings

laura
Hi Alain , hi Nicolai, thank you for your answers.
In fact what i need is to parametrically show all settings i defined on a package, so i'll do the second.


On Wed, Apr 8, 2015 at 6:23 PM, Nicolai Hess <[hidden email]> wrote:


2015-04-08 18:34 GMT+02:00 Laura Risani <[hidden email]>:
Hi all,

Say that i wanted to open a SettingBrowser showing only the settings defined by 'SystemSystemSettings class >> systemSettingOn:' . How could i do that? 

There is a method 'SettingBrowser >> browse:' . Based on it's comment i tried adding to systemSettingOn: the pragma <banana>, and then sending ' SettingBrowser browse:#('banana') ' but it didn't work.

Most (all?) settings use the pragma <systemsettings>, that means you can not filter by the pragma keyword, to only get the settings for one subcategory in the default settings.
But if the settings you want to display are all from one Package, you can browse only settings from that package:

(SettingBrowser new setViewedPackageNames: 'Settings-System')
        open;
        expandAll

 

Best,
Laura


Reply | Threaded
Open this post in threaded view
|

Re: Opening SettingBrowser on custom settings

laura
Mmmm, the second option takes for me a while to open, i'll try using the first option adding an argument to the pragma.

On Wed, Apr 8, 2015 at 7:25 PM, Laura Risani <[hidden email]> wrote:
Hi Alain , hi Nicolai, thank you for your answers.
In fact what i need is to parametrically show all settings i defined on a package, so i'll do the second.


On Wed, Apr 8, 2015 at 6:23 PM, Nicolai Hess <[hidden email]> wrote:


2015-04-08 18:34 GMT+02:00 Laura Risani <[hidden email]>:
Hi all,

Say that i wanted to open a SettingBrowser showing only the settings defined by 'SystemSystemSettings class >> systemSettingOn:' . How could i do that? 

There is a method 'SettingBrowser >> browse:' . Based on it's comment i tried adding to systemSettingOn: the pragma <banana>, and then sending ' SettingBrowser browse:#('banana') ' but it didn't work.

Most (all?) settings use the pragma <systemsettings>, that means you can not filter by the pragma keyword, to only get the settings for one subcategory in the default settings.
But if the settings you want to display are all from one Package, you can browse only settings from that package:

(SettingBrowser new setViewedPackageNames: 'Settings-System')
        open;
        expandAll

 

Best,
Laura