64 lines
4.5 KiB
XML
64 lines
4.5 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!--
|
|
* This file is part of the LibreOffice project.
|
|
*
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
*
|
|
* This file incorporates work covered by the following license notice:
|
|
*
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
* with this work for additional information regarding copyright
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
* except in compliance with the License. You may obtain a copy of
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
-->
|
|
|
|
<helpdocument version="1.0">
|
|
<meta>
|
|
<topic id="textsbasicshared03131900xml" indexer="include" status="PUBLISH">
|
|
<title id="tit" localize="false" xml-lang="en-US">GlobalScope</title>
|
|
<filename>/text/sbasic/shared/03131900.xhp</filename>
|
|
</topic>
|
|
<history>
|
|
<created date="2003-10-31T00:00:00">Sun Microsystems, Inc.</created>
|
|
</history>
|
|
</meta>
|
|
<body>
|
|
<section id="globalscope">
|
|
<bookmark xml-lang="en-US" branch="index" id="bm_id3150682"><bookmark_value>GlobalScope specifier</bookmark_value>
|
|
<bookmark_value>library systems</bookmark_value>
|
|
<bookmark_value>Library container</bookmark_value>
|
|
<bookmark_value>GlobalScope</bookmark_value>
|
|
<bookmark_value>API; BasicLibraries</bookmark_value>
|
|
<bookmark_value>API; DialogLibraries</bookmark_value>
|
|
<bookmark_value>BasicLibraries; library container</bookmark_value>
|
|
<bookmark_value>DialogLibraries; library container</bookmark_value>
|
|
</bookmark>
|
|
<h1 id="hd_id3150682"><variable id="GlobalScope_h1"><link href="text/sbasic/shared/03131900.xhp">GlobalScope specifier</link></variable></h1>
|
|
<paragraph role="paragraph" id="par_id991572457387308">To manage personal or shared library containers (<emph>Application Macros</emph> or <emph>My Macros</emph>) from within a document, use the <literal>GlobalScope</literal> specifier.</paragraph>
|
|
</section>
|
|
<section id="basicdialogs">
|
|
<paragraph role="paragraph" id="par_id3153345" xml-lang="en-US">Basic source code and dialogs are organized in library containers. Libraries can contain modules and dialogs.</paragraph>
|
|
</section>
|
|
<h2 id="hd_id3143271">In Basic:</h2>
|
|
<paragraph role="paragraph" id="par_id3153061" xml-lang="en-US">Basic libraries and modules can be managed with the <literal>BasicLibraries</literal> object. Libraries can be searched, explored and loaded on request. <link href="text/sbasic/python/python_document_events.xhp">Monitoring Documents Events</link> illustrates %PRODUCTNAME library loading.</paragraph>
|
|
<h2 id="hd_id3154346">In dialogs:</h2>
|
|
<paragraph role="paragraph" id="par_id3148663" xml-lang="en-US">Dialog libraries and dialogs can be managed with the <literal>DialogLibraries</literal> object. <link href="text/sbasic/guide/show_dialog.xhp">Opening a Dialog With Basic</link> illustrates how to display %PRODUCTNAME shared dialogs.</paragraph>
|
|
<paragraph role="paragraph" id="par_id3150543" xml-lang="en-US"><literal>BasicLibraries</literal> and <literal>DialogLibraries</literal> containers exist at application level and within every document. Document's library containers do not need the <literal>GlobalScope</literal> specifier to be managed. If you want to call a global library container (located in <emph>Application Macros</emph> or <emph>My Macros</emph>) from within a document, you must use the <literal>GlobalScope</literal> specifier.</paragraph>
|
|
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
|
|
<paragraph role="code" localize="false" id="par_id3149203" xml-lang="en-US">GlobalScope specifier</paragraph>
|
|
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
|
|
<paragraph role="paragraph" id="par_id3154124" xml-lang="en-US">Example in the document Basic</paragraph>
|
|
<bascode>
|
|
<paragraph role="bascode" id="par_id3158408" xml-lang="en-US">' calling Dialog1 in the document library Standard</paragraph>
|
|
<paragraph role="bascode" localize="false" id="par_id3125865" xml-lang="en-US">oDlgDesc = DialogLibraries.Standard.Dialog1</paragraph>
|
|
<paragraph role="bascode" id="par_id3154910" xml-lang="en-US">' calling Dialog2 in the application library Library1</paragraph>
|
|
<paragraph role="bascode" localize="false" id="par_id3156424" xml-lang="en-US">oDlgDesc = GlobalScope.DialogLibraries.Library1.Dialog2</paragraph>
|
|
</bascode>
|
|
</body>
|
|
</helpdocument>
|