Richard Gaskin wrote:
>
Thanks Bob.  While I'm sure RunRev will be interested in catching up
with RB's well thought-out suite of folder paths, I'm not sure how long
I can hold my breath waiting for Linux-related stuff in Bugzilla (I'm
already in my 40s <g>) -- do you know of shell calls to get those paths?

I don't need system or some of the others, just DesktopFolder,
PreferencesFolder, and maybe ApplicationsSupportFolder.

-------------------------------------------------------
Richard:

I don't know of any shell calls that can be made through Linux, but they must exist I imagine. Perhaps one of the Linux wizards out there can help.

As a 2nd class solution, I had the idea of getting these paths in an RB module which would push them out to a text file so that they could be read in RR. The RR prog would then only have to shell the RB module and wait for it to terminate. In principle it was easy, but I don't have any practice in RB at all and I didn't manage to get the module to save the text file!

So here's an appeal. If anyone reading this is familiar with RB, perhaps they can tell me where I am going wrong. Here's the test routine for saving a text file:

  Dim nameline as String
  Dim addressline as String
  Dim phoneline as String
  nameline = "bob"
  addressline = "leonor de barros"
  phoneline = "32332951"

  Dim file as FolderItem
  Dim fileStream as TextOutputStream
  file=GetSaveFolderItem(FileTypes1.Text, "text_saved_by_rb.txt")
  fileStream=file.CreateTextFile
  fileStream.WriteLine nameline
  fileStream.WriteLine addressline
  fileStream.WriteLine phoneline
  fileStream.Close

As per Help (as far as I can gather***), I have defined the FileTypes1 module in the IDE as:

Text    application/text        TEXT    text    .txt

[***Though what is mentioned in the Help is "TextTypes" and not "FileTypes1" as appears for use in the IDE. If this is not an inconsistency in the Help, then it is probably where I am going wrong, and I need to learn how to define "TextTypes" more correctly.]

After getting the above working, I need to get it to save the system paths mentioned in the last e-mail instead of the lines "nameline", "addressline" and "phoneline". I also need to find out how to execute this on prog startup (followed by an immediate quit) rather than putting it into e.g. a button's mouseUp handler.

List moderators please note! I am simply trying to find a quick workaround for what is currently lacking in the Rev for Linux system info provided. I am NOT trying to discuss or promote RB! In fact, noting the difficulty I had trying to save a simple text file in RB, I am not all that impressed! Perhaps this kind of comparison between RB and RR is not such a bad thing.

----------------------------------------
The routine from the previous e-mail:

  Dim f As FolderItem
  f=DesktopFolder
  If f<>Nil then
    MsgBox f.AbsolutePath
  else
    MsgBox "The folderItem does not exist"
  end if

Other available functions are ApplicationsSupportFolder, FontsFolder, PreferencesFolder, StartupItemsFolder, SystemFolder, TemporaryFolder, TrashFolder, SpecialFolder.
----------------------------------------

Bob


_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to