New topic: FileType wildcard
<http://forums.realsoftware.com/viewtopic.php?t=41969> Page 1 of 1 [ 4 posts ] Previous topic | Next topic Author Message rb_monster Post subject: FileType wildcardPosted: Tue Dec 27, 2011 8:58 am Joined: Mon Nov 24, 2008 8:03 pm Posts: 18 Hi there, I'm using this code Code:Private Function AnyFileType() As fileType static f as FileType if f = nil then f = new FileType f.Extensions = "*" // there are millions of file formats, why limit to any? f.MacType = "????" f.Name = "movie" end if Return f End Function me.AcceptFileDrop movieFT // in mywindow.open I want to be able to drag and drop ANY file, to my window. How do I do this?? Its not working on Windows I can't figure out how Top DaveS Post subject: Re: FileType wildcardPosted: Tue Dec 27, 2011 9:26 am Joined: Sun Aug 05, 2007 10:46 am Posts: 3350 Location: San Diego, CA Filetypes are a royal PITA..... get them right and they work..... get the slightest thing out of kilter and you will scratch your head raw trying to figure out what you missed. try setting f.Extensions="" or create the FT with the IDE .... and select "SPECIAL/ANY" _________________ Dave Sisemore MacPro, OSX 10.6.8 RB2011r3 Note : I am not interested in any solutions that involve custom Plug-ins of any kind Top mjh Post subject: Re: FileType wildcardPosted: Tue Dec 27, 2011 10:13 am Joined: Sun Feb 19, 2006 3:10 pm Posts: 1553 Location: Hamburg, Germany There is a standard filetype âspecial/anyâ to be found under âAdd common filetypeâ â why not add that in the filetype editor rather than defining your own filetype at runtime? But if you absolutely want to do that you should set its extensions property to the empty string (or just leave it alone). Thatâs how âspecial/anyâ is defined. _________________ Michael J. HuÃmann http://digicam-experts.de Top npalardy Post subject: Re: FileType wildcardPosted: Tue Dec 27, 2011 10:17 am Real Software Engineer Joined: Sat Dec 24, 2005 8:18 pm Posts: 6964 Location: Canada, Alberta, Near Red Deer And be aware that if the FileType object you create at runtime goes out of scope it gets destroyed & then it won't work. It's scope has to be such that it stays around. Personally the easiest way to insure that is to just add the file type to the project & be done. _________________ My web site Great White Software RBLibrary.com REALbasic learning Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 4 posts ]
-- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
