removeAccelerators {iSPlot}R Documentation

Remove Accelerators Relating to a Window


removeAccelerators removes all accelerators from the environment variable, keyVals, in controlEnv that have a winNum element. The keyVals variable stores all the accelerator keys for the control window. Using the keyVals variable, any new window that opens can have the same key press events as the control window. The function, removeAccelerators, is called whenever a view window is destroyed and thus, the accelerator for that window must be removed.




Elizabeth Whalen

See Also

setDeleteEvents, createMenuItem


  if (interactive())
    # should load data through Open Data or Open File under the File menu
    # 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 close the scatterplot window; the Window menu on the control
    # window will no longer have Window 1 as a sub menu item and pressing
    # Ctrl+1 will not result in any action    

[Package iSPlot version 1.0.3 Index]