From 28dcdd5f6c2204718519e215d2ef5466743536c7 Mon Sep 17 00:00:00 2001 From: Jean-Pierre Ledure Date: Thu, 13 Jun 2019 14:42:49 +0200 Subject: Access2Base - Robustness changes Addition of _This address in every Basic object Default parameters reviewed when ambiguous Typo's corrections --- wizards/source/access2base/Control.xba | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'wizards/source/access2base/Control.xba') diff --git a/wizards/source/access2base/Control.xba b/wizards/source/access2base/Control.xba index 3a41609ef48e..39afaee804a3 100644 --- a/wizards/source/access2base/Control.xba +++ b/wizards/source/access2base/Control.xba @@ -16,6 +16,7 @@ REM --- CLASS ROOT FIELDS --- REM ----------------------------------------------------------------------------------------------------------------------- Private _Type As String ' Must be CONTROL +Private _This As Object ' Workaround for absence of This builtin function Private _ImplementationName As String Private _ClassId As Integer Private _ParentType As String ' One of CTLPARENTISxxxx constants @@ -38,6 +39,7 @@ REM --- CONSTRUCTORS / DESTRUCTORS --- REM ----------------------------------------------------------------------------------------------------------------------- Private Sub Class_Initialize() _Type = OBJCONTROL + Set _This = Nothing _ClassId = -1 _ParentType = "" _Shortcut = "" @@ -765,6 +767,7 @@ Dim j As Integer, oView As Object If IsMissing(pvIndex) Then ' No argument, return Collection pseudo-object Set oCounter = New Collect + Set oCounter._This = oCounter oCounter._CollType = COLLCONTROLS oCounter._ParentType = OBJCONTROL oCounter._ParentName = _Shortcut @@ -778,6 +781,7 @@ Dim j As Integer, oView As Object ' Start building the ocControl object ' Determine exact name Set ocControl = New Control + Set ocControl._This = ocControl ocControl._ParentType = CTLPARENTISGRID sParentShortcut = _Shortcut sControls() = ControlModel.getElementNames() @@ -1512,6 +1516,7 @@ Dim oControlEvents As Object, sEventName As String Case UCase("Form") Set ofSubForm = New SubForm ' Start building the SUBFORM object With ofSubForm + Set ._This = ofSubForm Set .DatabaseForm = ControlModel ._Name = _Name ._Shortcut = _Shortcut & ".Form" -- cgit