File/Close

Caravelle

Active Member
Licensed User
Longtime User
I registered the program yesterday and as a new user am busy finding all sorts of unexpected behaviour - or shall we say "non-standard" :) ?

When I open a sample code to look at it, there is no simple "Close" option under the "File" menu as in other Windows applications that open documents. If I simply open another code example, the old one seems to disappear (like in Windows NotePad for example) but when I try to run the new example I get an "error Saving File" message. So it seems that the approved way of closing down a code file is to save it - even if no changes are made or you don't want to save the changes you made.

It's a simple thing, from now on I can try to remember to Save but it's not intuitive to save an unamended document and it's odd that you only get some kind of error message when you try to run the second example.

Caravelle
 

agraham

Expert
Licensed User
Longtime User
but when I try to run the new example I get an "error Saving File" message.
I'm not really sure what your problem is but when running a program if the the option Tools->IDE Options->Auto Save is checked then the current source will be saved before running it. I guess that the second sample is read-only or something is stopping Basic4ppc being able to write to the file.

You don't need to save a file to "close" it. You should be able to just do File->New or File->Open Source or close Basic4ppc and if the current source has been modified it will ask if you want to save the changes, you can then say no if you don't want to save the changes.
 

Caravelle

Active Member
Licensed User
Longtime User
The samples are the files supplied in the Samples folder. I was just trying to look through them and try them out, as I imagine most people do, that's what they're there for, right? The ones I've just checked are not Read-only files. I haven't set any options, the program is as supplied, a fresh download when my registration was confirmed last night.

However, I am still getting the "cannot save file" message even after closing the program down and re-opening it - the message pops up when I try to run a code file by clicking the "play" icon. Once dismissed the code runs. I shall go through it again and document it exactly.

I have been playing with unregistered BASIC4PPC on my Win XP laptop for a few days without encountering this phenomenon - the new download is on a Vista desktop.

Caravelle
 

agraham

Expert
Licensed User
Longtime User
the new download is on a Vista desktop.
That's the problem. I guess you are not running Basic4ppc as an Administrator. The Samples are under Program Files and Vista won't allow non-Administrators to write to any folder there. Copy the samples to a temporary folder elsewhere and all will be well.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
This is a pretty annoying issue. Personally I don't like that applications create folders under My Documents during installation. However it seems to be the best solution now that Program Files is restricted.
So next version we will move the samples out of Program Files.
You can download all the samples here: http://www.b4x.com/files/Samples.zip
 
Top