I tried the new code on NSRange. It seems to work on adding NSRange
into NSValue,
but failed for returning NSRange from NSValue.

NSObject subclass: SmalltalkTool [
        run [ | range |
                range := (NSValue rangeWithLocation:0 length:9).
                'Create range: ' log.
                range log.
                ('Substring of longer string' substringWithRange:range) log.
        ]
]

The results are:

2008-08-04 01:04:31.767 st[14880]  Create range:
2008-08-04 01:04:31.768 st[14880] {location=0, length=9}
st: Uncaught exception NSRangeException, reason: in
substringWithRange:, range { 136769776, 1310946 } extends beyond size
(26)

Thanx.

Yen-Ju

On Sat, Aug 2, 2008 at 2:36 AM, David Chisnall <[EMAIL PROTECTED]> wrote:
> Author: theraven
> Date: Fri Aug  1 20:35:53 2008
> New Revision: 3446
>
> URL: http://svn.gna.org/viewcvs/etoile?rev=3446&view=rev
> Log:
> Added boxing and unboxing support for Foundation types.
>
>
> Added:
>    trunk/Etoile/Languages/Smalltalk/examples/nsrange.st
> Modified:
>    trunk/Etoile/Languages/Smalltalk/SmalltalkKit/CGObjCGNU.cpp
>    trunk/Etoile/Languages/Smalltalk/SmalltalkKit/CodeGenModule.cpp
>    trunk/Etoile/Languages/Smalltalk/SmalltalkKit/GNUmakefile
>    trunk/Etoile/Languages/Smalltalk/SmalltalkKit/LLVMCodeGen.cpp
>    trunk/Etoile/Languages/Smalltalk/SmalltalkKit/MessageSend.m
>    trunk/Etoile/Languages/Smalltalk/Support/GNUmakefile
>    trunk/Etoile/Languages/Smalltalk/main.m
>    trunk/Etoile/Languages/Smalltalk/st.sh
>
>
> _______________________________________________
> Etoile-cvs mailing list
> [EMAIL PROTECTED]
> https://mail.gna.org/listinfo/etoile-cvs
>

_______________________________________________
Etoile-dev mailing list
[email protected]
https://mail.gna.org/listinfo/etoile-dev

Reply via email to