Deprecated: Optional parameter $args declared before required parameter $parser is implicitly treated as a required parameter in /var/www/vhosts/rave.gatech.edu/httpdocs/help/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.class.php on line 70

Deprecated: Optional parameter $prefix declared before required parameter $code is implicitly treated as a required parameter in /var/www/vhosts/rave.gatech.edu/httpdocs/help/languages/Language.php on line 4270

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/json/FormatJson.php on line 397

Deprecated: Return type of ResultWrapper::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/db/DatabaseUtility.php on line 174

Deprecated: Return type of ResultWrapper::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/db/DatabaseUtility.php on line 192

Deprecated: Return type of ResultWrapper::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/db/DatabaseUtility.php on line 185

Deprecated: Return type of ResultWrapper::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/db/DatabaseUtility.php on line 202

Deprecated: Return type of ResultWrapper::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/db/DatabaseUtility.php on line 163

Warning: Private methods cannot be final as they are never overridden by other classes in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/actions/Action.php on line 67

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /var/www/vhosts/rave.gatech.edu/httpdocs/help/languages/LanguageConverter.php on line 703

Deprecated: Optional parameter $label declared before required parameter $alt is implicitly treated as a required parameter in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/Linker.php on line 730

Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/vhosts/rave.gatech.edu/httpdocs/help/languages/Language.php on line 2104

Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/vhosts/rave.gatech.edu/httpdocs/help/languages/Language.php on line 2104

Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/vhosts/rave.gatech.edu/httpdocs/help/languages/Language.php on line 2104

Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/vhosts/rave.gatech.edu/httpdocs/help/languages/Language.php on line 2104

Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/vhosts/rave.gatech.edu/httpdocs/help/languages/Language.php on line 2104

Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/vhosts/rave.gatech.edu/httpdocs/help/languages/Language.php on line 2104

Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/vhosts/rave.gatech.edu/httpdocs/help/languages/Language.php on line 2104

Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/vhosts/rave.gatech.edu/httpdocs/help/languages/Language.php on line 2104

Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/vhosts/rave.gatech.edu/httpdocs/help/languages/Language.php on line 2104

Warning: Trying to access array offset on value of type null in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/profiler/SectionProfiler.php on line 104

Warning: Trying to access array offset on value of type null in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/profiler/SectionProfiler.php on line 104

Warning: Trying to access array offset on value of type null in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/profiler/SectionProfiler.php on line 105

Warning: Trying to access array offset on value of type null in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/profiler/SectionProfiler.php on line 105

Warning: Trying to access array offset on value of type null in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/profiler/SectionProfiler.php on line 106

Warning: Trying to access array offset on value of type null in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/profiler/SectionProfiler.php on line 106

Deprecated: header(): Passing null to parameter #3 ($response_code) of type int is deprecated in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/WebResponse.php on line 37

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/rave.gatech.edu/httpdocs/help/languages/Language.php:2104) in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/WebResponse.php on line 37

Deprecated: header(): Passing null to parameter #3 ($response_code) of type int is deprecated in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/WebResponse.php on line 37

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/rave.gatech.edu/httpdocs/help/languages/Language.php:2104) in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/WebResponse.php on line 37

Deprecated: header(): Passing null to parameter #3 ($response_code) of type int is deprecated in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/WebResponse.php on line 37

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/rave.gatech.edu/httpdocs/help/languages/Language.php:2104) in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/WebResponse.php on line 37

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/skins/SkinTemplate.php on line 313
Difference between revisions of "Coding Workspace Objects with Java Components" - Rave Documentation

Difference between revisions of "Coding Workspace Objects with Java Components"

From Rave Documentation
Jump to: navigation, search

Deprecated: Optional parameter $attribs declared before required parameter $contents is implicitly treated as a required parameter in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/Xml.php on line 131
(Created page with "Coding workspace objects that use java components is complicated by the fact that java objects cannot be saved in a .rve project file. Because of this limitation, you need to fol...")
 
(The rules)
Line 10: Line 10:
  
 
*You MUST include a property in your graphpropertiesWORKSPACEOBJECT.m file named "unsaveablehandles". This is a cell array of strings that are the field names in udata (including the "udata." part) where java objects have been stored. All non-graphical java objects must ONLY be stored in a udata field that appears in this list (i.e. do not store them in handles, only store them in udata, and then include the place that you store them in this list.) Any stored handles to graphical java objects that you placed using javacomponent may ONLY be stored in udata in a field that appears in this list.
 
*You MUST include a property in your graphpropertiesWORKSPACEOBJECT.m file named "unsaveablehandles". This is a cell array of strings that are the field names in udata (including the "udata." part) where java objects have been stored. All non-graphical java objects must ONLY be stored in a udata field that appears in this list (i.e. do not store them in handles, only store them in udata, and then include the place that you store them in this list.) Any stored handles to graphical java objects that you placed using javacomponent may ONLY be stored in udata in a field that appears in this list.
 +
 +
 +
