Re: I just thought this looked cool

From: Lachlan Deck (lachlan.dec..mail.com)
Date: Wed Feb 27 2008 - 17:35:31 EST

  • Next message: Mike Schrag: "Re: I just thought this looked cool"

    On 28/02/2008, at 9:04 AM, Mike Schrag wrote:

    >>> I'm not sure how they determine which ones are actions compared
    >>> to just regular "get" methods. No way they looked at the
    >>> inheritance hierarchy to only show methods that extend from
    >>> WOActionResults (and even though we can do that easily, it's
    >>> really expensive to actually do that).
    >>
    >> I'd be guessing they did.
    > Should be relatively straightforward to test ... Subclass
    > WOComponent as CommonComponent (but don't make a .wo), and have an
    > action method that declares its type signature as returning
    > CommonComponent. There's no .wo to match it against, so WO would
    > have to walk the inheritance tree to know that's a
    > WOActionResults. It's mostly academic, but I am a little curious.
    > If anyone has a WOB around and wants to try this to see, I'd be
    > interested to know the results.

    Just did this.
    - created new WebObjects application within Xcode (I'd forgotten how
    quickly you can type in Cocoa apps)
    - Added new Java Class: CommonComponent extends WOComponent
    - Added method to Main.java: public CommonComponent someResults()
    { return null; }
    - Double clicked on Main.wo

    WOB shows the someResults action below the line.

    - Changed Main to subclass CommonComponent
    - moved method to super class but as returning yet again another
    component name (without *.wo)

    Also is showed.

    It depends if there are no potential compile errors... but it works
    (mostly) :-)

    with regards,

    --
    

    Lachlan Deck



    This archive was generated by hypermail 2.0.0 : Wed Feb 27 2008 - 17:36:44 EST