Programmatically settings Store UI preferences

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

Programmatically settings Store UI preferences

stéphane ducasse-2
Hi

I want to programmatically set some Store settings:
       
        I read Store.UI.Settings
        I tried all kinds of expressions:

                ( Smalltalk.Store.UISettings preferenceModelFor:  
#searchOrderEditing) value: #pundlesFirst asValue.
                Smalltalk.Store.UISettings preferenceFor: #searchOrder put:  
UI.Store.Policies prerequisitePolicy searchOrder asValue.

        But nothing works.
        Does anybody have an idea how I get this working.

Stef

Reply | Threaded
Open this post in threaded view
|

Re: Programmatically settings Store UI preferences

Reinout Heeck


VisualWorksSettings storePrerequisitesSeachOrder value: #pundlesFirst


R
-

stéphane ducasse wrote:

> Hi
>
> I want to programmatically set some Store settings:
>
> I read Store.UI.Settings
> I tried all kinds of expressions:
>
> ( Smalltalk.Store.UISettings preferenceModelFor:
> #searchOrderEditing) value: #pundlesFirst asValue.
> Smalltalk.Store.UISettings preferenceFor: #searchOrder put:
> UI.Store.Policies prerequisitePolicy searchOrder asValue.
>
> But nothing works.
> Does anybody have an idea how I get this working.
>
> Stef

Reply | Threaded
Open this post in threaded view
|

Re: Programmatically settings Store UI preferences

stéphane ducasse-2
txtxtxtxtx

Stef
On 19 févr. 06, at 10:08, Reinout Heeck wrote:

> VisualWorksSettings storePrerequisitesSeachOrder value: #pundlesFirst

Reply | Threaded
Open this post in threaded view
|

Re: Programmatically settings Store UI preferences

Reinout Heeck-2
In reply to this post by Reinout Heeck
Hi Stef,

These store (and maybe other) settings are stored in multiple places.
If you look at: Store.UISettings>>prereqOptionAccept you'll see it.
If you ask the UISettings for  preferenceModelFor: #<something>Editing ypu'll get the model used in the UI
not the one that is stored.

So this will work:

( Smalltalk.Store.UISettings preferenceModelFor: #searchOrder) value: #pundlesFirst.
Store.Policies prerequisitePolicy searchOrder: #pundlesFirst.

the seconds line can be replaced by:
VisualWorksSettings storePrerequisitesSeachOrder value: #pundlesFirst

Both lines are necessary to have the setting work everywhere.

Have fun,

Cham


Reinout Heeck wrote:
VisualWorksSettings storePrerequisitesSeachOrder value: #pundlesFirst
  
Alas, this is not enough, it will only alter the Policy not the UISettings and a lot of code still uses the UISettings
R
-

stéphane ducasse wrote:
  
Hi

I want to programmatically set some Store settings:

	I read Store.UI.Settings
	I tried all kinds of expressions:

		( Smalltalk.Store.UISettings preferenceModelFor:
#searchOrderEditing) value: #pundlesFirst asValue.
		Smalltalk.Store.UISettings preferenceFor: #searchOrder put:
UI.Store.Policies prerequisitePolicy searchOrder asValue.

	But nothing works.
	Does anybody have an idea how I get this working.

Stef
    


  


-- 
Cham Püschel
Soops
Johan van Hasseltweg 43-II
1021 KN Amsterdam
Nederland
Tel: +31206222844
Fax: +31206360827

Reply | Threaded
Open this post in threaded view
|

Re: Programmatically settings Store UI preferences

stéphane ducasse-2
Tx

Apparently the settings code is bit unclear.
Now I'm talking political correct :)

Stef


On 19 févr. 06, at 13:47, Cham Püschel wrote:

> Hi Stef,
>
> These store (and maybe other) settings are stored in multiple places.
> If you look at: Store.UISettings>>prereqOptionAccept you'll see it.
> If you ask the UISettings for  preferenceModelFor:  
> #<something>Editing ypu'll get the model used in the UI
> not the one that is stored.
>
> So this will work:
>
> ( Smalltalk.Store.UISettings preferenceModelFor: #searchOrder)  
> value: #pundlesFirst.
> Store.Policies prerequisitePolicy searchOrder: #pundlesFirst.
>
> the seconds line can be replaced by:
> VisualWorksSettings storePrerequisitesSeachOrder value: #pundlesFirst
> Both lines are necessary to have the setting work everywhere.
>
> Have fun,
>
> Cham
>
>
> Reinout Heeck wrote:
>> VisualWorksSettings storePrerequisitesSeachOrder value: #pundlesFirst
> Alas, this is not enough, it will only alter the Policy not the  
> UISettings and a lot of code still uses the UISettings
>> R - stéphane ducasse wrote:
>>> Hi I want to programmatically set some Store settings: I read  
>>> Store.UI.Settings I tried all kinds of expressions:  
>>> ( Smalltalk.Store.UISettings preferenceModelFor:  
>>> #searchOrderEditing) value: #pundlesFirst asValue.  
>>> Smalltalk.Store.UISettings preferenceFor: #searchOrder put:  
>>> UI.Store.Policies prerequisitePolicy searchOrder asValue. But  
>>> nothing works. Does anybody have an idea how I get this working.  
>>> Stef
>
>
> -- Cham Püschel Soops Johan van Hasseltweg 43-II 1021 KN Amsterdam  
> Nederland Tel: +31206222844 Fax: +31206360827

Reply | Threaded
Open this post in threaded view
|

Re: Programmatically settings Store UI preferences

Vassili Bykov
You guys seem to confuse settings, as in variables that store values
defining behavior of something, with Settings, as in the framework for
storing such settings in a generalized form in an XML file and exposing
them in a UI.

The correct code to change the setting (as in a variable somewhere in
Store) is

Store.Policies prerequisitePolicy searchOrder: #pundlesFirst

--Vassili

stéphane ducasse wrote:

> Tx
>
> Apparently the settings code is bit unclear.
> Now I'm talking political correct :)
>
> Stef
>
>
> On 19 févr. 06, at 13:47, Cham Püschel wrote:
>
>> Hi Stef,
>>
>> These store (and maybe other) settings are stored in multiple places.
>> If you look at: Store.UISettings>>prereqOptionAccept you'll see it.
>> If you ask the UISettings for  preferenceModelFor: #<something>Editing
>> ypu'll get the model used in the UI
>> not the one that is stored.
>>
>> So this will work:
>>
>> ( Smalltalk.Store.UISettings preferenceModelFor: #searchOrder) value:
>> #pundlesFirst.
>> Store.Policies prerequisitePolicy searchOrder: #pundlesFirst.
>>
>> the seconds line can be replaced by:
>> VisualWorksSettings storePrerequisitesSeachOrder value: #pundlesFirst
>> Both lines are necessary to have the setting work everywhere.
>>
>> Have fun,
>>
>> Cham
>>
>>
>> Reinout Heeck wrote:
>>> VisualWorksSettings storePrerequisitesSeachOrder value: #pundlesFirst
>> Alas, this is not enough, it will only alter the Policy not the
>> UISettings and a lot of code still uses the UISettings
>>> R - stéphane ducasse wrote:
>>>> Hi I want to programmatically set some Store settings: I read
>>>> Store.UI.Settings I tried all kinds of expressions: (
>>>> Smalltalk.Store.UISettings preferenceModelFor: #searchOrderEditing)
>>>> value: #pundlesFirst asValue. Smalltalk.Store.UISettings
>>>> preferenceFor: #searchOrder put: UI.Store.Policies
>>>> prerequisitePolicy searchOrder asValue. But nothing works. Does
>>>> anybody have an idea how I get this working. Stef
>>
>>
>> -- Cham Püschel Soops Johan van Hasseltweg 43-II 1021 KN Amsterdam
>> Nederland Tel: +31206222844 Fax: +31206360827
>
>


--
Vassili Bykov <[hidden email]>

[:s | s, s printString] value: '[s: | s, s printString] value: '