Post Reply 
Programmatically changing Entry mode crashes iOS Pro App
05-27-2020, 08:39 AM
Post: #5
RE: Programmatically changing Entry mode crashes iOS Pro App
(05-27-2020 07:11 AM)cyrille de brébisson Wrote:  Hello,

Well, it took me a couple of hours to chase that one up, but I found the problem!

The geist of it is that, when you do a mode change, the graphical control gets changed from (for example) the RPN stack to the algebraic stack.
So, the system deletes the RPN stack and creates an algebraic stack...
Up to here, no problem...

HOWEVER,
your user key program returns 1. Which, had you read the documentation (I know that I documented it somewhere, but do not ask me where!!!!) means that the system is expected to execute key "1" (symb)....

The problem is that it would send the execution of said key 1 to the now defunct/deleted stack. -> crash!

So, I have added some code to avoid the crash in the future... BUT you can also fix things on your side by adding a return -1 at the end of your program.

Hope this helps...
Cyrille

Thank you Cyrille, lots of helpful answers.
I turned around the RETURN -1 without finding it in the documentation, and indeed my code generates erratic behavior because of random return values.
I also understood that there was a loss of coherence when changing the view, but there again, without finding the solution. In event oriented programming I should have sent a “redraw” message to the window manager.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Programmatically changing Entry mode crashes iOS Pro App - pinkman - 05-27-2020 08:39 AM



User(s) browsing this thread: 2 Guest(s)