PCE version 4C man_modulenamespaceid_tablemodified current_idOIxN class/messageN referenceC hash_tablerefersizeOIxNbothIsNM.message.S.initialiseCman_method_card identifiermodule last_modifiednamesummary descriptionsee_alsoinherit diagnosticsdefaultsbugsOIxNM.message.S.initialiseRICdateOIx,ƒ_(N initialisenCstringOIx¼Create a send-template from its receiver, selector and argument list. Note that all arguments may be function objects. If the message is executed it will first evaluate all functions. Example: ?- new(D, dialog), send(D, append, button(show_display_size, message(@display, inform, 'The display is %dx%d pixels', @display?size?width, @display?size?height))), send(D, open). See also class ?.nnnnnsNV.message.argumentsCman_variable_card identifiermodule last_modifiednamesummary descriptionsee_alsoinheritdefaultsOIxNV.message.argumentsRIOIx,ƒ`†N argumentsnOIxÙVector of arguments to pass to the send-operation. When @nil, no arguments are passed. It is a code_vector object because it should allow the elements to be function objects. See also ->initialise and <->argument.nnnsNM.message.G.argumentOI xNM.message.G.argumentRIOI x,ƒ_nNargumentnnnCchainsizeOI xIENM.message.S.argumentXnnnsN C.messageCman_class_card identifiermodule last_modifiednamesummary descriptionsee_alsoinherituser_interfacebugsOI xN C.messageRIOI x,ƒ^/NmessagenOIxžA message object is a template for the execution of a *send* virtual machine operation: messages represent behaviour to be invoked. Messages are the most commonly used code objects. The code below creates a small dialog window with buttons to quit the window and to start PceDraw (the XPCE drawing demo): ?- new(D, dialog('Start PceDraw')), send(D, append, button(start_draw, message(@prolog, pcedraw))), send(D, append, button(quit, message(D, destroy))), send(D, open). It illustrates how a message can be used to activate a host language function (in this case a Prolog predicate) as well as how a message can be used to start an internal XPCE operation. The following example shows how a message may be used to change the `graphical ->pen' of all graphical objects on a device object. It exploits `chain ->for_all'. send(Device?graphicals, for_all, message(@arg1, pen, 3)).OIxIEN $examples$5XnnnsNM.message.S._executeOIxNM.message.S._executeRIOIx,ƒaN_executenOIx¹Start the XPCE virtual machine operation send(<-receiver, <-selector, <-arguments ...) Any function object appearing in the <-receiver, <-selector or <-arguments are first evaluated.nnnnnsNV.message.contextOIxNV.message.contextRIOIx5†hNcontextnOIx¦The context slot is reserved for cooperation with `function-based' modularization. For Prolog, it contains the module from which the object was created. If the object is `executed', this context argument will be used to resolve the proper function. In Prolog: ?- new(X, foo:message(@prolog, hello)), send(X, execute). will call the predicate `hello' in the module `foo'. See also '?<-_context' and `rc<-context'.OIxIXnnsNM.message.S.argumentOIxNM.message.S.argumentRIOIx,ƒ_ËNargumentnOIxSet the nth (1-based) argument of the send-operation. When necessary, the <-arguments code_vector object is created or enlarged.nnnnnXaCnumber O Ixx