Skip to content

Commit 3eb4fde

Browse files
committed
Prefer objc.super() over native one
The native super() doesn't always expose Objective-C methods according to the PyObjC documentation.
1 parent e01df04 commit 3eb4fde

File tree

4 files changed

+4
-7
lines changed

4 files changed

+4
-7
lines changed
Binary file not shown.
Binary file not shown.

CJKAnchorPlacement.glyphsTool/Contents/Resources/plugin.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -233,10 +233,7 @@ def mouseDoubleDown_(self, event):
233233
elif anchor_name == 'BSB':
234234
self.BSBValue = distance_from_edge
235235
return
236-
try:
237-
super(CJKAnchorPlacementTool, self).mouseDoubleDown_(event)
238-
except AttributeError as e:
239-
LogError(repr(e)) # Some encounter AttributeError while I cannot reproduce it.
236+
objc.super(CJKAnchorPlacementTool, self).mouseDoubleDown_(event)
240237

241238
@LSBValue.setter
242239
def LSBValue(self, value):

CJKAnchorPlacement.glyphsTool/Contents/_CodeSignature/CodeResources

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
</data>
1515
<key>Resources/plugin.py</key>
1616
<data>
17-
h47wMCCvx7uHRTCuCv8+KoeHCjw=
17+
C0dV8JTKRYujsIbGxQoHOHewQvA=
1818
</data>
1919
<key>Resources/toolbar.ai</key>
2020
<data>
@@ -53,11 +53,11 @@
5353
<dict>
5454
<key>hash</key>
5555
<data>
56-
h47wMCCvx7uHRTCuCv8+KoeHCjw=
56+
C0dV8JTKRYujsIbGxQoHOHewQvA=
5757
</data>
5858
<key>hash2</key>
5959
<data>
60-
SHYBTpPzKYMVmPbfjrTDtNxo8usimYPc62W6aAd75V0=
60+
ysOzDH+jDFSj+BMCJtqpRUL1K1PJy9DTABx2FfzxClI=
6161
</data>
6262
</dict>
6363
<key>Resources/toolbar.ai</key>

0 commit comments

Comments
 (0)