MouseUp has lost index

I finally am using mouseup. I am also confused. I have an array of textarea controls and/but the mousedown index starts at the correct index, but the mouseup index goes to 0(zero). These events are in the textarea control’s events and not the window’s. No other event in between. Also this on a Mac. There isn’t a apparently feedback case that mentions mouseup. Am I missing something?

Are you returning True in mousedown? Mouseup won’t fire otherwise.

been using MouseDown/Up events since forever under OSX with no issues at all…

Post a snippet of code that illustrates the issue… if you can… and like Gavin said. the MouseUp(index) won’t fire unless the corresponding MouseDown(Index) returned TRUE…

Note : you cannot MouseDown on one control, and MouseUp on another and expect the index to change… if you need that use the Drag Events instead.

I’m on OS X 10.8.4 with Xojo 2013 r2. I have not been able to get the MouseDown Event Handler to work at all. I only tried using it with this version of Xojo.

Create a simple Desktop app with a sole PushButton. Place MsgBox code in the MouseUp and it does not work. I also tried it with other controls.

[quote=30852:@Robert Boice]I’m on OS X 10.8.4 with Xojo 2013 r2. I have not been able to get the MouseDown Event Handler to work at all. I only tried using it with this version of Xojo.

Create a simple Desktop app with a sole PushButton. Place MsgBox code in the MouseUp and it does not work. I also tried it with other controls.[/quote]

In your first paragraph, you mentioned MouseDown and in your second paragraph you mentioned MouseUp, so I’m not sure which one your MsgBox code is in.

If it’s in MouseDown, it should work. If it’s in MouseUp, you also need to Return True in MouseDown. If you don’t, MouseUp will never fire.

Thanks, Gavin. My mistake. I was working with both handlers. My apologies for the typo.

I was unaware of the need to return a True in the MouseDown first. Makes sense.

Yes. That was a problem. Couldn’t figure why mouseup wasn’t firing until I noticed that in the forum. I added return true and that part worked.

I now have the different problem. Quite literally it changes the index. It goes into mousedown with correct index, and the next event fired is mouseup but the index has changed back to 0 (zero).

Note again. I have an array of textarea controls, so index is part of the event. That is what changes. I just compiled it on RB 2012r2 and it is continues to happen. The cursor won’t leave textarea(0) I also haven’t tried this on Windows.