Register function call for entry/text change #103

Closed
jarvisteach opened this Issue Feb 27, 2017 · 2 comments

Comments

Projects
None yet
1 participant
@jarvisteach
Owner

jarvisteach commented Feb 27, 2017

As mentioned in issue #100, it should be possible to raise events when an entry is changed.

This requires adding a trace to the StringVar associated with the Entry.
Or registering the event for TextAreas.

@jarvisteach jarvisteach added this to the 0.06 milestone Feb 27, 2017

@jarvisteach jarvisteach self-assigned this Feb 27, 2017

@jarvisteach

This comment has been minimized.

Show comment
Hide comment
@jarvisteach

jarvisteach Mar 18, 2017

Owner

Need to rethink process here. Currently we have:

  • .set XXX Function()
  • .set XXX OverFunction()
  • .set XXX DragFunction()

Will introduce:

  • .set XXX ChangeFunction() - mimic .set XXX Function(), but remove image/label, change Entry, and introduce Text.
  • .set XXX SubmitFunction() - mimic .set XXX Function()

Will deprecate:

  • .set XXX Function()

Longer term - additional events will want to be supported - Enter/Leave/FocusIn/FocusOut.

The above model does not scale well, and tkinter provides a good model for this already. Instead, a generic .__bindEvent() function should be created, that takes a widget, event type & a function.

The current functions should be modified to use this, then, longer term wrappers can be generated in the set generator for other event types.

Owner

jarvisteach commented Mar 18, 2017

Need to rethink process here. Currently we have:

  • .set XXX Function()
  • .set XXX OverFunction()
  • .set XXX DragFunction()

Will introduce:

  • .set XXX ChangeFunction() - mimic .set XXX Function(), but remove image/label, change Entry, and introduce Text.
  • .set XXX SubmitFunction() - mimic .set XXX Function()

Will deprecate:

  • .set XXX Function()

Longer term - additional events will want to be supported - Enter/Leave/FocusIn/FocusOut.

The above model does not scale well, and tkinter provides a good model for this already. Instead, a generic .__bindEvent() function should be created, that takes a widget, event type & a function.

The current functions should be modified to use this, then, longer term wrappers can be generated in the set generator for other event types.

jarvisteach added a commit that referenced this issue Mar 18, 2017

First work on new event functions (#103)
Isolated setter code for command in __bindEvent function.

Created new setters for change & submit events

Deprecated setter for function

Remove ability to set change function on label/image

jarvisteach added a commit that referenced this issue Mar 19, 2017

Added TextAreas to bingdChangeEvent (#103)
Had to create a new class to monitor TextArea changes.

Both TextArea & ScrolledTextArea now inherit from this as well as their
own classes

Also, fixed bug with Entry Changes not giving widget name…

jarvisteach added a commit that referenced this issue Mar 19, 2017

Changes to textArea (#103)
Now that we have our own TextArea classes, have moved some code into
the TextArea. And made some changes:
* Tidied up logging changes
* On demand import of hashlib.
* Fixed hash lib for python 2.7

jarvisteach added a commit that referenced this issue Apr 14, 2017

Updates to Events (#103 & #114 & #85)
Lots of tweaks to how events are registered/called.
Updated documentation to reflect state of events.

Other miner documentation tweaks.
@jarvisteach

This comment has been minimized.

Show comment
Hide comment
@jarvisteach

jarvisteach Apr 14, 2017

Owner

Change/Submit events fixed for standard, interactive widgets

Owner

jarvisteach commented Apr 14, 2017

Change/Submit events fixed for standard, interactive widgets

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment