472,954 Members | 1,644 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,954 software developers and data experts.

Mimic MS Word open document status "~foo.doc".

I've made a program where I serialize data to a file. Conceptually these
data are handled by the user just as you would a document in MS Word. Load,
Save etc.

I would like my program to prevent loading these data if the file is already
loaded in another instance of the program. Just like MS Word prevents you
from opening the same document twice (at the same time).

I was thinking about setting (and testing for) a file attribute when loading
my data and then remove the file attribute when saving. Is this a good idea
or are there any more clever alternatives that I should know of?

I see in the MS Explorer that word make a ghosted version of the file with a
prepended tilde "~foo.doc" when I open foo.doc. What does this file serve??

Jun 27 '08 #1
0 918

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: David Carroll | last post by:
I'm at my wits end with this silly thing. I'm new to python, so please excuse my impending ignorance ;). I am trying to execute a command, and get the output back into a string variable. Here's...
by: Thomas Guettler | last post by:
Hi, Python 2.3.3 (#1, Feb 5 2005, 16:22:10) on linux2 >>> assert 0, "foo" Traceback (most recent call last): File "<stdin>", line 1, in ? AssertionError: foo >>> assert(0, "foo") >>>
by: Kai Grossjohann | last post by:
The following HTML file invoker.html creates a modal dialog: <html><head> <script language="JavaScript"> function popup() { window.showModalDialog("main.html", null,...
by: Daniel | last post by:
how to make sure a xsl document has valid xsl syntax? i tried loading it into an xml document but that doesnt show syntax errors inside attributes such as "foo/bar" vs "bar\foo"
by: Tom Rodman | last post by:
I want to embed a bash script inside the c program. How could you do the below bash snippet in "c"?: cat > /tmp/foo <<\__EOD_ all kinds of nasty stuff in here including single and double...
by: Rajesh | last post by:
I was informed tht $SUBJECT was asked in M$ interview. Real imp. is no. of ways to achive it. mine sol. was.... int main() { if(printf("foo")) { ; } else { ; }
by: ahammad | last post by:
I have an MFC application that opens up a Word document for editing using automation. Is there a way to pause or freeze the MFC application while the Word doc is being edited? After the editing is...
by: kj | last post by:
My book (Flanagan's JavaScript: The Definitive Guide, 5th ed.) implies on page 111 that the following two constructs are equivalent: ( x.constructor == Foo ) and ( x instanceof Foo ) The...
by: murthychvrm | last post by:
why we declare "ReportDocument doc;" in this coding?what it is doing here? using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using...
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.