Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New feature. Change Base Drive #17

Closed
RFO-BASIC opened this issue Dec 10, 2012 · 4 comments
Closed

New feature. Change Base Drive #17

RFO-BASIC opened this issue Dec 10, 2012 · 4 comments
Assignees

Comments

@RFO-BASIC
Copy link
Owner

Add after "Editor Autoindent" on page 23:

Base Drive
Some Android devices have more than one external storage devices. BASIC! will use the system suggested device as its base drive. The base drive is the device where the BASIC! “rfo-basic” directory is located. The “rfo-basic” directory is where BASIC!’s programs and data are stored. If you want to use a different storage device as BASIC!’s base drive, you can change it here.
If your device does have more than one external storage device they will be listed here. Tap the device you want to use as the base directory and press the BACK key. You will then be given the choice to immediately restart BASIC! with the new base drive or waiting and doing the restart yourself.

Note: If you have created a shortcut with files in one base directory but try to execute that shortcut while using a different base directory, the shortcut will fail to execute. You will get an error message.

@ghost ghost assigned mrleavitt Dec 10, 2012
@mrleavitt
Copy link
Collaborator

The "Note:" paragraph is not so clear. The problem is in the first phrase, "If you have created a shortcut with files in one base directory" I think. Can you say it in different words?

@mrleavitt
Copy link
Collaborator

Also, in the section Working With Files around p. 63, would it be useful to make some changes consistent with the Base Drive? It now reads:

Working with Files

BASIC! can work with files anywhere on the SD Card. BASIC! does not access the device's Internal Memory.

Could this be changed to:

BASIC! can work with files anywhere on any external storage device, including the SD Card. The SD Card is the default Base Drive, but this can be changed in the Preferences section (see p. 23). BASIC! does not access the device's Internal Memory.

@RFO-BASIC
Copy link
Owner Author

When Launcher Shortcut, p128, is built, a data structure is created. The data structure contains the full file path of the program to run, for example, "/mnt/sdcard/rfo-basic/source/MyApp.bas" This particular path leads to a program on /sdcard/. If that program uses data files the program is assuming that the data files will be in the path formed by the current base drive""/mnt/sdcard/rfo-basic/data/MyData.txt"

If the above short were created with /sdcard/ as the base drive but it executed with /sdcard-ext/ as the base drive, the program executed would be the original program on the sdcard but it would be reading its data files from /sdcar-ext"

This could be confusing to the user. The simple solution is that the executor compares the path from the data structure to the current base drive path. If they are different, an error mesn edsage is created.

You note is close enough to what is true but not quite true. There are devices like the Nexus 7 that do not have any external storage. They emulate a sdcard. A path with built with sdcard will work on these devices but the actual path name is something like /storage/emulated/. The user never really sees the strange path so it best not to even try to explain it. If the user selects the base drive preference his one and only choice will "No external storage."

@mrleavitt
Copy link
Collaborator

Good. I expanded the text to make it a little clearer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants