commit 28/12/2024 13_08
This commit is contained in:
32
Objects/shell/src/b4a/example/analogclock.java
Normal file
32
Objects/shell/src/b4a/example/analogclock.java
Normal file
@@ -0,0 +1,32 @@
|
||||
|
||||
package b4a.example;
|
||||
|
||||
import anywheresoftware.b4a.pc.PCBA;
|
||||
import anywheresoftware.b4a.pc.RemoteObject;
|
||||
|
||||
public class analogclock {
|
||||
public static RemoteObject myClass;
|
||||
public analogclock() {
|
||||
}
|
||||
public static PCBA staticBA = new PCBA(null, analogclock.class);
|
||||
|
||||
public static RemoteObject __c = RemoteObject.declareNull("anywheresoftware.b4a.keywords.Common");
|
||||
public static RemoteObject _xui = RemoteObject.declareNull("anywheresoftware.b4a.objects.B4XViewWrapper.XUI");
|
||||
public static RemoteObject _pnlclock = RemoteObject.declareNull("anywheresoftware.b4a.objects.PanelWrapper");
|
||||
public static RemoteObject _cvsclock = RemoteObject.declareNull("anywheresoftware.b4a.objects.B4XCanvas");
|
||||
public static RemoteObject _clockdiameter = RemoteObject.createImmutable(0f);
|
||||
public static RemoteObject _centerx = RemoteObject.createImmutable(0f);
|
||||
public static RemoteObject _centery = RemoteObject.createImmutable(0f);
|
||||
public static RemoteObject _intervals = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.List");
|
||||
public static RemoteObject _quadrantstrokewidth = RemoteObject.createImmutable(0f);
|
||||
public static RemoteObject _hourtickstrokewidth = RemoteObject.createImmutable(0f);
|
||||
public static RemoteObject _minutetickstrokewidth = RemoteObject.createImmutable(0f);
|
||||
public static RemoteObject _intervalarcstrokewidth = RemoteObject.createImmutable(0f);
|
||||
public static RemoteObject _hourhandstrokewidth = RemoteObject.createImmutable(0f);
|
||||
public static RemoteObject _minutehandstrokewidth = RemoteObject.createImmutable(0f);
|
||||
public static b4a.example.main _main = null;
|
||||
public static b4a.example.starter _starter = null;
|
||||
public static Object[] GetGlobals(RemoteObject _ref) throws Exception {
|
||||
return new Object[] {"centerX",_ref.getField(false, "_centerx"),"centerY",_ref.getField(false, "_centery"),"clockDiameter",_ref.getField(false, "_clockdiameter"),"cvsClock",_ref.getField(false, "_cvsclock"),"hourHandStrokeWidth",_ref.getField(false, "_hourhandstrokewidth"),"hourTickStrokeWidth",_ref.getField(false, "_hourtickstrokewidth"),"intervalArcStrokeWidth",_ref.getField(false, "_intervalarcstrokewidth"),"intervals",_ref.getField(false, "_intervals"),"minuteHandStrokeWidth",_ref.getField(false, "_minutehandstrokewidth"),"minuteTickStrokeWidth",_ref.getField(false, "_minutetickstrokewidth"),"pnlClock",_ref.getField(false, "_pnlclock"),"quadrantStrokeWidth",_ref.getField(false, "_quadrantstrokewidth"),"xui",_ref.getField(false, "_xui")};
|
||||
}
|
||||
}
|
||||
610
Objects/shell/src/b4a/example/analogclock_subs_0.java
Normal file
610
Objects/shell/src/b4a/example/analogclock_subs_0.java
Normal file
@@ -0,0 +1,610 @@
|
||||
package b4a.example;
|
||||
|
||||
import anywheresoftware.b4a.BA;
|
||||
import anywheresoftware.b4a.pc.*;
|
||||
|
||||
public class analogclock_subs_0 {
|
||||
|
||||
|
||||
public static RemoteObject _addinterval(RemoteObject __ref,RemoteObject _starthour,RemoteObject _startminute,RemoteObject _endhour,RemoteObject _endminute,RemoteObject _tipo) throws Exception{
|
||||
try {
|
||||
Debug.PushSubsStack("AddInterval (analogclock) ","analogclock",2,__ref.getField(false, "ba"),__ref,150);
|
||||
if (RapidSub.canDelegate("addinterval")) { return __ref.runUserSub(false, "analogclock","addinterval", __ref, _starthour, _startminute, _endhour, _endminute, _tipo);}
|
||||
RemoteObject _interval = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
|
||||
Debug.locals.put("startHour", _starthour);
|
||||
Debug.locals.put("startMinute", _startminute);
|
||||
Debug.locals.put("endHour", _endhour);
|
||||
Debug.locals.put("endMinute", _endminute);
|
||||
Debug.locals.put("tipo", _tipo);
|
||||
BA.debugLineNum = 150;BA.debugLine="Public Sub AddInterval(startHour As Int, startMinu";
|
||||
Debug.ShouldStop(2097152);
|
||||
BA.debugLineNum = 151;BA.debugLine="Dim interval As Map";
|
||||
Debug.ShouldStop(4194304);
|
||||
_interval = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");Debug.locals.put("interval", _interval);
|
||||
BA.debugLineNum = 152;BA.debugLine="interval.Initialize";
|
||||
Debug.ShouldStop(8388608);
|
||||
_interval.runVoidMethod ("Initialize");
|
||||
BA.debugLineNum = 153;BA.debugLine="interval.Put(\"startHour\", startHour)";
|
||||
Debug.ShouldStop(16777216);
|
||||
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("startHour"))),(Object)((_starthour)));
|
||||
BA.debugLineNum = 154;BA.debugLine="interval.Put(\"startMinute\", startMinute)";
|
||||
Debug.ShouldStop(33554432);
|
||||
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("startMinute"))),(Object)((_startminute)));
|
||||
BA.debugLineNum = 155;BA.debugLine="interval.Put(\"endHour\", endHour)";
|
||||
Debug.ShouldStop(67108864);
|
||||
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("endHour"))),(Object)((_endhour)));
|
||||
BA.debugLineNum = 156;BA.debugLine="interval.Put(\"endMinute\", endMinute)";
|
||||
Debug.ShouldStop(134217728);
|
||||
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("endMinute"))),(Object)((_endminute)));
|
||||
BA.debugLineNum = 157;BA.debugLine="Select tipo.ToLowerCase";
|
||||
Debug.ShouldStop(268435456);
|
||||
switch (BA.switchObjectToInt(_tipo.runMethod(true,"toLowerCase"),BA.ObjectToString("mattino"),BA.ObjectToString("pomeriggio"))) {
|
||||
case 0: {
|
||||
BA.debugLineNum = 159;BA.debugLine="interval.Put(\"color\", Colors.Blue)";
|
||||
Debug.ShouldStop(1073741824);
|
||||
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("color"))),(Object)((analogclock.__c.getField(false,"Colors").getField(true,"Blue"))));
|
||||
BA.debugLineNum = 160;BA.debugLine="interval.Put(\"radius\", clockDiameter /";
|
||||
Debug.ShouldStop(-2147483648);
|
||||
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("radius"))),(Object)((RemoteObject.solve(new RemoteObject[] {__ref.getField(true,"_clockdiameter" /*RemoteObject*/ ),RemoteObject.createImmutable(2),analogclock.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 15)))}, "/-",1, 0))));
|
||||
BA.debugLineNum = 161;BA.debugLine="interval.Put(\"strokeWidth\", intervalAr";
|
||||
Debug.ShouldStop(1);
|
||||
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("strokeWidth"))),(Object)((__ref.getField(true,"_intervalarcstrokewidth" /*RemoteObject*/ ))));
|
||||
break; }
|
||||
case 1: {
|
||||
BA.debugLineNum = 163;BA.debugLine="interval.Put(\"color\", Colors.Green)";
|
||||
Debug.ShouldStop(4);
|
||||
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("color"))),(Object)((analogclock.__c.getField(false,"Colors").getField(true,"Green"))));
|
||||
BA.debugLineNum = 164;BA.debugLine="interval.Put(\"radius\", clockDiameter /";
|
||||
Debug.ShouldStop(8);
|
||||
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("radius"))),(Object)((RemoteObject.solve(new RemoteObject[] {__ref.getField(true,"_clockdiameter" /*RemoteObject*/ ),RemoteObject.createImmutable(2),analogclock.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 25)))}, "/-",1, 0))));
|
||||
BA.debugLineNum = 165;BA.debugLine="interval.Put(\"strokeWidth\", intervalAr";
|
||||
Debug.ShouldStop(16);
|
||||
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("strokeWidth"))),(Object)((__ref.getField(true,"_intervalarcstrokewidth" /*RemoteObject*/ ))));
|
||||
break; }
|
||||
default: {
|
||||
BA.debugLineNum = 167;BA.debugLine="Log(\"Tipo di intervallo non riconosciu";
|
||||
Debug.ShouldStop(64);
|
||||
analogclock.__c.runVoidMethod ("LogImpl","31835025",RemoteObject.concat(RemoteObject.createImmutable("Tipo di intervallo non riconosciuto: "),_tipo),0);
|
||||
BA.debugLineNum = 168;BA.debugLine="Return";
|
||||
Debug.ShouldStop(128);
|
||||
if (true) return RemoteObject.createImmutable("");
|
||||
break; }
|
||||
}
|
||||
;
|
||||
BA.debugLineNum = 170;BA.debugLine="intervals.Add(interval)";
|
||||
Debug.ShouldStop(512);
|
||||
__ref.getField(false,"_intervals" /*RemoteObject*/ ).runVoidMethod ("Add",(Object)((_interval.getObject())));
|
||||
BA.debugLineNum = 171;BA.debugLine="DrawClock";
|
||||
Debug.ShouldStop(1024);
|
||||
__ref.runClassMethod (b4a.example.analogclock.class, "_drawclock" /*RemoteObject*/ );
|
||||
BA.debugLineNum = 172;BA.debugLine="End Sub";
|
||||
Debug.ShouldStop(2048);
|
||||
return RemoteObject.createImmutable("");
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw Debug.ErrorCaught(e);
|
||||
}
|
||||
finally {
|
||||
Debug.PopSubsStack();
|
||||
}}
|
||||
public static RemoteObject _class_globals(RemoteObject __ref) throws Exception{
|
||||
//BA.debugLineNum = 1;BA.debugLine="Sub Class_Globals";
|
||||
//BA.debugLineNum = 2;BA.debugLine="Private xui As XUI";
|
||||
analogclock._xui = RemoteObject.createNew ("anywheresoftware.b4a.objects.B4XViewWrapper.XUI");__ref.setField("_xui",analogclock._xui);
|
||||
//BA.debugLineNum = 4;BA.debugLine="Private pnlClock As Panel ' Pannello in c";
|
||||
analogclock._pnlclock = RemoteObject.createNew ("anywheresoftware.b4a.objects.PanelWrapper");__ref.setField("_pnlclock",analogclock._pnlclock);
|
||||
//BA.debugLineNum = 5;BA.debugLine="Private cvsClock As B4XCanvas ' Canvas per";
|
||||
analogclock._cvsclock = RemoteObject.createNew ("anywheresoftware.b4a.objects.B4XCanvas");__ref.setField("_cvsclock",analogclock._cvsclock);
|
||||
//BA.debugLineNum = 6;BA.debugLine="Private clockDiameter As Float ' Diametro dell";
|
||||
analogclock._clockdiameter = RemoteObject.createImmutable(0f);__ref.setField("_clockdiameter",analogclock._clockdiameter);
|
||||
//BA.debugLineNum = 7;BA.debugLine="Private centerX As Float ' Coordinata X";
|
||||
analogclock._centerx = RemoteObject.createImmutable(0f);__ref.setField("_centerx",analogclock._centerx);
|
||||
//BA.debugLineNum = 8;BA.debugLine="Private centerY As Float ' Coordinata Y";
|
||||
analogclock._centery = RemoteObject.createImmutable(0f);__ref.setField("_centery",analogclock._centery);
|
||||
//BA.debugLineNum = 9;BA.debugLine="Private intervals As List ' Lista degli i";
|
||||
analogclock._intervals = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.List");__ref.setField("_intervals",analogclock._intervals);
|
||||
//BA.debugLineNum = 12;BA.debugLine="Private quadrantStrokeWidth As Float = 5dip";
|
||||
analogclock._quadrantstrokewidth = BA.numberCast(float.class, analogclock.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 5))));__ref.setField("_quadrantstrokewidth",analogclock._quadrantstrokewidth);
|
||||
//BA.debugLineNum = 13;BA.debugLine="Private hourTickStrokeWidth As Float = 5dip";
|
||||
analogclock._hourtickstrokewidth = BA.numberCast(float.class, analogclock.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 5))));__ref.setField("_hourtickstrokewidth",analogclock._hourtickstrokewidth);
|
||||
//BA.debugLineNum = 14;BA.debugLine="Private minuteTickStrokeWidth As Float = 2dip";
|
||||
analogclock._minutetickstrokewidth = BA.numberCast(float.class, analogclock.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 2))));__ref.setField("_minutetickstrokewidth",analogclock._minutetickstrokewidth);
|
||||
//BA.debugLineNum = 15;BA.debugLine="Private intervalArcStrokeWidth As Float = 5dip";
|
||||
analogclock._intervalarcstrokewidth = BA.numberCast(float.class, analogclock.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 5))));__ref.setField("_intervalarcstrokewidth",analogclock._intervalarcstrokewidth);
|
||||
//BA.debugLineNum = 16;BA.debugLine="Private hourHandStrokeWidth As Float = 8dip";
|
||||
analogclock._hourhandstrokewidth = BA.numberCast(float.class, analogclock.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 8))));__ref.setField("_hourhandstrokewidth",analogclock._hourhandstrokewidth);
|
||||
//BA.debugLineNum = 17;BA.debugLine="Private minuteHandStrokeWidth As Float = 5dip";
|
||||
analogclock._minutehandstrokewidth = BA.numberCast(float.class, analogclock.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 5))));__ref.setField("_minutehandstrokewidth",analogclock._minutehandstrokewidth);
|
||||
//BA.debugLineNum = 18;BA.debugLine="Private intervals As List";
|
||||
analogclock._intervals = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.List");__ref.setField("_intervals",analogclock._intervals);
|
||||
//BA.debugLineNum = 19;BA.debugLine="End Sub";
|
||||
return RemoteObject.createImmutable("");
|
||||
}
|
||||
public static RemoteObject _clearcanvas(RemoteObject __ref,RemoteObject _color) throws Exception{
|
||||
try {
|
||||
Debug.PushSubsStack("ClearCanvas (analogclock) ","analogclock",2,__ref.getField(false, "ba"),__ref,72);
|
||||
if (RapidSub.canDelegate("clearcanvas")) { return __ref.runUserSub(false, "analogclock","clearcanvas", __ref, _color);}
|
||||
Debug.locals.put("color", _color);
|
||||
BA.debugLineNum = 72;BA.debugLine="Private Sub ClearCanvas(color As Int)";
|
||||
Debug.ShouldStop(128);
|
||||
BA.debugLineNum = 73;BA.debugLine="cvsClock.DrawRect(cvsClock.TargetRect, color, Tru";
|
||||
Debug.ShouldStop(256);
|
||||
__ref.getField(false,"_cvsclock" /*RemoteObject*/ ).runVoidMethod ("DrawRect",(Object)(__ref.getField(false,"_cvsclock" /*RemoteObject*/ ).runMethod(false,"getTargetRect")),(Object)(_color),(Object)(analogclock.__c.getField(true,"True")),(Object)(BA.numberCast(float.class, 0)));
|
||||
BA.debugLineNum = 74;BA.debugLine="cvsClock.Invalidate";
|
||||
Debug.ShouldStop(512);
|
||||
__ref.getField(false,"_cvsclock" /*RemoteObject*/ ).runVoidMethod ("Invalidate");
|
||||
BA.debugLineNum = 75;BA.debugLine="End Sub";
|
||||
Debug.ShouldStop(1024);
|
||||
return RemoteObject.createImmutable("");
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw Debug.ErrorCaught(e);
|
||||
}
|
||||
finally {
|
||||
Debug.PopSubsStack();
|
||||
}}
|
||||
public static RemoteObject _drawclock(RemoteObject __ref) throws Exception{
|
||||
try {
|
||||
Debug.PushSubsStack("DrawClock (analogclock) ","analogclock",2,__ref.getField(false, "ba"),__ref,78);
|
||||
if (RapidSub.canDelegate("drawclock")) { return __ref.runUserSub(false, "analogclock","drawclock", __ref);}
|
||||
RemoteObject _interval = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
|
||||
RemoteObject _now = RemoteObject.createImmutable(0L);
|
||||
RemoteObject _hours = RemoteObject.createImmutable(0);
|
||||
RemoteObject _minutes = RemoteObject.createImmutable(0);
|
||||
RemoteObject _seconds = RemoteObject.createImmutable(0);
|
||||
RemoteObject _hourangle = RemoteObject.createImmutable(0f);
|
||||
RemoteObject _minuteangle = RemoteObject.createImmutable(0f);
|
||||
RemoteObject _secondangle = RemoteObject.createImmutable(0f);
|
||||
BA.debugLineNum = 78;BA.debugLine="Public Sub DrawClock";
|
||||
Debug.ShouldStop(8192);
|
||||
BA.debugLineNum = 79;BA.debugLine="cvsClock.Initialize(pnlClock)";
|
||||
Debug.ShouldStop(16384);
|
||||
__ref.getField(false,"_cvsclock" /*RemoteObject*/ ).runVoidMethod ("Initialize",RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.B4XViewWrapper"), __ref.getField(false,"_pnlclock" /*RemoteObject*/ ).getObject()));
|
||||
BA.debugLineNum = 82;BA.debugLine="ClearCanvas(Colors.White)";
|
||||
Debug.ShouldStop(131072);
|
||||
__ref.runClassMethod (b4a.example.analogclock.class, "_clearcanvas" /*RemoteObject*/ ,(Object)(analogclock.__c.getField(false,"Colors").getField(true,"White")));
|
||||
BA.debugLineNum = 85;BA.debugLine="cvsClock.DrawCircle(centerX, centerY, clockDia";
|
||||
Debug.ShouldStop(1048576);
|
||||
__ref.getField(false,"_cvsclock" /*RemoteObject*/ ).runVoidMethod ("DrawCircle",(Object)(__ref.getField(true,"_centerx" /*RemoteObject*/ )),(Object)(__ref.getField(true,"_centery" /*RemoteObject*/ )),(Object)(BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {__ref.getField(true,"_clockdiameter" /*RemoteObject*/ ),RemoteObject.createImmutable(2)}, "/",0, 0))),(Object)(analogclock.__c.getField(false,"Colors").getField(true,"Black")),(Object)(analogclock.__c.getField(true,"False")),(Object)(__ref.getField(true,"_quadrantstrokewidth" /*RemoteObject*/ )));
|
||||
BA.debugLineNum = 88;BA.debugLine="DrawTicks";
|
||||
Debug.ShouldStop(8388608);
|
||||
__ref.runClassMethod (b4a.example.analogclock.class, "_drawticks" /*RemoteObject*/ );
|
||||
BA.debugLineNum = 91;BA.debugLine="For Each interval As Map In intervals";
|
||||
Debug.ShouldStop(67108864);
|
||||
_interval = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");
|
||||
{
|
||||
final RemoteObject group5 = __ref.getField(false,"_intervals" /*RemoteObject*/ );
|
||||
final int groupLen5 = group5.runMethod(true,"getSize").<Integer>get()
|
||||
;int index5 = 0;
|
||||
;
|
||||
for (; index5 < groupLen5;index5++){
|
||||
_interval = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.collections.Map"), group5.runMethod(false,"Get",index5));Debug.locals.put("interval", _interval);
|
||||
Debug.locals.put("interval", _interval);
|
||||
BA.debugLineNum = 92;BA.debugLine="DrawInterval(interval.Get(\"startHour\"), in";
|
||||
Debug.ShouldStop(134217728);
|
||||
__ref.runClassMethod (b4a.example.analogclock.class, "_drawinterval" /*RemoteObject*/ ,(Object)(BA.numberCast(int.class, _interval.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("startHour")))))),(Object)(BA.numberCast(int.class, _interval.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("startMinute")))))),(Object)(BA.numberCast(int.class, _interval.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("endHour")))))),(Object)(BA.numberCast(int.class, _interval.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("endMinute")))))),(Object)(BA.numberCast(int.class, _interval.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("color")))))),(Object)(BA.numberCast(float.class, _interval.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("radius")))))),(Object)(BA.numberCast(float.class, _interval.runMethod(false,"Get",(Object)((RemoteObject.createImmutable("strokeWidth")))))));
|
||||
}
|
||||
}Debug.locals.put("interval", _interval);
|
||||
;
|
||||
BA.debugLineNum = 96;BA.debugLine="Dim now As Long = DateTime.Now";
|
||||
Debug.ShouldStop(-2147483648);
|
||||
_now = analogclock.__c.getField(false,"DateTime").runMethod(true,"getNow");Debug.locals.put("now", _now);Debug.locals.put("now", _now);
|
||||
BA.debugLineNum = 97;BA.debugLine="Dim Hours As Int = DateTime.GetHour(now) Mod 1";
|
||||
Debug.ShouldStop(1);
|
||||
_hours = RemoteObject.solve(new RemoteObject[] {analogclock.__c.getField(false,"DateTime").runMethod(true,"GetHour",(Object)(_now)),RemoteObject.createImmutable(12)}, "%",0, 1);Debug.locals.put("Hours", _hours);Debug.locals.put("Hours", _hours);
|
||||
BA.debugLineNum = 98;BA.debugLine="Dim Minutes As Int = DateTime.GetMinute(now)";
|
||||
Debug.ShouldStop(2);
|
||||
_minutes = analogclock.__c.getField(false,"DateTime").runMethod(true,"GetMinute",(Object)(_now));Debug.locals.put("Minutes", _minutes);Debug.locals.put("Minutes", _minutes);
|
||||
BA.debugLineNum = 99;BA.debugLine="Dim Seconds As Int = DateTime.GetSecond(now)";
|
||||
Debug.ShouldStop(4);
|
||||
_seconds = analogclock.__c.getField(false,"DateTime").runMethod(true,"GetSecond",(Object)(_now));Debug.locals.put("Seconds", _seconds);Debug.locals.put("Seconds", _seconds);
|
||||
BA.debugLineNum = 102;BA.debugLine="Dim HourAngle As Float = -90 + Hours * 30 + Mi";
|
||||
Debug.ShouldStop(32);
|
||||
_hourangle = BA.numberCast(float.class, -(double) (0 + 90)+(double) (0 + _hours.<Integer>get().intValue())*(double) (0 + 30)+(double) (0 + _minutes.<Integer>get().intValue())/(double)(double) (0 + 2));Debug.locals.put("HourAngle", _hourangle);Debug.locals.put("HourAngle", _hourangle);
|
||||
BA.debugLineNum = 103;BA.debugLine="DrawHand(centerX, centerY, clockDiameter * 0.2";
|
||||
Debug.ShouldStop(64);
|
||||
__ref.runClassMethod (b4a.example.analogclock.class, "_drawhand" /*RemoteObject*/ ,(Object)(__ref.getField(true,"_centerx" /*RemoteObject*/ )),(Object)(__ref.getField(true,"_centery" /*RemoteObject*/ )),(Object)(BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {__ref.getField(true,"_clockdiameter" /*RemoteObject*/ ),RemoteObject.createImmutable(0.25)}, "*",0, 0))),(Object)(_hourangle),(Object)(__ref.getField(true,"_hourhandstrokewidth" /*RemoteObject*/ )),(Object)(analogclock.__c.getField(false,"Colors").getField(true,"Black")));
|
||||
BA.debugLineNum = 106;BA.debugLine="Dim MinuteAngle As Float = -90 + Minutes * 6";
|
||||
Debug.ShouldStop(512);
|
||||
_minuteangle = BA.numberCast(float.class, -(double) (0 + 90)+(double) (0 + _minutes.<Integer>get().intValue())*(double) (0 + 6));Debug.locals.put("MinuteAngle", _minuteangle);Debug.locals.put("MinuteAngle", _minuteangle);
|
||||
BA.debugLineNum = 107;BA.debugLine="DrawHand(centerX, centerY, clockDiameter * 0.4";
|
||||
Debug.ShouldStop(1024);
|
||||
__ref.runClassMethod (b4a.example.analogclock.class, "_drawhand" /*RemoteObject*/ ,(Object)(__ref.getField(true,"_centerx" /*RemoteObject*/ )),(Object)(__ref.getField(true,"_centery" /*RemoteObject*/ )),(Object)(BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {__ref.getField(true,"_clockdiameter" /*RemoteObject*/ ),RemoteObject.createImmutable(0.4)}, "*",0, 0))),(Object)(_minuteangle),(Object)(__ref.getField(true,"_minutehandstrokewidth" /*RemoteObject*/ )),(Object)(analogclock.__c.getField(false,"Colors").getField(true,"Blue")));
|
||||
BA.debugLineNum = 110;BA.debugLine="Dim SecondAngle As Float = -90 + Seconds * 6";
|
||||
Debug.ShouldStop(8192);
|
||||
_secondangle = BA.numberCast(float.class, -(double) (0 + 90)+(double) (0 + _seconds.<Integer>get().intValue())*(double) (0 + 6));Debug.locals.put("SecondAngle", _secondangle);Debug.locals.put("SecondAngle", _secondangle);
|
||||
BA.debugLineNum = 111;BA.debugLine="DrawHand(centerX, centerY, clockDiameter * 0.4";
|
||||
Debug.ShouldStop(16384);
|
||||
__ref.runClassMethod (b4a.example.analogclock.class, "_drawhand" /*RemoteObject*/ ,(Object)(__ref.getField(true,"_centerx" /*RemoteObject*/ )),(Object)(__ref.getField(true,"_centery" /*RemoteObject*/ )),(Object)(BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {__ref.getField(true,"_clockdiameter" /*RemoteObject*/ ),RemoteObject.createImmutable(0.45)}, "*",0, 0))),(Object)(_secondangle),(Object)(BA.numberCast(float.class, analogclock.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 2))))),(Object)(analogclock.__c.getField(false,"Colors").getField(true,"Red")));
|
||||
BA.debugLineNum = 114;BA.debugLine="pnlClock.Invalidate";
|
||||
Debug.ShouldStop(131072);
|
||||
__ref.getField(false,"_pnlclock" /*RemoteObject*/ ).runVoidMethod ("Invalidate");
|
||||
BA.debugLineNum = 115;BA.debugLine="End Sub";
|
||||
Debug.ShouldStop(262144);
|
||||
return RemoteObject.createImmutable("");
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw Debug.ErrorCaught(e);
|
||||
}
|
||||
finally {
|
||||
Debug.PopSubsStack();
|
||||
}}
|
||||
public static RemoteObject _drawhand(RemoteObject __ref,RemoteObject _x,RemoteObject _y,RemoteObject _length,RemoteObject _angle,RemoteObject _width,RemoteObject _color) throws Exception{
|
||||
try {
|
||||
Debug.PushSubsStack("DrawHand (analogclock) ","analogclock",2,__ref.getField(false, "ba"),__ref,118);
|
||||
if (RapidSub.canDelegate("drawhand")) { return __ref.runUserSub(false, "analogclock","drawhand", __ref, _x, _y, _length, _angle, _width, _color);}
|
||||
RemoteObject _endx = RemoteObject.createImmutable(0f);
|
||||
RemoteObject _endy = RemoteObject.createImmutable(0f);
|
||||
Debug.locals.put("x", _x);
|
||||
Debug.locals.put("y", _y);
|
||||
Debug.locals.put("length", _length);
|
||||
Debug.locals.put("angle", _angle);
|
||||
Debug.locals.put("width", _width);
|
||||
Debug.locals.put("color", _color);
|
||||
BA.debugLineNum = 118;BA.debugLine="Private Sub DrawHand(x As Float, y As Float, lengt";
|
||||
Debug.ShouldStop(2097152);
|
||||
BA.debugLineNum = 119;BA.debugLine="Dim endX As Float = x + length * CosD(angle)";
|
||||
Debug.ShouldStop(4194304);
|
||||
_endx = BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {_x,_length,analogclock.__c.runMethod(true,"CosD",(Object)(BA.numberCast(double.class, _angle)))}, "+*",1, 0));Debug.locals.put("endX", _endx);Debug.locals.put("endX", _endx);
|
||||
BA.debugLineNum = 120;BA.debugLine="Dim endY As Float = y + length * SinD(angle)";
|
||||
Debug.ShouldStop(8388608);
|
||||
_endy = BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {_y,_length,analogclock.__c.runMethod(true,"SinD",(Object)(BA.numberCast(double.class, _angle)))}, "+*",1, 0));Debug.locals.put("endY", _endy);Debug.locals.put("endY", _endy);
|
||||
BA.debugLineNum = 121;BA.debugLine="cvsClock.DrawLine(x, y, endX, endY, color, wid";
|
||||
Debug.ShouldStop(16777216);
|
||||
__ref.getField(false,"_cvsclock" /*RemoteObject*/ ).runVoidMethod ("DrawLine",(Object)(_x),(Object)(_y),(Object)(_endx),(Object)(_endy),(Object)(_color),(Object)(_width));
|
||||
BA.debugLineNum = 122;BA.debugLine="End Sub";
|
||||
Debug.ShouldStop(33554432);
|
||||
return RemoteObject.createImmutable("");
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw Debug.ErrorCaught(e);
|
||||
}
|
||||
finally {
|
||||
Debug.PopSubsStack();
|
||||
}}
|
||||
public static RemoteObject _drawinterval(RemoteObject __ref,RemoteObject _starthour,RemoteObject _startminute,RemoteObject _endhour,RemoteObject _endminute,RemoteObject _color,RemoteObject _radius,RemoteObject _strokewidth) throws Exception{
|
||||
try {
|
||||
Debug.PushSubsStack("DrawInterval (analogclock) ","analogclock",2,__ref.getField(false, "ba"),__ref,174);
|
||||
if (RapidSub.canDelegate("drawinterval")) { return __ref.runUserSub(false, "analogclock","drawinterval", __ref, _starthour, _startminute, _endhour, _endminute, _color, _radius, _strokewidth);}
|
||||
RemoteObject _startangle = RemoteObject.createImmutable(0f);
|
||||
RemoteObject _endangle = RemoteObject.createImmutable(0f);
|
||||
RemoteObject _sweepangle = RemoteObject.createImmutable(0f);
|
||||
RemoteObject _path = RemoteObject.declareNull("anywheresoftware.b4a.objects.B4XCanvas.B4XPath");
|
||||
Debug.locals.put("startHour", _starthour);
|
||||
Debug.locals.put("startMinute", _startminute);
|
||||
Debug.locals.put("endHour", _endhour);
|
||||
Debug.locals.put("endMinute", _endminute);
|
||||
Debug.locals.put("color", _color);
|
||||
Debug.locals.put("radius", _radius);
|
||||
Debug.locals.put("strokeWidth", _strokewidth);
|
||||
BA.debugLineNum = 174;BA.debugLine="Private Sub DrawInterval(startHour As Int, startMi";
|
||||
Debug.ShouldStop(8192);
|
||||
BA.debugLineNum = 175;BA.debugLine="Dim startAngle As Float = (startHour Mod 12 + sta";
|
||||
Debug.ShouldStop(16384);
|
||||
_startangle = BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {(RemoteObject.solve(new RemoteObject[] {_starthour,RemoteObject.createImmutable(12),_startminute,RemoteObject.createImmutable(60)}, "%+/",1, 0)),RemoteObject.createImmutable(30),RemoteObject.createImmutable(90)}, "*-",1, 0));Debug.locals.put("startAngle", _startangle);Debug.locals.put("startAngle", _startangle);
|
||||
BA.debugLineNum = 176;BA.debugLine="Dim endAngle As Float = (endHour Mod 12 + endMinu";
|
||||
Debug.ShouldStop(32768);
|
||||
_endangle = BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {(RemoteObject.solve(new RemoteObject[] {_endhour,RemoteObject.createImmutable(12),_endminute,RemoteObject.createImmutable(60)}, "%+/",1, 0)),RemoteObject.createImmutable(30),RemoteObject.createImmutable(90)}, "*-",1, 0));Debug.locals.put("endAngle", _endangle);Debug.locals.put("endAngle", _endangle);
|
||||
BA.debugLineNum = 177;BA.debugLine="Dim sweepAngle As Float = endAngle - startAngle";
|
||||
Debug.ShouldStop(65536);
|
||||
_sweepangle = BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {_endangle,_startangle}, "-",1, 0));Debug.locals.put("sweepAngle", _sweepangle);Debug.locals.put("sweepAngle", _sweepangle);
|
||||
BA.debugLineNum = 178;BA.debugLine="If sweepAngle < 0 Then sweepAngle = sweepAngle +";
|
||||
Debug.ShouldStop(131072);
|
||||
if (RemoteObject.solveBoolean("<",_sweepangle,BA.numberCast(double.class, 0))) {
|
||||
_sweepangle = BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {_sweepangle,RemoteObject.createImmutable(360)}, "+",1, 0));Debug.locals.put("sweepAngle", _sweepangle);};
|
||||
BA.debugLineNum = 180;BA.debugLine="Dim path As B4XPath";
|
||||
Debug.ShouldStop(524288);
|
||||
_path = RemoteObject.createNew ("anywheresoftware.b4a.objects.B4XCanvas.B4XPath");Debug.locals.put("path", _path);
|
||||
BA.debugLineNum = 181;BA.debugLine="path.InitializeArc(centerX, centerY, radius, star";
|
||||
Debug.ShouldStop(1048576);
|
||||
_path.runVoidMethod ("InitializeArc",(Object)(__ref.getField(true,"_centerx" /*RemoteObject*/ )),(Object)(__ref.getField(true,"_centery" /*RemoteObject*/ )),(Object)(_radius),(Object)(_startangle),(Object)(_sweepangle));
|
||||
BA.debugLineNum = 182;BA.debugLine="cvsClock.DrawPath(path, color, False, strokeWidth";
|
||||
Debug.ShouldStop(2097152);
|
||||
__ref.getField(false,"_cvsclock" /*RemoteObject*/ ).runVoidMethod ("DrawPath",(Object)(_path),(Object)(_color),(Object)(analogclock.__c.getField(true,"False")),(Object)(_strokewidth));
|
||||
BA.debugLineNum = 183;BA.debugLine="End Sub";
|
||||
Debug.ShouldStop(4194304);
|
||||
return RemoteObject.createImmutable("");
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw Debug.ErrorCaught(e);
|
||||
}
|
||||
finally {
|
||||
Debug.PopSubsStack();
|
||||
}}
|
||||
public static RemoteObject _drawticks(RemoteObject __ref) throws Exception{
|
||||
try {
|
||||
Debug.PushSubsStack("DrawTicks (analogclock) ","analogclock",2,__ref.getField(false, "ba"),__ref,124);
|
||||
if (RapidSub.canDelegate("drawticks")) { return __ref.runUserSub(false, "analogclock","drawticks", __ref);}
|
||||
int _i = 0;
|
||||
RemoteObject _angle = RemoteObject.createImmutable(0f);
|
||||
RemoteObject _startx = RemoteObject.createImmutable(0f);
|
||||
RemoteObject _starty = RemoteObject.createImmutable(0f);
|
||||
RemoteObject _endx = RemoteObject.createImmutable(0f);
|
||||
RemoteObject _endy = RemoteObject.createImmutable(0f);
|
||||
BA.debugLineNum = 124;BA.debugLine="Private Sub DrawTicks";
|
||||
Debug.ShouldStop(134217728);
|
||||
BA.debugLineNum = 125;BA.debugLine="For i = 0 To 59";
|
||||
Debug.ShouldStop(268435456);
|
||||
{
|
||||
final int step1 = 1;
|
||||
final int limit1 = 59;
|
||||
_i = 0 ;
|
||||
for (;(step1 > 0 && _i <= limit1) || (step1 < 0 && _i >= limit1) ;_i = ((int)(0 + _i + step1)) ) {
|
||||
Debug.locals.put("i", _i);
|
||||
BA.debugLineNum = 126;BA.debugLine="Dim angle As Float = -90 + i * 6";
|
||||
Debug.ShouldStop(536870912);
|
||||
_angle = BA.numberCast(float.class, -(double) (0 + 90)+(double) (0 + _i)*(double) (0 + 6));Debug.locals.put("angle", _angle);Debug.locals.put("angle", _angle);
|
||||
BA.debugLineNum = 127;BA.debugLine="Dim startX As Float";
|
||||
Debug.ShouldStop(1073741824);
|
||||
_startx = RemoteObject.createImmutable(0f);Debug.locals.put("startX", _startx);
|
||||
BA.debugLineNum = 128;BA.debugLine="Dim startY As Float";
|
||||
Debug.ShouldStop(-2147483648);
|
||||
_starty = RemoteObject.createImmutable(0f);Debug.locals.put("startY", _starty);
|
||||
BA.debugLineNum = 129;BA.debugLine="Dim endX As Float";
|
||||
Debug.ShouldStop(1);
|
||||
_endx = RemoteObject.createImmutable(0f);Debug.locals.put("endX", _endx);
|
||||
BA.debugLineNum = 130;BA.debugLine="Dim endY As Float";
|
||||
Debug.ShouldStop(2);
|
||||
_endy = RemoteObject.createImmutable(0f);Debug.locals.put("endY", _endy);
|
||||
BA.debugLineNum = 131;BA.debugLine="If i Mod 5 = 0 Then";
|
||||
Debug.ShouldStop(4);
|
||||
if (RemoteObject.solveBoolean("=",RemoteObject.solve(new RemoteObject[] {RemoteObject.createImmutable(_i),RemoteObject.createImmutable(5)}, "%",0, 1),BA.numberCast(double.class, 0))) {
|
||||
BA.debugLineNum = 133;BA.debugLine="startX = centerX + (clockDiameter / 2";
|
||||
Debug.ShouldStop(16);
|
||||
_startx = BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {__ref.getField(true,"_centerx" /*RemoteObject*/ ),(RemoteObject.solve(new RemoteObject[] {__ref.getField(true,"_clockdiameter" /*RemoteObject*/ ),RemoteObject.createImmutable(2),analogclock.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 20)))}, "/-",1, 0)),analogclock.__c.runMethod(true,"CosD",(Object)(BA.numberCast(double.class, _angle)))}, "+*",1, 0));Debug.locals.put("startX", _startx);
|
||||
BA.debugLineNum = 134;BA.debugLine="startY = centerY + (clockDiameter / 2";
|
||||
Debug.ShouldStop(32);
|
||||
_starty = BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {__ref.getField(true,"_centery" /*RemoteObject*/ ),(RemoteObject.solve(new RemoteObject[] {__ref.getField(true,"_clockdiameter" /*RemoteObject*/ ),RemoteObject.createImmutable(2),analogclock.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 20)))}, "/-",1, 0)),analogclock.__c.runMethod(true,"SinD",(Object)(BA.numberCast(double.class, _angle)))}, "+*",1, 0));Debug.locals.put("startY", _starty);
|
||||
BA.debugLineNum = 135;BA.debugLine="endX = centerX + (clockDiameter / 2 -";
|
||||
Debug.ShouldStop(64);
|
||||
_endx = BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {__ref.getField(true,"_centerx" /*RemoteObject*/ ),(RemoteObject.solve(new RemoteObject[] {__ref.getField(true,"_clockdiameter" /*RemoteObject*/ ),RemoteObject.createImmutable(2),analogclock.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 5)))}, "/-",1, 0)),analogclock.__c.runMethod(true,"CosD",(Object)(BA.numberCast(double.class, _angle)))}, "+*",1, 0));Debug.locals.put("endX", _endx);
|
||||
BA.debugLineNum = 136;BA.debugLine="endY = centerY + (clockDiameter / 2 -";
|
||||
Debug.ShouldStop(128);
|
||||
_endy = BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {__ref.getField(true,"_centery" /*RemoteObject*/ ),(RemoteObject.solve(new RemoteObject[] {__ref.getField(true,"_clockdiameter" /*RemoteObject*/ ),RemoteObject.createImmutable(2),analogclock.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 5)))}, "/-",1, 0)),analogclock.__c.runMethod(true,"SinD",(Object)(BA.numberCast(double.class, _angle)))}, "+*",1, 0));Debug.locals.put("endY", _endy);
|
||||
BA.debugLineNum = 137;BA.debugLine="cvsClock.DrawLine(startX, startY, endX";
|
||||
Debug.ShouldStop(256);
|
||||
__ref.getField(false,"_cvsclock" /*RemoteObject*/ ).runVoidMethod ("DrawLine",(Object)(_startx),(Object)(_starty),(Object)(_endx),(Object)(_endy),(Object)(analogclock.__c.getField(false,"Colors").getField(true,"Black")),(Object)(__ref.getField(true,"_hourtickstrokewidth" /*RemoteObject*/ )));
|
||||
}else {
|
||||
BA.debugLineNum = 140;BA.debugLine="startX = centerX + (clockDiameter / 2";
|
||||
Debug.ShouldStop(2048);
|
||||
_startx = BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {__ref.getField(true,"_centerx" /*RemoteObject*/ ),(RemoteObject.solve(new RemoteObject[] {__ref.getField(true,"_clockdiameter" /*RemoteObject*/ ),RemoteObject.createImmutable(2),analogclock.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 10)))}, "/-",1, 0)),analogclock.__c.runMethod(true,"CosD",(Object)(BA.numberCast(double.class, _angle)))}, "+*",1, 0));Debug.locals.put("startX", _startx);
|
||||
BA.debugLineNum = 141;BA.debugLine="startY = centerY + (clockDiameter / 2";
|
||||
Debug.ShouldStop(4096);
|
||||
_starty = BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {__ref.getField(true,"_centery" /*RemoteObject*/ ),(RemoteObject.solve(new RemoteObject[] {__ref.getField(true,"_clockdiameter" /*RemoteObject*/ ),RemoteObject.createImmutable(2),analogclock.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 10)))}, "/-",1, 0)),analogclock.__c.runMethod(true,"SinD",(Object)(BA.numberCast(double.class, _angle)))}, "+*",1, 0));Debug.locals.put("startY", _starty);
|
||||
BA.debugLineNum = 142;BA.debugLine="endX = centerX + (clockDiameter / 2 -";
|
||||
Debug.ShouldStop(8192);
|
||||
_endx = BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {__ref.getField(true,"_centerx" /*RemoteObject*/ ),(RemoteObject.solve(new RemoteObject[] {__ref.getField(true,"_clockdiameter" /*RemoteObject*/ ),RemoteObject.createImmutable(2),analogclock.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 5)))}, "/-",1, 0)),analogclock.__c.runMethod(true,"CosD",(Object)(BA.numberCast(double.class, _angle)))}, "+*",1, 0));Debug.locals.put("endX", _endx);
|
||||
BA.debugLineNum = 143;BA.debugLine="endY = centerY + (clockDiameter / 2 -";
|
||||
Debug.ShouldStop(16384);
|
||||
_endy = BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {__ref.getField(true,"_centery" /*RemoteObject*/ ),(RemoteObject.solve(new RemoteObject[] {__ref.getField(true,"_clockdiameter" /*RemoteObject*/ ),RemoteObject.createImmutable(2),analogclock.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 5)))}, "/-",1, 0)),analogclock.__c.runMethod(true,"SinD",(Object)(BA.numberCast(double.class, _angle)))}, "+*",1, 0));Debug.locals.put("endY", _endy);
|
||||
BA.debugLineNum = 144;BA.debugLine="cvsClock.DrawLine(startX, startY, endX";
|
||||
Debug.ShouldStop(32768);
|
||||
__ref.getField(false,"_cvsclock" /*RemoteObject*/ ).runVoidMethod ("DrawLine",(Object)(_startx),(Object)(_starty),(Object)(_endx),(Object)(_endy),(Object)(analogclock.__c.getField(false,"Colors").getField(true,"Black")),(Object)(__ref.getField(true,"_minutetickstrokewidth" /*RemoteObject*/ )));
|
||||
};
|
||||
}
|
||||
}Debug.locals.put("i", _i);
|
||||
;
|
||||
BA.debugLineNum = 147;BA.debugLine="End Sub";
|
||||
Debug.ShouldStop(262144);
|
||||
return RemoteObject.createImmutable("");
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw Debug.ErrorCaught(e);
|
||||
}
|
||||
finally {
|
||||
Debug.PopSubsStack();
|
||||
}}
|
||||
public static RemoteObject _initialize(RemoteObject __ref,RemoteObject _ba,RemoteObject _parentpanel,RemoteObject _percentageofwidth) throws Exception{
|
||||
try {
|
||||
Debug.PushSubsStack("Initialize (analogclock) ","analogclock",2,__ref.getField(false, "ba"),__ref,22);
|
||||
if (RapidSub.canDelegate("initialize")) { return __ref.runUserSub(false, "analogclock","initialize", __ref, _ba, _parentpanel, _percentageofwidth);}
|
||||
__ref.runVoidMethodAndSync("innerInitializeHelper", _ba);
|
||||
RemoteObject _interval = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
|
||||
Debug.locals.put("ba", _ba);
|
||||
Debug.locals.put("ParentPanel", _parentpanel);
|
||||
Debug.locals.put("PercentageOfWidth", _percentageofwidth);
|
||||
BA.debugLineNum = 22;BA.debugLine="Public Sub Initialize(ParentPanel As Panel, Percen";
|
||||
Debug.ShouldStop(2097152);
|
||||
BA.debugLineNum = 23;BA.debugLine="pnlClock = ParentPanel";
|
||||
Debug.ShouldStop(4194304);
|
||||
__ref.setField ("_pnlclock" /*RemoteObject*/ ,_parentpanel);
|
||||
BA.debugLineNum = 24;BA.debugLine="cvsClock.Initialize(pnlClock)";
|
||||
Debug.ShouldStop(8388608);
|
||||
__ref.getField(false,"_cvsclock" /*RemoteObject*/ ).runVoidMethod ("Initialize",RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.B4XViewWrapper"), __ref.getField(false,"_pnlclock" /*RemoteObject*/ ).getObject()));
|
||||
BA.debugLineNum = 25;BA.debugLine="intervals.Initialize";
|
||||
Debug.ShouldStop(16777216);
|
||||
__ref.getField(false,"_intervals" /*RemoteObject*/ ).runVoidMethod ("Initialize");
|
||||
BA.debugLineNum = 26;BA.debugLine="Dim interval As Map";
|
||||
Debug.ShouldStop(33554432);
|
||||
_interval = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");Debug.locals.put("interval", _interval);
|
||||
BA.debugLineNum = 27;BA.debugLine="interval.Initialize";
|
||||
Debug.ShouldStop(67108864);
|
||||
_interval.runVoidMethod ("Initialize");
|
||||
BA.debugLineNum = 28;BA.debugLine="interval.Put(\"startHour\", 8)";
|
||||
Debug.ShouldStop(134217728);
|
||||
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("startHour"))),(Object)(RemoteObject.createImmutable((8))));
|
||||
BA.debugLineNum = 29;BA.debugLine="interval.Put(\"startMinute\", 0)";
|
||||
Debug.ShouldStop(268435456);
|
||||
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("startMinute"))),(Object)(RemoteObject.createImmutable((0))));
|
||||
BA.debugLineNum = 30;BA.debugLine="interval.Put(\"endHour\", 12)";
|
||||
Debug.ShouldStop(536870912);
|
||||
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("endHour"))),(Object)(RemoteObject.createImmutable((12))));
|
||||
BA.debugLineNum = 31;BA.debugLine="interval.Put(\"endMinute\", 0)";
|
||||
Debug.ShouldStop(1073741824);
|
||||
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("endMinute"))),(Object)(RemoteObject.createImmutable((0))));
|
||||
BA.debugLineNum = 32;BA.debugLine="interval.Put(\"color\", Colors.Magenta)";
|
||||
Debug.ShouldStop(-2147483648);
|
||||
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("color"))),(Object)((analogclock.__c.getField(false,"Colors").getField(true,"Magenta"))));
|
||||
BA.debugLineNum = 33;BA.debugLine="interval.Put(\"radius\",(clockDiameter/2 +25dip))";
|
||||
Debug.ShouldStop(1);
|
||||
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("radius"))),(Object)(((RemoteObject.solve(new RemoteObject[] {__ref.getField(true,"_clockdiameter" /*RemoteObject*/ ),RemoteObject.createImmutable(2),analogclock.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 25)))}, "/+",1, 0)))));
|
||||
BA.debugLineNum = 34;BA.debugLine="interval.Put(\"strokeWidth\", 5dip)";
|
||||
Debug.ShouldStop(2);
|
||||
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("strokeWidth"))),(Object)((analogclock.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 5))))));
|
||||
BA.debugLineNum = 35;BA.debugLine="interval.Put(\"period\", \"mattino\")";
|
||||
Debug.ShouldStop(4);
|
||||
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("period"))),(Object)((RemoteObject.createImmutable("mattino"))));
|
||||
BA.debugLineNum = 36;BA.debugLine="intervals.Add(interval)";
|
||||
Debug.ShouldStop(8);
|
||||
__ref.getField(false,"_intervals" /*RemoteObject*/ ).runVoidMethod ("Add",(Object)((_interval.getObject())));
|
||||
BA.debugLineNum = 38;BA.debugLine="interval.Initialize";
|
||||
Debug.ShouldStop(32);
|
||||
_interval.runVoidMethod ("Initialize");
|
||||
BA.debugLineNum = 39;BA.debugLine="interval.Put(\"startHour\", 13)";
|
||||
Debug.ShouldStop(64);
|
||||
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("startHour"))),(Object)(RemoteObject.createImmutable((13))));
|
||||
BA.debugLineNum = 40;BA.debugLine="interval.Put(\"startMinute\", 0)";
|
||||
Debug.ShouldStop(128);
|
||||
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("startMinute"))),(Object)(RemoteObject.createImmutable((0))));
|
||||
BA.debugLineNum = 41;BA.debugLine="interval.Put(\"endHour\", 17)";
|
||||
Debug.ShouldStop(256);
|
||||
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("endHour"))),(Object)(RemoteObject.createImmutable((17))));
|
||||
BA.debugLineNum = 42;BA.debugLine="interval.Put(\"endMinute\", 0)";
|
||||
Debug.ShouldStop(512);
|
||||
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("endMinute"))),(Object)(RemoteObject.createImmutable((0))));
|
||||
BA.debugLineNum = 43;BA.debugLine="interval.Put(\"color\", Colors.Green)";
|
||||
Debug.ShouldStop(1024);
|
||||
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("color"))),(Object)((analogclock.__c.getField(false,"Colors").getField(true,"Green"))));
|
||||
BA.debugLineNum = 44;BA.debugLine="interval.Put(\"radius\", (clockDiameter/2 )+25dip)";
|
||||
Debug.ShouldStop(2048);
|
||||
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("radius"))),(Object)((RemoteObject.solve(new RemoteObject[] {(RemoteObject.solve(new RemoteObject[] {__ref.getField(true,"_clockdiameter" /*RemoteObject*/ ),RemoteObject.createImmutable(2)}, "/",0, 0)),analogclock.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 25)))}, "+",1, 0))));
|
||||
BA.debugLineNum = 45;BA.debugLine="interval.Put(\"strokeWidth\", 5dip)";
|
||||
Debug.ShouldStop(4096);
|
||||
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("strokeWidth"))),(Object)((analogclock.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 5))))));
|
||||
BA.debugLineNum = 46;BA.debugLine="interval.Put(\"period\", \"pomeriggio\")";
|
||||
Debug.ShouldStop(8192);
|
||||
_interval.runVoidMethod ("Put",(Object)(RemoteObject.createImmutable(("period"))),(Object)((RemoteObject.createImmutable("pomeriggio"))));
|
||||
BA.debugLineNum = 47;BA.debugLine="intervals.Add(interval)";
|
||||
Debug.ShouldStop(16384);
|
||||
__ref.getField(false,"_intervals" /*RemoteObject*/ ).runVoidMethod ("Add",(Object)((_interval.getObject())));
|
||||
BA.debugLineNum = 49;BA.debugLine="SetClockSize(PercentageOfWidth)";
|
||||
Debug.ShouldStop(65536);
|
||||
__ref.runClassMethod (b4a.example.analogclock.class, "_setclocksize" /*RemoteObject*/ ,(Object)(_percentageofwidth));
|
||||
BA.debugLineNum = 50;BA.debugLine="End Sub";
|
||||
Debug.ShouldStop(131072);
|
||||
return RemoteObject.createImmutable("");
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw Debug.ErrorCaught(e);
|
||||
}
|
||||
finally {
|
||||
Debug.PopSubsStack();
|
||||
}}
|
||||
public static RemoteObject _setclocksize(RemoteObject __ref,RemoteObject _percentageofwidth) throws Exception{
|
||||
try {
|
||||
Debug.PushSubsStack("SetClockSize (analogclock) ","analogclock",2,__ref.getField(false, "ba"),__ref,53);
|
||||
if (RapidSub.canDelegate("setclocksize")) { return __ref.runUserSub(false, "analogclock","setclocksize", __ref, _percentageofwidth);}
|
||||
Debug.locals.put("PercentageOfWidth", _percentageofwidth);
|
||||
BA.debugLineNum = 53;BA.debugLine="Public Sub SetClockSize(PercentageOfWidth As Float";
|
||||
Debug.ShouldStop(1048576);
|
||||
BA.debugLineNum = 54;BA.debugLine="clockDiameter = pnlClock.Width * PercentageOfW";
|
||||
Debug.ShouldStop(2097152);
|
||||
__ref.setField ("_clockdiameter" /*RemoteObject*/ ,BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {__ref.getField(false,"_pnlclock" /*RemoteObject*/ ).runMethod(true,"getWidth"),_percentageofwidth,RemoteObject.createImmutable(100)}, "*/",0, 0)));
|
||||
BA.debugLineNum = 55;BA.debugLine="centerX = pnlClock.Width / 2";
|
||||
Debug.ShouldStop(4194304);
|
||||
__ref.setField ("_centerx" /*RemoteObject*/ ,BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {__ref.getField(false,"_pnlclock" /*RemoteObject*/ ).runMethod(true,"getWidth"),RemoteObject.createImmutable(2)}, "/",0, 0)));
|
||||
BA.debugLineNum = 56;BA.debugLine="centerY = pnlClock.Height / 2";
|
||||
Debug.ShouldStop(8388608);
|
||||
__ref.setField ("_centery" /*RemoteObject*/ ,BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {__ref.getField(false,"_pnlclock" /*RemoteObject*/ ).runMethod(true,"getHeight"),RemoteObject.createImmutable(2)}, "/",0, 0)));
|
||||
BA.debugLineNum = 57;BA.debugLine="DrawClock";
|
||||
Debug.ShouldStop(16777216);
|
||||
__ref.runClassMethod (b4a.example.analogclock.class, "_drawclock" /*RemoteObject*/ );
|
||||
BA.debugLineNum = 58;BA.debugLine="End Sub";
|
||||
Debug.ShouldStop(33554432);
|
||||
return RemoteObject.createImmutable("");
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw Debug.ErrorCaught(e);
|
||||
}
|
||||
finally {
|
||||
Debug.PopSubsStack();
|
||||
}}
|
||||
public static RemoteObject _setstrokewidths(RemoteObject __ref,RemoteObject _quadrantwidth,RemoteObject _hourtickwidth,RemoteObject _minutetickwidth,RemoteObject _intervalarcwidth,RemoteObject _hourhandwidth,RemoteObject _minutehandwidth) throws Exception{
|
||||
try {
|
||||
Debug.PushSubsStack("SetStrokeWidths (analogclock) ","analogclock",2,__ref.getField(false, "ba"),__ref,61);
|
||||
if (RapidSub.canDelegate("setstrokewidths")) { return __ref.runUserSub(false, "analogclock","setstrokewidths", __ref, _quadrantwidth, _hourtickwidth, _minutetickwidth, _intervalarcwidth, _hourhandwidth, _minutehandwidth);}
|
||||
Debug.locals.put("quadrantWidth", _quadrantwidth);
|
||||
Debug.locals.put("hourTickWidth", _hourtickwidth);
|
||||
Debug.locals.put("minuteTickWidth", _minutetickwidth);
|
||||
Debug.locals.put("intervalArcWidth", _intervalarcwidth);
|
||||
Debug.locals.put("hourHandWidth", _hourhandwidth);
|
||||
Debug.locals.put("minuteHandWidth", _minutehandwidth);
|
||||
BA.debugLineNum = 61;BA.debugLine="Public Sub SetStrokeWidths(quadrantWidth As Float,";
|
||||
Debug.ShouldStop(268435456);
|
||||
BA.debugLineNum = 62;BA.debugLine="quadrantStrokeWidth = quadrantWidth";
|
||||
Debug.ShouldStop(536870912);
|
||||
__ref.setField ("_quadrantstrokewidth" /*RemoteObject*/ ,_quadrantwidth);
|
||||
BA.debugLineNum = 63;BA.debugLine="hourTickStrokeWidth = hourTickWidth";
|
||||
Debug.ShouldStop(1073741824);
|
||||
__ref.setField ("_hourtickstrokewidth" /*RemoteObject*/ ,_hourtickwidth);
|
||||
BA.debugLineNum = 64;BA.debugLine="minuteTickStrokeWidth = minuteTickWidth";
|
||||
Debug.ShouldStop(-2147483648);
|
||||
__ref.setField ("_minutetickstrokewidth" /*RemoteObject*/ ,_minutetickwidth);
|
||||
BA.debugLineNum = 65;BA.debugLine="intervalArcStrokeWidth = intervalArcWidth";
|
||||
Debug.ShouldStop(1);
|
||||
__ref.setField ("_intervalarcstrokewidth" /*RemoteObject*/ ,_intervalarcwidth);
|
||||
BA.debugLineNum = 66;BA.debugLine="hourHandStrokeWidth = hourHandWidth";
|
||||
Debug.ShouldStop(2);
|
||||
__ref.setField ("_hourhandstrokewidth" /*RemoteObject*/ ,_hourhandwidth);
|
||||
BA.debugLineNum = 67;BA.debugLine="minuteHandStrokeWidth = minuteHandWidth";
|
||||
Debug.ShouldStop(4);
|
||||
__ref.setField ("_minutehandstrokewidth" /*RemoteObject*/ ,_minutehandwidth);
|
||||
BA.debugLineNum = 68;BA.debugLine="DrawClock";
|
||||
Debug.ShouldStop(8);
|
||||
__ref.runClassMethod (b4a.example.analogclock.class, "_drawclock" /*RemoteObject*/ );
|
||||
BA.debugLineNum = 69;BA.debugLine="End Sub";
|
||||
Debug.ShouldStop(16);
|
||||
return RemoteObject.createImmutable("");
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw Debug.ErrorCaught(e);
|
||||
}
|
||||
finally {
|
||||
Debug.PopSubsStack();
|
||||
}}
|
||||
public static RemoteObject _startclock(RemoteObject __ref) throws Exception{
|
||||
try {
|
||||
Debug.PushSubsStack("StartClock (analogclock) ","analogclock",2,__ref.getField(false, "ba"),__ref,187);
|
||||
if (RapidSub.canDelegate("startclock")) { return __ref.runUserSub(false, "analogclock","startclock", __ref);}
|
||||
RemoteObject _timer = RemoteObject.declareNull("anywheresoftware.b4a.objects.Timer");
|
||||
BA.debugLineNum = 187;BA.debugLine="Public Sub StartClock";
|
||||
Debug.ShouldStop(67108864);
|
||||
BA.debugLineNum = 188;BA.debugLine="Dim timer As Timer";
|
||||
Debug.ShouldStop(134217728);
|
||||
_timer = RemoteObject.createNew ("anywheresoftware.b4a.objects.Timer");Debug.locals.put("timer", _timer);
|
||||
BA.debugLineNum = 189;BA.debugLine="timer.Initialize(\"timer\", 1000)";
|
||||
Debug.ShouldStop(268435456);
|
||||
_timer.runVoidMethod ("Initialize",__ref.getField(false, "ba"),(Object)(BA.ObjectToString("timer")),(Object)(BA.numberCast(long.class, 1000)));
|
||||
BA.debugLineNum = 190;BA.debugLine="timer.Enabled = True";
|
||||
Debug.ShouldStop(536870912);
|
||||
_timer.runMethod(true,"setEnabled",analogclock.__c.getField(true,"True"));
|
||||
BA.debugLineNum = 191;BA.debugLine="End Sub";
|
||||
Debug.ShouldStop(1073741824);
|
||||
return RemoteObject.createImmutable("");
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw Debug.ErrorCaught(e);
|
||||
}
|
||||
finally {
|
||||
Debug.PopSubsStack();
|
||||
}}
|
||||
public static RemoteObject _timer_tick(RemoteObject __ref) throws Exception{
|
||||
try {
|
||||
Debug.PushSubsStack("timer_Tick (analogclock) ","analogclock",2,__ref.getField(false, "ba"),__ref,194);
|
||||
if (RapidSub.canDelegate("timer_tick")) { return __ref.runUserSub(false, "analogclock","timer_tick", __ref);}
|
||||
BA.debugLineNum = 194;BA.debugLine="Private Sub timer_Tick";
|
||||
Debug.ShouldStop(2);
|
||||
BA.debugLineNum = 195;BA.debugLine="DrawClock";
|
||||
Debug.ShouldStop(4);
|
||||
__ref.runClassMethod (b4a.example.analogclock.class, "_drawclock" /*RemoteObject*/ );
|
||||
BA.debugLineNum = 196;BA.debugLine="End Sub";
|
||||
Debug.ShouldStop(8);
|
||||
return RemoteObject.createImmutable("");
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw Debug.ErrorCaught(e);
|
||||
}
|
||||
finally {
|
||||
Debug.PopSubsStack();
|
||||
}}
|
||||
}
|
||||
75
Objects/shell/src/b4a/example/main.java
Normal file
75
Objects/shell/src/b4a/example/main.java
Normal file
@@ -0,0 +1,75 @@
|
||||
|
||||
package b4a.example;
|
||||
|
||||
import java.io.IOException;
|
||||
import anywheresoftware.b4a.BA;
|
||||
import anywheresoftware.b4a.pc.PCBA;
|
||||
import anywheresoftware.b4a.pc.RDebug;
|
||||
import anywheresoftware.b4a.pc.RemoteObject;
|
||||
import anywheresoftware.b4a.pc.RDebug.IRemote;
|
||||
import anywheresoftware.b4a.pc.Debug;
|
||||
import anywheresoftware.b4a.pc.B4XTypes.B4XClass;
|
||||
import anywheresoftware.b4a.pc.B4XTypes.DeviceClass;
|
||||
|
||||
public class main implements IRemote{
|
||||
public static main mostCurrent;
|
||||
public static RemoteObject processBA;
|
||||
public static boolean processGlobalsRun;
|
||||
public static RemoteObject myClass;
|
||||
public static RemoteObject remoteMe;
|
||||
public main() {
|
||||
mostCurrent = this;
|
||||
}
|
||||
public RemoteObject getRemoteMe() {
|
||||
return remoteMe;
|
||||
}
|
||||
|
||||
public static void main (String[] args) throws Exception {
|
||||
new RDebug(args[0], Integer.parseInt(args[1]), Integer.parseInt(args[2]), args[3]);
|
||||
RDebug.INSTANCE.waitForTask();
|
||||
|
||||
}
|
||||
static {
|
||||
anywheresoftware.b4a.pc.RapidSub.moduleToObject.put(new B4XClass("main"), "b4a.example.main");
|
||||
}
|
||||
|
||||
public boolean isSingleton() {
|
||||
return true;
|
||||
}
|
||||
public static RemoteObject getObject() {
|
||||
return myClass;
|
||||
}
|
||||
|
||||
public RemoteObject activityBA;
|
||||
public RemoteObject _activity;
|
||||
private PCBA pcBA;
|
||||
|
||||
public PCBA create(Object[] args) throws ClassNotFoundException{
|
||||
processBA = (RemoteObject) args[1];
|
||||
activityBA = (RemoteObject) args[2];
|
||||
_activity = (RemoteObject) args[3];
|
||||
anywheresoftware.b4a.keywords.Common.Density = (Float)args[4];
|
||||
remoteMe = (RemoteObject) args[5];
|
||||
pcBA = new PCBA(this, main.class);
|
||||
main_subs_0.initializeProcessGlobals();
|
||||
return pcBA;
|
||||
}
|
||||
public static RemoteObject __c = RemoteObject.declareNull("anywheresoftware.b4a.keywords.Common");
|
||||
public static RemoteObject _timer1 = RemoteObject.declareNull("anywheresoftware.b4a.objects.Timer");
|
||||
public static RemoteObject _running = RemoteObject.createImmutable(false);
|
||||
public static RemoteObject _starttime = RemoteObject.createImmutable(0L);
|
||||
public static RemoteObject _elapsedtime = RemoteObject.createImmutable(0L);
|
||||
public static RemoteObject _canvas1 = RemoteObject.declareNull("anywheresoftware.b4a.objects.drawable.CanvasWrapper");
|
||||
public static RemoteObject _panel1 = RemoteObject.declareNull("anywheresoftware.b4a.objects.PanelWrapper");
|
||||
public static RemoteObject _btnstart = RemoteObject.declareNull("anywheresoftware.b4a.objects.ButtonWrapper");
|
||||
public static RemoteObject _btnpause = RemoteObject.declareNull("anywheresoftware.b4a.objects.ButtonWrapper");
|
||||
public static RemoteObject _btnreset = RemoteObject.declareNull("anywheresoftware.b4a.objects.ButtonWrapper");
|
||||
public static RemoteObject _btnsync = RemoteObject.declareNull("anywheresoftware.b4a.objects.ButtonWrapper");
|
||||
public static RemoteObject _lblelapsedtime = RemoteObject.declareNull("anywheresoftware.b4a.objects.LabelWrapper");
|
||||
public static RemoteObject _pnlclock = RemoteObject.declareNull("anywheresoftware.b4a.objects.PanelWrapper");
|
||||
public static RemoteObject _myclock = RemoteObject.declareNull("b4a.example.analogclock");
|
||||
public static b4a.example.starter _starter = null;
|
||||
public Object[] GetGlobals() {
|
||||
return new Object[] {"Activity",main.mostCurrent._activity,"BtnPause",main.mostCurrent._btnpause,"BtnReset",main.mostCurrent._btnreset,"BtnStart",main.mostCurrent._btnstart,"BtnSync",main.mostCurrent._btnsync,"Canvas1",main.mostCurrent._canvas1,"ElapsedTime",main._elapsedtime,"lblElapsedTime",main.mostCurrent._lblelapsedtime,"myClock",main.mostCurrent._myclock,"Panel1",main.mostCurrent._panel1,"pnlClock",main.mostCurrent._pnlclock,"Running",main._running,"Starter",Debug.moduleToString(b4a.example.starter.class),"StartTime",main._starttime,"Timer1",main._timer1};
|
||||
}
|
||||
}
|
||||
408
Objects/shell/src/b4a/example/main_subs_0.java
Normal file
408
Objects/shell/src/b4a/example/main_subs_0.java
Normal file
@@ -0,0 +1,408 @@
|
||||
package b4a.example;
|
||||
|
||||
import anywheresoftware.b4a.BA;
|
||||
import anywheresoftware.b4a.pc.*;
|
||||
|
||||
public class main_subs_0 {
|
||||
|
||||
|
||||
public static RemoteObject _activity_create(RemoteObject _firsttime) throws Exception{
|
||||
try {
|
||||
Debug.PushSubsStack("Activity_Create (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,48);
|
||||
if (RapidSub.canDelegate("activity_create")) { return b4a.example.main.remoteMe.runUserSub(false, "main","activity_create", _firsttime);}
|
||||
Debug.locals.put("FirstTime", _firsttime);
|
||||
BA.debugLineNum = 48;BA.debugLine="Sub Activity_Create(FirstTime As Boolean)";
|
||||
Debug.ShouldStop(32768);
|
||||
BA.debugLineNum = 49;BA.debugLine="Activity.LoadLayout(\"Main_Layout\")";
|
||||
Debug.ShouldStop(65536);
|
||||
main.mostCurrent._activity.runMethodAndSync(false,"LoadLayout",(Object)(RemoteObject.createImmutable("Main_Layout")),main.mostCurrent.activityBA);
|
||||
BA.debugLineNum = 50;BA.debugLine="Log(\"Layout caricato correttamente.\")";
|
||||
Debug.ShouldStop(131072);
|
||||
main.mostCurrent.__c.runVoidMethod ("LogImpl","3131074",RemoteObject.createImmutable("Layout caricato correttamente."),0);
|
||||
BA.debugLineNum = 53;BA.debugLine="myClock.Initialize(pnlClock, 50) ' L'orologio avr";
|
||||
Debug.ShouldStop(1048576);
|
||||
main.mostCurrent._myclock.runClassMethod (b4a.example.analogclock.class, "_initialize" /*RemoteObject*/ ,main.mostCurrent.activityBA,(Object)(main.mostCurrent._pnlclock),(Object)(BA.numberCast(float.class, 50)));
|
||||
BA.debugLineNum = 56;BA.debugLine="Timer1.Initialize(\"Timer1\", 1000) ' Aggiornamento";
|
||||
Debug.ShouldStop(8388608);
|
||||
main._timer1.runVoidMethod ("Initialize",main.processBA,(Object)(BA.ObjectToString("Timer1")),(Object)(BA.numberCast(long.class, 1000)));
|
||||
BA.debugLineNum = 57;BA.debugLine="Timer1.Enabled = True";
|
||||
Debug.ShouldStop(16777216);
|
||||
main._timer1.runMethod(true,"setEnabled",main.mostCurrent.__c.getField(true,"True"));
|
||||
BA.debugLineNum = 73;BA.debugLine="End Sub";
|
||||
Debug.ShouldStop(256);
|
||||
return RemoteObject.createImmutable("");
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw Debug.ErrorCaught(e);
|
||||
}
|
||||
finally {
|
||||
Debug.PopSubsStack();
|
||||
}}
|
||||
public static RemoteObject _activity_pause(RemoteObject _userclosed) throws Exception{
|
||||
try {
|
||||
Debug.PushSubsStack("Activity_Pause (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,86);
|
||||
if (RapidSub.canDelegate("activity_pause")) { return b4a.example.main.remoteMe.runUserSub(false, "main","activity_pause", _userclosed);}
|
||||
Debug.locals.put("UserClosed", _userclosed);
|
||||
BA.debugLineNum = 86;BA.debugLine="Sub Activity_Pause (UserClosed As Boolean)";
|
||||
Debug.ShouldStop(2097152);
|
||||
BA.debugLineNum = 88;BA.debugLine="End Sub";
|
||||
Debug.ShouldStop(8388608);
|
||||
return RemoteObject.createImmutable("");
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw Debug.ErrorCaught(e);
|
||||
}
|
||||
finally {
|
||||
Debug.PopSubsStack();
|
||||
}}
|
||||
public static RemoteObject _activity_resume() throws Exception{
|
||||
try {
|
||||
Debug.PushSubsStack("Activity_Resume (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,82);
|
||||
if (RapidSub.canDelegate("activity_resume")) { return b4a.example.main.remoteMe.runUserSub(false, "main","activity_resume");}
|
||||
BA.debugLineNum = 82;BA.debugLine="Sub Activity_Resume";
|
||||
Debug.ShouldStop(131072);
|
||||
BA.debugLineNum = 84;BA.debugLine="End Sub";
|
||||
Debug.ShouldStop(524288);
|
||||
return RemoteObject.createImmutable("");
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw Debug.ErrorCaught(e);
|
||||
}
|
||||
finally {
|
||||
Debug.PopSubsStack();
|
||||
}}
|
||||
public static RemoteObject _btnpause_click() throws Exception{
|
||||
try {
|
||||
Debug.PushSubsStack("BtnPause_Click (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,169);
|
||||
if (RapidSub.canDelegate("btnpause_click")) { return b4a.example.main.remoteMe.runUserSub(false, "main","btnpause_click");}
|
||||
BA.debugLineNum = 169;BA.debugLine="Sub BtnPause_Click";
|
||||
Debug.ShouldStop(256);
|
||||
BA.debugLineNum = 170;BA.debugLine="Running = False";
|
||||
Debug.ShouldStop(512);
|
||||
main._running = main.mostCurrent.__c.getField(true,"False");
|
||||
BA.debugLineNum = 171;BA.debugLine="End Sub";
|
||||
Debug.ShouldStop(1024);
|
||||
return RemoteObject.createImmutable("");
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw Debug.ErrorCaught(e);
|
||||
}
|
||||
finally {
|
||||
Debug.PopSubsStack();
|
||||
}}
|
||||
public static RemoteObject _btnreset_click() throws Exception{
|
||||
try {
|
||||
Debug.PushSubsStack("BtnReset_Click (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,174);
|
||||
if (RapidSub.canDelegate("btnreset_click")) { return b4a.example.main.remoteMe.runUserSub(false, "main","btnreset_click");}
|
||||
BA.debugLineNum = 174;BA.debugLine="Sub BtnReset_Click";
|
||||
Debug.ShouldStop(8192);
|
||||
BA.debugLineNum = 175;BA.debugLine="Running = False";
|
||||
Debug.ShouldStop(16384);
|
||||
main._running = main.mostCurrent.__c.getField(true,"False");
|
||||
BA.debugLineNum = 176;BA.debugLine="ElapsedTime = 0";
|
||||
Debug.ShouldStop(32768);
|
||||
main._elapsedtime = BA.numberCast(long.class, 0);
|
||||
BA.debugLineNum = 177;BA.debugLine="lblElapsedTime.Text = \"Tempo: 00:00:00\"";
|
||||
Debug.ShouldStop(65536);
|
||||
main.mostCurrent._lblelapsedtime.runMethod(true,"setText",BA.ObjectToCharSequence("Tempo: 00:00:00"));
|
||||
BA.debugLineNum = 178;BA.debugLine="End Sub";
|
||||
Debug.ShouldStop(131072);
|
||||
return RemoteObject.createImmutable("");
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw Debug.ErrorCaught(e);
|
||||
}
|
||||
finally {
|
||||
Debug.PopSubsStack();
|
||||
}}
|
||||
public static RemoteObject _btnstart_click() throws Exception{
|
||||
try {
|
||||
Debug.PushSubsStack("BtnStart_Click (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,157);
|
||||
if (RapidSub.canDelegate("btnstart_click")) { return b4a.example.main.remoteMe.runUserSub(false, "main","btnstart_click");}
|
||||
BA.debugLineNum = 157;BA.debugLine="Sub BtnStart_Click";
|
||||
Debug.ShouldStop(268435456);
|
||||
BA.debugLineNum = 158;BA.debugLine="If Not(Running) Then";
|
||||
Debug.ShouldStop(536870912);
|
||||
if (main.mostCurrent.__c.runMethod(true,"Not",(Object)(main._running)).<Boolean>get().booleanValue()) {
|
||||
BA.debugLineNum = 159;BA.debugLine="Running = True";
|
||||
Debug.ShouldStop(1073741824);
|
||||
main._running = main.mostCurrent.__c.getField(true,"True");
|
||||
BA.debugLineNum = 161;BA.debugLine="Timer1.Initialize(\"Timer1\",1000)";
|
||||
Debug.ShouldStop(1);
|
||||
main._timer1.runVoidMethod ("Initialize",main.processBA,(Object)(BA.ObjectToString("Timer1")),(Object)(BA.numberCast(long.class, 1000)));
|
||||
BA.debugLineNum = 163;BA.debugLine="Timer1.Enabled = True";
|
||||
Debug.ShouldStop(4);
|
||||
main._timer1.runMethod(true,"setEnabled",main.mostCurrent.__c.getField(true,"True"));
|
||||
BA.debugLineNum = 164;BA.debugLine="StartTime = DateTime.Now - ElapsedTime";
|
||||
Debug.ShouldStop(8);
|
||||
main._starttime = RemoteObject.solve(new RemoteObject[] {main.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"getNow"),main._elapsedtime}, "-",1, 2);
|
||||
};
|
||||
BA.debugLineNum = 166;BA.debugLine="End Sub";
|
||||
Debug.ShouldStop(32);
|
||||
return RemoteObject.createImmutable("");
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw Debug.ErrorCaught(e);
|
||||
}
|
||||
finally {
|
||||
Debug.PopSubsStack();
|
||||
}}
|
||||
public static RemoteObject _btnsync_click() throws Exception{
|
||||
try {
|
||||
Debug.PushSubsStack("BtnSync_Click (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,181);
|
||||
if (RapidSub.canDelegate("btnsync_click")) { return b4a.example.main.remoteMe.runUserSub(false, "main","btnsync_click");}
|
||||
BA.debugLineNum = 181;BA.debugLine="Sub BtnSync_Click";
|
||||
Debug.ShouldStop(1048576);
|
||||
BA.debugLineNum = 182;BA.debugLine="SynchronizeClock";
|
||||
Debug.ShouldStop(2097152);
|
||||
_synchronizeclock();
|
||||
BA.debugLineNum = 183;BA.debugLine="End Sub";
|
||||
Debug.ShouldStop(4194304);
|
||||
return RemoteObject.createImmutable("");
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw Debug.ErrorCaught(e);
|
||||
}
|
||||
finally {
|
||||
Debug.PopSubsStack();
|
||||
}}
|
||||
public static RemoteObject _drawclock() throws Exception{
|
||||
try {
|
||||
Debug.PushSubsStack("DrawClock (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,91);
|
||||
if (RapidSub.canDelegate("drawclock")) { return b4a.example.main.remoteMe.runUserSub(false, "main","drawclock");}
|
||||
RemoteObject _now = RemoteObject.createImmutable(0L);
|
||||
RemoteObject _hours = RemoteObject.createImmutable(0);
|
||||
RemoteObject _minutes = RemoteObject.createImmutable(0);
|
||||
RemoteObject _seconds = RemoteObject.createImmutable(0);
|
||||
RemoteObject _x = RemoteObject.createImmutable(0);
|
||||
RemoteObject _y = RemoteObject.createImmutable(0);
|
||||
RemoteObject _radius = RemoteObject.createImmutable(0);
|
||||
RemoteObject _hourangle = RemoteObject.createImmutable(0f);
|
||||
RemoteObject _minuteangle = RemoteObject.createImmutable(0f);
|
||||
RemoteObject _secondangle = RemoteObject.createImmutable(0f);
|
||||
BA.debugLineNum = 91;BA.debugLine="Sub DrawClock";
|
||||
Debug.ShouldStop(67108864);
|
||||
BA.debugLineNum = 92;BA.debugLine="Canvas1.Initialize(Activity)";
|
||||
Debug.ShouldStop(134217728);
|
||||
main.mostCurrent._canvas1.runVoidMethod ("Initialize",(Object)((main.mostCurrent._activity.getObject())));
|
||||
BA.debugLineNum = 93;BA.debugLine="Dim now As Long = DateTime.Now";
|
||||
Debug.ShouldStop(268435456);
|
||||
_now = main.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"getNow");Debug.locals.put("now", _now);Debug.locals.put("now", _now);
|
||||
BA.debugLineNum = 94;BA.debugLine="Dim Hours As Int = DateTime.GetHour(now) Mod 1";
|
||||
Debug.ShouldStop(536870912);
|
||||
_hours = RemoteObject.solve(new RemoteObject[] {main.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"GetHour",(Object)(_now)),RemoteObject.createImmutable(12)}, "%",0, 1);Debug.locals.put("Hours", _hours);Debug.locals.put("Hours", _hours);
|
||||
BA.debugLineNum = 95;BA.debugLine="Dim Minutes As Int = DateTime.GetMinute(now)";
|
||||
Debug.ShouldStop(1073741824);
|
||||
_minutes = main.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"GetMinute",(Object)(_now));Debug.locals.put("Minutes", _minutes);Debug.locals.put("Minutes", _minutes);
|
||||
BA.debugLineNum = 96;BA.debugLine="Dim Seconds As Int = DateTime.GetSecond(now)";
|
||||
Debug.ShouldStop(-2147483648);
|
||||
_seconds = main.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"GetSecond",(Object)(_now));Debug.locals.put("Seconds", _seconds);Debug.locals.put("Seconds", _seconds);
|
||||
BA.debugLineNum = 99;BA.debugLine="Dim x As Int = Activity.Width / 2";
|
||||
Debug.ShouldStop(4);
|
||||
_x = BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {main.mostCurrent._activity.runMethod(true,"getWidth"),RemoteObject.createImmutable(2)}, "/",0, 0));Debug.locals.put("x", _x);Debug.locals.put("x", _x);
|
||||
BA.debugLineNum = 100;BA.debugLine="Dim y As Int = Activity.Height / 2";
|
||||
Debug.ShouldStop(8);
|
||||
_y = BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {main.mostCurrent._activity.runMethod(true,"getHeight"),RemoteObject.createImmutable(2)}, "/",0, 0));Debug.locals.put("y", _y);Debug.locals.put("y", _y);
|
||||
BA.debugLineNum = 101;BA.debugLine="Dim Radius As Int = Min(x, y) - 10";
|
||||
Debug.ShouldStop(16);
|
||||
_radius = BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {main.mostCurrent.__c.runMethod(true,"Min",(Object)(BA.numberCast(double.class, _x)),(Object)(BA.numberCast(double.class, _y))),RemoteObject.createImmutable(10)}, "-",1, 0));Debug.locals.put("Radius", _radius);Debug.locals.put("Radius", _radius);
|
||||
BA.debugLineNum = 104;BA.debugLine="Canvas1.DrawColor(Colors.White)";
|
||||
Debug.ShouldStop(128);
|
||||
main.mostCurrent._canvas1.runVoidMethod ("DrawColor",(Object)(main.mostCurrent.__c.getField(false,"Colors").getField(true,"White")));
|
||||
BA.debugLineNum = 107;BA.debugLine="Canvas1.DrawCircle(x, y, Radius, Colors.Black,";
|
||||
Debug.ShouldStop(1024);
|
||||
main.mostCurrent._canvas1.runVoidMethod ("DrawCircle",(Object)(BA.numberCast(float.class, _x)),(Object)(BA.numberCast(float.class, _y)),(Object)(BA.numberCast(float.class, _radius)),(Object)(main.mostCurrent.__c.getField(false,"Colors").getField(true,"Black")),(Object)(main.mostCurrent.__c.getField(true,"False")),(Object)(BA.numberCast(float.class, 5)));
|
||||
BA.debugLineNum = 110;BA.debugLine="Dim HourAngle As Float = -90 + Hours * 30 + Mi";
|
||||
Debug.ShouldStop(8192);
|
||||
_hourangle = BA.numberCast(float.class, -(double) (0 + 90)+(double) (0 + _hours.<Integer>get().intValue())*(double) (0 + 30)+(double) (0 + _minutes.<Integer>get().intValue())/(double)(double) (0 + 2));Debug.locals.put("HourAngle", _hourangle);Debug.locals.put("HourAngle", _hourangle);
|
||||
BA.debugLineNum = 111;BA.debugLine="DrawHand(x, y, Radius * 0.5, HourAngle, 8, Col";
|
||||
Debug.ShouldStop(16384);
|
||||
_drawhand(_x,_y,BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {_radius,RemoteObject.createImmutable(0.5)}, "*",0, 0)),_hourangle,BA.numberCast(int.class, 8),main.mostCurrent.__c.getField(false,"Colors").getField(true,"Black"));
|
||||
BA.debugLineNum = 114;BA.debugLine="Dim MinuteAngle As Float = -90 + Minutes * 6";
|
||||
Debug.ShouldStop(131072);
|
||||
_minuteangle = BA.numberCast(float.class, -(double) (0 + 90)+(double) (0 + _minutes.<Integer>get().intValue())*(double) (0 + 6));Debug.locals.put("MinuteAngle", _minuteangle);Debug.locals.put("MinuteAngle", _minuteangle);
|
||||
BA.debugLineNum = 115;BA.debugLine="DrawHand(x, y, Radius * 0.7, MinuteAngle, 5, C";
|
||||
Debug.ShouldStop(262144);
|
||||
_drawhand(_x,_y,BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {_radius,RemoteObject.createImmutable(0.7)}, "*",0, 0)),_minuteangle,BA.numberCast(int.class, 5),main.mostCurrent.__c.getField(false,"Colors").getField(true,"Blue"));
|
||||
BA.debugLineNum = 118;BA.debugLine="Dim SecondAngle As Float = -90 + Seconds * 6";
|
||||
Debug.ShouldStop(2097152);
|
||||
_secondangle = BA.numberCast(float.class, -(double) (0 + 90)+(double) (0 + _seconds.<Integer>get().intValue())*(double) (0 + 6));Debug.locals.put("SecondAngle", _secondangle);Debug.locals.put("SecondAngle", _secondangle);
|
||||
BA.debugLineNum = 119;BA.debugLine="DrawHand(x, y, Radius * 0.9, SecondAngle, 2, C";
|
||||
Debug.ShouldStop(4194304);
|
||||
_drawhand(_x,_y,BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {_radius,RemoteObject.createImmutable(0.9)}, "*",0, 0)),_secondangle,BA.numberCast(int.class, 2),main.mostCurrent.__c.getField(false,"Colors").getField(true,"Red"));
|
||||
BA.debugLineNum = 120;BA.debugLine="End Sub";
|
||||
Debug.ShouldStop(8388608);
|
||||
return RemoteObject.createImmutable("");
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw Debug.ErrorCaught(e);
|
||||
}
|
||||
finally {
|
||||
Debug.PopSubsStack();
|
||||
}}
|
||||
public static RemoteObject _drawhand(RemoteObject _x,RemoteObject _y,RemoteObject _length,RemoteObject _angle,RemoteObject _width,RemoteObject _color) throws Exception{
|
||||
try {
|
||||
Debug.PushSubsStack("DrawHand (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,122);
|
||||
if (RapidSub.canDelegate("drawhand")) { return b4a.example.main.remoteMe.runUserSub(false, "main","drawhand", _x, _y, _length, _angle, _width, _color);}
|
||||
RemoteObject _endx = RemoteObject.createImmutable(0f);
|
||||
RemoteObject _endy = RemoteObject.createImmutable(0f);
|
||||
Debug.locals.put("x", _x);
|
||||
Debug.locals.put("y", _y);
|
||||
Debug.locals.put("length", _length);
|
||||
Debug.locals.put("angle", _angle);
|
||||
Debug.locals.put("width", _width);
|
||||
Debug.locals.put("color", _color);
|
||||
BA.debugLineNum = 122;BA.debugLine="Sub DrawHand(x As Int, y As Int, length As Float,";
|
||||
Debug.ShouldStop(33554432);
|
||||
BA.debugLineNum = 123;BA.debugLine="Dim endX As Float = x + length * CosD(angle)";
|
||||
Debug.ShouldStop(67108864);
|
||||
_endx = BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {_x,_length,main.mostCurrent.__c.runMethod(true,"CosD",(Object)(BA.numberCast(double.class, _angle)))}, "+*",1, 0));Debug.locals.put("endX", _endx);Debug.locals.put("endX", _endx);
|
||||
BA.debugLineNum = 124;BA.debugLine="Dim endY As Float = y + length * SinD(angle)";
|
||||
Debug.ShouldStop(134217728);
|
||||
_endy = BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {_y,_length,main.mostCurrent.__c.runMethod(true,"SinD",(Object)(BA.numberCast(double.class, _angle)))}, "+*",1, 0));Debug.locals.put("endY", _endy);Debug.locals.put("endY", _endy);
|
||||
BA.debugLineNum = 125;BA.debugLine="Canvas1.DrawLine(x, y, endX, endY, color, widt";
|
||||
Debug.ShouldStop(268435456);
|
||||
main.mostCurrent._canvas1.runVoidMethod ("DrawLine",(Object)(BA.numberCast(float.class, _x)),(Object)(BA.numberCast(float.class, _y)),(Object)(_endx),(Object)(_endy),(Object)(_color),(Object)(BA.numberCast(float.class, _width)));
|
||||
BA.debugLineNum = 126;BA.debugLine="End Sub";
|
||||
Debug.ShouldStop(536870912);
|
||||
return RemoteObject.createImmutable("");
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw Debug.ErrorCaught(e);
|
||||
}
|
||||
finally {
|
||||
Debug.PopSubsStack();
|
||||
}}
|
||||
public static RemoteObject _formatelapsedtime(RemoteObject _ms) throws Exception{
|
||||
try {
|
||||
Debug.PushSubsStack("FormatElapsedTime (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,147);
|
||||
if (RapidSub.canDelegate("formatelapsedtime")) { return b4a.example.main.remoteMe.runUserSub(false, "main","formatelapsedtime", _ms);}
|
||||
RemoteObject _seconds = RemoteObject.createImmutable(0);
|
||||
RemoteObject _minutes = RemoteObject.createImmutable(0);
|
||||
RemoteObject _hours = RemoteObject.createImmutable(0);
|
||||
Debug.locals.put("ms", _ms);
|
||||
BA.debugLineNum = 147;BA.debugLine="Sub FormatElapsedTime(ms As Long) As String";
|
||||
Debug.ShouldStop(262144);
|
||||
BA.debugLineNum = 148;BA.debugLine="Dim seconds As Int = ms / 1000";
|
||||
Debug.ShouldStop(524288);
|
||||
_seconds = BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {_ms,RemoteObject.createImmutable(1000)}, "/",0, 0));Debug.locals.put("seconds", _seconds);Debug.locals.put("seconds", _seconds);
|
||||
BA.debugLineNum = 149;BA.debugLine="Dim minutes As Int = seconds / 60";
|
||||
Debug.ShouldStop(1048576);
|
||||
_minutes = BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {_seconds,RemoteObject.createImmutable(60)}, "/",0, 0));Debug.locals.put("minutes", _minutes);Debug.locals.put("minutes", _minutes);
|
||||
BA.debugLineNum = 150;BA.debugLine="Dim hours As Int = minutes / 60";
|
||||
Debug.ShouldStop(2097152);
|
||||
_hours = BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {_minutes,RemoteObject.createImmutable(60)}, "/",0, 0));Debug.locals.put("hours", _hours);Debug.locals.put("hours", _hours);
|
||||
BA.debugLineNum = 151;BA.debugLine="seconds = seconds Mod 60";
|
||||
Debug.ShouldStop(4194304);
|
||||
_seconds = RemoteObject.solve(new RemoteObject[] {_seconds,RemoteObject.createImmutable(60)}, "%",0, 1);Debug.locals.put("seconds", _seconds);
|
||||
BA.debugLineNum = 152;BA.debugLine="minutes = minutes Mod 60";
|
||||
Debug.ShouldStop(8388608);
|
||||
_minutes = RemoteObject.solve(new RemoteObject[] {_minutes,RemoteObject.createImmutable(60)}, "%",0, 1);Debug.locals.put("minutes", _minutes);
|
||||
BA.debugLineNum = 153;BA.debugLine="Return NumberFormat(hours, 2, 0) & \":\" & Numbe";
|
||||
Debug.ShouldStop(16777216);
|
||||
if (true) return RemoteObject.concat(main.mostCurrent.__c.runMethod(true,"NumberFormat",(Object)(BA.numberCast(double.class, _hours)),(Object)(BA.numberCast(int.class, 2)),(Object)(BA.numberCast(int.class, 0))),RemoteObject.createImmutable(":"),main.mostCurrent.__c.runMethod(true,"NumberFormat",(Object)(BA.numberCast(double.class, _minutes)),(Object)(BA.numberCast(int.class, 2)),(Object)(BA.numberCast(int.class, 0))),RemoteObject.createImmutable(":"),main.mostCurrent.__c.runMethod(true,"NumberFormat",(Object)(BA.numberCast(double.class, _seconds)),(Object)(BA.numberCast(int.class, 2)),(Object)(BA.numberCast(int.class, 0))));
|
||||
BA.debugLineNum = 154;BA.debugLine="End Sub";
|
||||
Debug.ShouldStop(33554432);
|
||||
return RemoteObject.createImmutable("");
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw Debug.ErrorCaught(e);
|
||||
}
|
||||
finally {
|
||||
Debug.PopSubsStack();
|
||||
}}
|
||||
public static RemoteObject _globals() throws Exception{
|
||||
//BA.debugLineNum = 21;BA.debugLine="Sub Globals";
|
||||
//BA.debugLineNum = 22;BA.debugLine="Private Canvas1 As Canvas";
|
||||
main.mostCurrent._canvas1 = RemoteObject.createNew ("anywheresoftware.b4a.objects.drawable.CanvasWrapper");
|
||||
//BA.debugLineNum = 23;BA.debugLine="Private Panel1 As Panel";
|
||||
main.mostCurrent._panel1 = RemoteObject.createNew ("anywheresoftware.b4a.objects.PanelWrapper");
|
||||
//BA.debugLineNum = 24;BA.debugLine="Private BtnStart As Button";
|
||||
main.mostCurrent._btnstart = RemoteObject.createNew ("anywheresoftware.b4a.objects.ButtonWrapper");
|
||||
//BA.debugLineNum = 25;BA.debugLine="Private BtnPause As Button";
|
||||
main.mostCurrent._btnpause = RemoteObject.createNew ("anywheresoftware.b4a.objects.ButtonWrapper");
|
||||
//BA.debugLineNum = 26;BA.debugLine="Private BtnReset As Button";
|
||||
main.mostCurrent._btnreset = RemoteObject.createNew ("anywheresoftware.b4a.objects.ButtonWrapper");
|
||||
//BA.debugLineNum = 27;BA.debugLine="Private BtnSync As Button";
|
||||
main.mostCurrent._btnsync = RemoteObject.createNew ("anywheresoftware.b4a.objects.ButtonWrapper");
|
||||
//BA.debugLineNum = 29;BA.debugLine="Private lblElapsedTime As Label";
|
||||
main.mostCurrent._lblelapsedtime = RemoteObject.createNew ("anywheresoftware.b4a.objects.LabelWrapper");
|
||||
//BA.debugLineNum = 30;BA.debugLine="Private pnlClock As Panel";
|
||||
main.mostCurrent._pnlclock = RemoteObject.createNew ("anywheresoftware.b4a.objects.PanelWrapper");
|
||||
//BA.debugLineNum = 31;BA.debugLine="Private Timer1 As Timer";
|
||||
main._timer1 = RemoteObject.createNew ("anywheresoftware.b4a.objects.Timer");
|
||||
//BA.debugLineNum = 32;BA.debugLine="Private myClock As AnalogClock";
|
||||
main.mostCurrent._myclock = RemoteObject.createNew ("b4a.example.analogclock");
|
||||
//BA.debugLineNum = 33;BA.debugLine="Log(\"lblElapsedTime nel Sub Globals: \" & lblElaps";
|
||||
main.mostCurrent.__c.runVoidMethod ("LogImpl","365548",RemoteObject.concat(RemoteObject.createImmutable("lblElapsedTime nel Sub Globals: "),main.mostCurrent._lblelapsedtime.runMethod(true,"IsInitialized")),0);
|
||||
//BA.debugLineNum = 34;BA.debugLine="End Sub";
|
||||
return RemoteObject.createImmutable("");
|
||||
}
|
||||
|
||||
public static void initializeProcessGlobals() {
|
||||
|
||||
if (main.processGlobalsRun == false) {
|
||||
main.processGlobalsRun = true;
|
||||
try {
|
||||
main_subs_0._process_globals();
|
||||
starter_subs_0._process_globals();
|
||||
main.myClass = BA.getDeviceClass ("b4a.example.main");
|
||||
starter.myClass = BA.getDeviceClass ("b4a.example.starter");
|
||||
analogclock.myClass = BA.getDeviceClass ("b4a.example.analogclock");
|
||||
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}public static RemoteObject _process_globals() throws Exception{
|
||||
//BA.debugLineNum = 13;BA.debugLine="Sub Process_Globals";
|
||||
//BA.debugLineNum = 14;BA.debugLine="Private Timer1 As Timer";
|
||||
main._timer1 = RemoteObject.createNew ("anywheresoftware.b4a.objects.Timer");
|
||||
//BA.debugLineNum = 15;BA.debugLine="Private Running As Boolean = False";
|
||||
main._running = main.mostCurrent.__c.getField(true,"False");
|
||||
//BA.debugLineNum = 16;BA.debugLine="Private StartTime As Long = 0";
|
||||
main._starttime = BA.numberCast(long.class, 0);
|
||||
//BA.debugLineNum = 17;BA.debugLine="Private ElapsedTime As Long = 0";
|
||||
main._elapsedtime = BA.numberCast(long.class, 0);
|
||||
//BA.debugLineNum = 19;BA.debugLine="End Sub";
|
||||
return RemoteObject.createImmutable("");
|
||||
}
|
||||
public static RemoteObject _synchronizeclock() throws Exception{
|
||||
try {
|
||||
Debug.PushSubsStack("SynchronizeClock (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,186);
|
||||
if (RapidSub.canDelegate("synchronizeclock")) { return b4a.example.main.remoteMe.runUserSub(false, "main","synchronizeclock");}
|
||||
BA.debugLineNum = 186;BA.debugLine="Sub SynchronizeClock";
|
||||
Debug.ShouldStop(33554432);
|
||||
BA.debugLineNum = 187;BA.debugLine="DrawClock";
|
||||
Debug.ShouldStop(67108864);
|
||||
_drawclock();
|
||||
BA.debugLineNum = 188;BA.debugLine="End Sub";
|
||||
Debug.ShouldStop(134217728);
|
||||
return RemoteObject.createImmutable("");
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw Debug.ErrorCaught(e);
|
||||
}
|
||||
finally {
|
||||
Debug.PopSubsStack();
|
||||
}}
|
||||
public static RemoteObject _timer1_tick() throws Exception{
|
||||
try {
|
||||
Debug.PushSubsStack("Timer1_Tick (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,78);
|
||||
if (RapidSub.canDelegate("timer1_tick")) { return b4a.example.main.remoteMe.runUserSub(false, "main","timer1_tick");}
|
||||
BA.debugLineNum = 78;BA.debugLine="Sub Timer1_Tick";
|
||||
Debug.ShouldStop(8192);
|
||||
BA.debugLineNum = 79;BA.debugLine="myClock.DrawClock";
|
||||
Debug.ShouldStop(16384);
|
||||
main.mostCurrent._myclock.runClassMethod (b4a.example.analogclock.class, "_drawclock" /*RemoteObject*/ );
|
||||
BA.debugLineNum = 80;BA.debugLine="End Sub";
|
||||
Debug.ShouldStop(32768);
|
||||
return RemoteObject.createImmutable("");
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw Debug.ErrorCaught(e);
|
||||
}
|
||||
finally {
|
||||
Debug.PopSubsStack();
|
||||
}}
|
||||
}
|
||||
58
Objects/shell/src/b4a/example/starter.java
Normal file
58
Objects/shell/src/b4a/example/starter.java
Normal file
@@ -0,0 +1,58 @@
|
||||
|
||||
package b4a.example;
|
||||
|
||||
import java.io.IOException;
|
||||
import anywheresoftware.b4a.BA;
|
||||
import anywheresoftware.b4a.pc.PCBA;
|
||||
import anywheresoftware.b4a.pc.RDebug;
|
||||
import anywheresoftware.b4a.pc.RemoteObject;
|
||||
import anywheresoftware.b4a.pc.RDebug.IRemote;
|
||||
import anywheresoftware.b4a.pc.Debug;
|
||||
import anywheresoftware.b4a.pc.B4XTypes.B4XClass;
|
||||
import anywheresoftware.b4a.pc.B4XTypes.DeviceClass;
|
||||
|
||||
public class starter implements IRemote{
|
||||
public static starter mostCurrent;
|
||||
public static RemoteObject processBA;
|
||||
public static boolean processGlobalsRun;
|
||||
public static RemoteObject myClass;
|
||||
public static RemoteObject remoteMe;
|
||||
public starter() {
|
||||
mostCurrent = this;
|
||||
}
|
||||
public RemoteObject getRemoteMe() {
|
||||
return remoteMe;
|
||||
}
|
||||
|
||||
public boolean isSingleton() {
|
||||
return true;
|
||||
}
|
||||
static {
|
||||
anywheresoftware.b4a.pc.RapidSub.moduleToObject.put(new B4XClass("starter"), "b4a.example.starter");
|
||||
}
|
||||
public static RemoteObject getObject() {
|
||||
return myClass;
|
||||
}
|
||||
public RemoteObject _service;
|
||||
private PCBA pcBA;
|
||||
|
||||
public PCBA create(Object[] args) throws ClassNotFoundException{
|
||||
processBA = (RemoteObject) args[1];
|
||||
_service = (RemoteObject) args[2];
|
||||
remoteMe = RemoteObject.declareNull("b4a.example.starter");
|
||||
anywheresoftware.b4a.keywords.Common.Density = (Float)args[3];
|
||||
pcBA = new PCBA(this, starter.class);
|
||||
main_subs_0.initializeProcessGlobals();
|
||||
return pcBA;
|
||||
}public static RemoteObject runMethod(boolean notUsed, String method, Object... args) throws Exception{
|
||||
return (RemoteObject) mostCurrent.pcBA.raiseEvent(method.substring(1), args);
|
||||
}
|
||||
public static void runVoidMethod(String method, Object... args) throws Exception{
|
||||
runMethod(false, method, args);
|
||||
}
|
||||
public static RemoteObject __c = RemoteObject.declareNull("anywheresoftware.b4a.keywords.Common");
|
||||
public static b4a.example.main _main = null;
|
||||
public Object[] GetGlobals() {
|
||||
return new Object[] {"Main",Debug.moduleToString(b4a.example.main.class),"Service",starter.mostCurrent._service};
|
||||
}
|
||||
}
|
||||
103
Objects/shell/src/b4a/example/starter_subs_0.java
Normal file
103
Objects/shell/src/b4a/example/starter_subs_0.java
Normal file
@@ -0,0 +1,103 @@
|
||||
package b4a.example;
|
||||
|
||||
import anywheresoftware.b4a.BA;
|
||||
import anywheresoftware.b4a.pc.*;
|
||||
|
||||
public class starter_subs_0 {
|
||||
|
||||
|
||||
public static RemoteObject _application_error(RemoteObject _error,RemoteObject _stacktrace) throws Exception{
|
||||
try {
|
||||
Debug.PushSubsStack("Application_Error (starter) ","starter",1,starter.processBA,starter.mostCurrent,27);
|
||||
if (RapidSub.canDelegate("application_error")) { return b4a.example.starter.remoteMe.runUserSub(false, "starter","application_error", _error, _stacktrace);}
|
||||
Debug.locals.put("Error", _error);
|
||||
Debug.locals.put("StackTrace", _stacktrace);
|
||||
BA.debugLineNum = 27;BA.debugLine="Sub Application_Error (Error As Exception, StackTr";
|
||||
Debug.ShouldStop(67108864);
|
||||
BA.debugLineNum = 28;BA.debugLine="Return True";
|
||||
Debug.ShouldStop(134217728);
|
||||
if (true) return starter.mostCurrent.__c.getField(true,"True");
|
||||
BA.debugLineNum = 29;BA.debugLine="End Sub";
|
||||
Debug.ShouldStop(268435456);
|
||||
return RemoteObject.createImmutable(false);
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw Debug.ErrorCaught(e);
|
||||
}
|
||||
finally {
|
||||
Debug.PopSubsStack();
|
||||
}}
|
||||
public static RemoteObject _process_globals() throws Exception{
|
||||
//BA.debugLineNum = 6;BA.debugLine="Sub Process_Globals";
|
||||
//BA.debugLineNum = 10;BA.debugLine="End Sub";
|
||||
return RemoteObject.createImmutable("");
|
||||
}
|
||||
public static RemoteObject _service_create() throws Exception{
|
||||
try {
|
||||
Debug.PushSubsStack("Service_Create (starter) ","starter",1,starter.processBA,starter.mostCurrent,12);
|
||||
if (RapidSub.canDelegate("service_create")) { return b4a.example.starter.remoteMe.runUserSub(false, "starter","service_create");}
|
||||
BA.debugLineNum = 12;BA.debugLine="Sub Service_Create";
|
||||
Debug.ShouldStop(2048);
|
||||
BA.debugLineNum = 16;BA.debugLine="End Sub";
|
||||
Debug.ShouldStop(32768);
|
||||
return RemoteObject.createImmutable("");
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw Debug.ErrorCaught(e);
|
||||
}
|
||||
finally {
|
||||
Debug.PopSubsStack();
|
||||
}}
|
||||
public static RemoteObject _service_destroy() throws Exception{
|
||||
try {
|
||||
Debug.PushSubsStack("Service_Destroy (starter) ","starter",1,starter.processBA,starter.mostCurrent,31);
|
||||
if (RapidSub.canDelegate("service_destroy")) { return b4a.example.starter.remoteMe.runUserSub(false, "starter","service_destroy");}
|
||||
BA.debugLineNum = 31;BA.debugLine="Sub Service_Destroy";
|
||||
Debug.ShouldStop(1073741824);
|
||||
BA.debugLineNum = 33;BA.debugLine="End Sub";
|
||||
Debug.ShouldStop(1);
|
||||
return RemoteObject.createImmutable("");
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw Debug.ErrorCaught(e);
|
||||
}
|
||||
finally {
|
||||
Debug.PopSubsStack();
|
||||
}}
|
||||
public static RemoteObject _service_start(RemoteObject _startingintent) throws Exception{
|
||||
try {
|
||||
Debug.PushSubsStack("Service_Start (starter) ","starter",1,starter.processBA,starter.mostCurrent,18);
|
||||
if (RapidSub.canDelegate("service_start")) { return b4a.example.starter.remoteMe.runUserSub(false, "starter","service_start", _startingintent);}
|
||||
Debug.locals.put("StartingIntent", _startingintent);
|
||||
BA.debugLineNum = 18;BA.debugLine="Sub Service_Start (StartingIntent As Intent)";
|
||||
Debug.ShouldStop(131072);
|
||||
BA.debugLineNum = 19;BA.debugLine="Service.StopAutomaticForeground 'Starter service";
|
||||
Debug.ShouldStop(262144);
|
||||
starter.mostCurrent._service.runVoidMethod ("StopAutomaticForeground");
|
||||
BA.debugLineNum = 20;BA.debugLine="End Sub";
|
||||
Debug.ShouldStop(524288);
|
||||
return RemoteObject.createImmutable("");
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw Debug.ErrorCaught(e);
|
||||
}
|
||||
finally {
|
||||
Debug.PopSubsStack();
|
||||
}}
|
||||
public static RemoteObject _service_taskremoved() throws Exception{
|
||||
try {
|
||||
Debug.PushSubsStack("Service_TaskRemoved (starter) ","starter",1,starter.processBA,starter.mostCurrent,22);
|
||||
if (RapidSub.canDelegate("service_taskremoved")) { return b4a.example.starter.remoteMe.runUserSub(false, "starter","service_taskremoved");}
|
||||
BA.debugLineNum = 22;BA.debugLine="Sub Service_TaskRemoved";
|
||||
Debug.ShouldStop(2097152);
|
||||
BA.debugLineNum = 24;BA.debugLine="End Sub";
|
||||
Debug.ShouldStop(8388608);
|
||||
return RemoteObject.createImmutable("");
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw Debug.ErrorCaught(e);
|
||||
}
|
||||
finally {
|
||||
Debug.PopSubsStack();
|
||||
}}
|
||||
}
|
||||
Reference in New Issue
Block a user