contents   index   previous   next



seGetStringEx

 

syntax:

   boolean

SEContext.seGetBoolEx(SEObject object,

                      SEMemberDesc member,

                      int fl);

 

   double

SEContext.seGetNumberEx(SEObject object,

                        SEMemberDesc member,

                        int fl);

 

   Object

SEContext.seGetPointerEx(SEObject object,

                         SEMemberDesc member,

                         int fl);

 

   SEObject

SEContext.seGetObjectEx(SEObject object,

                        SEMemberDesc member,

                        int fl);

 

   String

SEContext.seGetStringEx(SEObject object,

                        SEMemberDesc member,

                        int fl);

where:

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 retrieved

 

return:

The Java value for the variable.

 

description:

These routines are a core element of the ScriptEase API. Given an Object,Member pair, these routines extract the current value as the given type, converting if necessary, and return the result. Note that the underlying variable does not change type, its value is retrieved and converted without changing the source variable. A valid return will always result from these functions. If an internal error occurs, like an illegal conversion, that error will be set up as the result of your function (see seThrow), but a valid result is still returned. The intent is that you can write a simple wrapper with no error checking that uses these routines. See the section SE.RETURN EXPLAINED in Chapter V for a discussion of the implications of this behavior. The value returned if an error occurs will always be a stock value. For numbers, it is SE.NAN (or 0 for non-floating point numbers). For strings, an empty string, “”, is returned. For objects, SE.NOWHERE is returned. Finally, for booleans false is returned.

 

The flags parameter can be any of the following |'d togethor:

 

SE.DEFAULT

 

SE.GF_DIRECT

 

SE.DEFAULT is the default. SE.GF_DIRECT means to ignore the object's prototype and dynamic methods when looking for the property. It directly accesses the object's internal structure. It is intended for writing faster dynamic routines. See Chapter IX for more information on using this flag.

 

In addition, you can specify the flags by using different named functions that have the flags as part of their name. In this case, you do not specify the flags, they are implicit. Taking seGetNumberEx as an example:

 

seGetNumber(...) = seGetNumberEx(...,SE_DEFAULT)

 

seGetDirectNumber(...) = seGetNumberEx(...,SE_GF_DIRECT)

 

The return from seGetObjectEx follows the usual ScriptEase lifetime rules described in Chapter VIII.

 

see:

None

 


seFreeObject