4.3 version

basiccode
Posts: 100
Joined: Wed Feb 12, 2014 12:21 pm

Re: 4.3 version

Post by basiccode »

Mr. Kibernetik wrote:
Henko wrote: Do you mean that SB is removed from the background as well? If not, could you implement the EXIT statement in that way?
(I frequently use a little SB app. When i forget to delete SB from the background, my iphone is totally dead after some hours, which is very nasty sometimes).
I would like to, but it is impossible for application to remove itself from memory completely. Frankly speaking, it is even not permitted to exit application from inside application itself - in Apple they think that only user can close app by pressing Home button, and not in any other way. So, any kind of programming exit violates Apple's guidelines, and they have no proper means to perform this task.
I think that EXIT should terminate all activity inside application, but memory will not be automatically freed.

I didn't realise smartBasic did not shut down with the exit command and I didn't even know apple considers it a sin to exit an app from within an app.

User avatar
Mr. Kibernetik
Site Admin
Posts: 4786
Joined: Mon Nov 19, 2012 10:16 pm
My devices: iPhone, iPad, MacBook
Location: Russia
Flag: Russia

Re: 4.3 version

Post by Mr. Kibernetik »

basiccode wrote:I didn't realise smartBasic did not shut down with the exit command
smart BASIC will stop. And there are many ways to stop it: commands END, STOP or just pressing "stop" button.
If smart BASIC is in code editor or in files table - it is stopped completely.
"Stopped" means it is not consuming CPU (almost) or is not performing any background activity. But an active iOS app cannot suicide: you always can go to desktop and return back to application. EXIT command will terminate smart BASIC to desktop and you can consider it to be destroyed - you cannot return to it in its previous state.

basiccode
Posts: 100
Joined: Wed Feb 12, 2014 12:21 pm

Re: 4.3 version

Post by basiccode »

Mr. Kibernetik wrote:
basiccode wrote:I didn't realise smartBasic did not shut down with the exit command
smart BASIC will stop. And there are many ways to stop it: commands END, STOP or just pressing "stop" button.
If smart BASIC is in code editor or in files table - it is stopped completely.
"Stopped" means it is not consuming CPU or is not performing any background activity. But as an active iOS app itself - it cannot suicide: you always can go to desktop and return back to application.
EXIT command will terminate smart BASIC to desktop and you can consider it to be destroyed - you cannot return to it in its previous state.
Is it possible to shut down one app from another app? If so then smartBasic could load that app and the loaded app could then properly shut smartBasic down.

User avatar
Mr. Kibernetik
Site Admin
Posts: 4786
Joined: Mon Nov 19, 2012 10:16 pm
My devices: iPhone, iPad, MacBook
Location: Russia
Flag: Russia

Re: 4.3 version

Post by Mr. Kibernetik »

basiccode wrote:Is it possible to shut down one app from another app? If so then smartBasic could load that app and the loaded app could then properly shut smartBasic down.
There are no problems with shutting down. Henko wants app to pause when it is in background.

basiccode
Posts: 100
Joined: Wed Feb 12, 2014 12:21 pm

Re: 4.3 version

Post by basiccode »

Mr. Kibernetik wrote:
basiccode wrote:Is it possible to shut down one app from another app? If so then smartBasic could load that app and the loaded app could then properly shut smartBasic down.
There are no problems with shutting down. Henko wants app to pause when it is in background.
I know people will want it to keep running for monitoring apps.
Make sure it is your app that's depleting the battery before doing anything drastic.

Henko
Posts: 814
Joined: Tue Apr 09, 2013 12:23 pm
My devices: iPhone,iPad
Windows
Location: Groningen, Netherlands
Flag: Netherlands

Re: 4.3 version

Post by Henko »

basiccode wrote: Make sure it is your app that's depleting the battery before doing anything drastic.
This could be tested using my app "password manager for iPhone 2 and up" on page 2 of the program section.
To make the test compatible with my experiences, start the app, enter a global password to be used and some phony accounts and push the app to the background. After an hour, pick up the phone, read the battery status and feel the temperature.

On the other hand, I just tested SB in the background with the following simple program:

Dim a$(10)
List "test" text a$ at 0,0 size 100,100
Wait: if not list_selected("test") then wait
End

Pushed RUN button followed by HOME button (at that moment a battery indication of 100%)

After an hour, still 100% battery indication! :roll:

Very strange!

basiccode
Posts: 100
Joined: Wed Feb 12, 2014 12:21 pm

Re: 4.3 version

Post by basiccode »

If you let your battery fully discharge it will then always discharge much quicker.

The more CPU hungry an app is the quicker the battery discharges and smartBasic can behave like CPU hungry but it is to be expected because sometimes it's like having a lot of different apps running at once depending on how many and what features you are using, basically it is normal.

User avatar
Mr. Kibernetik
Site Admin
Posts: 4786
Joined: Mon Nov 19, 2012 10:16 pm
My devices: iPhone, iPad, MacBook
Location: Russia
Flag: Russia

Re: 4.3 version

Post by Mr. Kibernetik »

New command will be added:

SET UNDERGROUND OFF
SET UNDERGROUND ON
turns OFF or turns ON the main, most power-consumptive calculation cycle of application when application is sent to background. By default application is active when it is in the background.

Henko
Posts: 814
Joined: Tue Apr 09, 2013 12:23 pm
My devices: iPhone,iPad
Windows
Location: Groningen, Netherlands
Flag: Netherlands

Re: 4.3 version

Post by Henko »

Mr. Kibernetik wrote:New command will be added:

SET UNDERGROUND OFF
SET UNDERGROUND ON
turns OFF or turns ON the main, most power-consumptive calculation cycle of application when application is sent to background. By default application is active when it is in the background.
MARVELLOUS! Very Anxious to see the effect. Thanks for the thinking and the effort.

Henko
Posts: 814
Joined: Tue Apr 09, 2013 12:23 pm
My devices: iPhone,iPad
Windows
Location: Groningen, Netherlands
Flag: Netherlands

Re: 4.3 version

Post by Henko »

basiccode wrote:If you let your battery fully discharge it will then always discharge much quicker.
Yep. I also read that charging a lithium-ion battery to about 95% is better than to charge it to the full 100%.

I keep the battery of my laptop in the fridge at about 40-50% charged. Every couple of months a reload cycle. The battery is now about 3years old and still of good capacity.

Post Reply