iConvert 4

Post Reply
User avatar
rbytes
Posts: 1963
Joined: Sun May 31, 2015 12:11 am
My devices: iPhone X
iPad 4
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet
Location: Calgary, Canada
Flag: Canada
Contact:

iConvert 4

Post by rbytes » Wed Nov 14, 2018 10:23 pm

;)
Last edited by rbytes on Thu Jun 13, 2019 6:02 am, edited 6 times in total.
Zzzzz

User avatar
Dutchman
Posts: 924
Joined: Mon May 06, 2013 9:21 am
My devices: iMac, iPad Air, iPhone
Location: Netherlands
Flag: Netherlands

Re: iConvert 4

Post by Dutchman » Thu Nov 15, 2018 3:05 pm

I have extended iConvert with the option to create the currency data file if it is not present. The user can decide to have it created or not.
To do this, I have rearranged the code of interest and added subroutines.

The program still freezes if the currency data is not present and the "currency" item is selected in the list.
Maybe you should make that selection impossible if the data file does not exist.

Attached is the modified code.
iconvert 4.1.txt
(32.65 KiB) Downloaded 25 times
We consider it a refreshing mental exercise to figure out ways to circumvent foolishness (Quote from Richard)

User avatar
rbytes
Posts: 1963
Joined: Sun May 31, 2015 12:11 am
My devices: iPhone X
iPad 4
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet
Location: Calgary, Canada
Flag: Canada
Contact:

Re: iConvert 4

Post by rbytes » Thu Nov 15, 2018 4:34 pm

Actually I had already programmed and tested code that would prevent selecting Currency if the data file was missing. Instead it popped up a window saying to first run Update to activate currency conversion. The category would then revert back to the previously-selected one. Now when I look at the iConvert 4 code I posted yesterday, I see that there is an error that has crept in!

Since I upgraded to iOS 12.1 this week, I am having a lot of difficulty copying large programs, whether in Smart Basic or on the Forum. I had already noticed in iOS 11 that after selecting an entire large program such as iConvert, it was taking 15-20 seconds to get the popup menu with the Copy option. Now, It takes over a minute! I can make it appear sooner if I select a smaller portion of code, although there is still a long delay before it appears. Does anyone else experience this problem?

I decided to select, copy and paste the code in sections. That is how I got iConvert 4 posted on the Forum, and perhaps that is how the error crept in. Now I will need to fix 4 and 4.1 both. :? I will do that today. In future I will select everything and wait as long as it takes.
Zzzzz

User avatar
rbytes
Posts: 1963
Joined: Sun May 31, 2015 12:11 am
My devices: iPhone X
iPad 4
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet
Location: Calgary, Canada
Flag: Canada
Contact:

Re: iConvert 4

Post by rbytes » Thu Nov 15, 2018 5:08 pm

iConvert 4 has been reposted. The error that crept in yesterday is fixed. Now the user can not select Currency until a currency.data file exists. If they try, they will get a popup advising them to press the Update button to activate currency conversion.

Ton, I have sent a private message re 4.1.
Zzzzz

User avatar
Dutchman
Posts: 924
Joined: Mon May 06, 2013 9:21 am
My devices: iMac, iPad Air, iPhone
Location: Netherlands
Flag: Netherlands

Re: iConvert 4

Post by Dutchman » Thu Nov 15, 2018 5:59 pm

An elegant solution for the missing data.
I think everything is now as desired. Thanks :D
We consider it a refreshing mental exercise to figure out ways to circumvent foolishness (Quote from Richard)

User avatar
rbytes
Posts: 1963
Joined: Sun May 31, 2015 12:11 am
My devices: iPhone X
iPad 4
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet
Location: Calgary, Canada
Flag: Canada
Contact:

Re: iConvert 4

Post by rbytes » Thu Nov 15, 2018 6:29 pm

I looked again at your 4.1 version (while meditating and walking my dog), and I think it has a better solution. If you remove the query at startup and just create the data file silently if it is missing, the user will get an even better experience.

They will be able to convert currencies immediately.
-They won't have to read my message telling them that the program is missing something (a data file) and that they have to do three more steps to activate Currency and re-select it! (Exit the message window, press Update, select Currency)
-They won't have to answer yes or no at startup to a question they may not understand.

If in the current 4.0 they see my message but don't Update, then they get my message again every time they try to select Currency. :o
If in the current 4.1 they answer NO to your startup message they get it again every time they run the program! :o

So 4.1 could solve both problems, and we could actually reduce some code. I hope you agree. :)
Zzzzz

User avatar
rbytes
Posts: 1963
Joined: Sun May 31, 2015 12:11 am
My devices: iPhone X
iPad 4
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet
Location: Calgary, Canada
Flag: Canada
Contact:

Re: iConvert 4

Post by rbytes » Fri Nov 16, 2018 12:46 am

After looking further at the 4.1 code, I realized that for a silent update, most of the needed changes could be made in the code sections I had written, so I did that. I have posted the code as a private message.
Zzzzz

User avatar
rbytes
Posts: 1963
Joined: Sun May 31, 2015 12:11 am
My devices: iPhone X
iPad 4
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet
Location: Calgary, Canada
Flag: Canada
Contact:

Re: iConvert 4

Post by rbytes » Sun Nov 18, 2018 4:54 am

A new version of iConvert will be posted in the coming week. In the meantime, if you want to download and try it, please use only version 4.

Any versions posted of 4.1, including the beta and alpha versions, were for testing new features and were not fully debugged.
Zzzzz

Post Reply