Exists
TheExistsmethod returns a Boolean value that indicates whether the specified focus context exists in this storage unit.
ODBoolean Exists (in ODPropertyName propertyName, in ODValueType valueType, in ODValueIndex valueIndex);
propertyName- The name of the property in the focus context, or
kODNULLfor the currently focused property.valueType- The value type of the value in the focus context, or
kODNULLto ignore this parameter.valueIndex- The value index of the value in the focus context, or 0 to ignore this parameter.
- return value
kODTrueif the specified focus context exists in this storage unit, otherwisekODFalse.DISCUSSION
You can call this method to see whether you can focus this storage unit on the specified focus context; however, this method does not change the current focus context. The parameters specify the focus context to be checked.
If this method returns true, it is safe to call the
- To specify a property as the focus context, pass its name as the property name parameter or
kODNULLfor the currently focused property. PasskODTypeAllas the value type parameter andkODIndexAllas the value index parameter.- To specify a value as the focus context, pass the name of the property containing the value as the property name parameter or
kODNULLfor the currently focused property. You can specify the value by either its type or its index:
- To use type, pass the type of the desired value as the value type parameter and 0 as the value index parameter.
- To use index, pass
kODNULLas the value type parameter and the index of the desired value as the value index parameter.
Focusmethod with the specified focus context.EXCEPTIONS
kODErrIllegalPropertyName- The specified property name is improperly formed or illegal.
kODErrInvalidValueType- The specified value type is improperly formed or illegal.
kODErrZeroRefCount- This storage unit has a reference count of 0.
SEE ALSO
TheODPropertyNametype (page 904).
TheODValueIndextype (page 904).
TheODValueTypetype (page 904).
TheODStorageUnit::ExistsWithCursormethod (page 682).
TheODStorageUnit::Focusmethod (page 684).
Listing 2-41 on page 100 in OpenDoc Cookbook.
Listing 2-44 on page 105 in OpenDoc Cookbook.
Listing 2-45 on page 106 in OpenDoc Cookbook.
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help