Chris, Fantastic! I saw enum in the documentation, but, as I was quickly browsing, thought 'no, it can't be that easy.' :)
Ed Wall >At 10:40 -0400 2002.04.22, Ed Wall wrote: >>$n->make(new => 'field', with_properties => {name => 'Name', type => >>'tString', 'length' => 50}, at => location(end => $Customer)); >> >>and I am having difficulty in getting the type to be compiled >>correctly. In the generated Pod the "Enumerations" lists tString as >>being of VLst and this works fine: >> >>$n->make(new => 'field', with_properties => {name => 'Name', type => >>'VLst', 'length' => 50}, at => location(end => $Customer)); >> >>as does this >> >>$n->make(new => 'field', with_properties => {name => 'Name', type => >>VLst, 'length' => 50}, at => location(end => $Customer)); >> >>although I get if I capture AppleEvents, VLtp:'VLst' rather than >>VLtp:VLst (as I do with AppleScript). >> >>However, using VLst rather than tString seems less than elegant (and >>I still wonder about 'VLst'). How could one modify my first try (i.e. >>with tString) to make it work? > >To use enumerations in Mac::Glue, you need to use the enum() function. It >basically marks that string as an enumeration; while AppleScript can mark >it as such during compilation, we don't know what it is in Perl. So this >should work: > > use Mac::Glue ':all'; > $n->make(new => 'field', with_properties => {name => 'Name', type => > enum('tString'), 'length' => 50}, at => location(end => $Customer)); > >See the docs for more information. There's no example of it, but it is >mentioned. :-) > >-- >Chris Nandor [EMAIL PROTECTED] http://pudge.net/ >Open Source Development Network [EMAIL PROTECTED] http://osdn.com/