Select global guides via script

I am currently trying to select all global guides via script. However, it seems that there is a bug (or at least a problem) that needs to be addressed before this is possible:

When I try to add local guides to the selection, I do it like this

layer = Glyphs.font.selectedLayers[0]
for guide in layer.guides:
  guide.selected = True

And it works.

When I try this with global guides analogously,

master = Glyphs.font.selectedFontMaster
for guide in master.guides:
  guide.selected = True

I end up with the following error:

Traceback (most recent call last):
  File "<macro>", line 3, in <module>
  File "GlyphsApp/GlyphsApp/", line 3820, in <lambda>
  File "GlyphsApp/GlyphsApp/", line 2546, in SetObjectInLayer_selected
AttributeError: 'GSFontMaster' object has no attribute 'selection'

Is it me or is it Glyphs? To me, it seems like it’s trying to add the guides to the selection attribute in GSLayer but searches in the wrong place because the guides are global (not local) and thus children of a GSFontMaster object.

I believe the selection still has to be done inside the layer:


I see, pretty straight forward. Thanks.
The reason I did not try this is because the API documentation says selection is read-only:


List of all selected objects in the glyph. Read-only.

That is a mistake in the API doc then. (I assume an update that has not been documented yet.) Thanks for letting us know. Just tried, and this works in the latest Glyphs 2.6 beta: