Commits

Romain Vernoux committed e3e020a

minor bug fixes

  • Participants
  • Parent commits 85f974b

Comments (0)

Files changed (2)

File AndroidManifest.xml

 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
       package="jp.co.itpl.ocamlandroid"
-      android:versionCode="1"
-      android:versionName="0.9 beta">
+      android:versionCode="2"
+      android:versionName="0.9.1 beta">
     <application android:icon="@drawable/icon" 
     			 android:label="@string/app_name">
         <activity android:name=".MainActivity"

File src/jp/co/itpl/ocamlandroid/MainActivity.java

  - The application now handles toplevel starting errors.
  - Beta release \o/
  
+ 09/03/11
+ - Beta report : display bug when the toplevel prints "<" FIXED
+ - Beta report : the automatic scrolls don't work properly FIXED
+ 
+ 
 */
 
 /*   TO DO
  
- - 
  - Wait for Feedbacks
-
+ - autorisations
+ - Beta demand : file open/save feature
+ - Beta demand : import modules
+ 
 */
 
 
 		
 		Object[] tab = (Object[]) getLastNonConfigurationInstance();
 		if (tab == null){ // The application has just been launched by the user
+			addEditPanel(0);
 			tabHost.setCurrentTab(1);
-			addEditPanel(0);
 		}
 		else { // The application just resumed from an orientation change
 			for (int k = 1; k < tab.length-1; k++){
 		editPanelView.addView(layout,index);
 		scrollView_editor.post(new Runnable() { 
 		    public void run() { 
-		        scrollView_editor.smoothScrollTo(0,((View) findViewById(10*(index+1)+COMPILE_BUTTON)).getBottom()); 
+		    	((View) findViewById(10*(index+1)+EDITTEXT)).requestFocus();
 		    } 
 		}); 
 		
 	
 	public void println(String line, int origin) { 
 		Log.d(TAG, "console output: "+line);
+		String line2 = line.replace("<", "&lt;").replace("\n", "<br />");
 		if(origin == FROM_USER){
-			output_text = output_text.concat(USER_START_TAG).concat(line).concat(USER_END_TAG).replace("\n", "<br />");
+			output_text = output_text.concat(USER_START_TAG).concat(line2).concat(USER_END_TAG);
 		}
 		else {
-			output_text = output_text.concat(TOPLEVEL_START_TAG).concat(line).concat(TOPLEVEL_END_TAG).replace("\n", "<br />");
+			output_text = output_text.concat(TOPLEVEL_START_TAG).concat(line2).concat(TOPLEVEL_END_TAG);
 		}
 		outView.setText(Html.fromHtml(output_text));
 		scrollView_toplevel.post(new Runnable() { 
 		    public void run() { 
+		        scrollView_toplevel.clearAnimation();
 		        scrollView_toplevel.smoothScrollTo(0, outView.getHeight()); 
 		    } 
 		});