Swift OSX NSOpenPanel not changing selection -


i calling nsopenpanel user can select file, after first selection done panel doesn't allow me change file when click mouse on file. changes when use keyboard arrows doesn't when click mouse.

@ibaction func selecionarimagembuttonclicked(_ sender: nsbutton) {      let panel = nsopenpanel()     panel.allowsmultipleselection = false     panel.canchoosedirectories = false     panel.canchoosefiles = true     panel.cancreatedirectories = false     //panel.allowedfiletypes = ["jpg","png","pct","bmp", "tiff"]     panel.allowedfiletypes = nsimage.imagetypes()      panel.beginsheetmodal(for: view.window!) { (result) in          if result == nsfilehandlingpanelokbutton {             self.logofornecedorimageview.image = nsimage(byreferencing: panel.url!)              self.logofornecedorselecionada = true         }     } } 


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -