-
I run into the (already known) problem of a uiImageButton not recognizing mouseDown (or Up for that matter). I did found a discussion on ctrlr.org about this. It turns out that a uiImageButton does only react on a mouseclick when one clicks on a label. But the image doesn't change! I think I can overcome this problem, by making a script that is called when the mouse is down on the label and then in that script getting the value of the button and change the button value to 0 or 1, depending on the initial value. Would that work? Also, since we have now a few VERY experienced coders ;-) (Damian and Ted-juh), is it possible to change the source, because it looks like a bug in CTRLR? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 11 replies
-
I did experiment further with this "issue". I can call the needed script when the button value changes, but at the risk (I found out) of having an infinite loop, because my script calls a midireceived script which causes the button value to change and then this button script is called again etc. etc. ;-). So I will study the discussion about this on the ctrlr.org, because I remember seeing same "loop" issues, which were solved at the end, I believe. Still I whished it could be solved by altering the source code of CTRLR... |
Beta Was this translation helpful? Give feedback.
-
Hi bijlevel! Let me know if you need more details. Thx for your work on the Ctrlr build for M1. I'm chasing a second hand M1 now just because of you. Hahaha... Happy New Year....Dominique |
Beta Was this translation helpful? Give feedback.
-
Hi @bijlevel, Slightly shorter code is: flagSetting=BigInteger(dbSpecial) flagSetting:setBit(3) dbSpecial=flagSetting:toInteger() |
Beta Was this translation helpful? Give feedback.
Well, I solved it. It was wrong coding. I mistakingly use a '.' instead of ':', so instead of db = flags.setBitRangeAsInt() I had to use flags:setBitRangeAsInt(). So now my actual code looks like this:
flagSetting = BigInteger(dbSpecial)
So the set part changes a bit in the byte to 1 and the get part gets the changed value for dbSpecial.