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

[MacPerl] Mac::Glue and properties



OK, so I am trying to think about how to handle properties.  I have some
thoughts.

First, how to tell the module it is a property.  The current object
specifier record setup has two parts for each object piece, a type and a
datum:

  $pbj = $f->_obj(file=>'file', folder=>'folder', disk=>'HD');

But a property may not have a datum attached to it.  I was thinking, then:

  $pbj = $f->_obj(property=>'label_index', item=>'HD');

And maybe:

  $obj = $f->_prop('label_index', item=>'HD');  # same thing

And so:

  $f->get($obj);
  $f->set($obj, {to=>1});

Thoughts?  Do people who know more about AppleScript than me see any
problems?  Any other uses that may not fit into this setup?

FWIW, I am getting the info about "label_index" by first looking to see if
there is a property of "item" called "label_index".  But in this case:

  $f->get($f->_prop('version'));

I am looking for a class called "version".



And there is a problem: right now, I am allowing the current application to
override the data in the Dialect file.  So the Finder has its own
properties for a "window".  But the Finder also uses the properties in the
dialect file; it does not replace them, just adds to them.  So I am asking
... is it the Right Thing not to replace the class, but to combine each
class from both packages?

I don't think this comes up in events; an event in the app overriding a
dialect event does not take parameters from the dialect event, does it?

Thanks for all your help,

--
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])

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