ASObjC: pointer to string object

I’d like to use this Objective-C method, but I don’t know how - or if - I can complete the final |type| parameter in ASObjC:

set w to aWorkspace's getFileSystemInfoForPath:"/" isRemovable:false isWritable:(missing value) isUnmountable:(missing value) |description|:(missing value) |type|:<????>

In pure objective-c, it’d be:


It’s the value of aString that I want, so missing value doesn’t help.

Hi Phil. Do you mean this?

set {successful, aString} to aWorkspace's getFileSystemInfoForPath:"/" isRemovable:(missing value) isWritable:(missing value) isUnmountable:(missing value) |description|:(missing value) |type|:(reference)

Ah, so that’s how you deal with pointers. Cool!!

Thanks, Nigel. :smiley:

It’s only usable in ASObjC with methods which return a result anyway, such as the boolean returned here by getFileSystemInfoForPath:…. In such cases, where any ‘pointer’ parameters are set to (reference), you get back a list containing the method result followed by an ASObjC value for each (reference) set. So if all five pointer parameters here are set to (missing value), the result’s just a boolean. If all five are set to (reference), the result’s a list containing the boolean and five other values.