[Cocoa-sharp] Event.cs and mouseLocation

Todd Schavey schaveyt at gmail.com
Tue Mar 13 23:27:25 EDT 2007


All,

I've added my Custom View Example to the Google Groups
page.<http://groups.google.com/group/cocoa-sharp-dev/web/example---responding-to-user-events-and-actions>Before
attempting to compile it, please get the latest source code from the
SVN repo. I did have to update the View.cs file...as captured in the
ChangeLog. I basically needed to add the IsOpaque event handler function.

Pedro and Geoff,

When you get a moment, please give this bad boy a shot. You can see my by
"TODO" comments where the problems are. Currently, there are only two. The
ConvertPointFromView method that, once functioning, will allow for the
Event's coordinates to be translated into usable x, y coordinates. The
second is the ColorWell explosion.

Enjoy,

Todd

On 3/13/07, Todd Schavey <schaveyt at gmail.com> wrote:
>
> Pedro,
>
> I didn't see your last reply to me until I read the cocoa-sharp mailing
> list digest :-(. For some reason my gmail is wiggin' out for some reason and
> I'm lossing a lot of the cocoa-sharp mailing list traffic.
>
> Anyway, I saw your reply. If you read my original reply closely I mention
> that your mouse location won't make sense still because we/you need to get
> the NSView::convertPoint:FromView: to work. This will translate those
> 1.3843843 values into a logical coordinate system that is used by your
> view. The current implementation will cause a segmentation fault. I'm
> putting up that tutorial sometime this week so that the community might be
> able to help us out.
>
> Todd
>
> On 3/12/07, Todd Schavey <schaveyt at gmail.com> wrote:
> >
> > Pedro,
> >
> > Please get the lastest source from SVN. As part of a drawing example
> > that I'm working on I actually went ahead and created the Event class as
> > well as updated the View class with a crap load of event handlers for mouse
> > and keyboard interaction.
> >
> > Please be aware, although you will be able to ge the location of the
> > mouse click, it's coordinate system still needs to be converted. ***this is
> > where I'm having some troubles yet. I'm attempting to call the
> > convertPoint:fromView ObjC method and it choking. Without this...the mouse
> > location won't make any sense...:-(.
> >
> > My plan is to upload the current tutorial to the Google Groups site.
> > That way maybe Mr. Norton would be able to help me out. You'll also see how
> > to use those event handlers...and they very handy and eliminate a lot of
> > repetitive lines of code.
> >
> > Todd
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/cocoa-sharp/attachments/20070313/97b16fe9/attachment.html 


More information about the Cocoa-sharp mailing list