If you could do that for me, it would be greatly appreciated.

At the moment, I don't really have a need to compile the source other than
to integrate this feature.

thank you so much for your time




-----Original Message-----
From: Jim Grandy [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 12, 2006 5:50 PM
To: William Krick
Cc: [email protected]
Subject: Re: [Laszlo-user] laszlo needs a shouldYieldFocus() method


On Jan 12, 2006, at 2:29 PM, William Krick wrote:

> I think the code in LzFocus.as LzFocus.setFocus() would look
> something like
> this...
>
>     if ( !this.csel.shouldYieldFocus() )
>       return;
>
That looks right.
> Then all focusable views would need to have a default
> shouldYieldFocus()
> method that simply returns true and that the user can override to
> return
> false if conditions aren't met.  I'm not sure where this would go.
> LzNode?
> LzView?  basecomponent?
>
LzView is a good choice. I don't think LzNodes are (or should be)
focusable. Just add a function declaration in LaszloView.as that
returns true.
> The problem is that I'm not that familiar with the internal
> workings of the
> whole laszlo architecture so I'm not sure how best to shoehorn this in
> without breaking things.
>
> I haven't tackled building the source yet. That looks pretty daunting.
>
I forgot you might not have a contributor setup. This took me most of
a day to get working when I started, so unless you want to be set up
to build for some other reason, it might not be worth your time. Let
me know, I can put together a diff for you and get it integrated (or
help you with the setup if you are interested).

Thanks again!

jim

>
>
> -----Original Message-----
> From: Jim Grandy [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, January 11, 2006 6:09 PM
> To: William Krick
> Cc: [email protected]
> Subject: Re: [Laszlo-user] laszlo needs a shouldYieldFocus() method
>
>
> Sounds like a relatively straightforward addition, and I agree we
> need something like that.
>
> You've already pretty much written the RFC in your email, and the
> change would be small. Could you at minimum write up a JIRA bug?
> Contributing the change would also be fantastic, and ensure that it
> happened on your timeframe. (I'd start looking in LzFocus.as, in
> LzFocus.setFocus(), perhaps just after the line that sets
> __LZsfrunning to true.)
>
> jim
>
> On Jan 11, 2006, at 2:28 PM, William Krick wrote:
>
>> We're trying to develop a fairly sophisticated application in laszlo.
>>
>> One of the most difficult and frustrating parts is validating user
>> input and
>> this may cause us to give up on laszlo entirely.
>>
>> We really need the ability to stop a focus change if the contents
>> of a field
>> is invalid.
>>
>> In Java, this problem was solved by giving each component a
>> shouldYieldFocus() method.
>>
>> The way this works, when any other component wants to take focus,
>> either by
>> user action via keyboard or mouse, or programmatically, the focus
>> system has
>> to call the current focus owner's shouldYieldFocus() method first.
>> This
>> method by default just always returns true.  However, you can
>> override the
>> method with your own implementation that can return false if certain
>> conditions aren't met.  Returning false prevents the focus system
>> from
>> moving focus to the new component.
>>
>> Laszlo really needs something similar in order for it to be viable
>> for
>> "real" applications.  Otherwise we might as well just go back to
>> HTML forms
>> and do all our validation server-side.
>>
>>
>>
>> _______________________________________________
>> Laszlo-user mailing list
>> [email protected]
>> http://www.openlaszlo.org/mailman/listinfo/laszlo-user
>
>
>



_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user

Reply via email to