Browse Source

minor comment adjustments

David Rose 16 years ago
parent
commit
7fca7f2e53
2 changed files with 9 additions and 4 deletions
  1. 3 1
      direct/src/plugin/p3d_plugin.h
  2. 6 3
      direct/src/showutil/runp3d.py

+ 3 - 1
direct/src/plugin/p3d_plugin.h

@@ -348,7 +348,9 @@ P3D_object_get_float_method(const P3D_object *object);
    string (not counting any terminating null character).  If the
    string (not counting any terminating null character).  If the
    return value is larger than buffer_length, the string has been
    return value is larger than buffer_length, the string has been
    truncated.  If it is equal, there is no null character written to
    truncated.  If it is equal, there is no null character written to
-   the buffer (like strncpy). */
+   the buffer (like strncpy).  You may call this method first with
+   buffer = NULL and buffer_length = 0 to return just the required
+   size of the buffer. */
 typedef int
 typedef int
 P3D_object_get_string_method(const P3D_object *object, 
 P3D_object_get_string_method(const P3D_object *object, 
                              char *buffer, int buffer_length);
                              char *buffer, int buffer_length);

+ 6 - 3
direct/src/showutil/runp3d.py

@@ -354,9 +354,7 @@ class AppRunner(DirectObject):
     def scriptRequest(self, operation, object, propertyName = '',
     def scriptRequest(self, operation, object, propertyName = '',
                       value = None, needsResponse = True):
                       value = None, needsResponse = True):
         """ Issues a new script request to the browser.  This queries
         """ Issues a new script request to the browser.  This queries
-        or modifies one of the browser's DOM properties.  This method
-        blocks until the return value is received from the browser,
-        and then it returns that value.
+        or modifies one of the browser's DOM properties.
         
         
         operation may be one of [ 'get_property', 'set_property',
         operation may be one of [ 'get_property', 'set_property',
         'call', 'evaluate' ].
         'call', 'evaluate' ].
@@ -370,6 +368,11 @@ class AppRunner(DirectObject):
         value is the new value to assign to the property for
         value is the new value to assign to the property for
         set_property, or the parameter list for call, or the string
         set_property, or the parameter list for call, or the string
         expression for evaluate.
         expression for evaluate.
+
+        If needsResponse is true, this method will block until the
+        return value is received from the browser, and then it returns
+        that value.  Otherwise, it returns None immediately, without
+        waiting for the browser to process the request.
         """
         """
         uniqueId = self.nextScriptId
         uniqueId = self.nextScriptId
         self.nextScriptId += 1
         self.nextScriptId += 1