gAddDataMessage-class {iSPlot} | R Documentation

## Class "gAddDataMessage": A class to represent an add data message

### Description

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.

### Objects from the Class

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.

### Slots

`dataName`:
  the name of the data to be added
`mData`:
  the data to be added, will be a list

### Extends

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

### Methods

handleMessage
  Adds the data to the data environment by calling the function, loadDFData
initialize
  Creates a gAddDataMessage object

### Author(s)

Elizabeth Whalen

### See Also

`loadDFData`, `gAddMessage-class`, `gAddViewMessage-class`

### Examples

      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)
      }

[Package iSPlot version 1.0.7 Index]