• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Cocoa-Java issues
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Cocoa-Java issues


  • Subject: Cocoa-Java issues
  • From: Steve Klingsporn <email@hidden>
  • Date: Sun, 20 Oct 2002 23:32:34 -0500

Howdy,

I've been doing some Cocoa-Java development. I like it. Very nice.

I know, I know, "real men use Objective-C," but I figured I'd give Java
a shot first.

Here are some questions I have:

1. When managing a cursor in a NSView subclass, I have the following
for my resetCursorRects() method:

/**
Sets the cursor rectangles up so the mighty
BeOS hand cursor shows when the mouse is within
our bounds.
**/
public void resetCursorRects()
{
addCursorRect(visibleRect(), mBeOSHandCursor);
}

I define "mBeOSHandCursor" elsewhere, where I initialize it with the
cursor data and hotspot and call setOnMouseEntered(true) on it.

The problem is that sometimes the cursor changes back to the arrow. I
don't want the arrow when it's in my view. I can make it happen every
time if I right-click on my view and my contextual menu pops up and
then I right-click again in my view to dismiss the menu -- the cursor
remains the arrow, instead of the BeOS hand.

I have tried to combat this by enabling mouse moved events in my window
as was suggested in an archived thread on cocoa.mamasam.com with no
luck, either. I'm assuming that there are bugs in Cocoa with regards
to cursor management (I'm using 10.2.1), as many other questions that
were archived on mamasam and pertain to cursor management have had the
same answers, yet programs like Chimera exhibit the same behavior when
I try them out. Which brings me to #2.

2. If I implement viewDidMoveToWindow() in my NSView subclass, and
immediately call window() from within the body of this method, null is
returned. Is this a Cocoa bug? If so, I'll gladly report it.

Thanks very much. Java-Cocoa is neat. I'll do an Objective-C project
next, but wanted to do a Java project first as I had a
platform-independent game (Ataxx clone) I wanted to port to Cocoa. You
can see it here:

http://www.buzzlabs.com/aquataxx/

Version 1.5 is coming any day now.

Thanks,
Steve
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • How portable are the NSxxx classes?
      • From: Ken Tozier <email@hidden>
  • Prev by Date: Re: How to make a NSMatrix with NSImageCell's ??
  • Next by Date: Re: Accepting the right file drops
  • Previous by thread: Complete Control Over A
  • Next by thread: How portable are the NSxxx classes?
  • Index(es):
    • Date
    • Thread