Sign up ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I was wondering if someone could explain me the code written below (example File Dialog from mathematica). Especially the part with returnValueand InvokeMethod. Also I want to ask how to actually save table from Table Widget(when I add Save button to the widget how to implement the method?). I really need help and any comment is appreciated.

ref = GUIRun[Widget["Panel", {Widget["Button", {"text" -> "Save File...",                    
    Widget["FileDialog", Name -> "saveFileDialog"];
    returnValue = 
     InvokeMethod[{"saveFileDialog", "showSaveDialog"}, Null];
     returnValue === 
      PropertyValue[{"saveFileDialog", "APPROVE_OPTION"}], 
         "selectedFile"}], "path"}],
Widget["Button", {"text" -> "Cancel"}]


share|improve this question
If you have any version more recent than v5 you should consider leaving the obsolete GUIkit package behind and using the newer dynamic controls instead. – Sjoerd C. de Vries Dec 6 '13 at 23:45
Ok...I will give it a try :) – Stefan Dec 7 '13 at 20:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.