Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 08:21 11 Nov 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Select Case Touch and MsgBox

Author Message
rhiemann
Newbie

Joined: 24/11/2017
Location: Germany
Posts: 12
Posted: 08:22am 08 Apr 2018
Copy link to clipboard 
Print this post

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: Germany
Posts: 12
Posted: 01:14pm 10 Apr 2018
Copy link to clipboard 
Print this post

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: Germany
Posts: 12
Posted: 01:18pm 10 Apr 2018
Copy link to clipboard 
Print this post

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: Australia
Posts: 3308
Posted: 03:29pm 10 Apr 2018
Copy link to clipboard 
Print this post

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
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025