Re: Mouse messages while down

2007-03-19 Thread Dick Kriesel
On 3/18/07 12:12 AM, Sarah Reichelt [EMAIL PROTECTED] wrote: I'm now doing the politically correct mouseMove instead of using repeat while mouse is down. But it still leaves me having to check the location all the time to see whether it is inside one of my 400 buttons. It seems that the

Re: Mouse messages while down

2007-03-18 Thread Sarah Reichelt
I thought this sort of polling was not considered a good idea. It seems fine on my 2GHz Intel Mac, but I'm not sure how it would go on slower machines. It still seems odd that I can't get the data I need without having to do this. Yeah, bad idea. At least, according to Mr. Raney. Sometimes

Re: Mouse messages while down

2007-03-18 Thread Dick Kriesel
On 3/18/07 12:12 AM, Sarah Reichelt [EMAIL PROTECTED] wrote: snip But it still leaves me having to check the location all the time to see whether it is inside one of my 400 buttons. snip/ Hi, Sarah. You could build an array using points as keys, so that when you look up any x,y pair you get

Re: Mouse messages while down

2007-03-18 Thread Scott Rossi
Recently, Sarah Reichelt wrote: It seems that the mouseControl should be able to report where the mouse is without me having to check it manually. But mouseControl gets stuck when you click down and never changes until the mouse comes up again. You may not be able to check the mouseControl

Re: Mouse messages while down

2007-03-18 Thread Bill Marriott
There's another fly in the ointment. Using within works reliably only if no buttons are overlapping (it doesn't respect layering like messages would), and the coordinate approach only works if the buttons are in a grid. If you have a more involved setup like using irregular graphics for the

Re: Mouse messages while down

2007-03-18 Thread Mark Schonewille
Sarah, 400 individual buttons is bad design. Draw a grid and use a mouseDown handler if you want to store the clicked location. Use the mouseRelease handler to get the new location. Calculate in which rectangle the new mouseLoc is, without a repeat loop. I am sure you can do this. Best

RE: Mouse messages while down

2007-03-18 Thread Mark Powell
Hi Sarah: Depending on the arrangement and characteristics of your 400 controls, you could take the approach of putting mouse detection in an image above your buttons instead of in a card script below: Create a one-bit mask...with areas in the image that register with buttons being made opaque,

Re: Mouse messages while down

2007-03-18 Thread Jerry Daniels
I prefer the method Bill Marriott suggested: set a global (or a script local) on a mouseDown event and then track the coordinates via mouseMove. You can theoretically track the location of the mouse (pointer) during mouseMove without using a local or global in a mouseDown handler, but

Re: Mouse messages while down

2007-03-18 Thread Jerry Daniels
Galaxy always shows the object name and path of the object it is hovering above. I think mousemove may be part of it. This is an interesting topic to me. One that doesn't necessarily deal with Sarah's original question, but for the sake of accuracy--and possible interest--I want to

Re: Mouse messages while down

2007-03-18 Thread Stephen Barncard
Jerry, would this explain the 'flickering' that I've seen in your tooltips field in earlier versions of Galaxy? This would only happen when Galaxy was kept running for hours and days... Restarting Rev always fixed it. The cursory inspection that Galaxy 1.5 has done to detect what object

Re: Mouse messages while down

2007-03-18 Thread Dick Kriesel
On 3/18/07 7:56 AM, Jerry Daniels [EMAIL PROTECTED] wrote: snip on glxInspectObject -- get long id of object, even if pointer is in title bar: put glxGetObjectBeneathPointer() into theObjectID edit the script of theObjectID end glxInspectObject snip/ Hi, Jerry. How does

Re: Mouse messages while down

2007-03-18 Thread Jerry Daniels
Dick, I indicated in my posting that I had distilled portions for simplicity. Look at the glxScriptEdit handler in the inspection folder in the frontScript. I't s quite large and has barnacles on it. You'll see how I determine the long id of the object below the pointer--including

Re: Mouse messages while down

2007-03-18 Thread Jerry Daniels
Stephen, The flicker we used to see was related, i believe, to a mouseWithin message gone bad. Best, Jerry Daniels Makers of Galaxy 1.5 http://www.daniels-mara.com/new_in_galaxy_1_5.htm On Mar 18, 2007, at 1:13 PM, Stephen Barncard wrote: Jerry, would this explain the 'flickering' that

Re: Mouse messages while down

2007-03-18 Thread Ken Ray
On Sat, 17 Mar 2007 19:50:40 -0700, Jim Ault wrote: The problem is that no other messages seem to be sent while the mouse is down (mouseEnter, mouseLeave, mouseStillDown etc). I can detect mouseRelease but the target is my original button so it doesn't tell me where the mouse is now. Checking

