EditActionCommand and Readonly flag

SyntaxEditor for WPF Forum

Posted 5 years ago by Boulay Sylvain - Staubli
Version: 14.2.0611
Avatar

Hi,

Why the EditorCommands that modify the document do not test the IsReadOnly flag of the document in the CanExecute ? 

Sylvain

Sylvain

Comments (6)

Posted 5 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

Which specific edit actions are you looking at for this?


Actipro Software Support

Posted 5 years ago by Boulay Sylvain - Staubli
Avatar

Hello,

I was thinking at 

  • EditorCommands.FormatDocument
  • EditorCommands.FormatSelection
  • EditorCommands.MakeUppercase
  • EditorCommands.MakeLowercase
  • EditorCommands.IncrementalSearch
  • EditorCommands.CommentLines
  • EditorCommands.UncommentLines
  • EditorCommands.Indent
  • EditorCommands.Outdent
  • EditorCommands.RequestIntelliPromptSurroundWithSession
  • EditorCommands.RequestIntelliPromptInsertSnippetSession

Thanks

Sylvain

Posted 5 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Ok we will update appropriate commands for the next maintenance release to do document read-only checks in CanExecutes.  They all currently check in Execute.


Actipro Software Support

Posted 5 years ago by Boulay Sylvain - Staubli
Avatar

Thanks 

Sylvain

Posted 2 years ago by Boulay Sylvain - Staubli
Avatar

Hi

I just test it again with version 17.1.650 and version 16.1.630 and it seems that this is not corrected ?

Regards,

Sylvain

Posted 2 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

I just looked at the source code for a number of those commands in the list above and their can-executes all have readonly checks.  Which specific one(s) don't you see it working in?


Actipro Software Support

The latest build of this product (v2019.1 build 0683) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.