Checkbox in menu bar (for settings) and save it

Seems it’s working on both windows and mac with the same code as it uses

FolderItem = SpecialFolder.Preferences.Child(PrefFileName)

Is that correct?