Hi all, I've a compiled a root application and want to process the user input before it is send to root for evaluation. I fooled around with TRint but didnt succeed really (overloaded some memberfunctions). Could you point me to the right direction? To give you a hint, where I am stuck, i'll send the relevant part of the code below of what I do. Rem: 1) ProcessLine works from within the code, but not, if I just type in a command at the prompt 2) HnadleTermInput comes back after each single keystroke,.. I didnt want to parse keystrokes,.. this seems a bit too unhandy to me,.. I only want to receive the string, after the return key was pressed,.. --- the main file ------------------------------------------------ [...] int Error; extern void InitGui(); VoidFuncPtr_t initFuncs[] = {InitGui, 0}; TROOT myRoot("Borg","", initFuncs); [...] class TMyRint : public TRint { public: TMyRint(char* appClassName, int* argc, char** argv); void ProcessLine(Text_t* line) { cout << "Your input, master: " << line << endl; TRint::ProcessLine(line); }; void HandleTermInput() { cout << "HTI: " << Argc() <<endl; cout << "HTI: " << GetIdleCommand() <<endl; TRint::HandleTermInput(); } }; TMyRint::TMyRint(char* appClassName, int* argc, char** argv) : TRint(appClassName, argc, argv) {} //--------------------------------------------------------- int main(int argc, char *argv[]) { int noArgsForRint = 1; TMyRint myRint("app", &noArgsForRint, argv); myRint.Run(); return 0; } ============================================================== Thanks a lot for your time! Best Wishes Selim -- Selim Issever | Tel: 040 8998-2843 +- Talk sense to a fool and he -- DESY-F15 | Fax: 040 8998-4033 +- calls you foolish. ----------- Notkestr. 85 | selim.issever@desy.de +-------------- Euripides ------ 22603 Hamburg/Germany | http://www.physik.uni-dortmund.de/~issevers
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:42 MET