closeWin {iSPlot} | R Documentation |
closeWin adds a callback to a gtk window for the delete event. The delete event will call setDeleteEvents, which will remove the window, view and device information from environment variables and from R's device list.
closeWin(viewItem)
viewItem |
the view object to remove |
Elizabeth Whalen
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 createView(type = "plotView", dataName = "USArrests", plotType = "sPlotView", dfRows = 1:nrow(USArrests), dfColumns = 1:2) # now check viewList in viewEnv, as well as R's device list get("viewList",viewEnv) dev.list() # now close the gtk window that has the scatterplot in it # closing the window will cause the delete event to occur and # the delete event callback is defined in closeWin # then check again viewList in viewEnv, as well as # R's device list - all should have removed the window and device info get("viewList",viewEnv) dev.list() }