Method signature hackery - lsit of type signatures?
| From: | Carsten Lucke | Date: | Sun, 27 Apr 2008 18:39:31 +0000 |
| Subject: | Method signature hackery - lsit of type signatures? | ||
| Groups: | php.objc | ||
| Request: | Send a blank email to php-objc+get-21@lists.php.net to get a copy of this message | ||
Hi all,
the README contains a short explanation of the method signature hackery. Where can I get an overview of what options I have here (which abbreviation for which type)? I've seen the @c and also @v (void?). When is it necessary to add a signature and when is it not? I couldn't find anything about that...
Any small hint is highly appreciated. Thanks a lot in advance!
Kind regards,
- Carsten
Method signature hackery The bridge isn't quite smart enough to automatically figure out type mapping
for everything, particularly if you are declaring a delegate object that will
act as a sink for events, so you will need to provide hints in some cases.
You can provide the hints using doc-comments like this: class MyDelegate extends NSObject { /** @objc:signature c@: */ function run_() { echo "*** run!\n"; } } the "c@:" part defines the return type and parameters for the run_ method; it
is a standard objective-C stype signature.