Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
PageFrame.Page.Activate looped calling?
Message
From
08/10/2001 10:29:48
 
 
To
08/10/2001 10:17:40
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00565350
Message ID:
00565482
Views:
16
Hi!

Thanks Dragan, it always good to know something like that.

I would like also to add that such event as UIEnable is fired after page Activate event, so you can try also to put code there in some control's UIEnable event.



>>HELP!! I have a form with a pageframe. In one of the pages ACTIVATE method, I call a couple SQL SELECTS that build up a couple cursors as well as preloading some data.
>>
>>Somehow, I am getting into a continuous loop into the ACTIVATE function where the only way out is the dreaded CTRL-ALT-DEL.
>>
>>If I step through the code with the debugger - it fires fine. What am I missing here. I thought the ACTIVATE only fires when that page on the pageframe comes active - once, shouldn't it under normal cicumstances? If it matters, I get to that page by calling....
>>
>>thisform.pageframe1.activepage=4
>>
>>
>>I put a WAIT WINDOW in the ACTIVATE so I could see if that was what was looping. Could a WAIT WINDOW or a SETFOCUS (for a listbox on this page), cause the ACTIVATE to fire multiple times?
>>
>>Hope someone knows what I am doing other than going nuts!!
>
>Well, setfocus() on a control on a page does run page.activate first, at least I've seen it do that. You may try to comment out the .setfocus code and change the taborder on that page, so that this control gets focus firs anyway.
>If there are a few .setfocus calls in page activate, and one of them is to an object on another page, the last one would take the focus back to your page and cause its .activate to fire again.
>
>If you have some important code in these controls' .gotfocus event, you may move that code into some custom method of the form, and call that directly from both .gotfocus and page.activate, so you don't fire the .activate by calling .setfocus.
>HTH
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Reply
Map
View

Click here to load this message in the networking platform