[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Simple Open Dialog



>I'm just lurking here, but still, is it that I'm  missing something or the 
>only way to have a simple dialog  to choose a file or a folder in MacPerl 
>is either to call AppleScript/Frontier, or to call directly the Mac ToolBox?
>
>I though that Chris N. was working on a package that was going to make 
>much more easier that kind of things. Sorry if  this question have already 
>been answered or is very obvious.

These are two seperate items AFAIK.  First, no, this is just TMTOWTDI in 
action.  One could use Mac::StandardFile to make the appropriate Toolbox 
calls, and then open files from there.  The trick here is that 
StandardFile only allows you to select the file to open, and returns its 
name (or pathname) (you still have to write the code to open the file).  
If you want to hard-code the filename into your program, you can just 
call "open()".  In the case in question, the embedded AppleScript was a 
more Quick&Dirty solution than walking through and in-depth discussion 
from the pages of Inside Macintosh

You could also build a dialog using Mac::Dialogs, Mac::Controls, 
Mac::Events, etc. Of course, you only do this if your dialog isn't going 
to be "simple."

Chris Nandor is working on a MacPerl module "Mac::Glue", which is 
supposed to make writing IAC (AppleEvent) glues easier.  I've only done a 
little work with AppleEvents in MacPerl, and it's currently far from 
intuitive.  Chris is more qualified than I am to describe what Mac::Glue 
actually does.  I haven't used it yet.



# Fungal Parataxonomy                   Mycology Information (Mycoinfo)
# Webmaster, Staff Writer      **The World's First Mycology E-Journal**   
# <mailto:webmaster@mycoinfo.com>            <http://www.mycoinfo.com/> 
# "A couple of guys trying to do something great..."



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch