I’m trying trying to write an event that will convert a full url entered into a TextCtrl into just the domain. I’m running in recursion problems though.
I’m trying trying to write an event that will convert a full url entered into a TextCtrl into just the domain. I’m running in recursion problems though.
Aha! I’ve been meaning to ask about a similar problem with the FileBrowseButton - works just fine if you browse, but if you try to type the filename it reacts to one character at a time. Now I see what to overload (although it seems like a bug in the widget to me…)
I’m trying trying to write an event that will convert a full url entered into a TextCtrl into just the domain. I’m running in recursion problems though.
I tried both and the event doesn’t seem to fire. With EVT_TEXT_ENTER I’m tyring pressing the enter key in the field. With EVT_KILL_FOCES I’m tabbing out…
I’m trying trying to write an event that will convert a full url entered into a TextCtrl into just the domain. I’m running in recursion problems though.
This can sometimes make a difference. (Unfortunately, I’m not sure which way is more appropriate. But I definitely process EVT_TEXT_ENTER events sent to a MiniFrame with no problem. . .)
I tried both and the event doesn’t seem to fire. With EVT_TEXT_ENTER I’m tyring pressing the enter key in the field. With EVT_KILL_FOCES I’m tabbing out…
I’m trying trying to write an event that will convert a full url entered into a TextCtrl into just the domain. I’m running in recursion problems though.
I'm trying trying to write an event that will convert a full url entered into a TextCtrl into just the domain. I'm running in recursion problems though.
I guess it's trying to run the event before the whole domain has been entered. How do I do this without running into the recursion problem?
The recursion problem comes from the fact that SetValue will generate another EVT_TEXT before the SetValue returns. You can use ChangeValue instead to avoid that, but do you really want to execute this code for every character typed?
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
I wouldn’t presume to answer for the OP, but in my case (which seems to be the same) the answer is NO - I wish to process the event only after all desired text has been entered.
The recursion problem comes from the fact that SetValue will generate another EVT_TEXT before the SetValue returns. You can use ChangeValue instead to avoid that, but do you really want to execute this code for every character typed?