discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: custom options during save in a document app


From: Riccardo Mottola
Subject: Re: custom options during save in a document app
Date: Sat, 06 Oct 2012 13:21:44 +0200
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:15.0) Gecko/20120909 Firefox/15.0.1 SeaMonkey/2.12.1

Hi,

Wolfgang Lux wrote:
Riccardo Mottola wrote:

is changeSaveType, undocumented, available on both Mac and GS? or is it some 
kind of extension? That would be the place probably where to add the 
view-swizzling code.
It is available on both Cocoa and GNUstep (otherwise, I wouldn't have suggested 
using it :-)

Indeed, it exists and works. I just get a warning when I call [super changeSaveType:sender] but it works as advertised (well from you, Apple keeps it hidden!). Perhaps the best thing would be to add/remove from the accessoryView the options for each file tye and make it totally dynamic.

Now  some further questions:
how do I get the current accessory view to modify it with my stuff? I could call "superview" on the sender which is the popupbutton, but it seems dirty. [savePanel accessoryView] ? I tried getting the accessoryView and making it larger, but it doesn't work, it is a NSBox, which makes sense under Mac. Perhaps the default one is not saved in accessoryView?

Second, in the changeSaveType method I need to know which filetype was selected. The document has not yet an updated fileType (hence the need of fileTYpeFromLastRunSavePanel of course). A way would be to read directly the contents of the popupbutton, but perhaps there is a cleaner way. It appears to have the document name.

It looks like I have a clear idea of what to do, but getting list in the implementation details, I hate this!

Riccardo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]