Re: Mouse messages while down

2007-03-18 Thread Sarah Reichelt
400 individual buttons is bad design. Draw a grid and use a mouseDown handler if you want to store the clicked location. Use the mouseRelease handler to get the new location. Calculate in which rectangle the new mouseLoc is, without a repeat loop. I am sure you can do this. It's not something I

Re: Mouse messages while down

2007-03-18 Thread Derek Bump
I just wanted to throw in my two cents on this thread. When I was working on Pixelution (which is still available on RevOnline) I ran into the problem of figuring out what button the mouse was hovering over when the mouse was down. My troubles lead me to post BugZilla # 3668

Mouse messages while down

2007-03-17 Thread Sarah Reichelt
I'm having a blank moment here and I can't work out how to solve what should be a simple problem. I have a grid of about 400 buttons and I have a mouseDown handler in the card script to detect which of these buttons is clicked first. Then I want the user to be able to drag the mouse around and

Re: Mouse messages while down

2007-03-17 Thread Jim Ault
how about: Use the within function to determine whether a point is inside the specified object. Jim Ault Las Vegas On 3/17/07 7:32 PM, Sarah Reichelt [EMAIL PROTECTED] wrote: I'm having a blank moment here and I can't work out how to solve what should be a simple problem. I have a grid of

Re: Mouse messages while down

2007-03-17 Thread Joe Lewis Wilkins
Sarah, I don't fully understand what you're trying to do, but something like the following should get you continuous x,y that you should be able to use in some manner or another to determine which button is affected: on mousedown repeat while the mouse is down get the mouseloc

Re: Mouse messages while down

2007-03-17 Thread Sarah Reichelt
Thanks Jim Joe, That works OK, using a repeat while the mouse is down loop and then checking the mouseLoc to see whether it is within the rect of any of my 400 buttons each time. I thought this sort of polling was not considered a good idea. It seems fine on my 2GHz Intel Mac, but I'm not sure

Re: Mouse messages while down

2007-03-17 Thread Bill Marriott
Sarah, Try this script in the card: -- global trackMouse on mouseDown put true into trackMouse end mouseDown on mouseMove if trackMouse = true then put mouseMove the target return after fld 1 pass mouseMove end if end mouseMove on mouseRelease if trackMouse =

Re: Mouse messages while down

2007-03-17 Thread Stephen Barncard
Jerry figured it out a while ago -- Galaxy always shows the object name and path of the object it is hovering above. I think mousemove may be part of it. from the docs: Sent periodically while the mouse button is being held down. this gets close to what you want I think. ON mouseMove

Re: Mouse messages while down

2007-03-17 Thread Joe Lewis Wilkins
Sarah, By and large, I would not put this in the category of polling; since nothing can be done while the mouse is down anyway. That's just the way it is. Now, if this repeat loop was being used in a mouseup handler, then it would be polling because all sorts of things can take place

Re: Mouse messages while down

2007-03-17 Thread J. Landman Gay
Sarah Reichelt wrote: Thanks Jim Joe, That works OK, using a repeat while the mouse is down loop and then checking the mouseLoc to see whether it is within the rect of any of my 400 buttons each time. I thought this sort of polling was not considered a good idea. It seems fine on my 2GHz

Re: Mouse messages while down

2007-03-17 Thread Stephen Barncard
Sorry Joe, polling is just plain bad practice and could interfere with other messaging code. Rev gives plenty of ways to deal with messages that one should never have to use idle. You still have your hypercard hat on. Untie the chains! sqb Sarah, By and large, I would not put this in the

Re: Mouse messages while down

2007-03-17 Thread Joe Lewis Wilkins
Stephen, So you're saying that with Rev, when the Mouse is Down, other messages can still be sent/received unless a repeat loop of the nature I suggested is invoked, so that it IS polling in the sense that it interrupts the normal flow? I guess things have gotten more complicated than I

Re: Mouse messages while down

2007-03-17 Thread Jim Ault
On Mar 17, 2007, at 9:22 PM, Stephen Barncard wrote: Sorry Joe, polling is just plain bad practice and could interfere with other messaging code. Rev gives plenty of ways to deal with messages that one should never have to use idle. You still have your hypercard hat on. Untie the chains!

Re: Mouse messages while down

2007-03-17 Thread Bob Warren
Sarah Reichelt wrote: I want the user to be able to drag the mouse around Mouse messages while down: SQUEAK! (poor thing) ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage