1. button problem and others
- Posted by George Walters <gwalters at sc.rr.com> Jul 28, 2003
- 455 views
I was having problems (memory trap, see above note) and a dead button. Here's come code snipit ----------------------------------- init ------------------------------------------- procedure init(integer self, integer idType, sequence args) setFocus (idCust) end procedure setHandler(Screen, w32HKeyPress, routine_id("keyPressProcessB")) setHandler(Screen, w32HKeyDown, routine_id("keyPressProcessA")) setHandler(buttonId, w32HClick, routine_id("pickCust")) setHandler(Screen, w32HActivate, routine_id("init")) WinMain(mainWindow,Normal) I was using w32HGotFocus instead of w32HActivate and having these problems. changing to w32HActivate made the problems go away... can anyone explain? I thought that either should work, although Activate would be the better choice. george
2. Re: button problem and others
- Posted by Pete Lomax <petelomax at blueyonder.co.uk> Jul 28, 2003
- 422 views
On Mon, 28 Jul 2003 16:59:47 -0400, George Walters <gwalters at sc.rr.com> wrote: George, I know in about five minutes time, you are going to post a message saying - never mind, I sorted it. I do accept that confessional debugging is obviously helpful to you, so obviously I'm not going to kick up much fuss if you keep this up till Christmas and beyond, but can I ask you to think just how on earth this could ever mean anything to anyone else? I'll comment belligerently: >I was having problems=20 What, we don't know >(memory trap, see above note)=20 What above note? >and a dead button. Hmm: what [is a] dead button? >Here's come code snipit > >----------------------------------- >init ------------------------------------------- >procedure init(integer self, integer idType, sequence args) > setFocus (idCust) >end procedure what is idCust > setHandler(Screen, w32HKeyPress, routine_id("keyPressProcessB")) what does that routine do? > setHandler(Screen, w32HKeyDown, routine_id("keyPressProcessA")) what does that routine do? > setHandler(buttonId, w32HClick, routine_id("pickCust")) what does that routine do? > setHandler(Screen, w32HActivate, routine_id("init")) what does that routine do? > > WinMain(mainWindow,Normal) what is mainWindow (No stupid answers please) > >I was using w32HGotFocus instead of w32HActivate and having these = problems. To do what; to have what problems? >changing to w32HActivate made the problems go away... can anyone = explain? I To make what problems go away? >thought that either should work, although Activate would be the better >choice. Possibly, how would we ever know? OK: Has the picture been made that the questions you ask could not possibly be answered? Would it be fair of me to ask that you more carefully explain whatever it is you are having trouble with, AND when you figure out the answer, TELL US, so at least we learn something in return for reading your posts, even if we were unable to help. Thanks, Pete
3. Re: button problem and others
- Posted by Pete Lomax <petelomax at blueyonder.co.uk> Jul 28, 2003
- 439 views
On Mon, 28 Jul 2003 16:59:47 -0400, George Walters <gwalters at sc.rr.com> wrote: Ouch, If I owe you any apology george, let me know. >I was having problems (memory trap, see above note) Yeah, I did actually see that, sorry. <snip> > setHandler(Screen, w32HActivate, routine_id("init")) Yikes! Screen? I missed that. Have you defined something else or do you really mean Screen? How can Screen get/lose focus and/or activate? I would not have thought that possible. Pete
4. Re: button problem and others
- Posted by George Walters <gwalters at sc.rr.com> Jul 29, 2003
- 466 views
Derek, Neat... to give focus to a particular control was exactly what I needed....thanks. george ----- Original Message ----- From: "Derek Parnell" <ddparnell at bigpond.com> To: "EUforum" <EUforum at topica.com> Subject: RE: button problem and others > > > George Walters wrote: > > > > > > I was having problems (memory trap, see above note) and a dead button. > > Here's come code snipit > > > > procedure init(integer self, integer idType, sequence args) > > setFocus (idCust) > > end procedure > > setHandler(Screen, w32HKeyPress, routine_id("keyPressProcessB")) > > setHandler(Screen, w32HKeyDown, routine_id("keyPressProcessA")) > > setHandler(buttonId, w32HClick, routine_id("pickCust")) > > setHandler(Screen, w32HActivate, routine_id("init")) > > > > WinMain(mainWindow,Normal) > > > > I was using w32HGotFocus instead of w32HActivate and having these > > problems. > > changing to w32HActivate made the problems go away... can anyone > > explain? I > > thought that either should work, although Activate would be the better > > choice. > > Sorry for a slow response. I'm attending a conference intersatte and > just managed to grab a few moments now. > > If what you were trying to do was to give focus to a specific control > when the window is first opened, the simpler way to do it is ... > > WinMain({mainWindow, idCust}, Normal) > > No need for a w32HActivate trap or init() routine. I think this is > documented. > > > Also, the Activate event ONLY applies to Window controls and is fired > off after the Window is opened. It does not work for the Screen control. > > -- > Derek > > > > TOPICA - Start your own email discussion group. FREE! > >