New topic: 

Double click a document to start a program.

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

       Page 1 of 1
   [ 1 post ]                 Previous topic | Next topic         Author  
Message       Jack Allen           Post subject: Double click a document to 
start a program.Posted: Wed Nov 05, 2008 6:59 am                        
Joined: Mon Jan 02, 2006 4:02 pm
Posts: 31
Location: Glasgow - UK              Hi
I've nearly completed a small application and I decided to give the user the 
option of what happens when the program is started
Do nothing (wait till a menu item is selected)
Open (File -> Open)
New (create a blank document - File -> New)

However, a good application should allow the use to double click a document or 
drop the document on the program icon, the program should start if it isn't 
already running and open that document. I can get this to work if the 
application is already running or the user has selected Do Nothing as the 
startup option. In other circumstances the open dialog or blank document is 
displayed probably because the startup check is made at the bottom of the 
App.Open event which seems the right place to put it. The document I'm trying 
to open seems to be ignored.
I've tried putting extra tests into the App.OpenDocument event but it doesn't 
help and, in anycase, various entries in this forum warn against depending on 
the order events are called, OpenDocument before Open or vice versa - you can't 
depend on it.

I'm running RB4.2 and OSX10.5.5.

What I think I need is a flag that tells me now the program was started, the 
program icon was clicked or a document icon then I can code
If not document-clicked and startupNew then .... display blank document.

Does anyone have any ideas how I can retain my existing functionality but also 
properly support double clicking a document.

Thanks
Jack   
                            Top           Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 1 post ]     

-- 
Over 900 classes with 18000 functions in one REALbasic plug-in. 
The Monkeybread Software Realbasic Plugin v8.1. 

&lt;http://www.monkeybreadsoftware.de/realbasic/plugins.shtml&gt;

[email protected]

Reply via email to