This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com

Home

 
4D v20.6
METHOD SET ATTRIBUTES

METHOD SET ATTRIBUTES 


 

METHOD SET ATTRIBUTES ( path ; attributes {; *} ) 
Parameter Type   Description
path  Text, Text array in Method path(s)
attributes  Object, Object array in Attribute(s) to set for selected method(s)
Operator in If passed = command applies to host database when executed from a component (parameter ignored outside of this context)

The METHOD SET ATTRIBUTES command allows you to set the attributes values for the method(s) specified in the path parameter.

In path, you can pass either a text containing a method path, or a text array containing an array of paths. You will need to pass the same kind of parameter (string or array) in attributes in order to set the appropriate attributes. This command only works with project methods. If you pass an invalid path, an error is generated.

In attributes, you pass an object or an array of objects (depending on the kind of parameter you passed in path) containing all the attributes that you want to set for the method(s).

Method attributes must be set using the OB SET or OB SET ARRAY commands, with True or False values for Boolean attributes, or specific values for extended attributes. Only attributes that are present in the attributes parameter will be updated in the method attributes.

If the command is executed from a component, by default it applies to the component methods. If you pass the * parameter, it accesses the methods of the host database.

 

The supported attributes are:

{
    "invisible" : false, // true if visible
    "preemptive" : "capable" // or "incapable" or "indifferent"
    "publishedWeb" : false,  // true if available through 4D tags and URLs
    "publishedSoap": false,  // true if offered as Web Service
    "publishedWsdl": false,  // true if published in WSDL
    "shared" : false,  // true if shared by components and host database
    "publishedSql" : false,  // true if available through SQL
    "executedOnServer" : false, // true if executed on server
}

Note: "published4DMobile" attributes are deprecated as for 4D v18.

Example  

You want to set a single attribute:

 C_OBJECT($attributes)
 OB SET($attributes;"executedOnServer";True)
 METHOD SET ATTRIBUTES("aMethod";$attributes//Only the "executedOnServer" attribute is modified



See also 

METHOD GET ATTRIBUTES
METHOD SET ATTRIBUTE

 
PROPERTIES 

Product: 4D
Theme: Design Object Access
Number: 1335

 
PAGE CONTENTS 
 
HISTORY 

Created: 4D v15
Modified: 4D v15 R5

 
ARTICLE USAGE

4D Language Reference ( 4D v20)
4D Language Reference ( 4D v20.1)
4D Language Reference ( 4D v20.2)
4D Language Reference ( 4D v20.3)
4D Language Reference ( 4D v20.4)
4D Language Reference ( 4D v20.5)
4D Language Reference ( 4D v20.6)