Re: Can Pure Java and Cocoa Java get along???
Re: Can Pure Java and Cocoa Java get along???
- Subject: Re: Can Pure Java and Cocoa Java get along???
- From: Chris Backas <email@hidden>
- Date: Sun, 07 Sep 2003 20:21:55 -0400 (EDT)
- Priority: Normal
>
Sounds good to me, thanks Chris. Basically, the thing I would be using
>
Cocoa Java for most would be the Interface area. The way I look at it, you
>
shouldn't spend more time on coding the interface than you do coding the
>
actual program, and when it comes to Java and interfaces, it's more work
>
than it should be. With Interface Builder, I can build my interface and get
>
it the way I want it to work, then do the actual business logic with equal
>
parts Java and ObjC. But the garbage collection is something I didn't think
>
about, thanks for pointing that out to me. Do you have any suggestions for
>
websites/forums/mailing lists (other than this one) that might provide more
>
real world information on writing Cocoa Java applications? I went through
>
the Apple tutorial, and I got that down pat real easy, so I'm looking for
>
more tutorials or examples. Thanks for getting back to me so quick!
>
>
James
>
>
Another question. Say I build the interface in Interface Builder, create
>
the files and all of that, then find that I need more work on the interface
>
(new windows, more functionality). Can I go back to Interface Builder, add
>
what I need, then Create Files again, and have it only generate the files
>
that aren't already created? I hope that makes sense. Basically, do I have
>
to do all of my interface work in one shot, or can I go back and add to the
>
interface and have it create the files needed in Project Builder? Thanks
>
again for your help.
I really agree about the time spent coding, which is why I settled on Java/Cocoa for my apps; Java has an enormous number of libraries I'm free to use, and Cocoa is a great GUI API.
As for resources for Cocoa Java.. there aren't really any good ones. If you run into a dead end, ask on the lists and hope for an answer. In the earlier days of OSX you'd get flamed for using Cocoa/Java, things are
much saner now, though the number of people knowledgable in the specific area is limited. Best advice I can give is to be fairly good at reading ObjC, and ask your questions generically. 95% of the time an ObjC
answer will be easy to translate to Java. I find that not mentioning Java in my questions tends to get me many more answers ;)
You can certainly change as much as you like in IB; but I only use the Create Files option for the first attempt. In theory, you can have IB 'read files' if you've kept the silly commenting in place (like /* IBOutlet */) and
added the appropriate comments yourself for new things, but I find that to be a nuisance. I also don't belive that the Create Files will attempt to merge existing files and only add new things.
The easiest approach in my opinion is just to keep it in sync yourself. If you find you need a new Outlet in IB, go ahead and make a new one, then declare it in your source. Ditto new actions, it's pretty easy to do by
hand. Make sure you have Console running when you run your app too, as you'll be notified of anything you've forgotten. If you neglect to declare an outlet in your Class that you told IB will be there, the runtime will
complain about it in Console.
Chris Backas
_______________________________________________
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.