Evt Text Not Generated By Textctrl For Mac

  воскресенье 05 апреля
      11

SetValue modifies the contents of the TextCtrl gtktextchangedcallback is triggered gtktextchangedcallback changes ismodified to true gtktext sends an EVTTEXT event and so again calls OnTextCtrlUpdated. Infinite loop ensues. Segmentation fault. The behavior I expected based on the manual was that SetValue would trigger an EVTTEXT call. I realize that EVTTEXT can be used to trigger a text change within a TextCtrl, however I need to do something whenever ONLY the user changes the value. The reason is, that sometimes I programmatically change the value of the TextCtrl and I then do NOT want to cause this event to be triggered. Is there any easy way to do this? Thanks David - To unsubscribe, send email to hidden email.


--------------------------------------------------
From: 'dubiboy' <[hidden email]>
Sent: Thursday, August 05, 2010 3:10 PM
To: 'wxPython-users' <[hidden email]>
Subject: [wxPython-users] Event from TextCtrl when user changes value
> I realize that EVT_TEXT can be used to trigger a text change within a
> TextCtrl, however
> I need to do something whenever ONLY the user changes the value. The
> reason is, that
> sometimes I programmatically change the value of the TextCtrl and I
> then do NOT want
> to cause this event to be triggered.
>
> Is there any easy way to do this?
David,
If you have to use SetValue how about checking the IsModified flag in your
event handler and not doing the processing if it returns false? Also the
ChangeValue method is supposed to not raise the EVT_COMMAND_TEXT_UPATED
event.
Gadget/Steve
> Thanks
> David
>
> --
> To unsubscribe, send email to [hidden email]
> or visit http://groups.google.com/group/wxPython-users?hl=en
>
--
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wxPython-users?hl=en

I'm using wxPython to build some GUI.. Indeed it isn't an easy program..
Many many user inputs and outputs to be generated..

One part of the program I put an 'Add' button that will dynamically add a TextCtrl field and an 'Open' button to open a file. After clicking in the 'Open' the user can select a file, the file pathway is therefore showed in the TextCtrl field.

Indeed, using a simple example (one TextCtrl one button) I can handle it..
But in a dynamically way, putting several TextCtrl and several Buttons I don't know how to handle it..

In the following code (only a small part of all, some stuff should not be there), I put a 'def OpenReadFile' as you can see there after 'Open' button click, it will put the text in the last TextCtrl not in the corresponding field.. Any ideas?

In another words.. Imagine this: Add (the user can Add 'n' samples)

if the user click in button-3 for example it will put the text in Text-3 field (as expected)
if the user click in button-2, it will put the text in Text-3..

My code so far (Indeed I know where the mistake is, I just don't know what to d0) =[

I'm pretty sure that I do have to do some stuff in OpenReadFile =]

EDITED

I've put a dict before, got the button ID and the TextCtrl put it in the dict and done.

Done Legend of zelda gba rom download.


via Chebli Mohamed