Re: WoLips and display groups

From: Anders Peterson (anders_peterso..ptimatika.se)
Date: Fri Jul 20 2007 - 02:54:22 EDT

  • Next message: Thomas: "Re: WoLips and display groups"

    Chuck Hill wrote:

    >> However, there are thousands of errors that don't seem right to me.
    >> For example, I have a display group called dg that uses an entity
    >> called PageType whose class in the model is PageType. I use the
    >> generation gap model where all the entity's model accessors are in
    >> _PageType.java and PageType.java extends _PageType. The class name in
    >> the model is PageType.
    >>
    >> _PageType.java has an accessor for the model attribute hasSubPages().
    >>
    >> I have a binding in a component (which works) for
    >> dg.selectedObject.hasSubPages
    >> But WOLips tells me this is an error: There is no key 'hasSubPages'
    >> for the keypath 'g.selectedObject'
    >
    > The part to understand here is not your code, but dg.selectObject. If
    > you check the API, this returns
    >
    > public Object selectedObject()
    >
    > And, obviously, java.lang.Object has no method named hasSubPages().
    >
    >
    >> So how do I tell WOLips that all these errors are not errors, so I can
    >> start finding the real errors?
    >
    > That is the correct question. Go to
    > Window - Preferences - WOLips - Binding Validation
    > Add
    > Component Regex: .*
    > Valid Binding Regex: .*\.selectedObject\..*
    >
    > And no, I am not 100% sure the regex for Valid Binding Regex is
    > correct. Getting it right is left as an exercise for the reader. :-)

    Couldn't there be a Quick Fix available in the editor that would set
    that preference?

    and/or

    Apple/WO used to have this..ypeInfo JavaDoc tag to tell WOBuilder and
    others what type was actually returned. Can't WOLips make use of this
    tag? The Quick Fix would then be to add that tag.

    /Anders



    This archive was generated by hypermail 2.0.0 : Fri Jul 20 2007 - 02:55:08 EDT