Print Page | Close Window

Document marked as modified although readonly

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=11535
Printed Date: 23 June 2024 at 2:36pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Document marked as modified although readonly
Posted By: peerschindel
Subject: Document marked as modified although readonly
Date Posted: 22 July 2008 at 8:27am
Hi,
 
I hope I will have soon found out and corrected all the small issues
that make the edit control act not perfectly perfect.
 
When you open a file in read-only mode (e.g. in sample MDITextEditor open it and select option "Read Only" from menu),
then all actions to modify the document from the context menu
and main "Edit" menue are still ENABLED (e.g. "Paste", "Cut", "Tabify Selection", "Delete").
 
This itself is only a small issue.
But it becomes really annoying, that when you select e.g. "Paste" or
"Tabify selection", then the document is marked as modified via
"SetDocModified" (called from inside the XTSyntaxEdit control element).
Which in turn means, when you are asked to save, if you close the
document (and that for a read-only document which you most probably
never want to save !)
 
In my mind the easiest way to correct the problem would be
to correct the Update-UI-Handler for ID
ID_EDIT_UNDO,
ID_EDIT_REDO,
ID_EDIT_CUT,
ID_EDIT_PASTE,
ID_EDIT_CLEAR,
ID_EDIT_REPLACE,
in "CXTPSyntaxEditView"
so that they check additionally the condition

... Enable ( .... && GetEditCtrl ().CanEditDoc ())

I mean, again, it can be workaround with/without modifying the library
source code... Maybe all this could be fixed in the next release
so that at least people after me will have a benefit from my problems.
 
Best regards

 
 
 



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