[Gambas-user] how to start a file?
Robert JUHASZ
robert1juhasz at ...626...
Tue Sep 15 01:27:12 CEST 2009
I just read the answers in a reverse order... I believe that the
Desktop.Open is exactly what I need. Many thanks!
I'll run the program on a server and I let the user to decide if he saves
only the link or "attach" the file - in this case I'll copy the referred
file to a dedicated folder on the server and I save the link of this copy.
Regards, Robi
2009/9/14 Dimitris Anogiatis <dosida at ...626...>
> Hey Robi,
>
> What I described above is a way to store information in a configuration
> file. what you need is different
>
> Files are going to be attached where? Where is the pdf going to be stored?
> in the same computer where
> the project is running? or in a website?
>
> To open a file with the default application, try using the gb.desktop
> component and Desktop.Open() as Benoit suggested.
>
> call it like this Desktop.Open("file:///myPDF.pdf") if it is for a file or
> Desktop.Open("http://myserver.com/myPDF.pdf") if the
> file is on a server somewhere on the internet.
>
>
> On Mon, Sep 14, 2009 at 8:40 AM, Robert JUHASZ <robert1juhasz at ...626...
> >wrote:
>
> > Hi Dimitris,
> >
> > Thanks for your answer.
> > I'm not sure if this is exactly what I want but I'll check. I try to tell
> > more concretly my need:
> > I wanna make a small project follower application for my colleagues where
> > they can follow some actions and attach files. For instance a pdf file
> with
> > the customer spec.
> >
> > The data, I'll store in a mySQL database where I can put the path as
> well.
> >
> > When the user (or an other user) opens the project and clicks on the
> link,
> > how can I tell to Gambas to open the file with the default application
> (in
> > the example with acrobat reader). I just need the same effect as when I
> > double click on the icon.
> >
> > If this is what you described just confirm please.
> >
> > Thanks,
> > Robi
> >
> > 2009/9/14 Dimitris Anogiatis <dosida at ...626...>
> >
> > > Hey Robi,
> > >
> > > one of the options is to use the gb.settings library.
> > >
> > > while you're on the IDE press CTRL and P then click on the Componets
> tab,
> > > find gb.settings and click on the box on the left side of the selection
> > > then
> > > press Ok
> > >
> > > now in your code you need to use this on top of your code (ie put this
> on
> > > the first line of your form or module)
> > >
> > > Public pathSettings AS NEW Settings(User.Home &/ Application.Name &/
> > > Application.Name & ".conf")
> > >
> > > this means that if your user account name is robi and your
> application's
> > > name is myApp then the settings
> > > file will be created in this path
> > >
> > > /home/robi/myApp/myapp.conf
> > >
> > > now to save settings you use pathSettings like this
> > >
> > > pathSettings["Files/LoadFrom"]="your path"
> > >
> > > this will create a category Files in your settings file and under that
> it
> > > will create a LoadFrom item
> > > where you can store your path's value
> > >
> > > to read that value all you have to do is
> > >
> > > myPath = pathSettings["Files/LoadFrom"]
> > >
> > > I hope it helps
> > >
> > > Regards
> > > Dimitris
> > >
> > >
> > > On Sun, Sep 13, 2009 at 4:39 PM, yuhej <robert1juhasz at ...626...>
> wrote:
> > >
> > > >
> > > > Hello,
> > > >
> > > > I just start with Gambas (used VB before) and hopefully I found a
> place
> > > > where I can get some answers.
> > > > At this moment I wish to add an option of attaching files in my
> > > application
> > > > (by saving the path) and to open them later.
> > > > Can someone tell me how can I start a file from Gambas? For instance
> a
> > > > spreadsheet with open office?
> > > >
> > > > Thanks for your help in advance.
> > > >
> > > > Robi
> > > > --
> > > > View this message in context:
> > > > http://www.nabble.com/how-to-start-a-file--tp25416046p25416046.html
> > > > Sent from the gambas-user mailing list archive at Nabble.com.
> > > >
> > > >
> > > >
> > > >
> > >
> >
> ------------------------------------------------------------------------------
> > > > Let Crystal Reports handle the reporting - Free Crystal Reports 2008
> > > 30-Day
> > > > trial. Simplify your report design, integration and deployment - and
> > > focus
> > > > on
> > > > what you do best, core application coding. Discover what's new with
> > > > Crystal Reports now. http://p.sf.net/sfu/bobj-july
> > > > _______________________________________________
> > > > Gambas-user mailing list
> > > > Gambas-user at lists.sourceforge.net
> > > > https://lists.sourceforge.net/lists/listinfo/gambas-user
> > > >
> > >
> > >
> >
> ------------------------------------------------------------------------------
> > > Let Crystal Reports handle the reporting - Free Crystal Reports 2008
> > 30-Day
> > > trial. Simplify your report design, integration and deployment - and
> > focus
> > > on
> > > what you do best, core application coding. Discover what's new with
> > > Crystal Reports now. http://p.sf.net/sfu/bobj-july
> > > _______________________________________________
> > > Gambas-user mailing list
> > > Gambas-user at lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/gambas-user
> > >
> >
> >
> ------------------------------------------------------------------------------
> > Let Crystal Reports handle the reporting - Free Crystal Reports 2008
> 30-Day
> > trial. Simplify your report design, integration and deployment - and
> focus
> > on
> > what you do best, core application coding. Discover what's new with
> > Crystal Reports now. http://p.sf.net/sfu/bobj-july
> > _______________________________________________
> > Gambas-user mailing list
> > Gambas-user at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
> >
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
More information about the User
mailing list