getMVCFromWinNum           package:iSPlot           R Documentation

_R_e_t_u_r_n_s _t_h_e _M_V_C _o_b_j_e_c_t _t_h_a_t _t_h_e _v_i_e_w _w_i_t_h _f_o_c_u_s _b_e_l_o_n_g_s _t_o

_D_e_s_c_r_i_p_t_i_o_n:

     Each view belongs to a MVC object.  This function takes the active
     window number, which is stored in the environment variable
     activeWinNum in mvcEnv, and returns the MVC object that this view
     belongs to.  This function is needed when the callback function
     needs to determine which MVC to update after user interaction with
     a view.  Note: the device number can't be used to determine the
     active view, because not all views have a device (ex.
     spreadsheet).

_U_s_a_g_e:

     getMVCFromWinNum()

_D_e_t_a_i_l_s:

     Initially, the user could only interact with views of the active
     MVC, but now the user can interact with any view.  Thus, this
     function is called by all callback functions to determine which
     MVC should be updated in response to user interaction with the
     view with focus.

_V_a_l_u_e:

     Returns the MVC object that the view (as represented by the active
     window number) belongs to.  If no MVC object can be found that
     corresponds with the view, then the active MVC object is returned.

_A_u_t_h_o_r(_s):

     Elizabeth Whalen

_S_e_e _A_l_s_o:

     'addCBFunction'

_E_x_a_m_p_l_e_s:

       if (interactive())
       {
         loadData("USArrests")
         setActiveMVC("USArrests")
         createSPlot(varx="Murder", vary="Assault")
         curMVC<-getMVCFromWinNum()
       } 

