AW Developer's Guide | AW Interfaces | AW Methods | AW Types and Misc API


IMoaAwAssetCallback


Interface ID: IID_IMoaAwAssetCallback
Pointer type: PIMoaAwAssetCallback
Inheritance: IMoaUnknown
Header file: awiservc.h

Methods

Icon Access

GetIconId()

Expressions

StoreExpression()
GetExpressionLength()
GetExpression()
DeleteExpression()
EvalExpression()
WatchExpression()
StopWatchExpression()

DeleteExpression()

Syntax

DeleteExpression(PIMoaAwAssetCallback This,
MoaLong expressionId)

Parameters

This
Pointer to the IMoaAwAssetCallback interface

expressionId
ID of the expression

Returns

MoaError

Description

Removes an expression. The expression must have been stored previously with StoreExpression(). This method only works at authoring time.


EvalExpression()

Syntax

EvalExpression(PIMoaAwAssetCallback This,
MoaLong expressionId,
PMoaMmValue pResult)

Parameters

This
Pointer to the IMoaAwAssetCallback interface

expressionId
ID of expression

pResult
Pointer to result of expression evaluation

Returns

MoaError

Description

Evaluates a stored expression. pResult contains the result in the specified format. The expression must have been stored previously with StoreExpression().


GetExpression()

Syntax

GetExpression(PIMoaAwAssetCallback This,
MoaLong expressionId,
PMoaChar pExpression,
MoaLong maxLen)

Parameters

This
Pointer to the IMoaAwAssetCallback interface

expressionId
ID of expression

pExpression
Pointer to string containing expression text

maxLen
Maximum length of pExpression

Returns

MoaError

Description

Retrieves the text for a previously stored expression. The expression must have been stored previously with StoreExpression(). This method only works at authoring time.


GetExpressionLength()

Syntax

GetExpressionLength(PIMoaAwAssetCallback This,
MoaLong expressionId,
MoaLong FAR * pLength)

Parameters

This
Pointer to the IMoaAwAssetCallback interface

expressionId
ID of the expression

pLength
Pointer to length of expression text in bytes (excluding null terminator)

Returns

MoaError

Description

Returns the length (in bytes, not including the terminating null character) of the expression text associated with the stored expression. The expression must have been stored previously with StoreExpression(). This method only works at authoring time.


GetIconId()

Syntax

GetIconId(PIMoaAwAssetCallback This,
PMoaAwIconId pIconId)

Parameters

This
Pointer to the IMoaAwAssetCallback interface

pIconId
Pointer to icon ID for the asset

Returns

MoaError

Description

Puts the unique identification number assigned to this asset's icon into *pIconId. This identification number is persistent across sessions. Authorware currently reassigns identification numbers when files are packaged, so don't store hard references to identification numbers in your property or media data.


StopWatchExpression()

Syntax

StopWatchExpression(PIMoaAwAssetCallback This,
MoaLong expressionId)

Parameters

This
Pointer to the IMoaAwAssetCallback interface

expressionId
ID of expression

Returns

MoaError

Description

Stops a watch that has been started previously.


StoreExpression()

Syntax

StoreExpression(PIMoaAwAssetCallback This,
ConstPMoaChar pExpression,
MoaLong expressionId,
MoaAwExprFlags exprAttribs,
MoaBoolParam errorUI,
MoaLong FAR *pErrStart,
MoaLong FAR *pErrEnd)

Parameters

This
Pointer to the IMoaAwAssetCallback interface

pExpression
Pointer to string containing expression

expressionId
Constant specified by Xtra to identify the expression

exprAttribs
Flag representing attributes of expression, including kMoaAwExprFlag_IsScript

errorUI
FALSE if error values are returnedsilently.

*pErrStart
Pointer to start of invalid text in expression

*pErrEnd
Pointer to the end of invalid text in expression

Returns

MoaError

Description

Called at authoring time to compile and store an expression. pExpressionis a pointer to a string containing the expression. expressionId is an Xtra-specified constant (between 1 and 100) used to track a particular expression. exprAttribs is a flag that represents attributes of the expression including. kMoaAwExprFlag_IsScript.
If errorUI is FALSE, any error value is returned silently; if it is TRUE and an error occurs, this method puts up an error dialog, dialogs allowing undefined variables or functions to be defined, or both. If an error occurs pErrStart and pErrEnd will contain the start and end of the invalid text in the expression. This method only works at authoring time.


WatchExpression()

Syntax

WatchExpression(PIMoaAwAssetCallback This,
MoaLong expressionId,
PMoaMmValue pInitialValue)

Parameters

This
Pointer to the IMoaAwAssetCallback interface

expressionId
ID of expression

pInitialValue
Pointer to initial value of expression

Returns

MoaError

Description

Set a watch on a given expression. The expression must have been stored previously with StoreExpression(). When the expression value changes, the Xtra's Notify() procedure will be called. If an initial value is not specified (pInitialValue is null), this method evaluates the expression once to establish its initial value.

Copyright © 1996-2007 Adobe Macromedia Software LLC, Inc.