>At 13:15 -0800 2002.04.02, Andrew O. Mellinger wrote: >> Can someone give me the quick rundown on how to use properties from >>Mac::Glue? >> >> For example, I'm using the Finder. How do I find the name of the >>startup disk? In AppleScript it is: >> >> tell application "Finder" >> return Startup Disk as text >> end tell >> > > What would the be in Mac::Glue? > > > > > my $f = new Mac::Glue 'Finder'; > my $obj = $f->prop(name => of => 'startup_disk'); > print $f->get($obj); > >Hope that helps,
Yes! But I still can't figure out the generic scheme. So the Finder.pod looks like (this doesn't have all the properties): Classes application (capp) The Finder Properties: desktop (desk/cdsk): the desktop startup_disk (sdsk/cdis): the startup disk Elements: alias_file, application_file, clipping, clipping_window, container, disk, document_file, file, finder_window, folder, internet_location_file, item, package, window But how does the POD relate to a call? I guess I'm just lacking the mapping to be able to turn the POD into calls. The Mac::Glue pod says: "The class and data are passed as key-value pairs, like in AE records or parameter lists." I would expect to be able to do: my $fndr = Mac::Glue->new("Finder"); my $obj = $fndr->obj(application => startup_disk); print $fndr->get($obj); The application is the class, and the startup disk is the data. Looking example at the top of the page, how do I know that "startup disk" is a generic property? Don't I have to get this from the application class? For some reason I just have hard time getting my head around what is a property, class, etc in AppleEvents. -Andrew --