I convert it in a portable code as below, Does it look correct for you ? :
openURI: aString | sharedApp nsUrl nsStringUTF8 urlWithString | sharedApp := ((Smalltalk at: #ObjectiveCBridge) perform: #classObjectForName: with: #UIApplication) perform: #sharedApplication. nsUrl := (Smalltalk at: #ObjectiveCBridge) perform: #classObjectForName: with: #NSURL. nsStringUTF8 := aString perform: #asNSStringUTF8. urlWithString := nsUrl perform: #URLWithString: with: nsStringUTF8. sharedApp perform: #openURL with: urlWithString.
"(ObjectiveCBridge classObjectForName: #UIApplication) sharedApplication openURL: ((ObjectiveCBridge classObjectForName: #NSURL) URLWithString: 'http://www.drgeo.eu' asNSStringUTF8)"
Le 29/01/2013 16:54, Esteban Lorenzano a écrit : > (ObjectiveCBridge classObjectForName: #UIApplication) sharedApplication > openURL: ((ObjectiveCBridge classObjectForName: #NSURL) URLWithString: 'http://www.drgeo.eu' asNSStringUTF8)
-- Dr. Geo - http://drgeo.eu
I convert it in a portable code as below, Does it look correct for you ? :
openURI: aString Name: with: #UIApplication) perform: #sharedApplication. Name: with: #NSURL.
| sharedApp nsUrl nsStringUTF8 urlWithString |
sharedApp := ((Smalltalk at: #ObjectiveCBridge) perform:
#classObjectFor
nsUrl := (Smalltalk at: #ObjectiveCBridge) perform:
#classObjectFor
nsStringUTF8 := aString perform: #asNSStringUTF8.
urlWithString := nsUrl perform: #URLWithString: with: nsStringUTF8.
sharedApp perform: #openURL with: urlWithString.
"(Objective CBridge classObjectForName: #UIApplication) www.drgeo. eu' asNSStringUTF8)"
sharedApplication
openURL: ((ObjectiveCBridge classObjectForName: #NSURL)
URLWithString: 'http://
Le 29/01/2013 16:54, Esteban Lorenzano a écrit : www.drgeo. eu' asNSStringUTF8)
> (ObjectiveCBridge classObjectForName: #UIApplication) sharedApplication
> openURL: ((ObjectiveCBridge classObjectForName: #NSURL) URLWithString: 'http://
-- drgeo.eu
Dr. Geo - http://