summaryrefslogtreecommitdiff
path: root/wizards/source/access2base/PropertiesGet.xba
diff options
context:
space:
mode:
Diffstat (limited to 'wizards/source/access2base/PropertiesGet.xba')
-rw-r--r--wizards/source/access2base/PropertiesGet.xba99
1 files changed, 0 insertions, 99 deletions
diff --git a/wizards/source/access2base/PropertiesGet.xba b/wizards/source/access2base/PropertiesGet.xba
index 3ada734ee766..332eaaa2e5c2 100644
--- a/wizards/source/access2base/PropertiesGet.xba
+++ b/wizards/source/access2base/PropertiesGet.xba
@@ -399,87 +399,6 @@ Public Function getName(Optional pvObject As Variant) As String
End Function ' getName
REM -----------------------------------------------------------------------------------------------------------------------
-Public Function getObject(Optional pvShortcut As Variant) As Variant
-' Return the object described by pvShortcut ignoring its final property
-' Example: "Forms!myForm!myControl.myProperty" => Controls(Forms("myForm"), "myControl"))
-
-Const cstEXCLAMATION = "!"
-Const cstDOT = "."
-
- If _ErrorHandler() Then On Local Error Goto Error_Function
-Const cstThisSub = "getObject"
- Utils._SetCalledSub(cstThisSub)
- If IsMissing(pvShortcut) Then Call _TraceArguments()
- If Not Utils._CheckArgument(pvShortcut, 1, vbString) Then Goto Exit_Function
-
-Dim iCurrentIndex As Integer, vCurrentObject As Variant, sCurrentProperty As String
-Dim sComponents() As String, sSubComponents() As String, sDialog As String
-Dim oDoc As Object
- Set vCurrentObject = Nothing
- sComponents = Split(Trim(pvShortcut), cstEXCLAMATION)
- If UBound(sComponents) = 0 Then Goto Trace_Error
- If Not Utils._InList(UCase(sComponents(0)), Array("FORMS", "DIALOGS", "TEMPVARS")) Then Goto Trace_Error
- If sComponents(1) = "0" Or Left(sComponents(1), 2) = "0." Then
- Set oDoc = _A2B_.CurrentDocument()
- If oDoc.DbConnect = DBCONNECTFORM Then sComponents(1) = oDoc.DbContainers(0).FormName Else Goto Trace_Error
- End If
-
- sSubComponents = Split(sComponents(UBound(sComponents)), cstDOT)
- sComponents(UBound(sComponents)) = sSubComponents(0) ' Ignore final property, if any
-
- Set vCurrentObject = New Collect
- Set vCurrentObject._This = vCurrentObject
- Select Case UCase(sComponents(0))
- Case "FORMS" : vCurrentObject._CollType = COLLFORMS
- Case "DIALOGS" : vCurrentObject._CollType = COLLALLDIALOGS
- Case "TEMPVARS" : vCurrentObject._CollType = COLLTEMPVARS
- End Select
- For iCurrentIndex = 1 To UBound(sComponents) ' Start parsing ...
- sSubComponents = Split(sComponents(iCurrentIndex), cstDOT)
- sComponents(iCurrentIndex) = Utils._Trim(sSubComponents(0))
- Select Case UBound(sSubComponents)
- Case 0
- sCurrentProperty = ""
- Case 1
- sCurrentProperty = sSubComponents(1)
- Case Else
- Goto Trace_Error
- End Select
- Select Case vCurrentObject._Type
- Case OBJCOLLECTION
- Select Case vCurrentObject._CollType
- Case COLLFORMS
- vCurrentObject = Application.AllForms(sComponents(iCurrentIndex))
- Case COLLALLDIALOGS
- sDialog = UCase(sComponents(iCurrentIndex))
- vCurrentObject = Application.AllDialogs(sDialog)
- If Not vCurrentObject.IsLoaded Then Goto Trace_Error
- Set vCurrentObject.UnoDialog = _A2B_.Dialogs.Item(sDialog)
- Case COLLTEMPVARS
- If UBound(sComponents) > 1 Then Goto Trace_Error
- vCurrentObject = Application.TempVars(sComponents(1))
- 'Case Else
- End Select
- Case OBJFORM, OBJSUBFORM, OBJCONTROL, OBJDIALOG
- vCurrentObject = vCurrentObject.Controls(sComponents(iCurrentIndex))
- End Select
- If sCurrentProperty <> "" Then vCurrentObject = vCurrentObject.getProperty(sCurrentProperty)
- Next iCurrentIndex
-
- Set getObject = vCurrentObject
-
-Exit_Function:
- Utils._ResetCalledSub(cstThisSub)
- Exit Function
-Trace_Error:
- TraceError(TRACEFATAL, ERRWRONGARGUMENT, Utils._CalledSub(), 0, , Array(1, pvShortcut))
- Goto Exit_Function
-Error_Function:
- TraceError(TRACEABORT, Err, cstThisSub, Erl)
- GoTo Exit_Function
-End Function ' getObject V0.9.5
-
-REM -----------------------------------------------------------------------------------------------------------------------
Public Function getObjectType(Optional pvObject As Variant) As String
If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments("getObjectType")
getObjectType = PropertiesGet._getProperty(pvObject, "ObjectType")
@@ -707,24 +626,6 @@ Public Function getTypeName(Optional pvObject As Variant) As Variant
End Function ' getTypeName
REM -----------------------------------------------------------------------------------------------------------------------
-Public Function getValue(Optional pvObject As Variant) As Variant
-' getValue also interprets shortcut strings !!
-Dim vItem As Variant, sProperty As String
- If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments("getValue")
- If VarType(pvObject) = vbString Then
- Utils._SetCalledSub("getValue")
- Set vItem = getObject(pvObject)
- sProperty = Utils._FinalProperty(pvObject)
- If sProperty = "" Then sProperty = "Value" ' Default value if final property in shortcut is absent
- getValue = vItem.getProperty(sproperty)
- Utils._ResetCalledSub("getValue")
- Else
- Set vItem = pvObject
- getValue = vItem.getProperty("Value")
- End If
-End Function ' getValue
-
-REM -----------------------------------------------------------------------------------------------------------------------
Public Function getVisible(Optional pvObject As Variant) As Variant
If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments("getVisible")
getVisible = PropertiesGet._getProperty(pvObject, "Visible")