Identitas Garuda Indonesia dalam Rubrik Garuda Indonesia ...
Garuda: Mythical Link to the CLR 18th Annual Tcl Conference Joe Mistachkin.
-
Upload
fidel-sevick -
Category
Documents
-
view
216 -
download
2
Transcript of Garuda: Mythical Link to the CLR 18th Annual Tcl Conference Joe Mistachkin.
![Page 1: Garuda: Mythical Link to the CLR 18th Annual Tcl Conference Joe Mistachkin.](https://reader030.fdocuments.net/reader030/viewer/2022032702/56649cbf5503460f94985104/html5/thumbnails/1.jpg)
Garuda: Mythical Link to the CLR
18th Annual Tcl Conference
Joe Mistachkin
![Page 2: Garuda: Mythical Link to the CLR 18th Annual Tcl Conference Joe Mistachkin.](https://reader030.fdocuments.net/reader030/viewer/2022032702/56649cbf5503460f94985104/html5/thumbnails/2.jpg)
What is Garuda?
• Garuda is an open-source Tcl package capable of loading and interacting with the CLR.
• Designed primarily for use with Eagle.
• Does not work on Mono because it lacks the native CLR API.
• Not TEA compliant; however, I would appreciate any help making it so.
![Page 3: Garuda: Mythical Link to the CLR 18th Annual Tcl Conference Joe Mistachkin.](https://reader030.fdocuments.net/reader030/viewer/2022032702/56649cbf5503460f94985104/html5/thumbnails/3.jpg)
How do I install it?
• Requires Tcl 8.4 or higher.
• Copy files to a directory in the $auto_path.
![Page 4: Garuda: Mythical Link to the CLR 18th Annual Tcl Conference Joe Mistachkin.](https://reader030.fdocuments.net/reader030/viewer/2022032702/56649cbf5503460f94985104/html5/thumbnails/4.jpg)
How do I load it?(mostly automatically)
package require Garuda
eagle { # Eagle script here # (optional).}
![Page 5: Garuda: Mythical Link to the CLR 18th Annual Tcl Conference Joe Mistachkin.](https://reader030.fdocuments.net/reader030/viewer/2022032702/56649cbf5503460f94985104/html5/thumbnails/5.jpg)
Diagnostic Configuration
## The Tcl command (with one# argument) used to log all CLR# lifecycle events and method# calls. May be defined as a# no-op.#set Garuda::logCommand
![Page 6: Garuda: Mythical Link to the CLR 18th Annual Tcl Conference Joe Mistachkin.](https://reader030.fdocuments.net/reader030/viewer/2022032702/56649cbf5503460f94985104/html5/thumbnails/6.jpg)
Startup Configuration(very rarely, if ever, required)
set Garuda::assemblyPath; # assembly file?
set Garuda::typeName; # qualified class?
set Garuda::methodFlags; # see GarudaInt.h
set Garuda::startupMethodName; # "Startup"
set Garuda::methodArguments; # extra args
![Page 7: Garuda: Mythical Link to the CLR 18th Annual Tcl Conference Joe Mistachkin.](https://reader030.fdocuments.net/reader030/viewer/2022032702/56649cbf5503460f94985104/html5/thumbnails/7.jpg)
Auto-Loader Configuration
set Garuda::useEnvironment
set Garuda::useRegistry
set Garuda::envVars
set Garuda::rootRegistryKeyName
set Garuda::startClr
set Garuda::startBridge
![Page 8: Garuda: Mythical Link to the CLR 18th Annual Tcl Conference Joe Mistachkin.](https://reader030.fdocuments.net/reader030/viewer/2022032702/56649cbf5503460f94985104/html5/thumbnails/8.jpg)
CLR Method Configuration
# send "control" directiveset Garuda::controlMethodName
# detach Tcl interpreterset Garuda::detachMethodName
# initiate bridge shutdownset Garuda::shutdownMethodName
![Page 9: Garuda: Mythical Link to the CLR 18th Annual Tcl Conference Joe Mistachkin.](https://reader030.fdocuments.net/reader030/viewer/2022032702/56649cbf5503460f94985104/html5/thumbnails/9.jpg)
Simple Usage(create and invoke)
package require Garuda
eagle { set o1 [object create Foo] object invoke $o1 DoSomething set o2 [object create –alias Foo] $o2 DoSomething}
![Page 10: Garuda: Mythical Link to the CLR 18th Annual Tcl Conference Joe Mistachkin.](https://reader030.fdocuments.net/reader030/viewer/2022032702/56649cbf5503460f94985104/html5/thumbnails/10.jpg)
Advanced Usage(Excel Automation)
package require Garuda
eagle {
object load -import –declare \
Microsoft.Office.Interop.Excel
set o [object create -alias \
Microsoft.Office.Interop.Excel.ApplicationClass]
$o Visible true
}
![Page 11: Garuda: Mythical Link to the CLR 18th Annual Tcl Conference Joe Mistachkin.](https://reader030.fdocuments.net/reader030/viewer/2022032702/56649cbf5503460f94985104/html5/thumbnails/11.jpg)
Introspection, Application Domain
% garuda clrappdomainid
1
![Page 12: Garuda: Mythical Link to the CLR 18th Annual Tcl Conference Joe Mistachkin.](https://reader030.fdocuments.net/reader030/viewer/2022032702/56649cbf5503460f94985104/html5/thumbnails/12.jpg)
Introspection, CLR Running?
% garuda clrrunning
1
![Page 13: Garuda: Mythical Link to the CLR 18th Annual Tcl Conference Joe Mistachkin.](https://reader030.fdocuments.net/reader030/viewer/2022032702/56649cbf5503460f94985104/html5/thumbnails/13.jpg)
Introspection, CLR Version
% garuda clrversion
v2.0.50727
![Page 14: Garuda: Mythical Link to the CLR 18th Annual Tcl Conference Joe Mistachkin.](https://reader030.fdocuments.net/reader030/viewer/2022032702/56649cbf5503460f94985104/html5/thumbnails/14.jpg)
Introspection, Internal State
% garuda dumpstate
packageMutex 0x013CE958↩
↪hModule 0x10000000↩
↪pClrRuntimeHost↩
↪0x00626C50 bClrStarted 1
![Page 15: Garuda: Mythical Link to the CLR 18th Annual Tcl Conference Joe Mistachkin.](https://reader030.fdocuments.net/reader030/viewer/2022032702/56649cbf5503460f94985104/html5/thumbnails/15.jpg)
Introspection, Package Id
% garuda packageid
Garuda 1.0↩
↪fba64d41d7ee08985af28564↩
↪437fc26ead7c8ef6 {2011-↩
↪10-01 22:35:24 UTC}
![Page 16: Garuda: Mythical Link to the CLR 18th Annual Tcl Conference Joe Mistachkin.](https://reader030.fdocuments.net/reader030/viewer/2022032702/56649cbf5503460f94985104/html5/thumbnails/16.jpg)
CLR Management
garuda clrexecute
garuda clrstart
garuda clrstop
![Page 17: Garuda: Mythical Link to the CLR 18th Annual Tcl Conference Joe Mistachkin.](https://reader030.fdocuments.net/reader030/viewer/2022032702/56649cbf5503460f94985104/html5/thumbnails/17.jpg)
Managed Code Interaction
garuda startup
garuda control
garuda detach
garuda shutdown
![Page 18: Garuda: Mythical Link to the CLR 18th Annual Tcl Conference Joe Mistachkin.](https://reader030.fdocuments.net/reader030/viewer/2022032702/56649cbf5503460f94985104/html5/thumbnails/18.jpg)
Demonstration
![Page 19: Garuda: Mythical Link to the CLR 18th Annual Tcl Conference Joe Mistachkin.](https://reader030.fdocuments.net/reader030/viewer/2022032702/56649cbf5503460f94985104/html5/thumbnails/19.jpg)
Questions and Answers