\helpref{wxDDEInitialize}{wxddeinitialize}\\
\helpref{wxDROP\_ICON}{wxdropicon}\\
\helpref{wxDebugMsg}{wxdebugmsg}\\
-\helpref{wxDirExists}{functionwxdirexists}\\
\helpref{wxDirSelector}{wxdirselector}\\
\helpref{wxDisplayDepth}{wxdisplaydepth}\\
\helpref{wxDisplaySize}{wxdisplaysize}\\
\helpref{wxFinite}{wxfinite}\\
\helpref{wxGetActiveWindow}{wxgetactivewindow}\\
\helpref{wxGetApp}{wxgetapp}\\
+\helpref{wxGetBatteryState}{wxgetbatterystate}\\
\helpref{wxGetClipboardData}{wxgetclipboarddata}\\
\helpref{wxGetClipboardFormatName}{wxgetclipboardformatname}\\
\helpref{wxGetColourFromUser}{wxgetcolourfromuser}\\
\helpref{wxGetElapsedTime}{wxgetelapsedtime}\\
\helpref{wxGetEmailAddress}{wxgetemailaddress}\\
\helpref{wxGetEnv}{wxgetenv}\\
+\helpref{wxGetFileKind}{wxgetfilekind}\\
\helpref{wxGetFontFromUser}{wxgetfontfromuser}\\
\helpref{wxGetFreeMemory}{wxgetfreememory}\\
\helpref{wxGetFullHostName}{wxgetfullhostname}\\
\helpref{wxGetOsDescription}{wxgetosdescription}\\
\helpref{wxGetOsVersion}{wxgetosversion}\\
\helpref{wxGetPasswordFromUser}{wxgetpasswordfromuser}\\
+\helpref{wxGetPowerType}{wxgetpowertype}\\
\helpref{wxGetPrinterCommand}{wxgetprintercommand}\\
\helpref{wxGetPrinterFile}{wxgetprinterfile}\\
\helpref{wxGetPrinterMode}{wxgetprintermode}\\
\helpref{wxIsNaN}{wxisnan}\\
\helpref{wxIsWild}{wxiswild}\\
\helpref{wxKill}{wxkill}\\
+\helpref{wxLaunchDefaultBrowser}{wxlaunchdefaultbrowser}\\
\helpref{wxLEAVE\_CRIT\_SECT}{wxleavecritsect}\\
\helpref{wxLoadUserResource}{wxloaduserresource}\\
\helpref{wxLogDebug}{wxlogdebug}\\
\helpref{wxNewId}{wxnewid}\\
\helpref{wxNow}{wxnow}\\
\helpref{wxOnAssert}{wxonassert}\\
+\helpref{wxON\_BLOCK\_EXIT}{wxonblockexit}\\
+\helpref{wxON\_BLOCK\_EXIT\_OBJ}{wxonblockexitobj}\\
\helpref{wxOpenClipboard}{wxopenclipboard}\\
\helpref{wxParseCommonDialogsFilter}{wxparsecommondialogsfilter}\\
+\helpref{wxDirExists}{functionwxdirexists}\\
\helpref{wxPathOnly}{wxpathonly}\\
\helpref{wxPostDelete}{wxpostdelete}\\
\helpref{wxPostEvent}{wxpostevent}\\
\helpref{wx\_reinterpret\_cast}{wxreinterpretcastraw}\\
\helpref{wx\_static\_cast}{wxstaticcastraw}\\
\helpref{\_}{underscore}\\
+\helpref{wxPLURAL}{wxplural}\\
\helpref{\_T}{underscoret}
\helpref{wxApp}{wxapp} object at all. In this case you must call it from your
{\tt main()} function before calling any other wxWidgets functions.
-If the function returns {\tt false} the initialization could not be performed,
+If the function returns \false the initialization could not be performed,
in this case the library cannot be used and
\helpref{wxUninitialize}{wxuninitialize} shouldn't be called neither.
The {\it flags} parameter can be wxKILL\_NOCHILDREN (the default),
or wxKILL\_CHILDREN, in which case the child processes of this
process will be killed too. Note that under Unix, for wxKILL\_CHILDREN
-to work you should have created the process by passing wxEXEC\_MAKE_GROUP\_LEADER
+to work you should have created the process by passing wxEXEC\_MAKE\_GROUP\_LEADER
to wxExecute.
\wxheading{See also}
\wxheading{Returns}
-{\tt true} on success, {\tt false} if an error occured.
+\true on success, \false if an error occurred.
\wxheading{Include files}
\func{bool}{wxIsMainThread}{\void}
-Returns {\tt true} if this thread is the main one. Always returns {\tt true} if
+Returns \true if this thread is the main one. Always returns \true if
{\tt wxUSE\_THREADS} is $0$.
\helpref{wxFileName}{wxfilename}
-\membersection{::wxDirExists}\label{functionwxdirexists}
-
-\func{bool}{wxDirExists}{\param{const wxString\& }{dirname}}
-
-Returns true if the directory exists.
-
-
\membersection{::wxDos2UnixFilename}\label{wxdos2unixfilename}
\func{void}{wxDos2UnixFilename}{\param{wxChar *}{s}}
Returns time of last modification of given file.
+The return value is $0$ if an error occured (e.g. file not found).
+
\membersection{::wxFileNameFromPath}\label{wxfilenamefrompath}
\wxheading{Warning}
-As of wx 2.5.2, these functions are not thread-safe! (use static variables)
+As of wx 2.5.2, these functions are not thread-safe! (they use static variables). You probably want to use \helpref{wxDir::GetFirst}{wxdirgetfirst} or \helpref{wxDirTraverser}{wxdirtraverser} instead.
{\it spec} may contain wildcards.
\begin{verbatim}
wxString f = wxFindFirstFile("/home/project/*.*");
- while ( !f.IsEmpty() )
+ while ( !f.empty() )
{
...
f = wxFindNextFile();
\wxheading{Returns}
-{\tt true} on success, {\tt false} if an error occured (for example, the
+\true on success, \false if an error occurred (for example, the
directory doesn't exist).
\wxheading{Portability}
This function first appeared in wxWidgets 2.3.2.
+\membersection{::wxGetFileKind}\label{wxgetfilekind}
+
+\func{wxFileKind}{wxGetFileKind}{\param{int }{fd}}
+
+\func{wxFileKind}{wxGetFileKind}{\param{FILE *}{fp}}
+
+Returns the type of an open file. Possible return values are:
+
+\begin{verbatim}
+enum wxFileKind
+{
+ wxFILE_KIND_UNKNOWN,
+ wxFILE_KIND_DISK, // a file supporting seeking to arbitrary offsets
+ wxFILE_KIND_TERMINAL, // a tty
+ wxFILE_KIND_PIPE // a pipe
+};
+
+\end{verbatim}
+
+\wxheading{Include files}
+
+<wx/filefn.h>
+
+
\membersection{::wxGetOSDirectory}\label{wxgetosdirectory}
\func{wxString}{wxGetOSDirectory}{\void}
or drive name at the beginning.
+\membersection{::wxDirExists}\label{functionwxdirexists}
+
+\func{bool}{wxDirExists}{\param{const wxString\& }{dirname}}
+
+Returns true if the path exists.
+
+
\membersection{::wxPathOnly}\label{wxpathonly}
\func{wxString}{wxPathOnly}{\param{const wxString\& }{path}}
\membersection{::wxUnix2DosFilename}\label{wxunix2dosfilename}
-\func{void}{wxUnix2DosFilename}{\param{const wxString\& }{s}}
+\func{void}{wxUnix2DosFilename}{\param{wxChar *}{s}}
+
+This function is deprecated, use \helpref{wxFileName}{wxfilename} instead.
Converts a Unix to a DOS filename by replacing forward
slashes with backslashes.
\twocolitem{Motif}{Return value is wxMOTIF\_X, {\it major} is X version, {\it minor} is X revision.}
\twocolitem{OS/2}{Return value is wxOS2\_PM.}
\twocolitem{Windows 3.1}{Return value is wxWINDOWS, {\it major} is 3, {\it minor} is 1.}
-\twocolitem{Windows NT/2000}{Return value is wxWINDOWS\_NT, version is returned in {\it major} and {\it minor}}
+\twocolitem{Windows NT/2000}{Return value is wxWINDOWS\_NT, version is returned in {\it major} and {\it minor}.}
\twocolitem{Windows 98}{Return value is wxWIN95, {\it major} is 4, {\it minor} is 1 or greater.}
\twocolitem{Windows 95}{Return value is wxWIN95, {\it major} is 4, {\it minor} is 0.}
\twocolitem{Win32s (Windows 3.1)}{Return value is wxWIN32S, {\it major} is 3, {\it minor} is 1.}
+\twocolitem{Windows PocketPC}{Return value is wxWINDOWS\_POCKETPC, version is returned in {\it major} and {\it minor}.}
+\twocolitem{Windows Smartphone}{Return value is wxWINDOWS\_SMARTPHONE, version is returned in {\it major} and {\it minor}.}
+\twocolitem{Windows CE (non-specific)}{Return value is wxWINDOWS\_CE, version is returned in {\it major} and {\it minor}.}
\twocolitem{Watcom C++ 386 supervisor mode (Windows 3.1)}{Return value is wxWIN386, {\it major} is 3, {\it minor} is 1.}
\end{twocollist}
the PENWIN.INI file is used.
The first variant of this function returns the user name if successful or an
-empty string otherwise. The second (deprecated) function returns {\tt true}
-if successful, {\tt false} otherwise.
+empty string otherwise. The second (deprecated) function returns \true
+if successful, \false otherwise.
\wxheading{See also}
The second form is used when retrieving translation of string that has
different singular and plural form in English or different plural forms in some
-other language. It takes two extra arguments: \arg{str}
-parameter must contain the singular form of the string to be converted.
-It is also used as the key for the search in the catalog.
-The \arg{strPlural} parameter is the plural form (in English).
-The parameter \arg{n} is used to determine the plural form. If no
-message catalog is found \arg{str} is returned if `n == 1',
+other language. It takes two extra arguments: as above, \arg{str}
+parameter must contain the singular form of the string to be converted and
+is used as the key for the search in the catalog. The \arg{strPlural} parameter
+is the plural form (in English). The parameter \arg{n} is used to determine the
+plural form. If no message catalog is found \arg{str} is returned if `n == 1',
otherwise \arg{strPlural}.
-See \urlref{GNU gettext manual}{http://www.gnu.org/manual/gettext/html\_chapter/gettext\_10.html\#SEC150} for additional information on plural forms handling.
+
+See \urlref{GNU gettext manual}{http://www.gnu.org/manual/gettext/html\_chapter/gettext\_10.html\#SEC150}
+for additional information on plural forms handling. For a shorter alternative
+see the \helpref{wxPLURAL()}{wxplural} macro.
Both versions call \helpref{wxLocale::GetString}{wxlocalegetstring}.
+Note that this function is not suitable for literal strings in Unicode
+builds, since the literal strings must be enclosed into
+\helpref{\_T()}{underscoret} or \helpref{wxT}{wxt} macro which makes them
+unrecognised by \texttt{xgettext}, and so they are not extracted to the message
+catalog. Instead, use the \helpref{\_()}{underscore} and
+\helpref{wxPLURAL}{wxplural} macro for all literal strings.
+
+
\membersection{::wxIsEmpty}\label{wxisempty}
\func{bool}{wxIsEmpty}{\param{const char *}{ p}}
-Returns {\tt true} if the pointer is either {\tt NULL} or points to an empty
-string, {\tt false} otherwise.
+Returns \true if the pointer is either {\tt NULL} or points to an empty
+string, \false otherwise.
\membersection{::wxStrcmp}\label{wxstrcmp}
{\bf NB:} This function is obsolete, use \helpref{wxString::Find}{wxstringfind} instead.
-Returns {\tt true} if the substring {\it s1} is found within {\it s2},
-ignoring case if {\it exact} is false. If {\it subString} is {\tt false},
+Returns \true if the substring {\it s1} is found within {\it s2},
+ignoring case if {\it exact} is false. If {\it subString} is \false,
no substring matching is done.
Here is an example which should make it more clear: suppose that you have a
static array of strings containing the weekday names and which have to be
-translated (note that it is a bad example, really, as
+translated (note that it is a bad example, really, as
\helpref{wxDateTime}{wxdatetime} already can be used to get the localized week
day names already). If you write
\func{const wxChar *}{\_}{\param{const char *}{s}}
-This macro expands into a call to \helpref{wxGetTranslation}{wxgettranslation}
+This macro expands into a call to \helpref{wxGetTranslation}{wxgettranslation}
function, so it marks the message for the extraction by {\tt xgettext} just as
\helpref{wxTRANSLATE}{wxtranslate} does, but also returns the translation of
the string for the current locale during execution.
Don't confuse this macro with \helpref{\_T()}{underscoret}!
+\membersection{wxPLURAL}\label{wxplural}
+
+\func{const wxChar *}{wxPLURAL}{\param{const char *}{sing}, \param{const char *}{plur}, \param{size\_t}{n}}
+
+This macro is identical to \helpref{\_()}{underscore} but for the plural variant
+of \helpref{wxGetTranslation}{wxgettranslation}.
+
+
\membersection{\_T}\label{underscoret}
\func{wxChar}{\_T}{\param{char }{ch}}
\func{int}{wxFinite}{\param{double }{x}}
-Returns a non-zero value if {\it x} is neither infinite or NaN (not a number),
+Returns a non-zero value if {\it x} is neither infinite or NaN (not a number),
returns 0 otherwise.
\func{}{wxDYNLIB\_FUNCTION}{\param{}{type}, \param{}{name}, \param{}{dynlib}}
-When loading a function from a DLL you always have to cast the returned
+When loading a function from a DLL you always have to cast the returned
{\tt void *} pointer to the correct type and, even more annoyingly, you have to
repeat this type twice if you want to declare and define a function pointer all
in one line
This macro makes this slightly less painful by allowing you to specify the
type only once, as the first parameter, and creating a variable of this type
named after the function but with {\tt pfn} prefix and initialized with the
-function \arg{name} from the \helpref{wxDynamicLibrary}{wxdynamiclibrary}
+function \arg{name} from the \helpref{wxDynamicLibrary}{wxdynamiclibrary}
\arg{dynlib}.
\wxheading{Parameters}
\func{bool}{wxGetKeyState}{\param{wxKeyCode }{key}}
-Returns \true if the key parameter is currently pressed on the keyboard, or
-with modifier keys, (caps lock, etc) if the key is active (the led light is
-on).
+For normal keys, returns \true if the specified key is currently down.
+
+For togglable keys (Caps Lock, Num Lock and Scroll Lock), returns
+\true if the key is toggled such that its LED indicator is lit. There is
+currently no way to test whether togglable keys are up or down.
+
+Even though there are virtual key codes defined for mouse buttons, they
+cannot be used with this function currently.
\wxheading{Include files}
<wx/utils.h>
+\membersection{wxON\_BLOCK\_EXIT}\label{wxonblockexit}
+
+\func{}{wxON\_BLOCK\_EXIT0}{\param{}{func}}
+\func{}{wxON\_BLOCK\_EXIT1}{\param{}{func}, \param{}{p1}}
+\func{}{wxON\_BLOCK\_EXIT2}{\param{}{func}, \param{}{p1}, \param{}{p2}}
+
+This family of macros allows to ensure that the global function \arg{func}
+with 0, 1, 2 or more parameters (up to some implementaton-defined limit) is
+executed on scope exit, whether due to a normal function return or because an
+exception has been thrown. A typical example of its usage:
+\begin{verbatim}
+ void *buf = malloc(size);
+ wxON_BLOCK_EXIT1(free, buf);
+\end{verbatim}
+
+Please see the original article by Andrei Alexandrescu and Petru Marginean
+published in December 2000 issue of \emph{C/C++ Users Journal} for more
+details.
+
+\wxheading{Include files}
+
+<wx/scopeguard.h>
+
+\wxheading{See also}
+
+\helpref{wxON\_BLOCK\_EXIT\_OBJ}{wxonblockexitobj}
+
+
+\membersection{wxON\_BLOCK\_EXIT\_OBJ}\label{wxonblockexitobj}
+
+\func{}{wxON\_BLOCK\_EXIT\_OBJ0}{\param{}{obj}, \param{}{method}}
+\func{}{wxON\_BLOCK\_EXIT\_OBJ1}{\param{}{obj}, \param{}{method}, \param{}{p1}}
+\func{}{wxON\_BLOCK\_EXIT\_OBJ2}{\param{}{obj}, \param{}{method}, \param{}{p1}, \param{}{p2}}
+
+This family of macros is similar to \helpref{wxON\_BLOCK\_EXIT}{wxonblockexit}
+but calls a method of the given object instead of a free function.
+
+\wxheading{Include files}
+
+<wx/scopeguard.h>
+
+
\membersection{::wxRegisterId}\label{wxregisterid}
\func{void}{wxRegisterId}{\param{long}{ id}}
<wx/windows.h>
+\membersection{::wxGetBatteryState}\label{wxgetbatterystate}
+
+\func{wxBatteryState}{wxGetBatteryState}{\void}
+
+Returns battery state as one of \texttt{wxBATTERY\_NORMAL\_STATE},
+\texttt{wxBATTERY\_LOW\_STATE}, \texttt{wxBATTERY\_CRITICAL\_STATE},
+\texttt{wxBATTERY\_SHUTDOWN\_STATE} or \texttt{wxBATTERY\_UNKNOWN\_STATE}.
+\texttt{wxBATTERY\_UNKNOWN\_STATE} is also the default on platforms where
+this feature is not implemented.
+
+\wxheading{Include files}
+
+<wx/utils.h>
+
+
\membersection{::wxGetDisplayName}\label{wxgetdisplayname}
\func{wxString}{wxGetDisplayName}{\void}
<wx/utils.h>
+\membersection{::wxGetPowerType}\label{wxgetpowertype}
+
+\func{wxPowerType}{wxGetPowerType}{\void}
+
+Returns the type of power source as one of \texttt{wxPOWER\_SOCKET},
+\texttt{wxPOWER\_BATTERY} or \texttt{wxPOWER\_UNKNOWN}.
+\texttt{wxPOWER\_UNKNOWN} is also the default on platforms where this
+feature is not implemented.
+
+\wxheading{Include files}
+
+<wx/utils.h>
+
+
\membersection{::wxGetMousePosition}\label{wxgetmouseposition}
\func{wxPoint}{wxGetMousePosition}{\void}
<wx/utils.h>
+\membersection{::wxGetStockLabel}\label{wxgetstocklabel}
+
+\func{wxString}{wxGetStockLabel}{\param{wxWindowID }{id}, \param{bool }{withCodes = true}, \param{wxString }{accelerator = wxEmptyString}}
+
+Returns label that should be used for given {\it id} element.
+
+\wxheading{Parameters}
+
+\docparam{id}{given id of the \helpref{wxMenuItem}{wxmenuitem}, \helpref{wxButton}{wxbutton}, \helpref{wxToolBar}{wxtoolbar} tool, etc.}
+
+\docparam{withCodes}{if false then strip accelerator code from the label;
+usefull for getting labels without accelerator char code like for toolbar tooltip or
+under platforms without traditional keyboard like smartphones}
+
+\docparam{accelerator}{optional accelerator string automatically added to label; useful
+for building labels for \helpref{wxMenuItem}{wxmenuitem}}
+
+\wxheading{Include files}
+
+<wx/stockitem.h>
+
+
\membersection{::wxGetTopLevelParent}\label{wxgettoplevelparent}
\func{wxWindow *}{wxGetTopLevelParent}{\param{wxWindow }{*win}}
<wx/window.h>
+\membersection{::wxLaunchDefaultBrowser}\label{wxlaunchdefaultbrowser}
+
+\func{bool}{wxLaunchDefaultBrowser}{\param{const wxString\& }{sUrl}}
+
+Launches the user's default browser and tells it to open the location at {\tt sUrl}.
+
+Returns true if the application was successfully launched.
+
+\wxheading{Include files}
+
+<wx/utils.h>
+
\membersection{::wxLoadUserResource}\label{wxloaduserresource}
\func{wxString}{wxLoadUserResource}{\param{const wxString\& }{resourceName}, \param{const wxString\& }{resourceType=``TEXT"}}
preserve the value of a \texttt{va\_list} object if you need to use it after
passing it to another function because it can be modified by the latter.
-As with \texttt{va\_start}, each call to \texttt{wxVaCopy} must have a matching
+As with \texttt{va\_start}, each call to \texttt{wxVaCopy} must have a matching
\texttt{va\_end}.
\func{}{DECLARE\_APP}{className}
-This is used in headers to create a forward declaration of the
-\helpref{wxGetApp}{wxgetapp} function implemented by
-\helpref{IMPLEMENT\_APP}{implementapp}. It creates the declaration
+This is used in headers to create a forward declaration of the
+\helpref{wxGetApp}{wxgetapp} function implemented by
+\helpref{IMPLEMENT\_APP}{implementapp}. It creates the declaration
{\tt className\& wxGetApp(void)}.
Example:
\func{}{DECLARE\_DYNAMIC\_CLASS}{className}
-Used inside a class declaration to declare that the objects of this class should be dynamically
-creatable from run-time type information.
+Used inside a class declaration to make the class known to wxWidgets RTTI
+system and also declare that the objects of this class should be dynamically
+creatable from run-time type information. Notice that this implies that the
+class should have a default constructor, if this is not the case consider using
+\helpref{DECLARE\_CLASS}{declareclass}.
Example:
\helpref{RTTI overview}{runtimeclassoverview}\\
\helpref{wxDynamicCastThis}{wxdynamiccastthis}\\
\helpref{wxConstCast}{wxconstcast}\\
-\helpref{wxStatiicCast}{wxstaticcast}
+\helpref{wxStaticCast}{wxstaticcast}
\membersection{wxDynamicCastThis}\label{wxdynamiccastthis}
\func{T}{wx\_const\_cast}{T, x}
-Same as \texttt{const\_cast<T>(x)} if the compiler supports const cast or
+Same as \texttt{const\_cast<T>(x)} if the compiler supports const cast or
\texttt{(T)x} for old compilers. Unlike \helpref{wxConstCast}{wxconstcast},
the cast it to the type \arg{T} and not to \texttt{T *} and also the order of
arguments is the same as for the standard cast.
\func{T}{wx\_reinterpret\_cast}{T, x}
-Same as \texttt{reinterpret\_cast<T>(x)} if the compiler supports reinterpret cast or
+Same as \texttt{reinterpret\_cast<T>(x)} if the compiler supports reinterpret cast or
\texttt{(T)x} for old compilers.
\wxheading{See also}
\func{T}{wx\_static\_cast}{T, x}
-Same as \texttt{static\_cast<T>(x)} if the compiler supports static cast or
+Same as \texttt{static\_cast<T>(x)} if the compiler supports static cast or
\texttt{(T)x} for old compilers. Unlike \helpref{wxStaticCast}{wxstaticcast},
there are no checks being done and the meaning of the macro arguments is exactly
the same as for the standard static cast, i.e. \arg{T} is the full type name and
\func{void}{wxVLogMessage}{\param{const char *}{formatString}, \param{va\_list }{argPtr}}
For all normal, informational messages. They also appear in a message box by
-default (but it can be changed). Notice that the standard behaviour is to not
-show informational messages if there are any errors later - the logic being
-that the later error messages make the informational messages preceding them
-meaningless.
-
+default (but it can be changed).
\membersection{::wxLogVerbose}\label{wxlogverbose}
Sleeps for the specified number of microseconds. The microsecond resolution may
not, in fact, be available on all platforms (currently only Unix platforms with
-nanosleep(2) may provide it) in which case this is the same as
+nanosleep(2) may provide it) in which case this is the same as
\helpref{wxMilliSleep}{wxmillisleep}(\arg{microseconds}$/1000$).
\wxheading{Include files}
\func{void}{wxUsleep}{\param{unsigned long}{ milliseconds}}
This function is deprecated because its name is misleading: notice that the
-argument is in milliseconds, not microseconds. Please use either
-\helpref{wxMilliSleep}{wxmillisleep} or \helpref{wxMicroSleep}{wxmicrosleep}
+argument is in milliseconds, not microseconds. Please use either
+\helpref{wxMilliSleep}{wxmillisleep} or \helpref{wxMicroSleep}{wxmicrosleep}
depending on the resolution you need.
{\it value} may be {\tt NULL} if you just want to know if the variable exists
and are not interested in its value.
-Returns {\tt true} if the variable exists, {\tt false} otherwise.
+Returns \true if the variable exists, \false otherwise.
\membersection{wxSetEnv}\label{wxsetenv}
Sets the value of the environment variable {\it var} (adding it if necessary)
to {\it value}.
-Returns {\tt true} on success.
+Returns \true on success.
\membersection{wxUnsetEnv}\label{wxunsetenv}
\helpref{wxGetEnv}{wxgetenv} will return {\tt NULL} after the call to this
function.
-Returns {\tt true} on success.
+Returns \true on success.