Support for write-only properties.
[DEVELOPMENT ENVIRONMENT] * NEW: Support for write-only properties.
This commit is contained in:
parent
600a4d961d
commit
c723d4c018
8 changed files with 19 additions and 7 deletions
|
@ -670,6 +670,10 @@ Private Sub ScanClass(hModule As Object, cSymbol As Collection, bModule As Boole
|
|||
If sKind = "p" Then sKind = "r"
|
||||
Inc iInd
|
||||
Break
|
||||
Case "WRITE"
|
||||
If sKind = "p" Then sKind = "w"
|
||||
Inc iInd
|
||||
Break
|
||||
Case "EVENT"
|
||||
sKind = ":"
|
||||
bStatic = False
|
||||
|
|
|
@ -152,6 +152,8 @@ Public Function GetIcon() As String
|
|||
|
||||
Case "r"
|
||||
sIcon = If(bStatic, "s-property-ro", "property-ro")
|
||||
Case "w"
|
||||
sIcon = If(bStatic, "s-property-rw", "property-rw")
|
||||
Case "p"
|
||||
sIcon = If(bStatic, "s-property", "property")
|
||||
Case "v"
|
||||
|
@ -633,6 +635,8 @@ Public Function GetDescription(Optional bBalise As Boolean) As String
|
|||
|
||||
Case "r"
|
||||
sDesc = sStatic & "Property Read"
|
||||
Case "w"
|
||||
sDesc = sStatic & "Property Write"
|
||||
Case "p"
|
||||
sDesc = sStatic & "Property"
|
||||
'CASE "v"
|
||||
|
@ -1439,6 +1443,8 @@ Public Sub WikiGetSyntax() As String[]
|
|||
sSyntax = sSyntax & Keyword("Property") & " "
|
||||
Case "r"
|
||||
sSyntax = sSyntax & Keyword("Property Read") & " "
|
||||
Case "w"
|
||||
sSyntax = sSyntax & Keyword("Property Write") & " "
|
||||
Case "c"
|
||||
sSyntax = sSyntax & Keyword("Const") & " "
|
||||
Case ":"
|
||||
|
|
|
@ -639,19 +639,23 @@ Private Sub InsertProperty(bShift As Boolean)
|
|||
Dim iLine As Integer
|
||||
Dim iCol As Integer
|
||||
Dim aSymbols As String[]
|
||||
Dim bWrite As Boolean
|
||||
|
||||
aSymbols = Highlight.Symbols
|
||||
|
||||
If aSymbols[0] = "STATIC" Then
|
||||
If aSymbols[0] == "STATIC" Then
|
||||
bStatic = True
|
||||
iPos = 2
|
||||
Else
|
||||
iPos = 1
|
||||
Endif
|
||||
|
||||
If aSymbols[iPos] = "READ" Then
|
||||
If aSymbols[iPos] == "READ" Then
|
||||
bRead = True
|
||||
Inc iPos
|
||||
Else If aSymbols[iPos] == "WRITE" Then
|
||||
bWrite = True
|
||||
Inc iPos
|
||||
Endif
|
||||
|
||||
ANOTHER_SYMBOL:
|
||||
|
@ -696,10 +700,8 @@ ANOTHER_SYMBOL:
|
|||
iCol = $hEditor.Column
|
||||
|
||||
$hEditor.Begin
|
||||
InsertFunction(sName & "_Read", sType, False, "", bStatic)
|
||||
If Not bRead Then
|
||||
InsertFunction(sName & "_Write", "", False, "Value As " & sType, bStatic)
|
||||
Endif
|
||||
If Not bWrite Then InsertFunction(sName & "_Read", sType, False, "", bStatic)
|
||||
If Not bRead Then InsertFunction(sName & "_Write", "", False, "Value As " & sType, bStatic)
|
||||
$hEditor.End
|
||||
|
||||
$hEditor.Goto(iCol, iLine)
|
||||
|
|
|
@ -677,7 +677,7 @@
|
|||
{ cmbForceBytecodeVersion ComboBox
|
||||
MoveScaled(61,0,14,4)
|
||||
#Translate = False
|
||||
List = ["", "3.8", "3.15"]
|
||||
List = ["", "3.8", "3.15", "3.18"]
|
||||
}
|
||||
}
|
||||
{ Label19 Label
|
||||
|
|
BIN
app/src/gambas3/img/symbol/property-rw.png
Normal file
BIN
app/src/gambas3/img/symbol/property-rw.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 225 B |
BIN
app/src/gambas3/img/symbol/s-property-rw.png
Normal file
BIN
app/src/gambas3/img/symbol/s-property-rw.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 225 B |
Binary file not shown.
Before Width: | Height: | Size: 210 B After Width: | Height: | Size: 127 B |
Binary file not shown.
Before Width: | Height: | Size: 225 B After Width: | Height: | Size: 140 B |
Loading…
Reference in a new issue