Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Thu Apr 09, 2020 6:24 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: RB: Mac OS and others, or really multi-platform?
PostPosted: Thu Jul 09, 2009 1:56 am 
Offline

Joined: Thu Jun 22, 2006 2:16 am
Posts: 205
Location: Barcelona
One of the reasons I left Visual Basic and moved to RB was its multi-platform environment.
I don't regret it at all, indeed, but some times I feel like I entered a Mac OS environment, where Windows users are just allowed.
I say that because I've reported some bugs and some requests which I consider not only "very important" but completely "necessary" and I've seen no answer from Real Software.
One of these requests is about the mouse middle button or wheel. In all Windows environment we are used to drag the mouse wheel to move (PAN) the image around the screen. Now, with RB I must "invent" combinations of keys (CTRL, SHIFT, ...) and mouse dragging to do the same. My users can not understand that I use a programming software that doesn't allow to consider mouse wheel pressing, so can't I!
Am I wrong in my feelings or somebody else has the same?

_________________
Thanks,
Ramon
----------------------------------------------------------------
REAL_Studio2012r1 Enterprise Academic- Licensed
Windows 7 - Registered and Activated


Top
 Profile  
Reply with quote  
 Post subject: Re: RB: Mac OS and others, or really multi-platform?
PostPosted: Thu Jul 09, 2009 5:09 am 
Offline
User avatar

Joined: Sun Feb 19, 2006 3:10 pm
Posts: 1583
Location: Hamburg, Germany
Ramon wrote:
One of these requests is about the mouse middle button or wheel. In all Windows environment we are used to drag the mouse wheel to move (PAN) the image around the screen.

Not just under Windows; under Mac OS X it is just the same. And of course, RB does support panning using the mouse wheel with the MouseWheel event. Where’s the problem?

_________________
Michael J. Hußmann
http://digicam-experts.de


Top
 Profile  
Reply with quote  
 Post subject: Re: RB: Mac OS and others, or really multi-platform?
PostPosted: Thu Jul 09, 2009 3:15 pm 
Offline
User avatar

Joined: Fri Sep 30, 2005 3:53 pm
Posts: 3261
Location: England
mjh wrote:
Ramon wrote:
Where’s the problem?

The problem is that the wheel is also a button but pressing it cannot be identified as such in RB.
I have a report dated June 2005 about this.

_________________
Steve Garman
Using REALbasic 2008r2 Professional on Windows Vista Ultimate
and REALbasic 2009r5.1 Professional on Linux Ubuntu 9.04 Desktop
and REAL Studio 2010r1 Personal on Linux Ubuntu 9.10 Desktop
Occasional blog


Top
 Profile  
Reply with quote  
 Post subject: Re: RB: Mac OS and others, or really multi-platform?
PostPosted: Fri Jul 10, 2009 4:50 am 
Offline

Joined: Fri Jul 21, 2006 12:28 am
Posts: 509
If you came to RB from VB I suspect your problem is largely one of perception. As with most MS products, VB is tailored specifically for Windows. RB is flexible enough to allow a single source code to be built into apps for three platforms. It may take a bit more effort on the development side, but not nearly as much as C or C++.

_________________
Regards,
Carl
Capaho Web
http://www.capaho.com


Top
 Profile  
Reply with quote  
 Post subject: Re: RB: Mac OS and others, or really multi-platform?
PostPosted: Fri Jul 10, 2009 2:25 pm 
Offline
User avatar

Joined: Wed Nov 15, 2006 3:50 pm
Posts: 2353
Location: England
A bit strong, but you might subclass the window and trap the Mouse events for middle button.

Check out Aaron Ballman's article at
http://www.aaronballman.com/programming ... rticle.php

Some useful values:
WM_MBUTTONUP = &H208

WM_MBUTTONDOWN = &H207


Top
 Profile  
Reply with quote  
 Post subject: Re: RB: Mac OS and others, or really multi-platform?
PostPosted: Sun Jul 12, 2009 5:25 am 
Offline

Joined: Thu Jun 22, 2006 2:16 am
Posts: 205
Location: Barcelona
Thanks jefftullin,

I know I can do what you suggest, but ...

    - First, this is not so easy for a non expert programmer
    - Second and more important: What I ask is to recognize mouse middle button events. Is it so difficult? I agree with all changes (EditField, for example) done because of MAC OS environment. Real Basic must take advantage of all new possibilities, but (again) the middle button of the mouse, isn't it a VERY USEFULL FEATURE to be taken into account?
