Maple Professionel
Maple Académique
Maple Edition Étudiant
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professionel
MapleSim Académique
Maple T.A. - Suite d'examens de classement
Maple T.A. MAA Placement Test Suite
Möbius - Didacticiels de mathématiques en ligne
Machine Design / Industrial Automation
Aéronautique
Ingénierie des véhicules
Robotics
Energie
System Simulation and Analysis
Model development for HIL
Modélisation du procédé pour la conception de systèmes de contrôle
Robotics/Motion Control/Mechatronics
Other Application Areas
Enseignement des mathématiques
Enseignement de l’ingénierie
Enseignement secondaire et supérieur (CPGE, BTS)
Tests et évaluations
Etudiants
Modélisation financière
Recherche opérationnelle
Calcul haute performance
Physique
Webinaires en direct
Webinaires enregistrés
Agenda des évènements
Forum MaplePrimes
Blog Maplesoft
Membres Maplesoft
Maple Ambassador Program
MapleCloud
Livres blancs techniques
Bulletin électronique
Livres Maple
Math Matters
Portail des applications
Galerie de modèles MapleSim
Cas d'Etudes Utilisateur
Exploring Engineering Fundamentals
Concepts d’enseignement avec Maple
Centre d’accueil utilisateur Maplesoft
Centre de ressources pour enseignants
Centre d’assistance aux étudiants
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