pycocoa.panels.SavePanel

Package pycocoa :: Module panels :: Class SavePanel |
[frames] | no frames]

# Class SavePanel

              object --+
                       |
    internals._Objectype --+
                           |
            baseTypes._Type0 --+
                               |
                baseTypes._Type1 --+
                                   |
                    baseTypes._Type2 --+
                                       |
                                      SavePanel

Python Type to save a file, wrapping ObjC `NSSavePanel`.

Instance Methods
__init__(self, title='') New SavePanel, a file save dialog. |
save_as(self, name='', filetype='', dir='', hidden=False, hidexts=False, label='', packages=False, prompt='', tags=`(``)`, dflt=None) Specify a file name in the panel. |
Inherited from `baseTypes._Type2`: `__str__` Inherited from `baseTypes._Type0`: `__repr__`, `type2strepr` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Properties
Inherited from `baseTypes._Type2`: `title` Inherited from `baseTypes._Type1`: `NSdelegate`, `app` Inherited from `baseTypes._Type0`: `NS`, `NSDelegate` Inherited from `internals._Objectype`: `typename` Inherited from `object`: `__class__`

Method Details

### __init__(self, title='') (Constructor) |
New SavePanel, a file save dialog. Parameters: `title` - The panel name (`str`). Overrides: object.__init__

### save_as(self, name='', filetype='', dir='', hidden=False, hidexts=False, label='', packages=False, prompt='', tags=`(``)`, dflt=None) |
Specify a file name in the panel. Parameters: `name` - A suggested file name (`str`), default "Untitled". `filetype` - The file type (`str`). `dir` - The directory (`str`). `hidden` - Show hidden files (`bool`). `hidexts` - Hide file extensions (`bool`). `label` - The name label (`str`), default "Save As:". `packages` - Treat file packages as directories (`bool`). `prompt` - The button label (`str`), default "Save". `tags` - Suggested tag names (`tuple` of `str`-s). `dflt` - Return value, cancelled (`None`). Returns: The specified file name path (`str`) or dflt.