Re: [Lazarus] tFileOpen Action, Is it possible to cancel the dialog...

2010-08-01 Thread Alberto Narduzzi
(...) The FileOpen Action is tied to a couple of controls though (Menu, ToolButton) then handle it within the FileOpen Action. I guess there you have if(MyFileDialog.Execute) Then OpenTheFile(MyFileDialog.FileName), right? So check for the file to be saved as first thing. At least, this is wh

Re: [Lazarus] tFileOpen Action, Is it possible to cancel the dialog...

2010-08-01 Thread Wildfire
Cannot you check if the current file needs to be saved and prompt the user for it _before_ opening the dialog? That's one work around, The FileOpen Action is tied to a couple of controls though (Menu, ToolButton) and I was hoping to do all the work inside (so the menu & toolbutton remain syn

Re: [Lazarus] tFileOpen Action, Is it possible to cancel the dialog...

2010-07-31 Thread Alberto Narduzzi
Is in possible to cancel the dialog in the BeforeExecute event, my plan was to ask the user to save the current file (Yes/No/Cancel) before opening another. Cannot you check if the current file needs to be saved and prompt the user for it _before_ opening the dialog? Cheers, A. -- ___

[Lazarus] tFileOpen Action, Is it possible to cancel the dialog...

2010-07-31 Thread Wildfire
Just started messing about with the standard actions in Lazarus and came across a minor problem. Is in possible to cancel the dialog in the BeforeExecute event, my plan was to ask the user to save the current file (Yes/No/Cancel) before opening another, problem is I don't know how to cancel th