|
Forum Index : Microcontroller and PC projects : Select Case Touch and MsgBox
| Author | Message | ||||
| rhiemann Newbie Joined: 24/11/2017 Location: GermanyPosts: 12 |
I am using MM+ V5.04.08 My initial idea was a simple confirmation message when a button was pressed using the MsgBox function. Sub Button_Pressed Select Case Touch(REF) CASE Button_First IF MsgBox("Button okay.","OK") = 1 THEN EXIT SUB ref_OK=1 Case Button_Second ref_OK=2 End Select ref_OK=3 End Sub I get following error: Expression too long. Everything works fine when MsgBox is outside the Select Case Touch construct, for instance inside the main loop. MM+ seems to have issues with the touch event of the msgbox inside the construct. Any idea? Thanks in advance Rico |
||||
| rhiemann Newbie Joined: 24/11/2017 Location: GermanyPosts: 12 |
I have to correct myself. The correct error message is: "Expression is to complex" It will be generated at the first case statement. It does not matter where the MsgBox is created inside the case. Any idea? Thanks in advance Rico |
||||
| rhiemann Newbie Joined: 24/11/2017 Location: GermanyPosts: 12 |
It always throws this message when a MsgBox is inside a Select Case construct but the error is thrown at the Touch function. Can anybody confirm this? A bug? Thanks in advance Rico |
||||
| Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3308 |
I'm not sure what is causing that error and I will look into it BUT I assume that Button_Pressed is an interrupt subroutine. If it is you have an even bigger problem - you should never delay the execution of an interrupt subroutine. Geoff Graham - http://geoffg.net |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |