Re: ANN: String to Property Coercion subroutines released
Re: ANN: String to Property Coercion subroutines released
- Subject: Re: ANN: String to Property Coercion subroutines released
- From: "Gary (Lists)" <email@hidden>
- Date: Thu, 02 Jun 2005 02:18:54 -0400
"Jeff Porten" wrote:
> Freeware for noncommercial use, although donations accepted. Contact
> me to use in commercial scripts.
>
> addPropToString will create new properties or replace existing ones,
> returning a string that looks exactly like an AppleScript property
> statement. getPropFromString returns the value of a selected
> property, returning an empty string if the property does not exist.
In addition to, or as an alternative with additional functionality, users
might be interested in the 'ConvertToString' AppleScript library found at
the AppleMods repository, <http://applemods.sourceforge.net/>
Class objects such as boolean, integer, string, record, list, data, script
can all be "converted to string" representations.
This is an Open Source library (which may be used for commercial projects,
under the standard BSD/MIT license) and provides the following commands:
----------------------------------------------------------------------
SUMMARY
Converts values of various classes to string while preserving their
structural appearance (e.g. braces in lists).
----------------------------------------------------------------------
COMMANDS
toString(val) -- Convert almost anything to a string, preserving its
structure [1]
val : anything -- boolean, integer, string, record, list, data, etc
Result : string -- the object as string
fastToString(val) -- Like toString, but doesn't automatically initialise the
library's internal settings (i.e. faster, but less 'safe') [1]
val : anything -- boolean, integer, string, record, list, data, etc
Result : string -- the object as string
init() -- Initialise library's internal settings; use in conjunction with
fastToString
======================================================================
AppleMods is a community affair, and all those interested are encouraged to
explore the site, become involved in extending or developing Libraries, use
Libraries in their current development work (to save time and costs), to
suggest improvements, or even to rant publicly (via the AppleMods mailing
list.)
--
Gary
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden