Hi,
I've got a problem with pseudo object no reachable when defined into
library. The error message when I call new is :
"This object is not accessible. Invalid object reference."
Beloww is the Modul Test into library LibApplication, to define a Test
object displaying a "Hello Box" dialog when execute
REM ***** BASIC *****
Option Compatible
Option ClassModule
Option Explicit
Private _value As Integer
Private const _Msg = "Hello World"
' #PROCEDURE#
==================================================================
' Name...........: Class_Initialize
' Description ...:
' Parameters ....:
' Syntax ........: Class_Initialize
' Return values .:
' Modified.......:
' Remarks .......:
' Related .......:
' Link ..........:
' Example .......:
Private Sub Class_Initialize()
_valute = 1
End Sub
' #PROCEDURE#
==================================================================
' Name...........: Class_Terminate
' Description ...:
' Parameters ....:
' Syntax ........: Class_Terminate
' Return values .:
' Modified.......:
' Remarks .......:
' Related .......:
' Link ..........:
' Example .......:
Private Sub Class_Terminate()
End Sub
Rem
***************************************************************************
Rem
Rem PROPRIETES
Rem
Rem
***************************************************************************
Rem
***************************************************************************
Rem
Rem METHODES PRIVEES
Rem
Rem
***************************************************************************
Rem
***************************************************************************
Rem
Rem METHODES PUBLIQUES
Rem
Rem
***************************************************************************
' #PROCEDURE#
==================================================================
' Name...........: Execute
' Description ...:
' Parameters ....:
' Syntax ........: Execute()
' Return values .:
' Modified.......:
' Remarks .......:
' Related .......:
' Link ..........:
' Example .......:
Public Sub Execute()
MsgBox _Msg & " : " & _value
End Sub
Module to test into my main document :
Sub Test()
If GlobalScope.BasicLibraries.hasByName("LibApplication") Then
GlobalScope.BasicLibraries.loadLibrary("LibApplication")
End If
if GlobalScope.BasicLibraries.isLibraryLoaded("LibApplication") Then
Call Application.OpenConnection(ThisDatabaseDocument)
Else
MsgBox("Librairie LibApplication non chargée !")
EndIf
Dim oTest As Object
Set oTest = new Test
oTest.execute()
Erase oTest
End Sub
Do you think it's not possible to use pseudo object code into library ?
Do you know an other way than libraries to create domains (there is no
folder to manage macros ...)
--
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy