contents   index   previous   next



sePutNullEx

 

syntax:

   sebool

sePutBoolEx(secontext se,seobject obj,

                         semember mem,

                         int fl,

                         sebool val);

 

   sebool

sePutNumberEx(secontext se,seobject obj,

                           semember mem,

                           int fl,

                           senumber val);

 

   sebool

sePutPointerEx(secontext se,seobject obj,

                            semember mem,

                            int fl,

                            void *val);

 

   sebool

sePutObjectEx(secontext se,seobject obj,

                           semember mem,

                           int fl,

                           seobject val);

 

   sebool

sePutStringEx(secontext se,seobject obj,

                           semember mem,

                           int fl,

                           seconstcharptr val,

                           sememcount len);

 

   sebool

sePutUndefinedEx(secontext se,seobject obj,

                              semember mem,

                              int fl);

 

   sebool

sePutNullEx(secontext se,seobject obj,

                         semember mem,

                         int fl);

where:

se the context to put the variable to

 

object the object half of an Object,Member pair

 

member the member half of an Object,Member pair

 

fl flags determining how the variable is stored

 

val the value to put, type based on which routine you are using

 

len for strings, the length of the item in characters for strings, or SE_PS_STRLEN to let sePutStringEx use strlen_sechar to determine the length of the string.

 

return:

The boolean TRUE if the member was created, FALSE if it already existed.

 

description:

These functions are the inverse of the seGetXXX versions, they put a value into the given Object,Member location. Like their get counterparts, these functions have versions that make the flags implicit in their name. However, there is one additional flag, SE_GF_MUST. SE_GF_MUST means that the value should ignore the SE_READONLY attribute. This eases updating internal members in your objects that should be read-only for the script but not for you. It is equivelent to turning off the read-only bit, putting the value, then turning it back on. It is most-often used in combination with SE_GF_DIRECT. Here are the name/flag equivalents using sePutNumberEx as an example:

 

sePutNumber(...) = sePutNumberEx(...,SE_GF_DEFAULT)

 

sePutDirectNumber(...) = sePutNumberEx(...,SE_GF_DIRECT)

 

seMustPutNumber(...) = sePutNumberEx(...,SE_GF_MUST)

 

seMustPutDirectNumber(...) = sePutNumberEx(...,SE_GF_MUST|SE_GF_DIRECT)

 

 

The sePutStringEx call has two extra possible flags, SE_PS_USEPOINTER and SE_PS_BORROWPOINTER. Normally, any string passed to the core is copied and retained internally. With these flag, a particular string pointer is given to the core. For SE_PS_USEPOINTER, the memory pointed to must have previously been allocated using one of the ScriptEase allocation routines. ScriptEase will free this pointer when it finishes using it, so you are giving up control of it permanently. For SE_PS_BORROWPOINTER, the ScriptEase core will use the pointer but never free it. This second flag is intended to use in conjunction with constant strings or strings that last the life of your application.

 

In either case, the string must be ‘\0’-terminated. This means there must be an extra ‘\0’ at the end of the string beyond the number of characters specified in the length. This character is not considered to be part of the string and should not be included in the length tally.

 

see:

None

 


seDelete