Losing Focus (OpenInsight Specific)
At 16 FEB 2000 05:02:43PM [email protected] wrote:
This seems like a simple thing, but it's boggling me for the moment so any hints would be appreciated.
Problem: I am losing focus when I shouldn't.
Some background: Two forms. In Form A, at the LOSTFOCUS of a control, I check to see if the item exists in another table. If exist, I display various data in a MSG with a BNY option. If the data needs to be corrected, I call Form B. At the Create Event of Form B, I read the record and do various things. This works, and when I save the changes, Form B closes and FOCUS returns to Form A.
However, if the item is new, that is, the displayed popup does not show the item and I hit the escape key the event script at LostFocus will let me add a new item. It calls Form B (essentially same code). However, the FOCUS shifts back to Form A prematurely before I can do anything in Form B. If I try to "click" Form B, nothing happens.
I know that I must be overlooking something. Any hints on what I need to look at would be apprecited.
I will also post this on the regular discussion place.
Thanks,
[email protected] onmouseover=window.status=imagine … ;return(true)"
Ray Chan ~ Symmetry Info
At 16 FEB 2000 05:43PM Blair wrote:
Hello Ray,
Is form B called with Dialog_Box function? If not, consider implimenting this way. It will give you much more control. On the close event of the window you could call End_Dialog and pass back to the LostFocus event all it needs to properly proceed. Also if window
B is called with Dialog_box( I believe that the function name ), the user cannot shift focus to outside the current window until they either Ok or Cancel the present operation. I have tried to set all my dialog windows up with Ok and Cancel buttons only.
Blair
At 16 FEB 2000 05:49PM Dr. Pangloss wrote:
Don't eat such large meals, especially on hot days.
At 16 FEB 2000 09:13PM [email protected] wrote:
Blair,
Thanks for the tip. I was using Create_Dialog. It has worked and should have worked (based on my understanding), but it looked like it was getting "confused and tired" like me.
Any case, I switched to the Dialog_Box as you suggested and now it works. It's a miracle! (After a zillion hours of looking at this thing)
Does this suggest that I wasn't overlooking or missing anything, and that maybe the Create_Dialog shouldn't be used. Are there limitations to the Create_Dialog? Should one stay away from them? Or are they okay to use, but it's just that I'm missing something.
Any comments from anyone would be appreciated. I'm really interested in learning the tool (OI).
Thanks,
[email protected] onmouseover=window.status=imagine … ;return(true)"
Ray Chan ~ Symmetry Info
At 16 FEB 2000 09:21PM [email protected] wrote:
Dear Doc,
Well actually I just got back from having a great pan-fried trout dinner with corn-stuffing, garnished with caramlized pecans, fresh green bean and carrots, and jasmine rice. Oh yes, I started all this with a tomato and scallop bisque. Yummy, we sure do like our food and various other pleasures here.
Talk to you later,
[email protected] onmouseover=window.status=imagine … ;return(true)"
Ray Chan ~ Symmetry Info
At 17 FEB 2000 09:33AM Don Bakke wrote:
Ray,
Create_Dialog allows you to choose between modal and modeless dialog boxes. So if you aren't consistent with your mode settings the behavour will not be the same. Plus, AFAIK, Create_Dialog won't return the results of an End_Dialog call.
Dialog_Box can only be used for modal dialog boxes and it will return the results of an End_Dialog call. The only time I use Create_Dialog is when I want to generate some type of floating toolbar so the end user can go back and forth between the parent and dialog box windows.