gAddMessage-class           package:iSPlot           R Documentation

_C_l_a_s_s "_g_A_d_d_M_e_s_s_a_g_e": _A _c_l_a_s_s _t_o _r_e_p_r_e_s_e_n_t _a_n _a_d_d _m_e_s_s_a_g_e

_D_e_s_c_r_i_p_t_i_o_n:

     gAddMessage is a class to represent an add message.  When one of
     the  components in the model-view-controller paradigm needs to
     tell another component to be added, an add message is created. 
     For example, when the controller adds data to the data
     environment, a gAddDataMessage object is created.  Both
     gAddDataMessage and gAddViewMessage classes are inherited from
     gAddMessage.  Although gAddMessage is not a virtual class,
     currently no objects of class gAddMessage are created in package,
     iSPlot.

_O_b_j_e_c_t_s _f_r_o_m _t_h_e _C_l_a_s_s:

     Objects can be created by calls of the form 'new("gAddMessage",
     ...)'.

_S_l_o_t_s:

     '_d_a_t_a_N_a_m_e': the name of the data to be added or the name of the
          data that the view depends on 

     '_m_D_a_t_a': the data needed to perform the add, will be a list 

_E_x_t_e_n_d_s:

     Class '"gMessage"', directly.

_M_e_t_h_o_d_s:

     _d_a_t_a_N_a_m_e Returns the 'dataName' slot

     _d_a_t_a_N_a_m_e<- Sets the 'dataName' slot 

     _m_D_a_t_a Returns the 'mData' slot 

     _m_D_a_t_a<- Sets the 'mData' slot 

_A_u_t_h_o_r(_s):

     Elizabeth Whalen

_S_e_e _A_l_s_o:

     'gMessage-class', 'gAddViewMessage-class', 'gAddDataMessage-class'

_E_x_a_m_p_l_e_s:

       if (interactive())
       {
         createControlWindow()
         # should load data through Open Data or Open File under the File menu
         data("USArrests")
         dMessage<-new("gAddDataMessage", data="USArrests")
         handleMessage(dMessage)
        
         # check to make sure it has been loaded in dataEnv
         names(get("dfList", dataEnv))
         # check if it inherits from gAddMessage
         is(dMessage,"gAddMessage")
       }