I'm not asking for help about how to make walks around to catch these events, what I'm asking is RealSoftware to implement it. Those who program CAD applications need it, and probably others.

_________________
Thanks,
Ramon
----------------------------------------------------------------
REAL_Studio2012r1 Enterprise Academic- Licensed
Windows 7 - Registered and Activated


Top
 Profile  
Reply with quote  
 Post subject: Re: RB: Mac OS and others, or really multi-platform?
PostPosted: Sun Jul 12, 2009 5:44 am 
Offline

Joined: Fri Sep 30, 2005 5:54 pm
Posts: 2055
Location: Great Falls, Montana USA
Ramon,

This is a long shot but this works in the MouseDown.Event to get the RightMouse Click.
// This example in a MouseDown event handler checks to see if the user has right+clicked, then displays a contextual menu.

If IsContextualClick Then
ContextualMenu1.Open // Display the contextual menu
End If

Normally the RightMouse.Click brings up a Menu option, that is what the ContextualMenu1.Open is. Now this may work on the MouseWheel Button, but I am not 100% sure as this is a just a wild guess!

Put the code below in the MouseWheel.Event and try it.
If IsContextualClick Then
Beep // Beep if the WheelMouse Button is clicked
End If

_________________
Jonathon Bevar
REALDevelopment: http://www.semielectronics.com/realdevelopment
SemiElectronics http://www.semielectronics.com

RB2005 R4 Pro for Windows XP Pro/SP2
RB2010 R2.1 Studio Enterprise Edition


Top
 Profile  
Reply with quote  
 Post subject: Re: RB: Mac OS and others, or really multi-platform?
PostPosted: Sun Jul 12, 2009 1:33 pm 
Offline

Joined: Thu Jun 22, 2006 2:16 am
Posts: 205
Location: Barcelona
Thanks Jonathon and Capaho,

Jonathon:
I'm not asking how to get the middle mouse button event. I know how to do it (using the method jefftullin proposed about Aaron's text), what I say is that this shouldn't be the way to deal with a normal event for all Windows programmers, and RB doesn't provide a simple way to use it

Capaho:
I came from VB some years ago. So, I've been programming with RB for some time. So when you say
Quote:
source code to be built into apps for three platforms
I understand it and that's one of the reasons why I moved to RB, but you can find quite a bundle of features thought to be used just in Mac. I think that using middle button should be normal in RB, although Mac users don't need it (Do they?)
This is my complain.

_________________
Thanks,
Ramon
----------------------------------------------------------------
REAL_Studio2012r1 Enterprise Academic- Licensed
Windows 7 - Registered and Activated


Top
 Profile  
Reply with quote  
 Post subject: Re: RB: Mac OS and others, or really multi-platform?
PostPosted: Sun Jul 12, 2009 7:31 pm 
Offline

Joined: Fri Sep 30, 2005 5:54 pm
Posts: 2055
Location: Great Falls, Montana USA
Ramon wrote:
I understand it and that's one of the reasons why I moved to RB, but you can find quite a bundle of features thought to be used just in Mac. I think that using middle button should be normal in RB, although Mac users don't need it (Do they?)
This is my complain.


Well, at least you know that you are not programming for Win alone. The thing is that if you do too much of one type, then others will complain about why don't I have that too?

I have been coding in RB since 2004(RB5.5.5 Pro for Windows) and I love RB. The real thing that most don't understand is that it will take time to get use to the Multi-Platform you are coding in, once you get use to it, you will never go back!

Oh, I am a WInMan myself too! :D

_________________
Jonathon Bevar
REALDevelopment: http://www.semielectronics.com/realdevelopment
SemiElectronics http://www.semielectronics.com

RB2005 R4 Pro for Windows XP Pro/SP2
RB2010 R2.1 Studio Enterprise Edition


Top
 Profile  
Reply with quote  
 Post subject: Re: RB: Mac OS and others, or really multi-platform?
PostPosted: Mon Jul 13, 2009 6:25 am 
Offline

Joined: Fri Jul 21, 2006 12:28 am
Posts: 509
Quote:
...but you can find quite a bundle of features thought to be used just in Mac.


As I understand it, RB began as an AppleScript tool for Macs, so its roots are there, but I wouldn't go so far as to say Mac has priority over Windows in the releases since it evolved into RB and went multi-platform. I started using the RB Windows IDE in 2004 when I was looking for a way to cut development time down from c++. I switched to the Mac IDE late in 2007 when I replaced the PC workstations in my office with Intel iMacs. Having used both the Windows IDE and the Mac IDE extensively I can tell you that from my perspective I don't see where the Mac IDE is favored over the Windows IDE. They both have annoying bugs and design issues.

