Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Syntax Edit
  New Posts New Posts RSS Feed - Document marked as modified although readonly
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Document marked as modified although readonly

 Post Reply Post Reply
Author
Message
peerschindel View Drop Down
Groupie
Groupie


Joined: 12 July 2008
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote peerschindel Quote  Post ReplyReply Direct Link To This Post Topic: Document marked as modified although readonly
    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

 
 
 
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.203 seconds.