|
What's
new in 5.01
For
5.00 users moving to 5.01 - what to look for
This document is intended for SE:ISDK/C or SE:ISDK/Java
movers moving from version 5.00 to 5.01.
5.01
30-day evaluation availble now for C/C++, Java,
or J2ME
|
API Enhancements
- The SE_SCOPE stock object has been added. SE_SCOPE
is similar to using SE_GLOBAL or SE_THIS except that
SE_SCOPE will follow the existing scope chain to locate
the specified value. SE_SCOPE will follow the appropriate
_prototype or __parent__ inheritance on get and put.
- SE_COMPOUND_MEM and SE_COMPOUND_UNIMEM
have been added as member specifiers to get or put
complex member names. A single call to seGetLong(..SE_COMPOUND_MEM("a.b.c.d")...)
can be a lot less coding than the multiple calls to
seGetObject() or seParseVar() that were required in
5.00.
-
SE_HIDDEN_MEM
and SE_HIDDEN_UNIMEM have been added as member
specifiers to associate data as a member of an
object that scripts can neither see nor change.
This method is much more robust than the old SE_OBJECT_DATA
method or attaching data to oddly-named members,
because 1) hidden members allow any number of
associations, 2) they assure that your data has
not been corrupted by the script, 3) hidden members
follow the same inheritance rules as standard
members, and 4) the internal implementation of
hidden members is much faster and smaller than
the SE_OBJECT_DATA or sePtrxxx() calls of previous
releases.
- seInternalizeStringHidden() also creates sestring
types that are hidden from scripts
- seGetInternalString() returns
strings that are now safe from being overwritten by
other calls to the API, so you don't need to quickly
store them elsewhere. These returned strings follow
the same lifetime rules as anything returned from
seGetString, and are freed the same way. Nearly all
conceivable uses of seGetInternalString() are in callbacks,
which automatically release the strings when they
return, so it is difficult to come up with a case
where you would need to explicitly free a string returned
by seGetInternalString().
New ways to save
memory
- On processors where data must be aligned on non-byte
boundaries, object members typically use half as much
memory as in previous versions(down from 32 bytes
per member to 16 bytes per member). For systems with
many objects, these members actually use the most
memory, therefore creating a noticeable memory savings..
- A phase of the garbage collector has been added
to minimize extra memory used by objects if those
objects are not frequently changing.
- seGarbageCollect(SE_COLLECT_AND_MINIMIZE) option
has been added to release all non-critical memory
from objects and pools. This is not a call to be made
frequently, but is useful if your putting a context
in a suspended state or if some other part of your
systems is aching for more memory.
- The garbage collector has been rewritten to require
no extra memory during the mark/sweep pass.
New build options
Miscellaneous
ScriptEase Workshop
/ Debugger version 2
-
ScriptEasy intelligent coding support
adds context-sensitive language information as you
write scripts with dot completion, code templates,
parameter hints, enumerated property values, and
integration with the manual.
- Workshop is completely extensible for new features,
objects, and languages through underlying XML description
files
- Customizable, dockable IDE with advanced editing
and coding functionality for integration with your
own products
- Debugger is now complete and faster for both local
and remote script debugging
Coding
Changes
These are deprecated functions or change
for 5.00 users to watch out for with the 5.01 API. Most
of the old behaviors can be re-enabled (although this
is not recommended) by compiling with SE_OLDVER_500E
defined.
- seParseVar() has been renamed as seVarParse() and
an extra parameter has been added to specify a staring
object - however, the new SE_COMPOUND member specifiers
(mentioned above) remove need
for this function in most cases
- SE_GETINTERNALSTRING_NO_LIFETIME option has been
added to turn off the new lifetime rules of seGetInternalString()
(as mentioned above)
- JSE_API_ASSERTLEVEL and JSE_API_ASSERTNAMES, options,
along with eh jseApiOK macro have been removed.
The engine was no longer using these methods for reporting
errors.
- SE_OBJECT_DATA and the sePtr() methods (sePtrAdd,
sePtrRemove, etc...) are no longer the preferred "magic"
way to store a C/C++/Java object with a script object.
Instead, use the more robust new hidden members (as
described above)
- C++ SEObjectWrapper users need to add a new parameter
when using the SEOBJWRAPPER_DECLARE_METHOD and SEOBJWRAPPER_DECLARE_VOID_METHOD
|