Website Summary Files Commits Branches @commit @diff @stats
path: root / src / UserInterface / UserInterface.cpp
diff options
context:
space:
mode:
Commitcf991dc2d8694bfc6d457133b44cb4a760f93724 (patch)
Author
 Syndamia <kamen@syndamia.com>
2022-05-29 07:53:44 +0300
Committer
 Syndamia <kamen@syndamia.com>
2022-05-29 07:53:44 +0300
Filesea2a4784d3f93c881a3a3b06dcbe76c5d687eddd /src/UserInterface/UserInterface.cpp
FMI-OOP-P2_Tables-cf991dc2d8694bfc6d457133b44cb4a760f93724.tar
FMI-OOP-P2_Tables-cf991dc2d8694bfc6d457133b44cb4a760f93724.tar.gz
FMI-OOP-P2_Tables-cf991dc2d8694bfc6d457133b44cb4a760f93724.zip
Parentd06a884302f3f771ed9b595c76b460f692d71893 (diff)
Autocommit at 29.05.2022 @ 07:53
1 files changed, 5 insertions, 4 deletions
-rw-r--r--src/UserInterface/UserInterface.cpp9
diff --git a/src/UserInterface/UserInterface.cpp b/src/UserInterface/UserInterface.cpp
index f9d7d87..8698a71 100644
--- a/src/UserInterface/UserInterface.cpp
+++ b/src/UserInterface/UserInterface.cpp
@@ -6,16 +6,17 @@
/* Private (static) */
void UserInterface::com_print(const char* params) {
- List<String> cells = this->table.getAllCells();
+ List<String> cells = table.getAllCells();
}
/* Public */
UserInterface::UserInterface(Table& table) : menu() {
- if (this->table.getCellCount() > 0)
- throw new std::logic_error("Singleton instance!");
+ if (!instantiated) {
+ this->table = table;
+ instantiated = true;
+ }
- this->table = table;
menu.addCommand(Command("print", com_print));
menu.addCommand(Command("edit", com_edit));
}