[futurebasic] AppleEvents vs. OS 8.6

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : June 1999 : Group Archive : Group : All Groups

From: Charlie Dickman <charlied@...>
Date: Sun, 20 Jun 1999 20:10:56 -0400
Fellow FB list members,

I'm having a problem with the required OPEN Apple Event under OS 8.6. The
code I have to respond to this event comes directly from the FB Handbook
and has worked just fine until I installed OS 8.6. It still works okay when
the OPEN event comes from the Finder but when it comes from an AppleScript
the call to AEGetNthPointer is returning a -1700 which means that the item
can not be coerced into the requested type (_"fss " in this case).

osErr% = FN AEGETNTHPTR(AEDesc&,loop,_"fss
",keyWord&,AEType&,@fsSpec,70,AESize&)

Does anyone know or can anyone point me to where I can find out what
changed in OS 8.6 AppleScript?

In trying to determine the type of the item I coded up the following FN to
allow me to call AESizeOfNthItem to find out the type of the item but I
don't think it's coded properly. Can someone have a look at this and tell
me what I'm doing wrong since the call returns 0 for both the typeCode and
the size?

'=========================================
'
' IM Interapplication Communications 4-90
'
' FUNCTION AESizeOfNthItem( theAEDescList:AEDescList;
'                                            index:LongInt;
'                                            VAR typeCode:DescType;
'                                            VAR dataSize:Size):OSErr
'
'=========================================
LOCAL FN AESizeOfNthItem(@theAEDescList&,index&,@typeCode&,@size&)
  '---------------------------------------
  `     CLR.W     -(SP)
  `     MOVE.L    ^theAEDescList&,-(SP)           ;AEDescList
  `     MOVE.L    ^index&,-(SP)                        ;LONGINT
  `     MOVE.L    ^typeCode&,-(SP)                  ;Var: typeCode
  `     MOVE.L    ^size%,-(SP)                         ;Var: size
  `     DC.W      $303C,$082A,$A816
  `     MOVE.W    (SP)+,D0
  `     EXT.L     D0
END FN

This is how I call it...

        osErr% = FN AESizeOfNthItem(AEDesc&,loop%,descType&,size&)

Any help will be greatly appreciated.


Charlie Dickman
charlied@...