gAddDataMessage-class         package:iSPlot         R Documentation

_C_l_a_s_s "_g_A_d_d_D_a_t_a_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 _d_a_t_a _m_e_s_s_a_g_e

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

     gAddDataMessage is a class to represent an add data message. 
     Whenever data need to be added to the data environment, a
     gAddDataMessage object is created and the handleMessage method is
     called to act on the message. Currently, the two places where data
     are added to the data environment  is when the Open File or Open
     Data menu options are chosen under the  File menu. 
     gAddDataMessage inherits from the class, gAddMessage, which 
     inherits from the virtual class, gMessage.

_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("gAddDataMessage", data, ...)'. When creating a
     gAddDataMessage object, the data parameter is either the name of
     the data or it is the actual data.  If the data parameter is the
     actual data, then the data name must be passed in the ... 
     parameter.

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

     '_d_a_t_a_N_a_m_e': the name of the data to be added 

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

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

     Class '"gAddMessage"', directly. Class '"gMessage"', by class
     '"gAddMessage"'.

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

     _h_a_n_d_l_e_M_e_s_s_a_g_e Adds the data to the data environment by calling the
          function, loadDFData

     _i_n_i_t_i_a_l_i_z_e Creates a gAddDataMessage object

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

     Elizabeth Whalen

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

     'loadDFData',  'gAddMessage-class', 'gAddViewMessage-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 the class
         class(dMessage)
       }

