[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Supress TextEditor Change event
[Thread Prev] | [Thread Next]
- Subject: Re: Supress TextEditor Change event
- From: Joe1962 <joe1962@xxxxxxxxx>
- Date: Thu, 12 Sep 2024 13:30:10 -0400
- To: user@xxxxxxxxxxxxxxxxxxxxxx
Well, I don't know if this fits your use case, or if it's not considered "good practice" nowadays, but I tend to use a 'FLAGS' class with (among others) a 'refreshing' boolean variable in it. This is in Java, admittedly I haven't done much in Gambas lately. Anyway, before starting any kind of coded refresh to the GUI, just set FLAGS.refreshing to true and back to false at the end. Then just check that FLAG where needed. Regards, Joe1962 On Thu, Sep 12, 2024 at 7:02 AM Bruce Steers <bsteers4@xxxxxxxxx> wrote: > > > On Wed, 11 Sept 2024 at 21:58, Benoît Minisini < > benoit.minisini@xxxxxxxxxxxxxxxx> wrote: > >> Le 10/09/2024 à 11:46, Bruce Steers a écrit : >> > >> > Aah I see, I never noticed it before but it explains a bug in my IDE >> > ExternalTools feature that has escaped me for a while where it is set >> to >> > save config changes on Change event. >> > but not if Locked when I'm loading fresh data. >> > I was finding that sometimes the text of one item would overwrite the >> > text of another for some unknown reason. (very annoyingly) >> > Makes sense it could be because of the unexpected Change event >> > triggering when locked and loading new data. >> > >> > I think I'd call this a bug. Object.Lock is supposed to stop event >> > triggers yes? >> >> Yes, but as the event is postponed, the object is not locked anymore >> when the event is raised. >> >> Maybe your fix is a good idea, but why don't you want the Change event >> to be raised at the first place? >> >> -- >> Benoît Minisini. >> > > Because a number of my applications react to the Change event. > When text changes it does things I only want to do when all is loaded okay > and when typing text, > I did not realize it was still doing these things when loading a new > document or clearing the text and other things are not fully configured yet > because Lock was not locking. > > My fix works so all is good now :) > I just expected (as anyone would) Object.Lock should suppress the Change > event trigger. > > Respects > BruceS >
Supress TextEditor Change event | Bruce Steers <bsteers4@xxxxxxxxx> |
Re: Supress TextEditor Change event | Bruce Steers <bsteers4@xxxxxxxxx> |
Re: Supress TextEditor Change event | Bruce Steers <bsteers4@xxxxxxxxx> |
Re: Supress TextEditor Change event | Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx> |
Re: Supress TextEditor Change event | Bruce Steers <bsteers4@xxxxxxxxx> |
Re: Supress TextEditor Change event | Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx> |
Re: Supress TextEditor Change event | Bruce Steers <bsteers4@xxxxxxxxx> |