OS10.2.29538 jsCheckbox notation to change checkboxcolor

Phil (OmnisList) phil at pgpotter.co.uk
Mon Mar 22 08:26:19 UTC 2021


Hi Philip,

try:
Do lFieldList.FieldRef().$checkboxcolor.$assign(kJSThemeColorPrimary)

() So that it evaluates your field first, then tries the notation.
The error suggests that the field has that notation...
not the object it is pointing to.

If unsure a cando is always a good place to check the notation

if lFieldList.FieldRef().$checkboxcolor.$cando()
...

regards
Phil Potter
Based in Chester in the UK.

On 22/03/2021 08:04, Philip Tulett wrote:
> Hi List
>
>   
>
> I am trying to change ALL the checkboxcolor throughout the entire library
> using notation.
>
> I first generate a list of ALL the remoteforms and from that I generate a
> list of ALL the fields on ALL the forms.
>
> I then search the field list for Check boxes and update their
> "$checkboxcolor" but get an error message:-
>
> E125207: Problem with notation
> $lvars.lFieldList.FieldRef.$checkboxcolor.$assign When evaluation
> $checkboxcolor.$assign Unrecognized custom attribute
>
>   
>
> I know the know the lFieldList.FieldRef is correct as I can move the fields
> left/right using the following:-
>
> Do lFieldList.FieldRef.$left.$assign(390)
>
>   
>
> Any ideas how I can change the checkboxcolor property ?
>
>   
>
> As a temp work around, I have exported the library to JSON and then used
> Notepad++ to perform a search and replace, but is so much slower when
> working with a large library.
>
>   
>
>   
>
> This is the code I have tried:-
>
> Do $clib.$remoteforms.$makelist($ref.$name,$ref.$ref) Returns
> lRemoteFormList
>
> Do lRemoteFormList.$redefine(lRemoteFormName,lRemoteFormRef)
>
>   
>
> Calculate lFieldList as ''
>
> Do lFieldList.$cols.$add('FormName',kCharacter,kSimplechar,100)
>
> Do lFieldList.$cols.$add('FieldRef',kItemref)
>
> Do lFieldList.$cols.$add('Name',kCharacter,kSimplechar,100)
>
> Do lFieldList.$cols.$add('Ident',kCharacter,kSimplechar,100)
>
> Do lFieldList.$cols.$add('Text',kCharacter,kSimplechar,100)
>
> Do lFieldList.$cols.$add('ObjType',kCharacter,kSimplechar,20)
>
> Do lFieldList.$cols.$add('Component',kCharacter,kSimplechar,20)
>
> Do lFieldList.$cols.$add('FieldStyle',kCharacter,kSimplechar,50)
>
>   
>
> For lRemoteFormList.$line from 1 to lRemoteFormList.$linecount
>
>    Do
> lRemoteFormList.lRemoteFormRef.$objs.$appendlist(lFieldList,lRemoteFormList.
> lRemoteFormName,$ref.$ref,$ref.$name,$ref.$ident,$ref.$text,$ref.$objtype,$r
> ef.$componentctrl,$ref.$fieldstyle)
>
> End For
>
>   
>
> Do lFieldList.$search($ref.Component='Checkbox Control')
>
> Breakpoint
>
> Do lFieldList.$remove(kListKeepSelected)
>
> Breakpoint
>
>   
>
> For lFieldList.$line from 1 to lFieldList.$linecount
>
> Do lFieldList.FieldRef.$checkboxcolor.$assign(kJSThemeColorPrimary)
>
> End For
>
>   
>
>   
>
> Kind regards
>
> Philip
>
>   
>
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com


More information about the omnisdev-en mailing list