01: /* Copyright 2008 David N. Welton - DedaSys LLC - http://www.dedasys.com
02:
03: Licensed under the Apache License, Version 2.0 (the "License");
04: you may not use this file except in compliance with the License.
05: You may obtain a copy of the License at
06:
07: http://www.apache.org/licenses/LICENSE-2.0
08:
09: Unless required by applicable law or agreed to in writing, software
10: distributed under the License is distributed on an "AS IS" BASIS,
11: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12: See the License for the specific language governing permissions and
13: limitations under the License.
14: */
15:
16: package org.hecl.android;
17:
18: import android.content.Intent;
19:
20: import android.os.Bundle;
21:
22: import org.hecl.Interp;
23: import org.hecl.Thing;
24:
25: import android.util.Log;
26:
27: public class SubHecl extends Hecl {
28: /** Called when the activity is first created. */
29: @Override
30: public void onCreate(Bundle heclApp) {
31: super .onCreate(heclApp);
32:
33: Intent i = getIntent();
34: Thing script = getMailBox();
35:
36: try {
37: AndroidCmd.setCurrentHecl(this );
38: interp.eval(script);
39: } catch (Exception e) {
40: logStacktrace(e);
41: errmsg("Hecl Error: " + e.toString());
42: }
43: }
44: }
|