File Types

| | Comments (1)

So I learned a new one today while working in REALbasic. I was working with file types so that I could enable the user to drag and drop files onto a listbox from Windows Explorer so that it would add the files and folders to the listbox. I had everything working great on the Mac, and so I was pulling the project over to Windows so that I could make sure the UI looked right and everything works. Lo and behold, but I can no longer drag and drop files onto the listbox!

So I start debugging and get more and more confused. I have the file type defined correctly, I can tell that I'm getting the drop notice (because I can debug the framework)... What could the problem possibly be?

Well, it turns out that the extension you put in the file types dialog isn't really what a typical Windows guy would expect. I had put *.* as the extension -- meaning allow any extension to work. And it turns out that having that extension was actually the cause of my problems. In REALbasic, you leave the extension blank to designate any extension.

This sort of makes sense because you put .jpg or .txt in there to support JPEGs or text files, and those don't need the * in front since the "any of this type" is assumed. But this sure caught me off-guard because I figured I had to put something there.

1 Comments

@@r0N == t3h sM@r7i3s

Leave a comment

Disclaimer

I'm currently an employee of REAL Software. My blog is mine. The opinions represented in this blog are mine as well and may not represent my employer's opinions. All original material is copyrighted and property of the author.

REALbasic® is a registered trademark of REAL Software, Inc. REAL SQL Server™ and Lingua™ are pending trademarks of REAL Software, Inc. All rights reserved.