UpdateCurrencies functions

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

Re: Update currencies

Post by rbytes »

I have reread the above several times and still don't fully understand it. As long as Update Currencies remains a separate program and iConvert still contains an include statement for currencies.data, users will not be able to run IConvert until after they run Update Currencies or create the two-line dummy data file.

In the most recent post (3.3), I modified Update Currencies to have an interactive and a silent mode. I renamed it Launch iConvert, and it does that after it has saved the currencies.data file. It also harmonizes with the look and color scheme of the main program by running in graphics rather than text mode, with the same title and screen color. My next step would be to add the buttons in iConvert that would run it during a session, and also set the preferred mode to interactive or silent.

Please give it a try and let me know how it works for you. If necessary we can combine our changes.
The only thing that gets me down is gravity...

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

Re: Update currencies

Post by Dutchman »

Yes the problem of missing include-file remains.
However "Update currencies" has now a silent mode which can be run from inside iConvert and it returns to iConvert.
So "Update currencies" can now be made an integral part of iConvert, but "Update currencies" should be run if iConvert is used for the first time.
Therefore I made the following proposal as reply to "iConvert 3.3"
Richard, I suggest that when you present the code, you add a note that
"Update currencies" viewtopic.php?f=20&t=2272 must first be run before iConvert is suitable for use.
Last edited by Dutchman on Thu Jan 19, 2023 3:12 pm, edited 1 time in total.

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

Re: Update currencies

Post by Dutchman »

Obsolete
The truth-table is no longer valid
Functions will be integrated in iConvert
Truth table for View and Convert.JPG
Truth table for View and Convert.JPG (44.7 KiB) Viewed 5836 times
Last edited by Dutchman on Sat Nov 10, 2018 8:13 pm, edited 1 time in total.

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

Re: Update currencies

Post by rbytes »

Nice job on Update Currencies 2.1. :D

A suggestion for future versions - a method to set the currencies that the user wants to see, and hide the remainder. This could be changed at any time they choose. It would mean less scrolling of the measures lists to get to the currencies they want.
The only thing that gets me down is gravity...

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

Re: Update currencies

Post by Dutchman »

Updated to version 2.2 with handling "viewstate" for iConvert 2.6

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

Re: UpdateCurrencies functions

Post by Dutchman »

I have changed the program to the bare basics: generate the data-file.
The program is a test-program now and does no longer continue with a call to iConvert.
To simplify integration with iConvert, I have recoded subroutines to functions.
Call to iConvert is removed
Essential tasks are coded in functions on red background:
- MakeCurrencyHTML (Url$,HtmlFile$,iview,iField$,Browser$)
- ExtractHtml (HtmlFile$,Data$(,))
- SortAndStore (File$,Data$(,),items)
Additional REQUIRED utility functions are coded on blue background:
- Input$ (Field$,Prompt$)
- Quicksort$ (Array$(,),MaxRow,Rowsize,SortColumn)
- PageContent$ (file$)
- ISO_Date$

The testprogram is an example of application.

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

Re: UpdateCurrencies functions

Post by Dutchman »

I have reduced the main section of the program by the addition of the startfunction "Update"
Preparation of the update requires now only the set up of
• Browser if view is active, to display the web-contents
• Interface-field
This field is at the top of the display in the testprogram and gives messages about progress and errors.
Progress-messages are on blue background, whereas interactivity requests and error-messages are on red background

I have integrated this version into iConvert and will publish it as "iConvert 4 alpha.sb"

Post Reply