Difference between revisions of "Documentation/DevGuide/WritingUNO/Test the Registration"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (FINAL VERSION FOR L10N)
 
Line 8: Line 8:
 
{{Documentation/DevGuideLanguages|Documentation/DevGuide/WritingUNO/{{SUBPAGENAME}}}}
 
{{Documentation/DevGuideLanguages|Documentation/DevGuide/WritingUNO/{{SUBPAGENAME}}}}
 
{{DISPLAYTITLE:Test the Registration}}
 
{{DISPLAYTITLE:Test the Registration}}
A short {{PRODUCTNAME}} Basic program indicates if the program runs went smoothly, by selecting '''Tools – Macro''' and entering a new macro name on the left, such as <code>TestImageShrink</code> and click '''New''' to create a new procedure. In the procedure, enter the appropriate code of the component. The test routine for <code>ImageShrink</code> would be:
+
A short {{AOo}} Basic program indicates if the program runs went smoothly, by selecting '''Tools – Macro''' and entering a new macro name on the left, such as <code>TestImageShrink</code> and click '''New''' to create a new procedure. In the procedure, enter the appropriate code of the component. The test routine for <code>ImageShrink</code> would be:
 
+
<syntaxhighlight lang="oobas">
 
   Sub TestImageShrink
 
   Sub TestImageShrink
 
       oTestComp = createUnoService("org.openoffice.test.ImageShrink")
 
       oTestComp = createUnoService("org.openoffice.test.ImageShrink")
Line 16: Line 16:
 
       MsgBox oTestComp.dbg_supportedInterfaces
 
       MsgBox oTestComp.dbg_supportedInterfaces
 
   end sub
 
   end sub
 
+
</syntaxhighlight>
 
The result should be three dialogs showing the methods, properties and interfaces supported by the implementation. Note that the interface attributes do not appear as get/set methods, but as properties in Basic. If the dialogs do not show what is expected, refer to the section [[Documentation/DevGuide/WritingUNO/Troubleshooting|Troubleshooting]].
 
The result should be three dialogs showing the methods, properties and interfaces supported by the implementation. Note that the interface attributes do not appear as get/set methods, but as properties in Basic. If the dialogs do not show what is expected, refer to the section [[Documentation/DevGuide/WritingUNO/Troubleshooting|Troubleshooting]].
  

Latest revision as of 13:49, 24 December 2020



A short Apache OpenOffice Basic program indicates if the program runs went smoothly, by selecting Tools – Macro and entering a new macro name on the left, such as TestImageShrink and click New to create a new procedure. In the procedure, enter the appropriate code of the component. The test routine for ImageShrink would be:

  Sub TestImageShrink
      oTestComp = createUnoService("org.openoffice.test.ImageShrink")
      MsgBox oTestComp.dbg_methods
      MsgBox oTestComp.dbg_properties
      MsgBox oTestComp.dbg_supportedInterfaces
  end sub

The result should be three dialogs showing the methods, properties and interfaces supported by the implementation. Note that the interface attributes do not appear as get/set methods, but as properties in Basic. If the dialogs do not show what is expected, refer to the section Troubleshooting.

Content on this page is licensed under the Public Documentation License (PDL).
Personal tools
In other languages