IID_IMoaMmPropertyReferencePIMoaMmPropertyReferenceIMoaUnknownImoaMmPropertyReference methods provide a way for a Director Object inspector to get
information on the actual properties (not just their values) that
your Xtra implements. For your Xtra to be compatible with the Object
inspector, your Xtra needs to provide these interfaces.
Note: Director does not call these methods. They are reserved for future use.
kMoaMmErr_AccessNotSupported if you do not want
to support these capabilities.
- AccessPropRef(PIMoaMmPropertyReference This,
- ConstPMoaMmValue selfRef,
- MoaMmSymbol propName,
- MoaLong indexCount,
- ConstPMoaMmValue pIndexValues,
- PMoaMmValue pResult)
ThisIMoaMmPropertyReference interfaceselfRefConstPMoaMmValue The property reference object, as a Lingo value. Assign to pResult and AddRef to return self.propNameMoaMmSymbol The property name to look upindexCountMoaLong The number of indices. Specify 0, 1, or 2.pIndexValuesConstPMoaMmValue An array of indicespResultPMoaMmValue Optional return value. To return a new property reference Lingo object, use IMoaMmPropReferenceValue::PropReferenceToValue.MoaError:
| kMoaMmErr_PropertyNotFound | The property is not found. |
| kMoaMmErr_AccessNotSupported | If your Xtra does not support cascaded property access, return this. |
AccessPropRef calls, up to the last access which will be any of GetProp, SetProp, SetContents, SetBefore, or SetAfter.
put x.sel[33].foo
--> i.AccessProp(propName=#sel, indexCount=1, pIndexValues={33} )
--> i.GetProp( propName=foo, indexCount=0 )
put x.sel[33].foo[10]
--> i.AccessProp(propName=#sel, indexCount=1, pIndexValues={33} )
--> i.GetProp( propName=#foo, indexCount=1, pIndexValues={10} )
set x.sel[33].foo[9..11] = "Done!"
--> i.AccessProp(propName=#sel, indexCount=1, pIndexValues={33} )
--> i.SetProp( propName=#foo, indexCount=2, pIndexValues={9,11}, pNewValue="Done!" )
- CallHandler(PIMoaMmPropertyReference This,
- PMoaMmCallInfo callPtr)
ThisIMoaMmPropertyReference interfacecallPtrPMoaMmCallInfo MoaError:
| kMoaMmErr_FunctionNotFound | If you do not support the handler call. |
x.sel[1].goDown(99)
--> AccesProp( propName=#sel, indexCount=1, pIndexValues={1})
--> CallHandlers( callPtr->nargs=2, args={instance, 99} )
- GetContents(PIMoaMmPropertyReference This,
- ConstPMoaMmValue selfRef,
- PMoaMmValue pResult)
ThisIMoaMmPropertyReference interfaceselfRefConstPMoaMmValue The property reference object, as a Lingo value. Assign to pResult and AddRef to return self.pResultPMoaMmValue The return valueMoaError
put command.
Note: This method is not used by Director 7 or eariler. It is reserved for future versions.
put "Banana" into x.sel[33].foo
--> i.AccessProp(propName=#sel, indexCount=1, pIndexValues={33} )
- GetCount(PIMoaMmPropertyReference This,
- MoaMmSymbol propName,
- MoaLong * pCount)
ThisIMoaMmPropertyReference interfacepropNameMoaMmSymbol The name of the property to look uppCountMoaLong * The return countMoaError:
| kMoaMmErr_PropertyNotFound | The property is not found. |
| kMoaMmErr_AccessNotSupported | The property is not countable. |
propName.
put x.word.count --> i.GetCount(propName=#word).
- GetProp(PIMoaMmPropertyReference This,
- ConstPMoaMmValue selfRef,
- MoaMmSymbol propName,
- MoaLong indexCount,
- ConstPMoaMmValue pIndexValues,
- PMoaMmValue pResult)
ThisIMoaMmPropertyReference interfaceselfRefConstPMoaMmValue The property reference object, as a Lingo value. Assign this to pResult and AddRef to return the same property reference. Use this parameter to support properties that are further references as opposed to final values.propNameMoaMmSymbol The property name to look upindexCountMoaLong The number of indices. Specify 0, 1, or 2.pIndexValuesConstPMoaMmValue An array of indicespResultPMoaMmValue The return valueMoaError:
| kMoaMmErr_PropertyNotFound | The property is not found. |
| kMoaMmErr_AccessNotSupported | If your Xtra does not support property access, then return this. (If you do not support indexCount values greater than 0, for example.) |
put x.foo
--> i.GetProp( propName=foo, indexCount=0 )
put x.foo[10]
--> i.GetProp( propName=#foo, indexCount=1, pIndexValues={10} )
put x.foo[9..11]
--> i.GetProp( propName=#foo, indexCount=2, pIndexValues={9,11} )
- GetPropCount(PIMoaMmPropertyReference This,
- MoaLong * pCount)
ThisIMoaMmPropertyReference interfacepCountMoaLong * MoaError
- GetPropNameByIndex(PIMoaMmPropertyReference This,
- MoaLong index,
- PMoaMmSymbol pSymbol)
ThisIMoaMmPropertyReference interfaceindexMoaLong pSymbolPMoaMmSymbol MoaError
- GetPropTypeByIndex(PIMoaMmPropertyReference This,
- MoaLong index,
- PMoaMmValue pType)
ThisIMoaMmPropertyReference interfaceindexMoaLong pTypePMoaMmValue MoaError
- SetContents(PIMoaMmPropertyReference This,
- ConstPMoaMmValue selfRef,
- PMoaMmValue pResult)
ThisIMoaMmPropertyReference interfaceselfRefConstPMoaMmValue The new value to stuff into the targetpResultPMoaMmValue MoaError
put-into command.
put "Banana" into x.sel[33].foo
--> i.AccessProp(propName=#sel, indexCount=1, pIndexValues={33} )
--> i.SetContents( pNewValue="Banana" )
- SetContentsAfter(PIMoaMmPropertyReference This,
- PMoaMmValue pNewValue)
ThisIMoaMmPropertyReference interfacepNewValuePMoaMmValue The new value to stuff into the targetMoaError
put-after command.
put "Banana" before x.sel[33].foo
--> i.AccessProp(propName=#sel, indexCount=1, pIndexValues={33} )
--> i.SetContents( pNewValue="Banana" )
- SetContentsBefore(PIMoaMmPropertyReference This,
- PMoaMmValue pNewValue)
ThisIMoaMmPropertyReference interfacepNewValuePMoaMmValue The new value to stuff into the targetMoaError
put "Banana" before x.sel[33].foo
--> i.AccessProp(propName=#sel, indexCount=1, pIndexValues={33} )
--> i.SetContents( pNewValue="Banana" )
- SetProp(PIMoaMmPropertyReference This,
- MoaMmSymbol propName,
- MoaLong indexCount,
- ConstPMoaMmValue pIndexValues,
- ConstPMoaMmValue pNewValue)
ThisIMoaMmPropertyReference interfacepropNameMoaMmSymbol The property name to look upindexCountMoaLong The number of indices. Specify 0, 1, or 2.pIndexValuesConstPMoaMmValue An array of indicespNewValueConstPMoaMmValue The new value to assignMoaError:
| kMoaMmErr_PropertyNotFound | The property is not found. |
| kMoaMmErr_AccessNotSupported | If your Xtra does not support property access, then return this. (If you do not support indexCount values greater than 0, for example.)
|
| kMoaMmErr_CannotSetProperty | Set not allowed on specified property. |
set x.foo = 99
--> i.SetProp( propName=foo, indexCount=0, pNewValue=99 )
set x.foo[10] = 99
--> i.GetProp( propName=#foo, indexCount=1, pIndexValues={10}, pNewValue=99 )
set x.foo[9..11] = 123
--> i.GetProp( propName=#foo, indexCount=2, pIndexValues={9,11}, pNewValue=123 )