GUIKIT - Export Graphics
- To: mathgroup at smc.vnet.net
- Subject: [mg63968] GUIKIT - Export Graphics
- From: "Emanuel" <vonwartburg at phys.ethz.ch>
- Date: Wed, 25 Jan 2006 08:45:57 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Hello
I wrote a GUIKit-Widget which produces a graph and display this graph
in a Widget frame. The graph was stored in the variable <cp>. Then I
want to save this graph in a file using the save file dialog (script
below). I can choose a name in the dialog, but the Export-function
doesn't work. No error was displayed. Has anyone an idea, what is wrong
with my script?
Script[
exportcs[] := Module[{fng},
Widget["FileDialog", Name -> "saveFileDialog"];
returnValue = InvokeMethod[{"saveFileDialog",
"showSaveDialog"}, Null];
If[returnValue === PropertyValue[{"saveFileDialog",
"APPROVE_OPTION"}],
PropertyValue[{PropertyValue[{"saveFileDialog",
"selectedFile"}], "path"}], Null];
fng = ToString[PropertyValue[{"saveFileDialog",
"selectedFile"}], InputForm];
Export[fng, cp, "JPEG"];
]
]