.. wxPython Phoenix documentation

   This file was generated by Phoenix's sphinx generator and associated
   tools, do not edit by hand.

   Copyright: (c) 2011-2018 by Total Control Software
   License:   wxWindows License

.. include:: headings.inc



.. _wx.CallLater:

==========================================================================================================================================
|phoenix_title|  **wx.CallLater**
==========================================================================================================================================

A convenience class for :class:`wx.Timer`, that calls the given callable
object once after the given amount of milliseconds, passing any
positional or keyword args.  The return value of the callable is
available after it has been run with the :meth:`~wx.CallLater.GetResult`
method.

If you don't need to get the return value or restart the timer
then there is no need to hold a reference to this object. CallLater
maintains references to its instances while they are running. When they
finish, the internal reference is deleted and the GC is free to collect
naturally.

.. seealso::
    :func:`wx.CallAfter`

            




|

|class_hierarchy| Class Hierarchy
=================================

.. raw:: html

   <div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
   <img id="toggleBlock-trigger" src="_static/images/closed.png"/>
   Inheritance diagram for class <strong>CallLater</strong>:
   </div>
   <div id="toggleBlock-summary" style="display:block;"></div>
   <div id="toggleBlock-content" style="display:none;">
   <p class="graphviz">
   <center><img src="_static/images/inheritance/wx.CallLater_inheritance.png" alt="Inheritance diagram of CallLater" usemap="#dummy" class="inheritance"/></center>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.CallLater.html" title="A convenience class for wx.Timer, that calls the given callable" alt="" coords="5,5,109,35"/> </map> 
   </p>
   </div>

|


|method_summary| Methods Summary
================================

================================================================================ ================================================================================
:meth:`~wx.CallLater.__init__`                                                   Constructs a new :class:`wx.CallLater` object.
:meth:`~wx.CallLater.GetInterval`                                                
:meth:`~wx.CallLater.GetResult`                                                  Returns the value of the callable.
:meth:`~wx.CallLater.HasRun`                                                     Returns whether or not the callable has run.
:meth:`~wx.CallLater.IsRunning`                                                  
:meth:`~wx.CallLater.Notify`                                                     The timer has expired so call the callable.
:meth:`~wx.CallLater.SetArgs`                                                    (Re)set the args passed to the callable object.  This is
:meth:`~wx.CallLater.Start`                                                      (Re)start the timer
:meth:`~wx.CallLater.Stop`                                                       Stop and destroy the timer.
:meth:`~wx.CallLater.__del__`                                                    
================================================================================ ================================================================================


|


|property_summary| Properties Summary
=====================================

================================================================================ ================================================================================
:attr:`~wx.CallLater.Interval`                                                   See :meth:`~wx.CallLater.GetInterval`
:attr:`~wx.CallLater.Result`                                                     See :meth:`~wx.CallLater.GetResult`
================================================================================ ================================================================================


|


|api| Class API
===============


.. class:: wx.CallLater(object)

   A convenience class for :class:`wx.Timer`, that calls the given callable
   object once after the given amount of milliseconds, passing any
   positional or keyword args.  The return value of the callable is
   available after it has been run with the :meth:`~wx.CallLater.GetResult`
   method.
   
   If you don't need to get the return value or restart the timer
   then there is no need to hold a reference to this object. CallLater
   maintains references to its instances while they are running. When they
   finish, the internal reference is deleted and the GC is free to collect
   naturally.
   
   .. seealso::
       :func:`wx.CallAfter`
   
               



   .. method:: __init__(self, millis, callableObj, *args, **kwargs)

      Constructs a new :class:`wx.CallLater` object.

      :param int millis: number of milliseconds to delay until calling the callable object
      :param PyObject callableObj: the callable object
      :param args: arguments to be passed to the callable object
      :param kw: keywords to be passed to the callable object
                





   .. method:: GetInterval(self)






   .. method:: GetResult(self)

      Returns the value of the callable.

      :rtype: a Python object
      :return: result from callable
                    





   .. method:: HasRun(self)

      Returns whether or not the callable has run.

      :rtype: bool

                    





   .. method:: IsRunning(self)






   .. method:: Notify(self)

      The timer has expired so call the callable.





   .. method:: SetArgs(self, *args, **kwargs)

      (Re)set the args passed to the callable object.  This is
      useful in conjunction with :meth:`Start` if
      you want to schedule a new call to the same callable
      object but with different parameters.

      :param args: arguments to be passed to the callable object
      :param kw: keywords to be passed to the callable object

                    





   .. method:: Start(self, millis=None, *args, **kwargs)

      (Re)start the timer

      :param int millis: number of milli seconds
      :param args: arguments to be passed to the callable object
      :param kw: keywords to be passed to the callable object

                    





   .. method:: Stop(self)

      Stop and destroy the timer.





   .. method:: __del__(self)






   .. attribute:: Interval

      See :meth:`~wx.CallLater.GetInterval`


   .. attribute:: Result

      See :meth:`~wx.CallLater.GetResult`