Ideas for editing config.json

Phil (OmnisList) phil at pgpotter.co.uk
Sun Oct 23 17:17:22 UTC 2022


Hi Das,

By way of a non TMObjs version, an example might be:

Calculaterowas $root.$prefs.$getconfigjson()


CalculateconfigRowas row.macOS


IfconfigRow.$cols.$findname('ignoreTitleClicksInBackground')

Else


DoconfigRow.$cols.$add('ignoreTitleClicksInBackground',kBoolean)

CalculateconfigRow.ignoreTitleClicksInBackgroundas kFalse

Calculaterow.macOSas configRow


Do$root.$prefs.$setconfigjson(row)

End If



regards
Phil Potter
Based in Chester in the UK.

On 23/10/2022 15:31, Doug Easterbrook via omnisdev-en wrote:
> here you go
>
> NOTE:   I’m using tmOBJS.$makeParamROw to dynamically add a column to a row, if it doesn’t exist, or set the value in the row, if it does exist.
>
> if you don’t wnt ot use TMobjs for this purpos, you have to use omnis commands like
>
> if not(row.$cols.$findname(‘MacOS’))
>    do row.$addcols(‘MacOS’)
> end if
> calculate row.macos as aSubRow
>
> or something like that.
>
>
>
> # set some key values in config.json
> Calculate Row as $root.$prefs.$getconfigjson()
> If Row.$cols.$findname('macOS')
> Calculate Row.macOS as TMObjs.$makeparamrow(Row.macOS,'ignoreTitleClicksInBackground',kFalse)
> # V1007363 kfalse to have title on left and icons on right in Monterey.
> # V1007363 Ktrue means put title above icons as traditional - decision for keep like old times
> Calculate Row.macOS as TMObjs.$makeparamrow(Row.macOS,'useToolbarStyleExpanded',kTrue)
> End If
> If Row.$cols.$findname('tooltips')
> Calculate Row.tooltips as TMObjs.$makeparamrow(Row.tooltips,'maxWidth',400)
> End If
> If Row.$cols.$findname('ide')
> Calculate Row.ide as TMObjs.$makeparamrow(Row.ide,'animateIDEcontrols',kFalse,'autoSave',kTrue,'canUseCreateVariableOnVarNotFound',kFalse)
> End If
> If Row.$cols.$findname('windows')
> Calculate Row.windows as TMObjs.$makeparamrow(Row.windows,'hideStudiorgMessage',kTrue)
> End If
> Do $root.$prefs.$setconfigjson(Row)
>
>
>
> Doug Easterbrook
> Arts Management Systems Ltd.
> mailto:doug at artsman.com
> http://www.artsman.com
> Phone (403) 650-1978
>
>> On Oct 23, 2022, at 5:55 AM, Das Goravani<goravanis at gmail.com>  wrote:
>>
>>
>> Is it true that you cannot edit the config.json file for Studio while Omnis is running?
>>
>> That’s my experience.
>>
>> Do you have any ideas of how to edit this file from a running Omnis?
>>
>> If your config.json file needs an edit, and you have many clients running already, how do you do that?
>>
>> If you have an option in your program, and for it to run you need to edit config.json, how do you do it ?
>> _____________________________________________________________
>> Manage your list subscriptions athttps://lists.omnis-dev.com
>> Start a new message ->mailto:omnisdev-en at lists.omnis-dev.com  
> _____________________________________________________________
> Manage your list subscriptions athttps://lists.omnis-dev.com
> Start a new message ->mailto:omnisdev-en at lists.omnis-dev.com  


More information about the omnisdev-en mailing list