Unary annotation pragmas have no arguments, so their only use is as a means to locate and evaluate the method they appear in. For example, the doStuff annotation pragma is only useful for sending the message containing it, as in:Rather than naming the method class explicitly, we can get it from the annotation pragma itself by sending it a methodClass message:Most annotation pragmas are keyword pragmas, and are useful because of the arguments they carry. To use the arguments, send a withArgumentsDo: message to the annotation pragma. The argument is a block with the same number of block arguments as the annotation pragma has keywords. For example:
|