Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
Hello. I'm working on an EVN utility that will open both mac and windows files, but have run into an aesthetic snag. I know of several ways to get RealBasic to display only files of a certain type in an open dialog window. I don't know of a way to get it to display files that have only a certain suffix, however.
Has anyone using RealBasic figured this trick out (if it is possible)?
-STH
------------------ "Create enigmas, not explanations." -Robert Smithson
Hmm... I don't think REALbasic pays attention to file name extensions except under Windows, at least in the versions I've worked in. Your only choices may be to either check for a valid extension after the user opens the file, or create your own open dialog.
------------------ David Arthur (url="http://"http://davidarthur.evula.net/")davidarthur.evula.net(/url) | (url="http://"http://www.ev-nova.net/")EV-Nova.net(/url) | (url="http://"http://www.evula.com/survival_guide/")EV Nova Survival Guide(/url) Truth! Justice! Freedom! And A Hard-Boiled Egg!
Quote
Originally posted by David Arthur: **Hmm... I don't think REALbasic pays attention to file name extensions except under Windows, at least in the versions I've worked in. Your only choices may be to either check for a valid extension after the user opens the file, or create your own open dialog. **
I was afraid of that. Damnit. That's stupid. Dear RealBasic, that's stupid. Thanks. Love Sean.
<mumbling>
Have you tried editing the "File Types..." setting, and having that type in the filter portion of getopenfolderitem()? I'm not sure if it would work, but it may. In the file types setting, you can set possible extensions for files, so this may do the trick.
------------------ Eat blazing electric death! (url="http://"http://www.evula.org/infernostudios/ept/")Unofficial EV and EVO Ports(/url): Both currently in FC1. Please post any bugs (url="http://"http://www.ev-nova.net/forums/viewforum.php?f=26")here(/url).
Would it not be possible to use the file type , for this purpose. I mean files with the same suffix have the same file type(most of the times) after all. You can then use the "File Types..." settings to work it out.
Entarus,
------------------ -Nothing lasts forever- (url="http://"http://www.AmbrosiaSW.com/cgi-bin/ubb/forumdisplay.cgi?action=topics&number;=9&SUBMIT;=Go&urgaylol;=yes")EV Developer's Corner(/url) (url="http://"http://www.ambrosiasw.com/cgi-bin/ubb/forumdisplay.cgi?action=topics&forum;=Uplink+web+board&number;=69") Uplink Forum(/url) (url="http://"http://www.apple.com")iMac, Therefore, I am(/url)
Originally posted by SpacePirate: **Have you tried editing the "File Types..." setting, and having that type in the filter portion of getopenfolderitem()? I'm not sure if it would work, but it may. In the file types setting, you can set possible extensions for files, so this may do the trick. **
Yeah. I tried that but saw no effect. I thought maybe I was doing something wrong, or it only worked when compiled for windows.
I thought about that, too. Unfortunately, the files I want to use have no file type when transfered to my mac via network, and an empty string doesn't seem to work. I'll keep messing with it, though I haven't much hope in getting it to work the way I want.
Originally posted by SpacePirate: Have you tried editing the "File Types..." setting, and having that type in the filter portion of getopenfolderitem()? I'm not sure if it would work, but it may. In the file types setting, you can set possible extensions for files, so this may do the trick.
According to my experiments, REALbasic seems to pay attention to the extensions that are entered in the "File Types" dialog only in Windows applications; Mac applications use the file type and creator code, even on Mac OS X.
Originally posted by seant: I thought about that, too. Unfortunately, the files I want to use have no file type when transfered to my mac via network, and an empty string doesn't seem to work. I'll keep messing with it, though I haven't much hope in getting it to work the way I want.
Here's an idea, although there would still be a few problems associated with it: before displaying the open dialog, your program searches through the contents of whichever folder it's working on, and properly sets the file type and creator code based on the extension.
If all else fails, just use "????" to show all files, and send an error message if it is an invalid file.
Originally posted by David Arthur: **Here's an idea, although there would still be a few problems associated with it: before displaying the open dialog, your program searches through the contents of whichever folder it's working on, and properly sets the file type and creator code based on the extension. **
That's an interesting solution. I makes me a bit nervous to be muching with file types, but still, that is quite a clever work around. I'm going to use it.