From 432a8cdf64052db5fef7df792e2a5a51734d27af Mon Sep 17 00:00:00 2001 From: Glenn Smith Date: Wed, 2 Dec 2020 15:42:58 -0500 Subject: Callback for address changes #2166 --- python/examples/ui_notifications.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'python/examples') diff --git a/python/examples/ui_notifications.py b/python/examples/ui_notifications.py index 8074a1c5..ee0a5279 100644 --- a/python/examples/ui_notifications.py +++ b/python/examples/ui_notifications.py @@ -71,6 +71,12 @@ class UINotification(UIContextNotification): else: print("py OnViewChange") + def OnAddressChange(self, context, frame, view, location): + if frame: + print(f"py OnAddressChange {frame.getShortFileName()} {location.getOffset()}") + else: + print(f"py OnAddressChange {location.getOffset()}") + # Register as a global so it doesn't get destructed notif = UINotification() -- cgit v1.3.1