Thread: How to use NSString methods with Objective-C bridge
How to use NSString methods with
Objective-C bridge
2006-12-06 21:40:06
Le 17 nov. 06 à 11:09, Baptiste Heyman a écrit :
> To resume I have turned off NSString/NSNumber => IoString/IoNumber
> autoconversion (the reverse conversion is still on). To perform it you
> have to use the ioValue slot. For example, you can now type
> NSString stringWithString:("~/") stringByStandardizingPath ioValue
> println
Sorry to be late, I haven't read the list lately.
This is nice, thanks
Perhaps letting the developer chooses what he prefers would be better
in some cases. This could be done by adding a method -[ObjcBridge
setStringAndNumberConversion:] that accepts various constants as
parameter.
Is there a method objcValue for Io objects that behaves symetrically
to ioValue?
Quentin.
--
Quentin Mathé
qmathe%40club-internet.fr">qmatheclub-internet.fr
How to use NSString methods with
Objective-C bridge
2006-12-07 15:20:19
--- In iolanguage%40yahoogroups.com">iolanguageyahoogroups.com, Quentin Mathé <gnustep-quentin...> wrote:
>
> Le 17 nov. 06 à 11:09, Baptiste Heyman a écrit :
> > To resume I have turned off NSString/NSNumber => IoString/IoNumber
> > autoconversion (the reverse conversion is still on). To perform it you
> > have to use the ioValue slot. For example, you can now type
> > NSString stringWithString:("~/") stringByStandardizingPath ioValue
> > println
> Sorry to be late, I haven't read the list lately.
> This is nice, thanks
> Perhaps letting the developer chooses what he prefers would be better
> in some cases. This could be done by adding a method -[ObjcBridge
> setStringAndNumberConversion:] that accepts various constants as
> parameter.
>
> Is there a method objcValue for Io objects that behaves symetrically
> to ioValue? >
> Quentin. >
> --
> Quentin Mathé
> qmathe...
>
No there is no objcValue slot, remember that the Io->Objc
autoconversion is still on, so you don't need to worry when passing Io
objects to Objective-C functions.
Anyway if you want a IoString->NSString conversion, you can use
[NSString stringWithCString:yourIoString], or just add
Sequence objcValue := method([ObjcBridge classNamed("NSString")
stringWithCString:self]).