SaveAs question


#1

When you use a “save as” menu in a menu bar model, how do you access to your main document window content ?

For example, when “save as” is clicked, and a Filechooser opened, you select a path for writing an XML file. Then you probably get info from your whole application, in order to write in your XML.

I dont manage to properly access to the document window of my app and get these infos…

thk


#2

Why not have a look at how the jucer handles document loading and saving.


#3

not bad :roll: hehe…

But I dont find any “saveas” related function in.


#4

Right, so you didn’t think of searching the jucer code for the string “saveas” or “save as”, then? :roll:


#5

I did.

There is method for many options of the menu, but I dont find the one for saving (particullary in “MenuBarModel::perform” function).


#6

5 seconds of searching took me to this:

case CommandIDs::saveAs: document->saveAsInteractive (true); break;

How could it possibly be any clearer??


#7

It could not be… hehe