The FileSelector Object: 3.4 File Selector Instance Data: Matching a File's Creator App

Up: GEOS SDK TechDocs | Up | Prev: 3.3 Matching a File's Token | Next: 3.5 Matching a File's Geode Attributes
ATTR_GEN_FILE_SELECTOR_CREATOR_MATCH, MSG_GEN_FILE_SELECTOR_SET_CREATOR, MSG_GEN_FILE_SELECTOR_GET_CREATOR

Most applications will store their documents in a special type of file; each of these files will include the token of the creator geode. (This is a function of the Document Control objects.)

As a result, you may limit the File Selector's searches to only those files created by a given geode. Set the token to be matched in the File Selector's ATTR_GEN_FILE_SELECTOR_CREATOR_MATCH variable data instance field. This search is employed in the same manner as a token search (above), so it is also subject to the FSFC_TOKEN_NO_ID attribute of GFSI_fileCriteria .

The ATTR_GEN_FILE_SELECTOR_CREATOR_MATCH field is a GeodeToken structure that contains both the match ID and the match characters of the creator token. The GeodeToken structure is shown in the previous section. You can set the creator information in the File Selector's Goc code, or you can set it at run-time with MSG_GEN_FILE_SELECTOR_SET_CREATOR . To retrieve the creator token, use MSG_GEN_FILE_SELECTOR_GET_CREATOR .

MSG_GEN_FILE_SELECTOR_SET_CREATOR

void	MSG_GEN_FILE_SELECTOR_SET_CREATOR(
        dword		tokenChars,
        ManufacturerID		manufacturerID);

This message sets the ATTR_GEN_FILE_SELECTOR_CREATOR_MATCH field to the two passed values. This field is a vardata instance record of type GeodeToken . The token set with this message will be used to filter out certain files; directories and volumes are not affected by this filter. Only files which have their creator token the same as that of the File Selector will be displayed.

If the File Selector is visible when it receives this message, it will rescan the directory using the new token as a filter. Otherwise, the File Selector will store the passed token for later use.

Source: Unrestricted.

Destination: Any GenFileSelector object.

Parameters: tokenChars The token characters of the creator token to match files against. Use the macro SET_TOKEN_CHARS to set this dword value from the four individual characters. This macro is shown in the previous section.

manufacturerID
The token ID of the creator token to match files against.

Return: Nothing.

Interception: Generally not intercepted.

See Also: MSG_GEN_FILE_SELECTOR_SET_FILE_CRITERIA , MSG_GEN_FILE_SELECTOR_SET_TOKEN

MSG_GEN_FILE_SELECTOR_GET_CREATOR

void	MSG_GEN_FILE_SELECTOR_GET_CREATOR(
        GetTokenCreatorParams *retValue);

This message returns the current creator match information set in the File Selector's ATTR_GEN_FILE_SELECTOR_CREATOR_MATCH field.

Source: Unrestricted.

Destination: Any GenFileSelector object.

Parameters: retValue A pointer to a GetTokenCreatorParams structure, shown below. The structure may be empty when passed.

Return: The GetTokenCreatorParams structure pointed to by retValue will contain the token in ATTR_GEN_FILE_SELECTOR_CREATOR_MATCH .

Structures: The GetTokenCreatorParams structure consists of two elements: a GeodeToken structure containing the File Selector's token characters and manufacturer ID fields, and a reserved word. Its structure is shown below:

typedef struct {
     GeodeToken   GTP_token;
    word         GTP_unused;						/* reserved */
} GetTokenCreatorParams;

Interception: Generally not intercepted.

See Also: MSG_GEN_FILE_SELECTOR_SET_FILE_CRITERIA, MSG_GEN_FILE_SELECTOR_GET_TOKEN


Up: GEOS SDK TechDocs | Up | Prev: 3.3 Matching a File's Token | Next: 3.5 Matching a File's Geode Attributes