Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

doAction

Execute Action Created by a Widget


Description

Executes the action expression formulated by the user and written as an action by a widget.

Usage

doAction(act)

Arguments

act

string representing an expression that can be executed

Details

If act is missing, doAction looks for it in the action directory of the window's widget directory in .PBSmod. This action can be accessed through getWinAct()[1].

Due to parsing complications, the expression act translates various symbols.
The function translates:

1. The back tick character ` to a double quote " character. For example,

"openFile(paste(getWinVal()$prefix,`.tpl`,sep=``))"

2. Underscore period _. to four back slashes and one period \\\\.. For example,

"poop=strsplit(`some.thing.else`,split=`_.`)"

Value

Invisibly returns the string expression expr.

Author(s)

Rowan Haigh, Pacific Biological Station, Fisheries and Oceans Canada, Nanaimo BC

See Also

Examples

## Not run: 
local(envir=.PBSmodEnv,expr={
  createWin("button text=\"list objects\" func=doAction action=print(ls(all.names=TRUE))",
    astext=TRUE)
})

## End(Not run)

PBSmodelling

GUI Tools Made Easy: Interact with Models and Explore Data

v2.68.8
GPL (>= 2)
Authors
Jon T. Schnute [aut], Alex Couture-Beil [aut], Rowan Haigh [aut, cre], Nicholas Boers [ctb], Anisa Egeli [ctb], A. R. Kronlund [ctb], Steve Martell [ctb], Norm Olsen [ctb]
Initial release
2019-03-12

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.