[Date Prev][Date Next] [Thread Prev][Thread Next]
[Date Index] [Thread Index] [New search]

Re: Object Id's



On Tue, 5 Jun 2001 09:30:35 -0400 , "Mitchell, Sue" <Sue.Mitchell@cognos.com> 
wrote:

>you are an angel...;-) thank you very much, now do you know if there is a
>method to get the value stored in those constants?  F_ApiGetObjectType()
>does not work?

The following details are largely gleaned from FDKREF.PDF for the 5.5
FDK, pp. 680 et seq.

First you need to acquire the hypertext marker string content in the
usual way, with F_ApiGetString(docID, markerID, FP_MarkerText) on the 
FO_Marker object in which you are interested.  To parse the hypertext 
command in the string, set the value of FP_HypertextCommandText using 
F_ApiSetString(0, docID, FP_HypertextCommandText, stringptr); setting 
the value of the string executes the parser.

Check the parse result with:

F_ApiGetInt(0, docID, FP_HypertextParseErr)

which may yield:

Value                             Meaning
FV_HypertextSyntaxOk              No parse errors
FV_HypertextEmptyCommand          Hypertext string is empty
FV_HypertextUnrecognizedCommand   Cannot map the first keyword to an 
                                  existing FP_HypertextParsedCmdCode
FV_HypertextMissingArguments      One or more arguments required for
                                  the command is missing
FV_HypertextExtraArguments        More than the required number of 
                                  arguments for the command; extra 
                                  arguments were ignored
FV_HypertextBadSyntaxPathSpec     File reference expected for this 
                                  command, but no valid filepath found
FV_HypertextUnanchoredPartialPath File reference is relative to the
                                  current document, but the current 
                                  document has not been saved; file
                                  location could not be calculated
FV_HypertextHelpDirNotFound       Default help directory either does 
                                  not exist (help was not installed)
                                  or cannot be found
FV_HypertextExpectedANumberParam  Command expected a number but got 
                                  text; check FP_HypertextParseBadParam

If it is zero (FV_HypertextSyntaxOk), then use:

F_ApiGetInt(0, docID, FP_HypertextParsedCmdDestObjType)
 
for which the result should be one of:

Value                Meaning
FV_ObjectUnknown     Unknown or invalid object
FV_ObjectMarker      Object is a marker
FV_ObjectPgf         Object is a paragraph
FV_ObjectXref        Object is a cross-reference
FV_ObjectGraphic     Object is a graphic
FV_ObjectElement     Object is an element
FV_ObjectTextInset   Object is a text inset
FV_ObjectDataLink    Object is subscribed data

Note that this is a read-only doc property.  When setting up a
marker, you need to assemble the string yourself, using the
numbers I gave you before... but once you create it, you should
be able to use the above method to verify the result.

Do let me know if you have any further problem with this...

-- Jeremy H. Griffith, at Omni Systems Inc.
  (jeremy@omsys.com)  http://www.omsys.com/

** To unsubscribe, send a message to majordomo@omsys.com **
** with "unsubscribe framers" (no quotes) in the body.   **