All Manuals > LispWorks Objective-C and Cocoa Interface User Guide and Reference Manual > 2 Objective-C Reference

NextPrevUpTopContentsIndex

can-invoke-p

Function
Summary

Checks whether a given Objective-C method can be invoked.

Package

objc

Signature

can-invoke-p class-or-object-pointer method => flag

Arguments

class-or-object-pointer

A string naming an Objective-C class or a pointer to an Objective-C foreign object.

method

A string naming the method to invoke.

Values

flag

A boolean.

Description

The function can-invoke-p is used to check whether an Objective-C instance and class method can be invoked (is defined) for a given class. If class-or-object-pointer is a string, then it must name an Objective-C class and the class method named method in that class is checked. Otherwise class-or-object-pointer should be a foreign pointer to an Objective-C object or class and the appropriate instance or class method named method is checked. The value of method should be a concatenation of the message name and its argument names, including the colons, for example "setWidth:height:" .

The return value flag is nil if the method cannot be invoked and t otherwise.

See also

invoke


LispWorks Objective-C and Cocoa Interface User Guide and Reference Manual - 15 Dec 2011

NextPrevUpTopContentsIndex