getMVCFromWinNum {iSPlot} | R Documentation

## Returns the MVC object that the view with focus belongs to

### Description

Each view belongs to a MVC object. This function takes the active window number, which is stored in the environment variable activeWinNum in mvcEnv, and returns the MVC object that this view belongs to. This function is needed when the callback function needs to determine which MVC to update after user interaction with a view. Note: the device number can't be used to determine the active view, because not all views have a device (ex. spreadsheet).

### Usage

    getMVCFromWinNum()

### Details

Initially, the user could only interact with views of the active MVC, but now the user can interact with any view. Thus, this function is called by all callback functions to determine which MVC should be updated in response to user interaction with the view with focus.

### Value

Returns the MVC object that the view (as represented by the active window number) belongs to. If no MVC object can be found that corresponds with the view, then the active MVC object is returned.

### Author(s)

Elizabeth Whalen

### See Also

`addCBFunction`

### Examples

      if (interactive())
      {
        loadData("USArrests")
        setActiveMVC("USArrests")
        createSPlot(varx="Murder", vary="Assault")
        curMVC<-getMVCFromWinNum()
      }

[Package iSPlot version 1.12.0 Index]