FOR those that their phone does not support file-access

17 views
Skip to first unread message

J F

unread,
Jul 14, 2010, 2:16:22 PM7/14/10
to CellularBasicPro
I've made a version of the original Cellular basic that reads from the
jar with some additional changes.
- Full screen mode in graphics screen.
- no numbers printed when pressing the keys.
- can load very big .bas files but you can not edit them.

how to use :
if you want to add basic programs you must rename the JAR file to ZIP
and then place
inside the 'programs' folder your programs.After that , rename it back
to JAR.

run the jar , select 'load a program from jar' type the name of the
program without the .bas extension , press 'read' , go back to the
menu and run it.

get it here
[http://groups.google.com/group/cbasjf/files]

or here
[http://rapidshare.com/files/406959635/CellularBasic-JF.jar]



I would like to see the 'PRO' version with this feature ;)



--------------------------------------------------------------------------------------
the core of the hack is in the " read() ;" in "CellularBasic.java"

import java.io.DataInputStream;

public void read() {
Thread t = new Thread() {
public void run() {
try {
String select = srcTextBox.getString(); // i use the text in the
srcTextBox as filename
DataInputStream in = new DataInputStream( //jf
this.getClass().getResourceAsStream("/programs/"+select+".bas")); //
jf


text = new StringBuffer(); ;
byte[] bb = new byte[1];
// read the file
while( in.read(bb) != -1 ) {
if ((char)bb[0] == '\r') { continue; }
text.append(new String(bb));
}
in.close(); //jf
// write contents into srcTxtBox
srcTextBox.setString(select+".bas ok_"); //jf
display.setCurrent(srcTextBox);
} catch (Exception e) { e.printStackTrace();
display.setCurrent(new Alert("Error")); }
}
};
t.start();
}





JF




J F

unread,
Jul 17, 2010, 5:32:08 AM7/17/10
to CellularBasicPro
new updated version get it here.
[http://groups.google.com/group/cbasjf/files]
Message has been deleted

Riller

unread,
Jul 19, 2010, 12:05:19 PM7/19/10
to CellularBasicPro


On Jul 17, 11:32 am, J F <rocketeer...@yahoo.com> wrote:
> new updated version get it here.
> [http://groups.google.com/group/cbasjf/files]

Why not make an input there you can type the whole file location,
like: "file:///mmc/bas/hello.bas". No FOR loop will be needed, and
actually, I think there's no non-programmer (ignorant) that download
this thing anyway, so please, any of you, do it so I can start code on
my phone. :)

ELSE: Gief Code

Yossi Kadosh

unread,
Jul 19, 2010, 2:44:54 PM7/19/10
to CellularBasicPro
You are right.
I will do so as soon as I have time.
I think the best way is to put the drive letter in an external
configuration file
so everyone can configure his own drive letter
Adding an input for the whole file location is also a very good idea.
Reply all
Reply to author
Forward
0 new messages