gUpdateDataMessage-class {iSPlot} | R Documentation |
gUpdateDataMessage
is a class to represent an update data message.
When either the controller or the views (i.e. the control window or the
views) want to update the data, a gUpdateDataMessage
object is created.
gUpdateDataMessage is inherited from the class, gUpdateMessage, which
inherits from the virtual class, gMessage. Whenever a gUpdateDataMessage
is created (initialized), the next step is to call the handleMessage method
to act upon that message and update the data.
Objects can be created by calls of the form new("gUpdateDataMessage", from, where, ...)
.
When creating a gUpdateDataMessage object, the from
parameter is the object
that is telling the data to be updated. Currently, the from
parameter will
be an object of class sPlotView or spreadView. The where parameter is what
point of the data should be updated (this is returned by the function,
identifyPoint). The initialize method for gUpdateDataMessage will call the
method, viewUpdateData
, to ensure that the message is properly initialized
when it is created.
to
:type
:mData
:
Class "gUpdateMessage"
, directly.
Class "gMessage"
, by class "gUpdateMessage"
.
to
slot Elizabeth Whalen
gMessage-class
,
gUpdateMessage-class
,
gUpdateViewMessage-class
if (interactive()) { createControlWindow() # should load data through Open Data or Open File under the File menu data(USArrests) loadDFData(USArrests,"USArrests") # plotting the data should occur through Plot Data under the # Display menu vMessage<-new("gAddViewMessage", dataName="USArrests", type="plotView", plotType="sPlotView", dfRows = 1:nrow(USArrests), dfColumns = 1:2) handleMessage(vMessage) # now set the view mode to Highlight using the ViewMode menu # then click on a point in the plot and a gUpdateDataMessage will be # created and handled # you can see this by looking at the data after you click on a point x<-getData(type="dataframe", name="USArrests") }