EditActionCommand and Readonly flag

SyntaxEditor for WPF Forum

Posted 9 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 9 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 9 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 9 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 9 years ago by Boulay Sylvain - Staubli
Avatar

Thanks 

Sylvain

Posted 7 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 7 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 (v24.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.