Mark Wieder wrote:

> And now that I'm looking at it again, I don't think that's the proper
> format for the url command. It should be
>
> put url "file:///sys/class/power_supply/BAT0/status" into tStatus

Oddly, I find that LC's file I/O routines don't work with *NIX virtual file system elements. I can use cat in shell to get those values, but neither LC's open/read/close nor get url options for work me.

It would be helpful if you could test this on your machine and verify what I've seen on both of my Ubuntu boxes:

on mouseUp
   put "/proc/meminfo" into tFile
   put url ("file:"& tFile) into t1
   put the result into r1
   --
   open file tFile for read
   put the result into r2
   read from file tFile until EOF
   put it into t2
   close file tFile
   --
   put shell("cat "& tFile) into t3
   put the result into r3
   --
   put "URL: "& t1 && r1 &cr\
   & "Open: "& t2 && r2 &cr\
   & "Shell: "& t3 && r3
end mouseUp

Here both of the first two values are empty, but the latter works fine. In all three cases the result is empty, which I would expect for the one that works but not for the two that don't.

And since you've memorized the LC code base <g>, can you guess why LC's file I/O routines don't work on virtual file system elements the way that nearly everything else in Linux does?

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 ____________________________________________________________________
 ambassa...@fourthworld.com                http://www.FourthWorld.com

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to