> How should I write NSNotFound in Factor code ?
> -1 ? Or 2 63 ^ 1 - ?
I found a way to ask it to Factor-san . :-)
NSArray -> array "a" <NSString> -> indexOfObject:
--- Data stack:
9223372036854775807
inspect
bignum
I am concerned that different values will occur in the 32 bit environment.
> At METHOD: void setMarkedText: id text selectedRange: NSRange range ,
> I would like to write like :
>
> if ([text isMemberOfClass:[NSString class]]) {
> ...
> } else {
> ...
> }
>
> in Factor. I wrote :
>
> NSString -> class
> text swap -> isMemberOfClass: [
> text CF>string str!
> ] [
> text -> string CF>string str!
> ] if
>
> But it does not seem to work well. How should I write it?
NO at Cocoa is 0, so I should write it as:
NSString -> class
text swap -> isMemberOfClass: 0 = not [
Also, for my purpose, I should use "isKindOfClass" instead of
"isMemberOfClass".
--
KUSUMOTO Norio
> 2019/04/15 14:08、KUSUMOTO Norio <[email protected]> のメール:
>
> Hello, all.
>
> How should I write NSNotFound in Factor code ?
> -1 ? Or 2 63 ^ 1 - ?
>
>
> At METHOD: void setMarkedText: id text selectedRange: NSRange range ,
> I would like to write like :
>
> if ([text isMemberOfClass:[NSString class]]) {
> ...
> } else {
> ...
> }
>
> in Factor. I wrote :
>
> NSString -> class
> text swap -> isMemberOfClass: [
> text CF>string str!
> ] [
> text -> string CF>string str!
> ] if
>
> But it does not seem to work well. How should I write it?
>
> --
> KUSUMOTO Norio
>
>
>
>
>
>
>
> _______________________________________________
> Factor-talk mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/factor-talk
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk