Error in masked text control

Tim Roberts wrote:

>

[...]

>I am currently in the process of making some fixes and
>enhancements to maskededit.py, and am trying to fix this issue
>while I'm at it.

[...]

In fact, your task is essentially impossible. Virtually every ASCII
character is allowed inside an RFC-822 e-mail address, with
appropriate quoting.

>...
>Is this acceptable and/or sufficient?

No, this doesn't do it. Jeffery Friedl's excellent book on
"Mastering Regular Expressions" contains the One True regular
expression that accurately matches all legal RFC-822 compliant
e-mail addresses. It 6,598 characters long. I kid you not.

Wow.
Rats.
Hmmm.... I believe you, but I don't want to drop the autoformat
entirely, as I think it is a nice thing, and I know that it
covers a large portion if not a majority of "normal" email
addresses.

So, I'll drop the "sufficient" part, assuming this implies
"full RFC-822" compliance, and substitute "reasonable" instead...
Given this criteria, would you add/change anything else?
(Remember, this is for form-filling, where the user is typing,
and you're trying to give them feedback on obvious mistakes.)

Regards,
/Will Sadkin
Parlance Corporation
www.nameconnector.com

···

On Wed, 23 Jul 2003 14:03:11 -0400, Will Sadkin > <wsadkin@nameconnector.com> > wrote:

Hi all,

Platform is Linux (Redhat 9), Python 2.2.3, and wxPython 2.4.1.2 compiled
for GTK2.

I get the following warning message every time I use GetSelection() in a
wxTextCtrl -

    GLib-GObject-WARNING **: invalid cast from 'GtkEntry' to 'GtkTextView'

This is followed by two Gtk_CRITICAL messages - 'assertion GTK_IS_TEXT_VIEW
failed' and 'assertion GTK_IS_TEXT_BUFFER failed'.

GetSelection() returns the correct value, and the application continues
running, so this is just an annoyance.

Any suggestions on getting rid of these messages?

Thanks in advance

Frank Millman

Frank Millman wrote:

Hi all,

Platform is Linux (Redhat 9), Python 2.2.3, and wxPython 2.4.1.2 compiled
for GTK2.

I get the following warning message every time I use GetSelection() in a
wxTextCtrl -

    GLib-GObject-WARNING **: invalid cast from 'GtkEntry' to 'GtkTextView'

This is followed by two Gtk_CRITICAL messages - 'assertion GTK_IS_TEXT_VIEW
failed' and 'assertion GTK_IS_TEXT_BUFFER failed'.

GetSelection() returns the correct value, and the application continues
running, so this is just an annoyance.

Any suggestions on getting rid of these messages?

Unfortunatly not. They are real tricky to track down sometimes. In this case it may just be some gtk1 code that gtk2 doesn't agree with...

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!