Quote Jim:
>> 4D needs to alter the startup mechanism to allow developers to write code 
>> that 
>> runs before the datafile is opened. This would allow a developer to much 
>> more 
>> easily do “the right thing”, which is to put the database (you know, with 
>> data the 
>> user can change) in the Documents or Application Support directories. 
>> Alternatively, if the data is indeed fully static, then the embedded 
>> datafile could 
>> be opened in read-only mode.

Quote Bill: 
> Agreed. This has been long-standing issue, even before the latest changes in 
> OS strategies.

Actually, in v15.0 4D introduced the concept of the Default Data File. 

This feature was implemented in response to the feature request for 
"New Database Event--On Before Opening Database":
http://forums.4d.fr/Post/EN/6265711/1/6265712#6265712 <- request
http://forums.4d.fr/Post/EN/6265711/1/6265712#16558316 <- implementation

more info: 
http://livedoc.4d.com/4Dv15/4D/15/Data-file-management-in-final-applications.300-2964259.en.html
 

----
Opening the data file  

When a user launches a merged application or an update (single-user or 
client-server applications), 4D tries to select a valid data file. Several 
locations are examined by the application successively.
The opening sequence for launching a merged application is:
1) 4D tries to open the Last data file opened, as described below (not 
applicable during initial launch).
2) If not found, 4D tries to open the data file in a default data folder next 
to the .4DC file in read-only mode (new in 4D v15, described below).
3) If not found, 4D tries to open the standard default data file (same name and 
same location as the .4DC file).
4) If not found, 4D displays a standard "Open data file" dialog box.
----

This allows you to include a read-only data file and write code to present your 
own dialog using your own logic to ask the end user to select or create a data 
file at the appropriate location, prior to / instead of  4D asking the end user 
to open/select a data file.

Kind Regards,

Tim PENNER
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to