PDA

View Full Version : REALbasic: Opening a file in finder




mahaboob
Sep 24, 2008, 07:24 AM
Hi all,
I'm new to REALbasic. I have one staticText and one button. staticText contains the path like: Mac Mini HDD: Library: Fonts: Chalkboard.ttf. When I clicking the button I need to open a browser to the actual location of the path with the file (Chalkboard.ttf) as selected. How can I do this ?

I tried it like this
Dim f as FolderItem
Dim fname as new FileType
fname.Name= me.txt_path.Text
fname.MacType = "TFF"
fname.Extensions = ";"
f= GetOpenFolderItem(fname)
But it selects only the Font folder not the Chalkboard.ttf
How can I solve this?
Thanks in advance



lazydog
Sep 24, 2008, 08:17 AM
Hi

FileTypes are used to specify what file types the dialog is interested in, eg .jpg, .txt etc. You can't specify the default file with them. If you want to specify a default file for the dialog I think you need to use the FolderItemDialog class.

By the way, I think you will get more help posting over on this forum (http://forums.realsoftware.com/).

b e n