path setting and consult don't match my intuition...

tejjyid, created Apr 04. 2015 I have assumed that the paths panel allows me to add a path X, such that "consult(filename)" would match "consult(X/filename)", but this is not what happens. Unless I type "consult(path/filename)" I get only a file not found message. jkjk 1.0.5, And. 4.4.2. Apologies if I missed something obvious.

Comments

Re: path setting and consult don't match my intuition...

tejjyid, created Apr 14. 2015 Thank you, I shall give the Hackers Keyboard a try. I've settled on OI file manager, so the menu option is going OK now. I have the development environment set up - so now all I have to do is master Prolog. Or maybe learn to negotiate with it better. Anyway, thanks for a.) the product and b.) your help.

Re: path setting and consult don't match my intuition...

Jan Burse, created Apr 13. 2015 Hi, Yes, currently the file loader in Jekejeke Prolog for Android doesn't work with all file chooser applications. The Problem on the Android platform is that they a) have invented an opaque URL concept so that it is hard to determine a file name from the URLs that a file chooser returns and b) that the specific protocols on the Android platform (different from http and file, for example content) are not yet supported by Jekejeke Prolog for Android. But there is a further trick that can ease your life. If you use for example the Hackers Keyboard, you will find an up arrow key. If this up arrow key is pressed Jekejeke Prolog for Android will recall the previous command and so forth from its command history. Hackers Keyboard: http://play.google.com/store/apps/details?id=org.pocketworkstation.pckeyboard You can then easily edit the previous command if it didn't work. Using the up arrow saves you the work of using copy paste. Hope this helps Bye

Re: path setting and consult don't match my intuition...

tejjyid, created Apr 12. 2015 thanks Jan. I noticed with the ES File Manager as the "loading app", the string passed to jkjk is "file:/document//storage/..." which unsurprisingly doesn't work. I guess this is a quirk of ES, but I mention it for your records...

Re: path setting and consult don't match my intuition...

Jan Burse, created Apr 06. 2015 Hi, The path panel works better on Windows/Linux/Mac than on Android. On Android there is currently the restriction that one can only add archives to the path. This has to do that on Android I am using the class PathClassLoader and not the class URLClassLoader to add paths. And this class only accepts JAR/ZIP/APK or DEX files: http://developer.android.com/reference/dalvik/system/PathClassLoader.html I did not yet figure a workaround. But there are two things that should make your life easier: - You can load a file from the menu item "Load" on android. Install a software such as http://play.google.com/store/apps/details?id=com.speedsoftware.explorer so that the menu item can spawn a file selector. - You can load a file2 from a file1 via a relative path. So for example when you have a file foo/bar/file1.p, and if you put a directive ensure_loaded('../baz/file2.p') in it, it will consult foo/baz/file2.p. Hope this helps. Bye