Hi there Josh, welcome to the forums!
'
saveDialog' is a property of the '
Window' class, which is used when you call
MenuFileSave().
Setting
'isDocument = true' basically causes the Window to also be treated as a document model object.
'
saveDialog' lets you assign your own
FileDialog instance, e.g. to customize the caption or the filters etc.
If you don't set one, it will use a default dialog.
'
MenuFileSave' is also a method of the 'Window' class related to the document model system.
It is a method you can conveniently assign to a menu item that will cause the document to save.
You can locate both of these in the API Reference under ecere module, ecere::gui namespace, Classes, Window, under Properties and Methods respectively.
There is indeed almost no info in the API reference, I hope to address that this summer, as well as expand on the GUI section of the Tao. It should however be quite useful to show you all the classes/properties/methods available. As of today, the best reference is the
samples/ folder as well as the many posts on these forums. Don't hesitate however to post a new question or hang around on IRC or message/e-mail me to guide you quickly in the right direction.
'
fileSaveDialog' in the eNotepad sample is an instance of the FileDialog class.
All class instance members are defined as: 'Class object { };'
OnSaveFile() is indeed a virtual method of the Window class (again, part of the document model embedded in the Window class) which is called back by
MenuFileSave.
The methods in the GUI classes are all named in a systematic manner.
Methods starting with "
On....." are virtual methods called back for the window itself.
Methods starting with "
Notify..." are 'events', virtual methods for common controls called back with their owner (master) as the 'this' object, e.g.
NotifyClicked,
NotifySelect for menu items.
Methods starting with "
Menu..." or the method
ButtonCloseDialog, are predefined methods meant to be assigned to common controls virtual methods (e.g. "Menu..." to NotifySelect of PopupMenus, ButtonCloseDialog to the NotifyClicked of a Button).
In the API Reference, you will see non-virutal/virtual methods (callbacks) are grouped separately, and you will notice a special yellow icon for events (within the virtual methods).
You can also of course assign any method with a matching prototype to NotifySelect, which you can write yourself, or you can define it in place (The IDE will help you do so by auto completing the prototype after you type 'bool NotifySelect('. See the NotifySelect defined within the 'openItem' in eNotepad.ec.
The
Ecere Tao of Programming goes to some extent to explain virtual methods/events.
There is also some
more GUI explanations in this tutorial you can find at
https://github.com/ecere/ecere-sdk/blob ... f?raw=true .
Again don't hesitate to ask for help, that's what these forums and myself are here for
I realize the docs are lacking and I really hope to improve on this as soon as possible.
Hoping to hear back from you with more good questions soon
Good luck and best regards,
-Jerome