database publishing GASSENHUBER DATAform DBP  
 
   
First page  <<  >> Last page
First page  <<  >> Last page
V. DATAform database interface 128 Developer handbook DATAformXTension © 1992-2004 www.gassenhuber.de DX_Message DX_Message (command; [DFTEXT]; [XPDOC]; [XPFolder]; Timeout; ‘Text; {user}; {form name }) => Error DX_Message (Text; Text; Text; Text; int; TextPtr ; {Text}; {Text}) => Integer This function sends a message to QuarkXPress and transfers the arguments. DATAformXTension receives the message, performs it and sends a message back. DX_Message waits for the response and returns the result as function value. Example: myText:= "QuarkXPress doesn’t respond."+char(13)+"Waiting:" $XPFolder := "HDinternal:QuarkXPress folder:" $err := DX_Message ( "IMPORT" ; "HDinternal:DFMText ; "" ; $XPFolder ; 5 ; =>myText ) DATAformXTension will import the text with DATAformTags “DFMText” into the current QuarkXPress document. At the end it sends a response and confirms the process or shows any errors that have occurred. The function DX_Message waits for up to 5 seconds (timeout as 5. argument) for the response. If the response does not arrive within this time, it shows the second alert text myText. If the response arrives, it shows the result otherwise –1 for timeout. A text with DATAformTags is hence imported the same way as with the command “Import boxes” in the DATAform menu in QuarkXPress. The function DX_Message expects between 6 and 8 arguments: 1) Command The following values are possible: IMPORT, UPDATE, EXPORTALL, EXPORTGROUP, IMPORTEXPORTALL, IMPORTEXPORT, CLOSE, PRINT. These commands and the internal functioning of the message system are described in detail in chapter IV. Message system, page: 109f. 2) Text with DATAformTags In the second argument the complete path to a text with DATAformTags file is transferred. The text will be imported by the import functions. This file will on the other hand be created or overwritten by the export commands. 3) QuarkXPress document In the third argument you specify the QuarkXPress document upon which all commands should act. The possibilities are: Complete path If a complete path is transferred, the QuarkXPress document will be opened. Empty argument If an empty string is specified, "", the commands relate to the current QuarkXPress document. Only use one QuarkXPress document. Switching between different opened QuarkXPress docu- ments is not supported. 4) QuarkXPress folder In the fourth argument you specify the path to the QuarkXPress folder.