Maple für Professional
Maple für Akademiker
Maple für Studenten
Maple Personal Edition
Maple Player
Maple Player für iPad
MapleSim für Professional
MapleSim für Akademiker
Maple T.A. - Testen & beurteilen
Maple T.A. MAA Placement Test Suite
Möbius - Online-Courseware
Machine Design / Industrial Automation
Luft- und Raumfahrt
Fahrzeugtechnik
Robotics
Energiebranche
System Simulation and Analysis
Model development for HIL
Anlagenmodelle für den Regelungsentwurf
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematikausbildung
Technik
Allgemein- und berufsbildende Schulen
Testen und beurteilen
Studierende
Finanzmodelle
Betriebsforschung
Hochleistungsrechnen
Physik
Live-Webinare
Aufgezeichnete Webinare
Geplante Veranstaltungen
MaplePrimes
Maplesoft-Blog
Maplesoft-Mitgliedschaft
Maple Ambassador Program
MapleCloud
Technische Whitepapers
E-Mail Newsletters
Maple-Bücher
Math Matters
Anwendungs-Center
MapleSim Modell-Galerie
Anwenderberichte
Exploring Engineering Fundamentals
Lehrkonzepte mit Maple
Maplesoft Welcome-Center
Resource-Center für Lehrer
Help-Center für Studierende
ContextMenu[CurrentContext][Queries][Add] - add query for use within context menu module
Calling Sequence
Queries[Add](nm, query)
Parameters
nm
-
string; name by which query is referenced
query
procedure; returns information about the right-clicked object
Description
The Queries[Add] command adds query to the set of recognized queries under the name nm.
The nm parameter is the name by which the query is used and referenced by the context menu module. The query parameter is a procedure applied to the selected object.
Note that if a query is boolean-valued, meaning it returns true, false, or FAIL, then nm may be used in the test parameter to the Entries[Add] command. This indicates that the appearance of the associated entry in the context menu is dependent on the return value of query.
In addition to their use in Entries[Add], queries may be called by entry generators (see EntryGenerators) or by other queries using the Run command.
Examples of Queries[Add]
with(ContextMenu[CurrentContext]):
Add a query that lists the exports of a specified module.
Queries[Add]("Exports", proc(e) [exports(e)] end proc);
Add a query that returns the number of exports a specified module has.
Queries[Add]("NumExports", proc(e) nops(RunQuery("Exports", e)) end proc);
Add a query that tests that the specified module has exactly five exports.
Queries[Add]("5 exports", proc(e) evalb(RunQuery("NumExports", e) = 5) end proc);
See Also
ContextMenu, ContextMenu[CurrentContext][Queries], Queries/Get, Queries/List, Queries/Run
Download Help Document