3
votes
Vote UpVote

SelectDirectory for OS X

JED Software Blog – I was creating an app for FireMonkey and needed to be able to select a directory, currently there is no method (that I could see) to do this. Here is what I used:   function SelectDirectory(const ATitle: string; var ADir: string): Boolean; var LOpenDir: NSOpenPanel; LInitialDir: NSURL; LDlgResult: NSInteger; begin Result := False; LOpenDir := TNSOpenPanel.Wrap(TNSOpenPanel.OCClass.openPanel); LOpenDir.setAllowsMultipleSelection(False); LOpenDir.setCanChooseFiles(False); LOpenDir.setCanChooseDirectories(True); if ADir <> '' then begin LInitialDir := ...
Favorite? Off-Topic? JED @ 2011-10-06 13:47

Statistics

Visits: 407
Votes: 3
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Rodrigo
TOndrej
vcldeveloper
Subscribe:
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News

Sponsor

 
Please login or register to use this functionality.
(click on this box to dismiss)