Changeset 1755 for code/trunk/src/core/Shell.cc
- Timestamp:
- Sep 10, 2008, 1:37:36 AM (16 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
/code/branches/gui (added) merged: 1636,1638,1640-1647,1649-1654,1656,1659-1665,1670,1672-1674,1686,1688-1692,1694-1697,1704 /code/branches/input (added) merged: 1629-1630
- Property svn:mergeinfo changed
-
code/trunk/src/core/Shell.cc
r1747 r1755 33 33 #include "Core.h" 34 34 #include "ConsoleCommand.h" 35 #include "input/InputInterfaces.h"36 35 #include "util/OutputHandler.h" 37 36 … … 64 63 this->clearLines(); 65 64 66 this->inputBuffer_ = 0;67 this-> setInputBuffer(new InputBuffer());65 this->inputBuffer_ = new InputBuffer(); 66 this->configureInputBuffer(); 68 67 69 68 this->outputBuffer_.registerListener(this); … … 71 70 72 71 this->setConfigValues(); 72 } 73 74 Shell::~Shell() 75 { 76 if (this->inputBuffer_) 77 delete this->inputBuffer_; 73 78 } 74 79 … … 113 118 } 114 119 115 void Shell::setInputBuffer(InputBuffer* buffer) 116 { 117 if (this->inputBuffer_) 118 { 119 this->inputBuffer_->unregisterListener(this); 120 // TODO: may be very dangerous. InputManager already deletes InputBuffer instance!!! 121 delete this->inputBuffer_; 122 } 123 124 this->inputBuffer_ = buffer; 120 void Shell::configureInputBuffer() 121 { 125 122 this->inputBuffer_->registerListener(this, &Shell::inputChanged, true); 126 123 this->inputBuffer_->registerListener(this, &Shell::execute, '\r', false);
Note: See TracChangeset
for help on using the changeset viewer.