[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re: [sc-users] UserView mouseDownAction button difference between Cocoa and SwingOsc



Window.new.front.view.mouseDownAction_({ arg view, x, y, mod, but; but.postln })

i'm on a 1-button laptop now, so i only get 1s....


----- original message --------

Subject: Re: [sc-users] UserView mouseDownAction button difference between Cocoa and SwingOsc
Sent: Fri, 29 May 2009
From: nescivi<nescivi@xxxxxxxxx>

> On Friday 29 May 2009 12:43:15 Batuhan Bozkurt wrote:
> > Hi Sciss,
> >
> > Unfortunately I don't have a three button mouse around now, but will
> > check when I see one. I presume, unifying them across kits would break
> > others code so the user level check and adjust is necessary I guess.
> 
> I have one, just send me the code snippet to do the check :)
> (don't want to search in helpfiles right now).
> 
> sincerely,
> marije
> 
> >
> > thanks
> > Batuhan
> >
> > On May 29, 2009, at 5:35 PM, Sc iss wrote:
> > > hi batuhan,
> > >
> > > i confess i never looked at the button codes comes from swing. i
> > > assume they are different from cocoa. i don't know if they can be
> > > translated to create the same codes... what do middle buttons an 3-
> > > button mice report?
> > >
> > > ciao, -sciss-
> > >
> > >
> > > ----- original message --------
> > >
> > > Subject: [sc-users] UserView mouseDownAction button difference
> > > between Cocoa and SwingOsc
> > > Sent: Fri, 29 May 2009
> > > From: Batuhan Bozkurt
> > >
> > > Hi all,
> > > I have a user view that grabs mouseDownActions. I want to
> > > differentiate between a left click and a right click across
> > > platforms.On my Mac, the reported button numbers are different in
> > > Cocoa and SwingOSC.
> > > I get these arguments:
> > > .mouseDownAction_({	arg view, x, y, mod, button, cCount;	.....
> > >
> > > And here are the passed values to the action;
> > > [ a JSCUserView, 243, 51, 0, 1, 1 ] //swing left click[ a
> > > JSCUserView, 229, 93, 1048576, 3, 1 ] //swing right click
> > > [ a SCUserView, 327, 118, 0, 0, 1 ] //cocoa left click[ a
> > > SCUserView, 327, 118, 256, 1, 1 ] //cocoa right click
> > >
> > > So in SwingOSC, left click is 1 and right click is 3, where in
> > > Cocoa, left click is 0 and right click is 1.
> > > So my question is, is this a bug? Or is this the way its meant to be
> > > and I should check for the active GUI kit in my class and act
> > > accordingly by hardcoding different values for these two GUI kits?
> > > I've never used SwingOSC before so I need a bit of assistance on this.
> > > Thanks in advance,Batuhan
> > >
> > > --- original message end ----
> >
> > _______________________________________________
> > sc-users mailing list
> >
> > info (subscription, etc.):
> > http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml archive:
> > https://listarc.bham.ac.uk/marchives/sc-users/
> > search: https://listarc.bham.ac.uk/lists/sc-users/search/
> 
> 
> 
> 
> _______________________________________________
> sc-users mailing list
> 
> info (subscription, etc.):
> http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
> archive: https://listarc.bham.ac.uk/marchives/sc-users/
> search: https://listarc.bham.ac.uk/lists/sc-users/search/
> 

--- original message end ----


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/