void FileChooserImpl::init( FileChooser* chooser, Style* s, FileChooserAction* a ) { fchooser_ = chooser; fbrowser_ = nil; editor_ = nil; filter_ = nil; directory_filter_ = nil; filter_map_ = nil; dir_ = Directory::open(*name_); if (dir_ == nil) { dir_ = Directory::current(); /* and what if we can't read the current directory? */ } Resource::ref(a); action_ = a; style_ = new Style(s); Resource::ref(style_); style_->alias("FileChooser"); style_->alias("Dialog"); update_ = new ActionCallback(FileChooserImpl)( this, &FileChooserImpl::build ); style_->add_trigger_any(update_); build(); }
void SymChooserImpl::init( SymChooser* chooser, Style* s, SymChooserAction* a ) { fchooser_ = chooser; filter_map_ = nil; Resource::ref(a); action_ = a; style_ = new Style(s); Resource::ref(style_); style_->alias("FileChooser"); style_->alias("Dialog"); update_ = new ActionCallback(SymChooserImpl)( this, &SymChooserImpl::build ); style_->add_trigger_any(update_); build(); }