Maple Professional
Maple Academic
Maple Student Edition
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professional
MapleSim Academic
Maple T.A. - Testing & Assessment
Maple T.A. MAA Placement Test Suite
Möbius - Online Courseware
Machine Design / Industrial Automation
Aerospace
Vehicle Engineering
Robotics
Power Industries
System Simulation and Analysis
Model development for HIL
Plant Modeling for Control Design
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematics Education
Engineering Education
High Schools & Two-Year Colleges
Testing & Assessment
Students
Financial Modeling
Operations Research
High Performance Computing
Physics
Live Webinars
Recorded Webinars
Upcoming Events
MaplePrimes
Maplesoft Blog
Maplesoft Membership
Maple Ambassador Program
MapleCloud
Technical Whitepapers
E-Mail Newsletters
Maple Books
Math Matters
Application Center
MapleSim Model Gallery
User Case Studies
Exploring Engineering Fundamentals
Teaching Concepts with Maple
Maplesoft Welcome Center
Teacher Resource Center
Student Help Center
Maplets[Tools][Set] - 起動中の maplet での、要素オプションの値の設定
使い方
Set(objs)
Set(handle, objs)
パラメータ
objs - 設定を行いたいオブジェクト
handle - maplet の識別子
説明
Set(objs) および Set(handle, objs) コマンドは、起動中の maplet 内で、指定された要素のオプションの値を設定します。Set を使用することが可能な要素オプションを特定するためには、個々の Element のヘルプページを参照するか、もしくは Maplets/ElementOptions を参照して下さい。
Set の使用は、(ライブラリの手続きを含む)手続き内に限定されます。Set は、maplet の定義の中では使用できません。
Set と SetOption の相違点は、Set が手続きの中で使用されるのに対して、SetOption は maplet 内で使用されるということです。Set を用いて設定される要素オプションは、SetOption を用いても設定が可能です。
handle が提供されていない場合には、Evaluate コマンド要素の実行により呼び出される手続き内で Set を 使用しなくてはなりません。変数 thismaplet が、maplet の呼び出しを指定するために使用可能です。
objs 内の各オブジェクトは、以下に示す形式のいずれかでなくてはなりません。ここで、ref は maplet 内にある要素への参照、opt は参照される要素に関するオプションを示す記号、そして右辺は、ref で参照される maplet 要素の、指定されたオプションopt として受け付けられる値を示します。
ref = anything ref(opt) = anything
オプション opt が指定されない場合には、value オプションが設定されます。
例
入力フィールドの内容として次の値を用いて、この例題を試してみて下さい; 'x', '[x]' および 'x y' 。後ろ2つの入力では、maplet がエラーを返します。
myProc := proc() local integrand; Maplets:-Tools:-Set( 'TF1' = int(Maplets:-Tools:-Get('TF1'::algebraic), x) ); end proc: with(Maplets[Elements]): maplet1 := Maplet([TextField['TF1'](), [ Button("Integrate w.r.t. x", Evaluate('function' = "myProc")), Button("OK", Shutdown(['TF1'])) ]]): Maplets[Display](maplet1);
以下に示す '[x]' および 'x y'を用いた maplet で表示されるエラーメッセージを、比較してみて下さい。
maplet2 := Maplet([TextField['TF1'](), [ Button("Integrate w.r.t. x", Evaluate('TF1' = 'int(TF1, x)')), Button("OK", Shutdown(['TF1'])) ]]): Maplets[Display](maplet2);
エラーメッセージが以下のものと似ていることに注意して下さい:
int([x], x);
Error, (in int) wrong number (or type) of arguments
int(x y, x);
on line 93, syntax error, missing operator or `;`: int(x y, x); ^
参照
int, Maplets パッケージの概要, Maplets[Display], Maplets/ElementOptions, Maplets[Elements] パッケージの紹介, Maplets[Elements][Button], Maplets[Elements][Evaluate], Maplets[Elements][Maplet], Maplets[Elements][SetOption], Maplets[Elements][Shutdown], Maplets[Elements][TextField], Maplets[Tools] パッケージの紹介, Maplets[Tools][Get], 手続き, type
Download Help Document