Observe editable CPTextField?

69 views
Skip to first unread message

Elias

unread,
Mar 18, 2011, 7:43:34 AM3/18/11
to Cappuccino & Objective-J
Hi,

is there any delegate which fires when you have a keyUp in an editable
CPTextField?

What's the best practice here?


Elias

Ian Lienert

unread,
Mar 18, 2011, 7:52:19 AM3/18/11
to objec...@googlegroups.com
textDidChange in CPControl is probably what you're looking for.

Gerrit Riessen

unread,
Mar 19, 2011, 3:51:19 AM3/19/11
to objec...@googlegroups.com
On a similar note, how do i to get feedback if someone pastes
something into a CPTextField? A paste does not trigger any of the
textDid* (e.g. Change, beginEditing, endEditing), so i've got the
problem that contents of the textfield are "reset" when the element is
redrawn.

one approach that i found was to override the performKeyEquivalent
method in the CPControl, but that seems a lot of work (subclassing
CPTextField, handling the event, passing on the data, etc) for
something that is, IMHO, just as common as text editing for which
dedicated delegates exist.

cheers
gerrit

> --
> You received this message because you are subscribed to the Google
> Groups "Cappuccino & Objective-J" group.
> To post to this group, send email to objec...@googlegroups.com.
> To unsubscribe from this group, send email to objectivej+...@googlegroups.com
> .
> For more options, visit this group at http://groups.google.com/group/objectivej?hl=en
> .
>

Klaas Pieter Annema

unread,
Mar 19, 2011, 4:37:18 AM3/19/11
to objec...@googlegroups.com
I believe we fixed that bug with this commit:


Are you running of master or 0.9? If not please make sure to update. If you're still experiencing the problem after updating, please create a sample project.

- Klaas Pieter

Gerrit Riessen

unread,
Mar 19, 2011, 5:44:14 AM3/19/11
to objec...@googlegroups.com
Thanks! I'm using 0.9 but not master. I installed the official release 
when it came out and it doesn't seem that the fix is contained in 
the release version 0.9? 

Is there a 0.9.1 on the way or is the best option to move to master and 
hope for the best ;)

cheers
gerrit

Klaas Pieter Annema

unread,
Mar 19, 2011, 7:45:50 AM3/19/11
to objec...@googlegroups.com
I'll try to make a 0.9.1 bug fix branch next week. Release will hopefully follow about a week or two after that. 

Sent from my iPhone

Gerrit Riessen

unread,
Mar 19, 2011, 7:57:22 AM3/19/11
to objec...@googlegroups.com
That would be great, although I'll try out the master branch using the 

i've got a couple of other potential bugs that i want try out on the master branch before
bothering everyone with them....

cheers!

Gerrit Riessen

unread,
Mar 19, 2011, 10:09:00 AM3/19/11
to objec...@googlegroups.com
OK, found the bug but ...

Using master branch fixes the issue when using CPTextField but it doesn't work
with LPMultiLineTextField. So there's probably something going on with keyUp:
as defined by LPMultiLineTextField, it doesn't seem to pass on/generate the 
textDidChange callback as CPTextField does in the case of a paste.

Tested with the lastest version of the LPKit master branch 

Thanks again,
gerrit

gorenje

unread,
Mar 19, 2011, 11:21:01 AM3/19/11
to Cappuccino & Objective-J
Sorry for all the spam but it seems that it's not keyUp: that's
causing
the problem, the paste event does not seem to be generated when using
LPMultiLineTextField.

The timer is not being triggered and keyUp: is not called when using
multi line.

On Mar 19, 3:09 pm, Gerrit Riessen <gerrit.ries...@googlemail.com>
wrote:
> OK, found the bug but ...
>
> Using master branch fixes the issue when using CPTextField but it  
> doesn't work
> with LPMultiLineTextField. So there's probably something going on with  
> keyUp:
> as defined by LPMultiLineTextField, it doesn't seem to pass on/
> generate the
> textDidChange callback as CPTextField does in the case of a paste.
>
> Tested with the lastest version of the LPKit master branch
> (https://github.com/luddep/LPKit/commit/d7086e1574251e55807ef591ca396a...
> )
>
> Thanks again,
> gerrit
>
> On 19.03.2011, at 12:45, Klaas Pieter Annema wrote:
>
>
>
> > I'll try to make a 0.9.1 bug fix branch next week. Release will  
> > hopefully follow about a week or two after that.
>
> > Sent from my iPhone
>
> > On 19 mrt. 2011, at 10:44, Gerrit Riessen <gerrit.ries...@googlemail.com
> > > wrote:
>
> >> Thanks! I'm using 0.9 but not master. I installed the official  
> >> release
> >> when it came out and it doesn't seem that the fix is contained in
> >> the release version 0.9?
>
> >> Is there a 0.9.1 on the way or is the best option to move to master  
> >> and
> >> hope for the best ;)
>
> >> cheers
> >> gerrit
>
> >> On 19.03.2011, at 09:37, Klaas Pieter Annema wrote:
>
> >>> I believe we fixed that bug with this commit:
>
> >>>https://github.com/280north/cappuccino/commit/cc5e8c3f345bbfdfe4b9eff...
> >>>>> For more options, visit this group athttp://groups.google.com/group/objectivej?hl=en
> >>>>> .
>
> >>>> --
> >>>> You received this message because you are subscribed to the  
> >>>> Google Groups "Cappuccino & Objective-J" group.
> >>>> To post to this group, send email to objec...@googlegroups.com.
> >>>> To unsubscribe from this group, send email to objectivej+...@googlegroups.com
> >>>> .
> >>>> For more options, visit this group athttp://groups.google.com/group/objectivej?hl=en
> >>>> .
>
> >>> --
> >>> You received this message because you are subscribed to the Google  
> >>> Groups "Cappuccino & Objective-J" group.
> >>> To post to this group, send email to objec...@googlegroups.com.
> >>> To unsubscribe from this group, send email to objectivej+...@googlegroups.com
> >>> .
> >>> For more options, visit this group athttp://groups.google.com/group/objectivej?hl=en
> >>> .
>
> >> --
> >> You received this message because you are subscribed to the Google  
> >> Groups "Cappuccino & Objective-J" group.
> >> To post to this group, send email to objec...@googlegroups.com.
> >> To unsubscribe from this group, send email to objectivej+...@googlegroups.com
> >> .
> >> For more options, visit this group athttp://groups.google.com/group/objectivej?hl=en
> >> .
>
> > --
Reply all
Reply to author
Forward
0 new messages