[Laszlo-dev] Strawman proposal for singleton classes

Donald Anderson dda at ddanderson.com
Tue Apr 29 13:54:01 PDT 2008


Using LzBrowser as a model.   This does not address the issue of
documentation that is appearing in interfaces vs. the implementation
classes, but it does show a proposal for how to refer to the Service
class from the object.

Two notes:  With the current primitive ruby tool, this causes both
LzBrowser and LzBrowserService to appear in the 'classes' pane
of the navbar.  Also in the javadoc for LzBrowser, I put in  
'@singleton LzBrowserService'.
This serves no function currently, but perhaps in the future when we  
can do better
integration, it can give us the needed info.

Comments on wording, etc.?

- Don

Index: WEB-INF/lps/lfc/services/LzBrowser.lzs
===================================================================
--- WEB-INF/lps/lfc/services/LzBrowser.lzs      (revision 8902)
+++ WEB-INF/lps/lfc/services/LzBrowser.lzs      (working copy)
@@ -12,6 +12,7 @@

  /**
   * Interface to the kernel browser
+ * @access private
   */

  class LzBrowserInterface {
@@ -103,6 +104,11 @@



+/** The browser service.  Also available as the global
+ * <code>LzBrowser</code>.
+ *
+ * @access public
+ */
  class LzBrowserService extends LzBrowserInterface {
    /** The browser service.  Also available as the global
     * <code>LzBrowser</code>.
@@ -331,7 +337,13 @@

  } // End of LzBrowserService

-
+/**
+ * This is the singleton object for LzBrowser.
+ * See <link linkend="LzBrowserService">LzBrowserService</link>
+ * for methods on this object.
+ * @singleton LzBrowserService
+ * @access public
+ */
  var LzBrowser = LzBrowserService.LzBrowser;




--

Don Anderson
Java/C/C++, Berkeley DB, systems consultant

voice: 617-547-7881
email: dda at ddanderson.com
www: http://www.ddanderson.com






More information about the Laszlo-dev mailing list