Hi,
Wolfgang Lux wrote:
Riccardo Mottola wrote:
What I meant (and I guess I wasn't clear about that) is that you should not try
to reimplement any functionality provided by NSDocument. NSDocument has already
created the pop up with the document types at the time -prepareSavePanel: is
called. So in your implementation of that method just ask the save panel for
its current accessory view and add your own elements to that view (you may
eventually need to resize the existing view for that). Or make the existing
accessory view a subview of your own accessory view. If you want to dynamically
change the save panel options depending on the document type currently chosen
by the user, you can do so by overriding the (undocumented) NSDocument method
-changeSaveType:. However, if you do so, be sure to call the super class
implementation in your own method.
Aha, so you say I should just try to extend the existing view. That
sounds the best way of course.
I precisely want to that. Currently TIFF has no options, JPEG has a
compression slider. Theoretically also TIFF has compression or not, but
just boolean. If, in the future, I'll support something else, it might
need for example Transparency for GIF and PNG...
Perhaps the best way would be to have N different small "options only"
accessory views, like TIFFOptionsView, JPEGOptionsView and add them as a
subview of the existing accessory view, but I don't know well how to
mess with it.
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.
Riccardo
_______________________________________________
Discuss-gnustep mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep