Click here to Skip to main content
15,035,283 members

Comments by Cormac Mattimoe (Top 4 by date)

Cormac Mattimoe 5-Apr-21 11:02am View
Hi David, I have updated the question to include the right formatting. Hope this all makes sense now.
"Is it returning 0 because that was the value it was defined with, or because that's the value it was assigned in the switch statement? Change it's default value to -1 to help differentiate." So I call the method in getBedHistory() and it enters calculateStatus() but jumps to bottom of return instead of going through code in calculateStatus and then returning to getBedHistory(), thanks very much for your helping
Cormac Mattimoe 4-Apr-21 9:51am View
sorry David it is the way the code is formatted. calculateStatus() and getBedHistory() are both separate methods..status code belongs to calculateStatus() that's what that method should return when it finishes going through that method but it just jumps to bottom of method onComplete and returns 0
Cormac Mattimoe 4-Apr-21 9:48am View
can you help?
Cormac Mattimoe 3-Apr-21 10:31am View
Hi there,

Thank you very much for getting back to me. I have use the debugger all the time. The problem is the code is being executed before the code is in the onComplete listener so example. I have my method called calculateStatus(). Once this is called it the code is executed by the calling of the method and jumps straight down to the return where it is suppose to go into the code in the method execute that and then return the right answer from that code instead of returning 0 like it is now.

Hope this makes sense