Print Page | Close Window

Unable to open read only files

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Syntax Edit
Forum Description: Topics Related to Codejock Syntax Edit
URL: http://forum.codejock.com/forum_posts.asp?TID=5922
Printed Date: 26 April 2024 at 5:24am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Unable to open read only files
Posted By: mgampi
Subject: Unable to open read only files
Date Posted: 27 December 2006 at 10:10am
Hi;
 
When trying to open a readonly file with the provided MDITextEditor sample, the CXTPSyntaxEditDoc::OnOpenDocument() returns FALSE which fails to open the document.
This is because CXTPSyntaxeditDoc::SaveFileData() is called and the default implementation returns FALSE when files with readonly flags set are opened. I did not dig deeper into code, but it looks strange that immediately after opening a file its written back.
Is this behaviour really what codejock developers wanted to implement. For me it seems more obvious to be able to open readonly files without any change in code.
 


-------------
Martin

Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0
Platform: Windows 10 v 1909 (64bit)
Language: VC++ 2017



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net