Previous Index Next

BridgePlus.framework, SMSForder Class Methods

Category

Cocoa to AppleScript conversion methods

Method

ASifyInListFrom:

Summary

As above, but returns the result in a single-item list. Use this when unsure of the class of the result, and extract the first item from the result coerced to a list. Works around coercion problem.

Typical use: set theThing to item 1 of (current application's SMSForder's ASifyFrom:anArray as list)

Bridge does the conversion under 10.11 and later.

Signature

+ (id)ASifyInListFrom:(id)anItem

Parameters

anItem = a Cocoa item

Result

An AppleScript equivalent if available, enclosed in a list

Availability

Version 1.0.0

Notes

If possible, use BridgePlus script library’s ASify from command instead.

Sample

use scripting additions

use framework "Foundation"

use script "BridgePlus"

load framework


set anItem to current application's NSDate's |date|()

set theResult to current application's SMSForder's ASifyInListFrom:anItem

item 1 of (theResult as list)

--> date "Monday, 23 November 2015 at 12:15:16 PM"


Click here to open script in a script editor