Ultimately, OS X, Linux and Windows are fundamentally different operating systems, so you will have to account for those differences at times with OS target pragmas. OS X can also do some nice tricks that Windows can't, so I don't think it's possible to make the IDEs for each platform function with exactly the same features.

As for the third mouse button issue, the Mac's Mighty Mouse trackball and the MacBook Pro's multi-touch trackpad can be set for for a third-button function, even though I don't use it for anything other than bringing up Dashboard, so I don't think the lack of a third-button function in the IDE is the result of Mac-centrism. You can put in a feature request for that one if you'd like to see it in a future release.

_________________
Regards,
Carl
Capaho Web
http://www.capaho.com


Top
 Profile  
Reply with quote  
 Post subject: Re: RB: Mac OS and others, or really multi-platform?
PostPosted: Mon Jul 13, 2009 9:22 am 
Offline

Joined: Thu Jun 22, 2006 2:16 am
Posts: 205
Location: Barcelona
Thanks Carl for your words.
Probably you're right, and my point of view is not completely equanimous.
In fact I use primordially Windows and Linux, although I've tried some things in Mac.
I imagine that in Mac you can also use those psychedelic mice with a lot of buttons, and I'm not asking to support all of them.
But I saw, before I made my request (middle button), that this request had been done some years ago, and it doesn't seem to be in any preference queue at all.
That's why I thought about MAC preferences and so on.
If this is not true, I'll accept it and I'll continue trapping this event by myself.
What else can I do !? :?

_________________
Thanks,
Ramon
----------------------------------------------------------------
REAL_Studio2012r1 Enterprise Academic- Licensed
Windows 7 - Registered and Activated


Top
 Profile  
Reply with quote  
 Post subject: Re: RB: Mac OS and others, or really multi-platform?
PostPosted: Mon Jul 13, 2009 1:12 pm 
Offline
User avatar

Joined: Wed Nov 15, 2006 3:50 pm
Posts: 2353
Location: England
Quote:
The problem is that the wheel is also a button but pressing it cannot be identified as such in RB.



Actually, I wonder...
I read that the middle button is presented to apps as CTRL + RIGHTMOUSE
Right Mouse events show up in RB as contextual in the mousedown event...


So I wonder if the following code works in the mousedown event?

DISCLAIMER: I don't own a 3 button mouse, so I haven't actually tested this: it's purely off the top of my bonce...

if IsContextualClick then
//right mouse button clicked
if keyboard.ControlKey then
//MAYBE this was a middle button click??
end if
end if


Top
 Profile  
Reply with quote  
 Post subject: Re: RB: Mac OS and others, or really multi-platform?
PostPosted: Mon Jul 13, 2009 1:28 pm 
Offline
User avatar

Joined: Fri Sep 30, 2005 3:53 pm
Posts: 3261
Location: England
Unfortunately, the MouseDown event doesn't fire at all if I press any middle mouse button (wheel or otherwise)

_________________
Steve Garman
Using REALbasic 2008r2 Professional on Windows Vista Ultimate
and REALbasic 2009r5.1 Professional on Linux Ubuntu 9.04 Desktop
and REAL Studio 2010r1 Personal on Linux Ubuntu 9.10 Desktop
Occasional blog


Top
 Profile  
Reply with quote  
 Post subject: Re: RB: Mac OS and others, or really multi-platform?
PostPosted: Mon Jul 13, 2009 4:32 pm 
Offline
User avatar

Joined: Wed Nov 15, 2006 3:50 pm
Posts: 2353
Location: England
Quote:
the MouseDown event doesn't fire at all if I press any middle mouse button


crashed and burned.. :(

And yet it should be SO simple to change the mousedown event to give 2 parameters: (like VB)

Button as integer .. which can be bitwsie masked to see if bit 1,2, 3 are set (mirroring the buttons)
Modifier as integer .. which can be bitwise masked to see if SHIFT,ALT,CTRL etc are pressed


Top
 Profile  
Reply with quote  
 Post subject: Re: RB: Mac OS and others, or really multi-platform?
PostPosted: Mon Jul 13, 2009 4:37 pm 
Offline

Joined: Fri Jan 06, 2006 3:21 pm
Posts: 12388
Location: Portland, OR USA
And it IS simple to do so. Make a subclass and implement it. Since the mousewheel is a Windows idiom, you only need one set of declares, as referenced above. RB goes for the lowest common denominator on this one, but it's easy to extend it yourself.

Tim


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group