From 9429424b52a9c66d6313d3085ef5638f87ee0055 Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Thu, 6 Aug 2009 12:08:50 +0200 Subject: remove docs that mention QScriptValue::{scope,setScope}() Those functions are internal and we don't want to support them in the JSC back-end, because they expose too much implementation detail of the old back-end. --- doc/src/qtscript.qdoc | 38 -------------------------------------- src/script/api/qscriptvalue.cpp | 4 ++-- 2 files changed, 2 insertions(+), 40 deletions(-) diff --git a/doc/src/qtscript.qdoc b/doc/src/qtscript.qdoc index 6b8f639..43dc42f 100644 --- a/doc/src/qtscript.qdoc +++ b/doc/src/qtscript.qdoc @@ -1230,44 +1230,6 @@ for it, evaluate the script, and finally restore the old context. \endlist - \section2 Nested Functions and the Scope Chain - - This is an advanced topic; feel free to skip it. - - A nested function can be used to "capture" the execution context in which a - nested function object is created; this is typically referred to as creating - a \e closure. When, at some later time, the nested function is invoked, it - can access the variables that were created when the enclosing function was - invoked. This can perhaps best be illustrated through a small example: - - \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 70 - - The \c{counter()} function initializes a local variable to zero, - and returns a nested function. The nested function increments - the "outer" variable and returns its new value. The variable - persists over function calls, as shown in the following example: - - \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 71 - - The \c{counter()} function can be implemented as a native function, too - \mdash or rather, as a pair of native functions: One for the outer and - one for the inner. The definition of the outer function is as follows: - - \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 72 - - The function creates a local variable and initializes it to zero. - Then it wraps the inner native function, and sets the scope of - the resulting function object to be the activation object associated - with this (the outer) function call. The inner function accesses - the "outer" activation through the scope of the callee: - - \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 73 - - It is also possible to have a hybrid approach, where the outer function - is a native function and the inner function is defined by a script: - - \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 74 - \section2 Property Getters and Setters A script object property can be defined in terms of a getter/setter diff --git a/src/script/api/qscriptvalue.cpp b/src/script/api/qscriptvalue.cpp index ae1235e..47f51b9 100644 --- a/src/script/api/qscriptvalue.cpp +++ b/src/script/api/qscriptvalue.cpp @@ -193,9 +193,9 @@ QT_BEGIN_NAMESPACE \value ResolvePrototype Check the object's own properties first, then search the prototype chain. This is the default. - \value ResolveScope Check the object's own properties first, then search the scope chain. + \omitvalue ResolveScope Check the object's own properties first, then search the scope chain. - \value ResolveFull Check the object's own properties first, then search the prototype chain, and finally search the scope chain. + \omitvalue ResolveFull Check the object's own properties first, then search the prototype chain, and finally search the scope chain. */ // ### move -- cgit v0.12