Re: Java delegate for NSBrowser?
Re: Java delegate for NSBrowser?
- Subject: Re: Java delegate for NSBrowser?
- From: Barry Wark <email@hidden>
- Date: Thu, 27 Sep 2001 23:48:31 -0700
The class which I am attempting to set as the delegate implements both
browserWillDisplayCell() and browserNumberOfRowsInColumn(), as described
in the (Java) documentation for NSBrowser.
Could this be a ObjC-Java bridge issue? There doesn't seem to be a
protocol/interface for the delegate, so it's a little hard to tell
exactly what method names are expected. I noticed in the documentation
on the ObjC-Java bridge that Objective-C methods are truncated at the
first colon when calling a Java method from Objective-C, so I tried
using browser() as the full function name for the two required
functions, again with no success. Same results using wilLDisplayCell()
and numberOfRowsInColumn().
Any ideas?
Barry
On Thursday, September 27, 2001, at 05:41 PM, Chris Backas wrote:
*** Illegal NSBrowser delegate
(SRImageOpManager$SRImageOpBrowserDelegate@7dc96c). Must implement
browser:willDisplayCell:atRow:column: and either
browser:numberOfRowsInColumn: or browser:createRowsForColumn:inMatrix:
Is there a problem using a Java class as a delegate, or have I made
some
much simpler (read: stupid) mistake.
The error is telling you all you need to know. There are several
method that the delegate *can* implement, but in this case there are
also some that the delegate *must* implement. I haven't specifically
done this
with an NSBrowser, but NSOutlineView and NSListView work the same way.
I know that in those cases the relevant information can be found in
both the online documentation and the JavaBrowser.
Good luck!
Chris Backas