Log Message:
-----------
refactored code using methodDefined()
converted configAlias to setConfigAlias
replaced debug by jsDebugMode (for now -- eventually we'll have a debug mode for each applet)
Modified Files:
--------------
pg/macros:
AppletObjects.pl
Revision Data
-------------
Index: AppletObjects.pl
===================================================================
RCS file: /webwork/cvs/system/pg/macros/AppletObjects.pl,v
retrieving revision 1.17
retrieving revision 1.18
diff -Lmacros/AppletObjects.pl -Lmacros/AppletObjects.pl -u -r1.17 -r1.18
--- macros/AppletObjects.pl
+++ macros/AppletObjects.pl
@@ -115,6 +115,9 @@
my $appletStateName = "${appletName}_state";
my $getState = $self->getStateAlias;
my $setState = $self->setStateAlias;
+ my $getConfig = $self->getConfigAlias;
+ my $setConfig = $self->setConfigAlias;
+
my $base64_initialState = $self->base64_state;
main::RECORD_FORM_LABEL($appletStateName); #this insures that they'll be saved from one invocation to the next
#main::RECORD_FORM_LABEL("previous_$appletStateName");
@@ -160,7 +163,17 @@
ww_applet_list['$appletName'].setState();
alert(debugText);"
>
+ <input type="button" value="$getConfig"
+ onClick="debugText='';
+ ww_applet_list['$appletName'].getConfig()"; "
+ >
+ <input type="button" value="$setConfig"
+ onClick="debugText='';
+ ww_applet_list['$appletName'].config();
+ alert(debugText);"
+ >
!;
+
my $state_input_element = ($self->debug == 1) ? $debug_input_element :
qq!\n<input type="hidden" name = "$appletStateName" value ="$base_64_encoded_answer_value">!;
my $reset_button_str = ($reset_button) ?
|