On Dec 5, 2013, at 10:33 PM, Fuchs Ira ihf@bit.net wrote:
I've temporarily given up on using Gambit on Android as it seems to fail almost immediately. I have now downloaded the IOS version. Am I correct that there is no way to access any IOS SDK functions? For example, it appears that set-webView-content is not there (as it is in the Android version). I presume this is due to Apple's restrictions on apps. Perhap someone has a version for jailbroken devices?
Also when I type (exit) in the REPL on IOS, I get: "To exit, press the sleep button for 5 seconds then the home button for 10 seconds." What is that all about?
Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
The source code for the Gambit REPL app is in the Gambit sources (subdirectory contrib/Gambit-REPL), and you are free to compile it yourself and install it on your device, possibly after modifying it. The file intf.scm (and intf#.scm) implement the interface to iOS. So you can set the webView content by calling intf#set-textView-content . The documentation for this function had to be removed from the app for the app to be approved. If you want to know more, please read intf.scm . In particular, you will see the redefinition of the ##exit procedure:
;; Make it impossible to quit the application with a call to "exit" or ;; with a ",q" from the REPL. This is needed to conform to the iOS ;; Developer Program License Agreement (I don't know which section ;; but I remember it had to do with the iOS human interface design).
(set! ##exit (lambda (#!optional (status 0)) (error "To exit, press the sleep button for 5 seconds then the home button for 10 seconds")))
Basically, the iOS human interface design prevents an application from quitting to give the illusion that applications are always "running".
You could
(set! ##exit (lambda (#!optional (status 0)) (##exit-with-err-code (+ code 1)))
to regain the ability to exit.
Just to be clear, I know the message "To exit, press the sleep button for 5 seconds then the home button for 10 seconds" is ironic. It does obey the iOS human interface design rules (in the legal sense of "obey"), but obviously it violates much more basic design principles.
Marc