• 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
Re: New Web Components failing to compile?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New Web Components failing to compile?


  • Subject: Re: New Web Components failing to compile?
  • From: Chuck Hill <email@hidden>
  • Date: Thu, 23 Mar 2006 10:02:07 -0800


On Mar 23, 2006, at 5:20 AM, Jerry W. Walker wrote:

Hi, Jeffrey,

While he's walking away whistling, Chuck will soon have you believing that the only way to develop a WO project is under Windows in Eclipse.

Sir! I take offence! I demand satisfaction! I challenge you to a duel of IDEs. The OS X platform, dawn, tomorrow.


:-P

90% of my Eclipse work is done on OS X 10.4. Maybe closer to 100% now that I have a desktop Mac with a big display and the big ass CRT on my PC is dying.


Because he's right about so many things on this list, his biases here could easily fool you. To put it simply and without justification, he's just plain wrong on this one. :-)

The easiest way to add a component on Mac OS X using the standard WO tools is:

  * Open your project in Xcode

  * Create your new component in WOBuilder

* Save the new component you've built in WOBuilder into your project's directory

* WOBuilder will ask whether you want the component added to the project, click Yes.

The component is added to the correct target in the correct location and automatically appears in Xcode within the Web Components group. No muss, no fuss, no worries about targets.


This, you feel is easier than * Open your project in Eclipse.

* Right click, New -> WOComponent

Ah, how devious are the easier ways of Mac tools!


You must have your project open in Xcode when you do this or it won't work correctly. If it does work correctly, you'll notice that Application and Session appear in the browser at the bottom of your WOBuilder component window.

All of this is even easier if you start up WOBuilder by double clicking on a WOComponent in Xcode. Then, when you create a new component in WOBuilder, the WOBuilder Save dialog sheet is already pointed at your project.

I've found it easiest to build my WOComponents in WOBuilder's Layout mode. I add new keys and new Action methods by right clicking (Cntrl clicking if you have a one-button mouse) in WOBuilder's browser panel to bring up a drop-down menu. This creates the key or Action method in your Java code and automatically saves it, making it immediately available in WOBuilder for binding to your component.

I've often reorganized the class members in Xcode that WOBuilder adds to the class, but I've found it easiest, overall, to mostly deal with WOComponents in WOBuilder.

You'll find that the underlying assumption with the Mac OS X WO tools is that certain parts of the project are best dealt with visually, specifically the EOModel and the WOComponents. Unfortunately, two issues have muddied this laudable objective:

* the tools used to deal with these parts of the project have atrophied over the last six years or so, due primarily to Apple's neglect

* Xcode is being used to develop projects in so many languages with so many different project structures, that its Java and WO capabilities seem buried, at times, under other priorities. Remember that Cocoa development is the primary use of Xcode and Cocoa apps are primarily developed in Objective C.

Yes, I agree, it is sad that all the Obj-C developers don't have a nicer IDE. Pity.


The good news is that:

  * the tools were pretty wonderful to start with

* Apple seems to have taken a renewed interest in WebObjects as of about two years ago and they are actively working on the tools again.

This I don't doubt and I expect good things to come in future releases of WOBuilder and EOModeler.


  * Xcode's Java capabilities are improving

With Xcode's architecture (still based on a process external to the IDE), I doubt it will never match what is possible in other IDEs.


They haven't surmounted the entropy of four years of neglect and Xcode will never be as precisely focused on Java development as Eclipse, but I'm hoping that they'll have the tools in good shape by this next WWDC. The EOModeler elements embedded in Xcode are not yet ready for prime time, but what's there seems to be first class. The new WOBuilder has changed, for the worse in some cases, but their aim is to have the new WOBuilder better follow the Cocoa GUI guidelines and I think they're getting there.

Now that they've officially dropped support for Windows development, they can focus on making the WOTools first class Cocoa citizens and I fully believe that they're achieving their aim.

If you follow Chuck's advice on this one, he will have you building your WOComponents and EOModels by hand in BBEdit, or some such so you can use Eclipse. Watch'im.

First Gosling, now Walker! What is the world coming to? FUD! FUD! Run Away! Run Away!


Um, I use Eclipse and WOBuilder and EOModeler. On OS X. And WOLips has a pretty nice (nod to Mike Schrag) text editor for the .wod/.html/.java that handles code completion, validation, color code, and some other nifty features.

Your tongue in cheek,
Chuck



On Mar 22, 2006, at 9:33 PM, Chuck Hill wrote:

I somehow sense that you are starting a deep and long love affair with targets. :-P


On Mar 22, 2006, at 6:27 PM, Jeffrey Pearson wrote:

Next issue.

When I add a web component, it fails to compile??

Steps I took:

Right-Click on Web Components in the Groups/Files panel.
Select Add->New File
Select WebObjects->Component
Click Next
Name it (ie Publishers)
Location is ~/metropolisadmin
Add to project: metropolisadmin
All Three targets selected (I have also tried just metropolisadmin target selected)
Click Finish
When XCode finishes what it is doing, I select Build and Go.


Here is the class file created:

//
// Publishers.java: Class file for WO Component 'Publishers'
// Project metropolisadmin
//
// Created by jeffreypearson on 3/22/06
//

import com.webobjects.foundation.*;
import com.webobjects.appserver.*;
import com.webobjects.eocontrol.*;
import com.webobjects.eoaccess.*;

public class Publishers extends WOComponent {

    public Publishers(WOContext context) {
        super(context);
    }

}


Get errors:

Publishers.java:9: package com.webobjects.appserver does not exist

Publishers.java:11: package com.webobjects.eoaccess does not exist

Changes are excellent that WebObjects does, in fact, exist. This message is a hint from Xcode that you have added the web component to the wrong target. It needs to be added to the Application Server target.


Eclipse has no targets...
<walks away whistling>

Chuck


--
__ Jerry W. Walker,
WebObjects Developer/Instructor for High Performance Industrial Strength Internet Enabled Systems


    email@hidden
    203 278-4085        office




--
Coming in 2006 - an introduction to web applications using WebObjects and Xcode http://www.global-village.net/wointro


Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects




_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: New Web Components failing to compile?
      • From: Lachlan Deck <email@hidden>
References: 
 >New Web Components failing to compile? (From: Jeffrey Pearson <email@hidden>)
 >Re: New Web Components failing to compile? (From: Chuck Hill <email@hidden>)
 >Re: New Web Components failing to compile? (From: "Jerry W. Walker" <email@hidden>)

  • Prev by Date: Re: Thanks and Comments
  • Next by Date: Re: Thanks and Comments
  • Previous by thread: Re: New Web Components failing to compile?
  • Next by thread: Re: New Web Components failing to compile?
  • Index(es):
    • Date
    • Thread