我正在将@dynamic属性与-forwardInvocation:
结合使用以在运行时生成属性(如this answer中所述)。现在,当我尝试在GDB中使用这样的属性(假设name
是一个动态属性)时,我总是得到这个:
(gdb) call (void) [myObject setName:@"foo"]
Target does not respond to this message selector.
(gdb) po [myObject name]
Target does not respond to this message selector.
GDB中是否有切换功能才能使其正常工作?
答案 0 :(得分:8)
您可以使用po [myObject performSelector:@selector(name)]
作为解决方法,但这很尴尬。