• 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
[SOLVED - But...] "Subclassing NSTableView while in a Java package"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SOLVED - But...] "Subclassing NSTableView while in a Java package"


  • Subject: [SOLVED - But...] "Subclassing NSTableView while in a Java package"
  • From: Frédéric BLANC <email@hidden>
  • Date: Fri, 14 Feb 2003 15:51:43 +0100 (CET)

Hi,


Thanks to Enrico Stamigna, my Java-based problem (cf. subject) is solved: I was
plain wrong, sorry, since there's no bug in IB here but solely consistency
checking based upon superclass while creating and naming a newly-created subclass.

Indeed, when you're subclassing a Java JDK class, you're allowed to use dots in
the name of the class (thus, to use a package-based name!); this is due to the
fact that the radio button for this class is automatically set to "Java". But,
when you're subclassing a Cocoa class, you're automatically in the "Objective-C"
case (thus, the cancelling of your dots-based classname!)

The solution when subclassing NSTableView to include it in your own Java package
was then to:
1) Subclass NSTableView (you can let the default "MyTableView" name);
2) Click "Java" in the inspector;
3) Change its name to "my.personal.package.MyTableView"

Then, you can assign in the "Custom Class" section of the inspector your custom
class as the type of any NSTableView widget! Thanks a lot to all of you and
especially to Enrico.

===

But... this hasn't solved my initial problem which was to specialized
NSTableView with custom code! Indeed, now that I can assign MY package-based
class to the widget, I thought it will be kind of simple to just overload some
methods (to catch special key events, for example.) But, it seems I can't run
such a project. To illustrate my new problem, I've done a tiny project - which
one could find at: http://blanc.free.fr/pub/temp/IB_TableView_package.sit.
The logic behind it was to ONLY build the simpliest .nib (a window w/ a
NSTableView reassigned to my custom subclass - which is the minimal NSTableView
subclass!) When I run this built app, I've got the following trace before it
shortly quits:

<<
ObjCJava WARNING:
jobjc_jvm_newObject(): constructor with signature
(Ljava/io/InputStream;)V on class java/io/ObjectInputStream failed
(should morph the java exception)
2003-02-14 00:16:08.987 IB_TableView_package[875] AppKitJava: uncaught
exception OBJCJava_RUNTIME_EXCEPTION ((null))
2003-02-14 00:16:08.989 IB_TableView_package[875] AppKitJava: exception
= (null description)
2003-02-14 00:16:08.991 IB_TableView_package[875] AppKitJava:
terminating.

IB_TableView_package has exited with status 1.
>>


Thanks to anyone who could help me here.
Note: Some people on those lists were kind enough to participate. I'll answer to
everyone, I just found the needed time until then. Thanks a lot for your
suggestions, they'll help me soon.

Bye,


- Fred
_______________________________________________
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:
    • Re: [SOLVED - But...] "Subclassing NSTableView while in a Java package"
      • From: Rams <email@hidden>
  • Prev by Date: Re: Protecting singleton objects from releasing
  • Next by Date: NSPopUpButton revealed: Images, small menu items & control, borderless (example code)
  • Previous by thread: Re: Protecting singleton objects from releasing
  • Next by thread: Re: [SOLVED - But...] "Subclassing NSTableView while in a Java package"
  • Index(es):
    • Date
    • Thread