MySQL Forums
Forum List  »  MySQL Workbench

Set model changed state programmatically (Python)
Posted by: Karsten Wutzke
Date: March 14, 2019 04:25PM

Hello,

how do you programmatically set the WB model state to "changed", so that the title bar shows an asterisk and when exiting WB a dialog would appear to warn the user about this?

There's

grt.modules.Workbench.hasUnsavedChanges()

see

https://pasteboard.co/I5roVwW.png

... but there's no setter:

[pre]
23:21:56 [ERR][ python]: error calling jpa_export.export_jpa_annotated_classesTraceback (most recent call last):
23:21:56 [ERR][ python]: File "C:\Users\Kawu\AppData\Roaming\MySQL\Workbench\modules\jpa_export_plugin_grt.py", line 417, in export_jpa_annotated_classes
23:21:56 [ERR][ python]: grt.modules.Workbench.setUnsavedChanges(True)
23:21:56 [ERR][ python]: AttributeError: unknown attribute 'setUnsavedChanges'
[/pre]

Can this be achieved? Why is there no setter?

Thanks
Karsten

Options: ReplyQuote


Subject
Views
Written By
Posted
Set model changed state programmatically (Python)
524
March 14, 2019 04:25PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.