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: 21 November 2024 at 12:12pm
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 22.1.0, new Projects v 24.0.0
Platform: Windows 10 v 22H2 (64bit)
Language: VC++ 2022



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