I'm not groking the current implementation of stracc in the objc bundle.
- (NSString *)${1:thing} { return ${2:f${1/(.)(.*)/\U$1\E$2/}}; }
- (void)set${3:${1/(.)(.*)/\U$1\E$2/}}:(NSString *) $1 { NSString * old${3:Thing} = ${2:fThing}; $2 = [${1:thing} copy]; [old${3:Thing} release]; }
Clearly fThing is not defined so return fThing makes no sense in a getter accessor method. Nor does instantiating another string object in the setter method.
A "working" objc stracc:
- (NSString *)${1:thing} { return ${2:${1/(.)(.*)/$1\E$2/}}; }
- (void)set${3:${1/(.)(.*)/\U$1\E$2/}}:(NSString *)${4:a$3} { $4 = [$4 copy]; [$1 release]; $1 = $4; }
[This models the string accessor implementation defined in Hillegass ... if it's not correct, maybe someone should tell Aaron.]
Refactoring and/or explanation as to the current defined stracc is welcome/encouraged.
-- Mark Grimes Stateful Labs mark@stateful.net