vList Xtra VLIST XTRA HELP: METHODS AT A GLANCE  
 
Method and Arguments Purpose
vList_register (keyList) Prevents the demo dialog from coming up after purchase.

 

Saving and Loading Lists

new xtra ("vList", fileName)

Returns a vlist instance containing a new file connection for storing or retrieving a list (or any type of data) to a file.

new xtra ("vList", fullFilePath)
new xtra ("vList", filepathString, | relativepathString |)
new xtra ("vList", filepathString, | optionsPropertylist |)
new xtra ("vList", filepathString, | singleoptionNumber |)
vlistInstance.fileDialogOpen (| optionsPropertylist |) Displays a file open dialog and returns the path chosen. Sets the file instance to use the chosen path.
vlistInstance.fileDialogSave( ) Displays a file save dialog and returns the path chosen. Sets the file instance to use the chosen path.
new xtra ("vList", urlString) Returns a vlist instance containing a new file connection for retrieving a list (or any type of data) from a file in the browser cache.
vlistInstance.write (list) Writes a list (or any type of data) out to a vlist file.
list = vlistInstance.read ( ) Returns the list (or other type of data) stored in a vlist file.
vlistInstance.writeBinary (binaryDatastring, [nullFlag]) Creates a binary file from data stored in a Lingo string
binaryDatastring = vlistInstance.(readBinary [nullFlag]) Reads an entire binary file into a Lingo string
integerLen = lengthBinary (binaryDatastring) Returns the length of a Lingo string containing binary data
new (#vlist) Creates a new vList member for storing lists (or any type of data) in the movie's cast

member(vList member).content = list

 

list = member(vList member).content

Setting the content property of a vList member stores a list (or any other data type) inside the member. Setting a variable to the content property of a vList member retrieves the list (or other stored data) and puts it into the variable.

 

Encryption

vlistInstance.write (list, encryption key) Writes a list (or any type of data) out to a file.
list = vlistInstance.read (encryption key) Returns the list (or other type of data) stored in a file.
member(vList member).encrypt (list, encryptionCodeList) Encrypts and stores the specified list (or other data) in the vList member.
data = member(vList member).decrypt (encryptionCodeList) Retrieves and decrypts the list (or other data) stored in the vList member
vList_encryptionStrength (integer) Sets the encryption strenght in bits (64 or 128)

 

Compression

vListInstance.compression ( ) = true/false Activates or deactivates compression for the file instance
member (vList member).compression = true/false Activates or deactivates compression for the member

 

MIME Base64 Encoding

MIMEencodedString = b64_encode_compress (data,fileName, compressionFlag, | encryptionKey or optionsList |) Creates a vList file in memory (optionally compressed and/or encrypted) from the passed-in data, then MIME Base64 encodes the vList file and returns it as a string
MIMEencodedString = b64_encode (data,fileName, | encryptionKey or optionsList |) Creates a vList file in memory (optionally encrypted) from the passed-in data, then MIME Base64 encodes the vList file and returns it as a string.
listData = b64_decode (MIMEencodedString, | encryptionKey or optionsList |) Extracts vList content (optionally encrypted) from a MIME Base64 string previously created by vList.

 

Reading and Storing Binary Data

vlistInstance.writeBinary (binaryDatastring) Creates a binary file from data stored in a Lingo string
binaryDatastring = vlistInstance.readBinary ( ) Reads an entire binary file into a Lingo string
integerLen = lengthBinary (binaryDatastring) Returns the length of a Lingo string containing binary data
vListInstance.binaryMode (boolean) Prevents character cross-mapping of strings written to the vlist file or member.
member("vlist").binaryMode = boolean

 

File Utility Operations

vlistInstance.fileExist ([encryption key]) Returns 1 if the file linked to the instance exists
vlistInstance.deleteFile ( ) Deletes the file linked to the instance
bytesWritten = vlistInstance.fileSpace ( ) Number of bytes written so far during this session. Useful when running in Shockwave.

 

vList Member Operations

put data into member (vList member)

 

Lingo syntax only

Replaces the contents of the vList member with the data passed in, which can be a list or any other data type

put data after member (vList member)

 

Lingo syntax only

Appends the data to the contents of the vList member

put data before member (vList member)

 

Lingo syntax only

Prepends the data to the contents of the vList member
member(vList member).importFile (| filePath |) Imports the list (or other data) contained by the file into the vList member
mediaContents = vList_readFromMedia (vListMediaProperty) Extracts the data from vList member.media property
boolean = vList_checkMedia (vListMediaProperty) Does an integrity check on a vList member.media property.

 

Lingo List Operations

concatenate (list, list, ..., list) Returns a list containing the elements of the first list followed by the elements of each subsequent list passed in.
insertAt (linearList, positionNumber, anyValue) Inserts a list item into a linear list at the specified index, and moves the items following it, up one position.
insertPropAt (propertyList,positionNumber, anyProp,`anyValue) Inserts a property/value pair into a property list at the specified index, and moves the items following it, up one position.
setPropAt (propertyList,positionNumber, anyValue) Changes the property of the property/value pair at the specified index, but leaves the value untouched.
changeProp (propertyList, oldProp, newProp, deepMode) Replaces all properties matching oldProp with newProp
appendProp (propertyList, anyProp, anyValue) Adds a new property/value pair to the end of a property list.
unsort (list) Removes the internal sort flag from a list but does not change the order of its items.
newList = duplicateSort (list) Clones the first list into the second list, preserving the sorted state of the original list in the new list.

 

Creating Populated Lingo Lists

newList = newList (numberOfItems, fillValue) Creates a new linear list with the specified number of items and fills each item with the specified value. (integer or Lingo symbol only).
newPropList = newPropList (numberOfItems, fillProperty, fillValue) Creates a new property list with the specified number of property/value pairs and fills each position with the specified property and value. (integer or Lingo symbol only).

 

Lingo List/Datatype Information

sortP (list) Returns true if the list is sorted
isSame (variable, variable) Returns true if the two lists (or any other supported data type) are actually pointers to the same memory location.
numRef (variable) Returns the number of references to a variable
float32P (float) Returns true if the passed-in float is a 32-bit float.
float32 (number) Returns the passed-in value converted to a float that requires only 32 bits for storage.
floatType (float) Obsolete. Replaced by float32P.
vList_size (list) Returns the size in bytes of the list (or any other supported data type) when resident in memory (after reading it back from disk).
vList_sizeOnDisk (list) Returns the size in bytes on disk if the list (or any other supported data type) was written out to a file.

 

ShockFiler Xtra Integration

propList = vList_to_sf (data, compressionFlag, | encryptionKey |)

 

propList = vList_to_sf (data, | optionsList |)

Packages a list or other Lingo value to pass to ShockFiler Xtra

 

Miscellaneous

fpReset ( ) Resets the floating point register on Windows
setFileName (memberRef, fileName) Links a member to an external media file.
vList_version ( ) Returns the release number of the xtra

 

Error Reporting

vList_error ( ) Returns the number of the last error
vList_errorString (errorNumber) Returns a text description of the error number.