New topic: 

Load data file on double click of the file

<http://forums.realsoftware.com/viewtopic.php?t=45532>

         Page 1 of 1
   [ 3 posts ]                 Previous topic | Next topic          Author  
Message        torrid          Post subject: Load data file on double click of 
the filePosted: Thu Oct 04, 2012 8:22 pm                                 
Joined: Sat Jun 04, 2011 8:29 am
Posts: 365                Hi
In windows, or mac, I know how to map a file ending to my application.... on 
mac have officially registered file type...

Part 1:
My question is how do I map the double click to the method in my app that opens 
the file?

App opens but does not call the routine that reads the data in from the file...
i.e. how do I "map" that?

Part 2: Can I have more than one file type that I set some sort of flag or 
field in there.. and then call different routine to load different type of 
file... even though both types would have the same registerd file type/file 
ending...      
_________________
Currently using:
Windows XP Pro SP3
Real Studio 2011 Release 4.3 Enterprise
and
Mac OS 10.7.4
Real Studio 2011 Release 4.3 Enterprise
(finally also compiled on Mac)  
                             Top                charonn0          Post subject: 
Re: Load data file on double click of the filePosted: Fri Oct 05, 2012 12:19 am 
                                
Joined: Mon Apr 02, 2007 2:08 am
Posts: 914
Location: San Francisco, CA, USA                Generally, the path to the file 
that's double-clicked is passed verbatim in System.CommandLine. e.g. 
Quote:C:\Program Files\MyApp\MyApp.exe C:\Users\Bob\Documents\somedoc.xxx

Since only the file path is given, it's up to your app to determine what sort 
of file it is and whether or not it can/should open it.      
_________________
Boredom Software  
                             Top                amitavak          Post subject: 
Re: Load data file on double click of the filePosted: Fri Oct 05, 2012 1:14 am  
                               
Joined: Mon Jan 02, 2012 1:51 am
Posts: 301
Location: India                If you want to open a file with your application 
by double clicking it.

First you have to map that file type with your application so that when you 
double click on that type of file it will open with your application and In the 
"OpenDocument" event of the "App", you will get the file you double clicked.

I think you already mapped the file type with your application.

torrid wrote:My question is how do I map the double click to the method in my 
app that opens the file?


You can just call the method that opens the file from the "OpenDocument" event 
of the "App".

For the part 2, I did not understand it properly.      
_________________
Amitava Karan
Real Studio 2012 Release 1
Windows 7 (32 bit)
Mac OS X Version 10.7  
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 3 posts ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to