In short: ravesavestate needs to be able to remove all of your java objects from the .rve file it saves. It only looks for graphical java objects in the list of children of handles.fig, handles.wspanel, and (if they are uipanels) handles.allgraphs, handles.fakeax, and handles.fakerax. If you have created your graphical java objects using the javacomponent function, which generates a regular hg handle for the java object, ravesavestate must also remove all references to that handle from the .rve file. Otherwise it will generate an invalid handle error later. Rave only looks for these handles in the list of udata fields you specify in graphproperties.unsaveablehandles. Note that you do not actually store the handle itself in unsaveable handles; rather unsaveable handles is a cell array of strings, in which each string says where you have stored the handle. For example, a string might be 'udata.view.jScrollPane'. Ravesavestate then simply sets all of these fields to [].

Revision as of 23:05, 26 February 2013

Coding workspace objects that use java components is complicated by the fact that java objects cannot be saved in a .rve project file. Because of this limitation, you need to follow certain rules to make sure that ravesavestate can correctly save a .rve project file, and that raveloadstate can load .rve files that use your object.

The rules

  • Java objects cannot be saved in the .rve project file, so ravesavestate deletes them first, then raveloadstate recreates them by calling ravecreateWORKSPACEOBJECT. Because of this:
    • Your ravecreateWORKSPACEOBJECT.m function must be able to recreate the java objects from just the information stored in udata. For example, if you have a java-based text box in which the user can enter text, this text must be stored in udata in addition to being stored in the java text box itself.
    • Your ravecreateWORKSPACEOBJECT.m function must not give errors if the java objects have been deleted (since they WILL be deleted by ravesavestate). If your workspace object creates the java object only once during raveinitializeWORKSPACEOBJECT, then ravecreateWORKSPACEOBJECT must have a check that if the java objects do not exist, it recreates them in the same way they initially get created by raveinitializeWORKSPACEOBJECT.
    • Similarly, if you recreate your java objects each time ravecreateWORKSPACEOBJECT.m is called, you probably delete them at the beginning of that function. Make sure you properly code this so it doesnt give an error if they've already been deleted.
  • Java objects that appear on screen (e.g., swing objects) MUST be children of either handles.fig, handles.wspanel, or a uipanel whose handle is stored in handles.allgraphs, handles.fakeax, or handles.fakerax. These are the only places that ravesavestate will look for java objects to be deleted.
  • You MUST include a property in your graphpropertiesWORKSPACEOBJECT.m file named "unsaveablehandles". This is a cell array of strings that are the field names in udata (including the "udata." part) where java objects have been stored. All non-graphical java objects must ONLY be stored in a udata field that appears in this list (i.e. do not store them in handles, only store them in udata, and then include the place that you store them in this list.) Any stored handles to graphical java objects that you placed using javacomponent may ONLY be stored in udata in a field that appears in this list.


In short: ravesavestate needs to be able to remove all of your java objects from the .rve file it saves. It only looks for graphical java objects in the list of children of handles.fig, handles.wspanel, and (if they are uipanels) handles.allgraphs, handles.fakeax, and handles.fakerax. If you have created your graphical java objects using the javacomponent function, which generates a regular hg handle for the java object, ravesavestate must also remove all references to that handle from the .rve file. Otherwise it will generate an invalid handle error later. Rave only looks for these handles in the list of udata fields you specify in graphproperties.unsaveablehandles. Note that you do not actually store the handle itself in unsaveable handles; rather unsaveable handles is a cell array of strings, in which each string says where you have stored the handle. For example, a string might be 'udata.view.jScrollPane'. Ravesavestate then simply sets all of these fields to [].


Deprecated: header(): Passing null to parameter #3 ($response_code) of type int is deprecated in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/WebResponse.php on line 37

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/rave.gatech.edu/httpdocs/help/languages/Language.php:2104) in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/WebResponse.php on line 37

Deprecated: header(): Passing null to parameter #3 ($response_code) of type int is deprecated in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/WebResponse.php on line 37

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/rave.gatech.edu/httpdocs/help/languages/Language.php:2104) in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/WebResponse.php on line 37

Deprecated: header(): Passing null to parameter #3 ($response_code) of type int is deprecated in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/WebResponse.php on line 37

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/rave.gatech.edu/httpdocs/help/languages/Language.php:2104) in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/WebResponse.php on line 37

Deprecated: header(): Passing null to parameter #3 ($response_code) of type int is deprecated in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/WebResponse.php on line 37

Warning: Cannot modify header information - headers already sent by (output started at /var/www/vhosts/rave.gatech.edu/httpdocs/help/languages/Language.php:2104) in /var/www/vhosts/rave.gatech.edu/httpdocs/help/includes/WebResponse.php on line 37