runtime(doc): add some error codes to `:help vim9class` (#13747)

Commit: 
https://github.com/vim/vim/commit/1d4fcfe5515dbef15919dff6f2032a2ffaa9220f
Author: errael <[email protected]>
Date:   Thu Dec 21 08:34:15 2023 -0800

    runtime(doc): add some error codes to `:help vim9class` 
(https://github.com/vim/vim/issues/13747)
    
    Signed-off-by: Ernie Rael <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/runtime/doc/tags b/runtime/doc/tags
index 5ac1db2cb..5c127b23b 100644
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -4504,11 +4504,14 @@ E1400   vim9class.txt   /*E1400*
 E1401  vim9class.txt   /*E1401*
 E1402  vim9class.txt   /*E1402*
 E1403  vim9class.txt   /*E1403*
+E1405  vim9class.txt   /*E1405*
+E1406  vim9class.txt   /*E1406*
 E1407  vim9class.txt   /*E1407*
 E1408  vim9class.txt   /*E1408*
 E1409  vim9class.txt   /*E1409*
 E141   message.txt     /*E141*
 E1410  vim9class.txt   /*E1410*
+E1411  vim9class.txt   /*E1411*
 E142   message.txt     /*E142*
 E143   autocmd.txt     /*E143*
 E144   various.txt     /*E144*
diff --git a/runtime/doc/vim9class.txt b/runtime/doc/vim9class.txt
index 929597c70..c1ebce4af 100644
--- a/runtime/doc/vim9class.txt
+++ b/runtime/doc/vim9class.txt
@@ -103,17 +103,27 @@ below for how to do this more efficiently): >
 You can create an object from this class with the new() method: >
 
        var pos = TextPosition.new(1, 1)
-
+<
 The object variables "lnum" and "col" can be accessed directly: >
 
        echo $'The text position is ({pos.lnum}, {pos.col})'
 <                                                      *E1317* *E1327*
-If you have been using other object-oriented languages you will notice that
-in Vim the object members are consistently referred to with the "this."
-prefix.  This is different from languages like Java and TypeScript.  The
-naming convention makes the object members easy to spot.  Also, when a
-variable does not have the "this." prefix you know it is not an object
-variable.
+If you have been using other object-oriented languages you will notice that in
+Vim, within a class definition, the object members are consistently referred
+to with the "this." prefix.  This is different from languages like Java and
+TypeScript.  The naming convention makes the object members easy to spot.
+Also, when a variable does not have the "this." prefix you know it is not an
+object variable.
+                                                               *E1411*
+From outside the class definition, access an object's methods and variables by
+using the object name followed by a dot following by the member: >
+
+       pos.lnum
+       pos.setCol(10)
+<
+                                                       *E1405* *E1406*
+A class name cannot be used as an expression.  A class name cannot be used in
+the left-hand-side of an assignment.
 
 
 Object variable write access ~

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/E1rGMAR-006kS6-TM%40256bit.org.

Raspunde prin e-mail lui