How do I know when I have reached Api2?
I have a ten megabite ‘xojo_binary-file’ database front end built over many years from the days of Real Basic. I have fixed thousands of depreciation ‘errors’.
I recently copied all the methods and items into a new ‘shell’ which threw up another few weeks of errors mostly to do with image issues. I am close to converting hundreds of images to triple images.
There is nothing that I can find that says: “Bingo! You have arrived at your destination.” Thanks in advance.
No errors or warnings and passing tests seems a bingo.
Ensure Analysis Warnings have all the following features turned on, and then after running Analyze project - if there are no warnings (or errors), then I think you have reached a fully compliant API 2 state.
Excellent. That is what I have done.
I also copied all methods and items into a blank new ‘shell’. I did this in case the ‘preamble’ was different in a new shell. It then threw up errors with images - now cured. Magic! I got there! It seems faster as well.
I’m also getting some new ‘infrequent’ exceptions but this appears to be due to the increase in speed where one item is not completed before the next action occurs. These appear to be mostly file-read actions. There was one where a value was not saved to a global before a window closed. A timer on close fixed that. Maybe some items such as ‘read a file’ are sent to a different core. I should have that fixed soon. It only occurs every few days.
Have-you read: Moving To API 2.0 — Xojo documentation
What do you mean with “new shell”?
Hi Beatrix.
I created a new project with no windows. My brain calls this a ‘shell’ as it would have a preamble and a closing sequence. I copied the image folder to the new project. I copied all other items as one block so that links did not break. I found that some image links can disappear if not done this way. I thought the preamble might be different in a fresh project.
Converting to API2 as I’ve seen it:
- Code fixing
- Menu item → “Convert to API2”
- GUI element fixing (prefix Desktop…) if found in code
- Don’t forget some menu items, like Apple Menu, Preferences menu,…)
Hmmm. Missing:
- event names
- 0 vs. 1 as the first element (Middle vs. Mid)
- Some method names have changed.
You may wish to look at:
API1 to API2 conversion experience
and probaly other threads and reports from others, too.
That’s a long missing list.