Traceback (most recent call last): File "plugin.py", line 28, in <module> class Fontbold(FilterWithDialog): objc.BadPrototypeError: Objective-C expects 1 arguments, Python argument has 2 arguments

Traceback (most recent call last):

File “plugin.py”, line 28, in

class Fontbold(FilterWithDialog):

objc.BadPrototypeError: Objective-C expects 1 arguments, Python argument has 2 arguments for <unbound selector Calculate_slope of Fontbold at 0x124b40b90>

Hello, is it not possible for both functions to call other functions? Do you have any good suggestions

When you define a method on an object that is inheriting from NSObject (as all the plugin base classes do) you need to make sure the method names form a valid selector that works with the pyobjc runtime. To avoid that trouble, add a @objc.python_method decorator (as you did in the method mentioned in the other thread).

Pyobjc (— PyObjC - the Python to Objective-C bridge) uses underscores to translate objectiveC selectors to python. So it might be better to use camel case (CalculateSlope()) instead.

Are the defined function names case-sensitive, such as CrossPoint?

All function names are written in uppercase and lowercase format, right

I have changed all function names to the format ‘use camel case (CalculateSlope()’, but there is still this issue

I think this should also be solved by this:

All function definitions have self parameters added and are defined in your order. And I found that if I had only one function to call other functions, I wouldn’t have reported an error. Several functions have called other functions, and the Python argument that reported an error will be.

Can it be because these two functions call the third function at the same time