Re: [Tutor] opening a file directly from memory

2009-11-18 Thread mjekl
Humm. Most enlighting. For my case the solution is clearly to have an initialization file. In case the specified extension is not known then I'll prompt the user to save the file and pass on the responsibility. Txs everyone, Miguel _

Re: [Tutor] opening a file directly from memory

2009-11-17 Thread Kent Johnson
On Tue, Nov 17, 2009 at 1:37 PM, wrote: >> Alan Gauld wrote: >>> >>> wrote >>> If you do you can call it explicitly, but if you do not then you need to >>> find a way of getting the OS to tell you, or to leave it to the OS. > > I'm interested in nthis for the sake of generalizing (which is bett

Re: [Tutor] opening a file directly from memory

2009-11-17 Thread Alan Plum
Dammit. Meant to send this over the list. Sorry, Alan. On Di, 2009-11-17 at 21:33 +, Alan Gauld wrote: > Unices, like Linux have file association tables - but these > are often associated with the desktop environment - KDE, Gnome etc. > Finally for text files you should check the EDITOR and V

Re: [Tutor] opening a file directly from memory

2009-11-17 Thread Alan Gauld
wrote If you do you can call it explicitly, but if you do not then you need to find a way of getting the OS to tell you, or to leave it to the OS. I'm interested in nthis for the sake of generalizing (which is better). How can I get the OS to tell me which program to use. alternatively,

Re: [Tutor] opening a file directly from memory

2009-11-17 Thread mjekl
Alan Gauld wrote: wrote Yes. My program knows. A database column stores the complete file name (including extension), and I can be certain the applications will be available to run the file. You still haven't answered the question. We have established that a) The OS knows what program i

Re: [Tutor] opening a file directly from memory

2009-11-15 Thread Dave Angel
mj...@iol.pt wrote: da...@ieee.org wrote: (You forgot to send this message to the list, so I'm forwarding it) mj...@iol.pt wrote: da...@ieee.org wrote: mj...@iol.pt wrote: I'm wondering if I must save a file to memory before opening it. By opening I mean displaying it to the user. I have

Re: [Tutor] opening a file directly from memory

2009-11-15 Thread Alan Gauld
wrote You forgot to answer the question. You say "The OS knows how to open". Does *your* *program* know what program is needed, to open this particular binary data? Yes. My program knows. A database column stores the complete file name (including extension), and I can be certain the app

Re: [Tutor] opening a file directly from memory

2009-11-14 Thread mjekl
da...@ieee.org wrote: (You forgot to send this message to the list, so I'm forwarding it) mj...@iol.pt wrote: da...@ieee.org wrote: mj...@iol.pt wrote: I'm wondering if I must save a file to memory before opening it. By opening I mean displaying it to the user. I have a BLOB field in a db

Re: [Tutor] opening a file directly from memory

2009-11-14 Thread Dave Angel
(You forgot to send this message to the list, so I'm forwarding it) mj...@iol.pt wrote: da...@ieee.org wrote: mj...@iol.pt wrote: I'm wondering if I must save a file to memory before opening it. By opening I mean displaying it to the user. I have a BLOB field in a db and I have managed to re

Re: [Tutor] opening a file directly from memory

2009-11-14 Thread mjekl
da...@ieee.org wrote: mj...@iol.pt wrote: I'm wondering if I must save a file to memory before opening it. By opening I mean displaying it to the user. I have a BLOB field in a db and I have managed to read the blob into a binary fileobject. I've also managed to write it to disk and then I o

Re: [Tutor] opening a file directly from memory

2009-11-14 Thread Dave Angel
mj...@iol.pt wrote: I'm wondering if I must save a file to memory before opening it. By opening I mean displaying it to the user. I have a BLOB field in a db and I have managed to read the blob into a binary fileobject. I've also managed to write it to disk and then I open it by doubleclic

[Tutor] opening a file directly from memory

2009-11-14 Thread mjekl
I'm wondering if I must save a file to memory before opening it. By opening I mean displaying it to the user. I have a BLOB field in a db and I have managed to read the blob into a binary fileobject. I've also managed to write it to disk and then I open it by doubleclicking on it. But I was