[Date Prev][Date Next][Thread Prev][Thread Next]
[Search]
[Date Index]
[Thread Index]
[MacPerl] Filemaker Descending Sort
Hello,
I've been sending Apple Events to Filemaker Pro 3.0 (not using Mac::Glue) with good results. However, I can't quite seem to get the following event to work...
I can sort by any field just fine, field #15 in this case ($layout_obj is layout #1 of database #1)...
$sort_obj1 = "obj{want:type(ccol), from:$layout_obj, form:indx, seld:long(15)}";
@{$ae{'params'}} = ("'----':$layout_obj, SRTE:$sort_obj1");
but I can't get Filemaker to sort in descending order. Capture AE outputs the following successful event sent by AppleScript or Frontier:
Process("FileMaker Pro").SendAE "DATA,SORT,'----':obj {want:type(ctbl), from:'null'(), form:indx, seld:1}, SRTE:obj {want:type(ccol), from:'null'(), form:indx, seld:15}, SRTT:' '"
So I tried constructing the event like this:
@{$ae{'params'}} = ("'----':$layout_obj, SRTE:$sort_obj1, SRTT:' '");
but I get a fatal error (# OS error 12345 (Error message text not available))
from the $event = AEBuildAppleEvent... line.
BBEdit reports the characters after SRTT: as ASCII 0,0,0, and 1. So I tried this but I got the same error...
$descending = chr(0).chr(0).chr(0).chr(1);
@{$ae{'params'}} = ("'----':$layout_obj, SRTE:$sort_obj1, SRTT:$descending");
Here's the output from aete.converter:
@EVENT "sort", "Sort the records in a layout", 'DATA', 'SORT'
@REPLY 'null', "", OPT, SINGLE, NOENUM
@DIRECT 'obj ', "The layout to sort", REQ, SINGLE, NOENUM, CHANGE
@PARAM "by", 'SRTE', 'obj ', "The fields to sort by", OPT, SINGLE, NOENUM
@PARAM "in order", 'SRTT', 'sort', "The sort type", OPT, SINGLE, ENUM
@ENUMERATION 'sort'
@ENUM "ascending", ' ', "Ascending sort order"
@ENUM "descending", ' ', "Descending sort order"
@ENUM "custom", ' ', "Custom sort order"
Sorry for the long-winded message, but any help on how to send the proper event would be greatly appreciated.
Thanks,
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Clinton Hogge clint@western.net
Industrial Images http://www.industrialimages.com/
# ===== Want to unsubscribe from this list? # ===== Send mail with body "unsubscribe" to macperl-request@macperl.org