Re: [F-Script-talk] FSBOOLEAN return values
Brought to you by:
pmougin
From: Ken F. <ken...@gm...> - 2005-01-09 18:05:29
|
On Sun, 9 Jan 2005 17:00:55 +0000, Alun ap Rhisiart <al...@ma...> wrote: > It appears that the block returns a pointer, which is then always caste > to YES. Unlike NSValue, I don't see a way of getting the plain C value > of of this return value. Good point! Perhaps Philippe will add a mechanism? But you don't need to wait, because you can use a category on FSBoolean. @implementation FSBoolean (ARBoolValue) - (BOOL)arBoolValue // prefix to avoid future conflict { return [self isEqual:[FSBoolean fsTrue]]; } @end and in your Tender class, - (BOOL)hasProposalForSite:(Site *)s { return [[[@"[:proposals :s| proposals site = s \\ #|]" asBlock] value: proposals value:s] arBoolValue]; } -Ken |