Hi,

Looking at the itunes demo, I've managed this

<PushButton buttonData="OK">
                <buttonPressListeners>
                    <wtkx:script>
                             <![CDATA[
                                    function buttonPressed(button) {
                                        application.doAction();
                                    }
                             ]]>
                    </wtkx:script>
                </buttonPressListeners>
</PushButton>

where application is a reference to the Java class which would be my
Controller. Although I'm really grateful that I got a cleaner Java code, I'd
like to ask if there a more clever way to reduce this code :D

thanks you so much!
-
thirdy

On Tue, Sep 1, 2009 at 7:34 PM, Greg Brown <[email protected]> wrote:

> You might try defining your event handlers in WTKX. That helps associate
> them with the components to which they apply, and forces you to define a
> clear public API in your main class (or classes).
> Re: CRUD apps - I would suggest returning your result sets as JSON and
> using data binding to populate your forms.
>
> G
>
>
> On Aug 31, 2009, at 10:32 PM, Vicente de Rivera III wrote:
>
> Hi,
>
> I've recently finished my first Pivot app,
> http://lazychick-4ita.appspot.com/
> But my code is really unmaintainable specially with handling exceptions
> from web queries. And I got all
> event handling in one Main class, actually I got everything in the Main
> class and 3 wtkx files.
>
> Now that I'm ready to start my new app. How can I solve this? What Design
> patterns do you recommend when developing with Pivot? Let's say for example,
> a Pivot desktop CRUD app with a JDBC backend
>
> Thanks!!!
> -
> thirdy
>
>
>

Reply via email to