Re: kButtonX processing, Root 2.23/10, WinNT 4

From: Valeri Fine (Faine) (fine@bnl.gov)
Date: Wed Jan 12 2000 - 02:39:17 MET


> >--------- Cut here ------------
>    Thank you, Valeri, for the suggestion.  The RequestString() works in the
> macro above, but I have not made it work yet in my program... the string is
> displayed on the canvas, but I cannot edit it and the canvas thread appears
> to be locked up.

  Yes you are right, I've looked up TPad class and found workaround. That should work for you too:

  #ifdef WIN32
    . . . 
            gROOT->ProcessLine(Form("((TPad *)0x%lx)->CreateNewPave(%d,%d,%d,%d);",
                                    (Long_t)this, event, px, py,newcode));
         }

 #endif
 See: http://root.cern.ch/root/html/src/TPad.cxx.html#TPad:ExecuteEvent 

look for "case kDiamond:" line.


 You should call some method of your class calling "RequestString()" via ProcessLine. 
 This will "unlock"  Canvas thread. You should not class "RequestString()"  via ProcessLine
  directly it will be returned right away and you will have no chance to edit your line.

  In fact there is no need for "#ifdef WIN32". ProcessLIne should work for either platform.

  If you have any question. let me know.

  Hope this helps,
                                         Valery



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:16 MET