Closed Sbte closed 8 months ago
The API is based on this pattern in system headers on macOS:
@property (readonly, getter=isRemote) BOOL remote
That is, the name of the property does not have the "is" prefix, only the getter method does.
I fixed my issues by not using the @getter
decorator, but instead defining the property after the getter and adding the getter to the property by calling the getter method manually. So the issues weren't caused by the modified names as I initially thought.
The actual issue with the @getter
decorator seems to be that the property is defined twice if the name of the getter does not match the name of the property, and that that breaks the class definition.
Since this is probably a very niche use case and I'm not even completely sure what the actual issue is, I'm not sure if it's worth it to open a new issue for this.
Anyway, thanks for the fast initial reply.
Describe the bug
The getter of a
_C_BOOL
object_property
is prefixed withis
here but the setter is not. This means that when defining thecondition
object_property
in my objective-c header asthe
setIsCondition:
selector will not be found when trying to set the property value.This can be fixed by using
but in this case KVO is broken because KVO gets generated for
condition
, notisCondition
.What does work (for getting, setting and KVO) is implementing an
isCondition
object_property
and then usingBut now I have this oddly named
isIsCondition
getter.So in short, I'm not sure why the getter is prefixed with
is
, but it's causing issues with setters and KVO.Edit: This also seems to break the
depends_on
parameter.