In the Scopes section of the language report is defined, that "another
object member of the same name must not be defined within the same class".
It turns out that properties and fields can be defined withe same name (as
shown in the program below)
Properties have precedence over fiels (i.e. the property assignment in the
initialize event is handled by the property's setter).
Note, that if the field is declared in the sources after the property,
then the compiler gives an error message (error: Redefinition of Value).
Dominik
Dim Value As String
Dim x As String
Property Value As String
Get
Value = x
End Get
Set
x = Value
Test.Title = x
End Set
End Property
Event Test.Initialize()
Value = 123
End Event
$Properties
$Source $Form
$Define Test $As Form
Layout = 1
Layout.Orientation = 1
$End $Define
$End $Properties
Original issue reported on code.google.com by dominik....@gmail.com on 7 Aug 2009 at 10:49
Original issue reported on code.google.com by
dominik....@gmail.com
on 7 Aug 2009 at 10:49