Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is there a way to mimic Read Events?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00152384
Message ID:
00152430
Views:
21
>>>>I asked a question yesterday about having nested Read Events to which I found out you can't do and it was suggested that I use a modal form. This really doesn't solve my problem.
>>>>
>>>>Basically whats happening is a class' method (preparedata) is called from within the class' init. In the preparedata method I check to see if whether or not I need to make the form visible to accept some selection criteria. What I want to happen is if I determine I need to accept selection criteria I would like for the code execution to stop at this point and then allow the customer to fill in textboxes etc and then click a button that will then allow the program execution to continue from where it stopped within the preparedata method.
>>>>
>>>>Is there a way to handle this scenario?
>>>>
>>>>Thanks
>>>
>>>You can still do it in Init event, and not necessarily to bring up 'Search' modal form. It can be modeless, but first form itself should return .F. When 'Search' form will finsih its work, the first form can be brought up again automatically.
>>
>>I take it what you are saying is the only way to do this is to call another form for the user to input the selection criteria. I can't have the selection criteria textboxes etc on the first form and just make it visible and stop the execution of the current method until the user fills in the textboxes etc.?
>
>I am confused as to why you don't want to use a modal form... this is what they are for, after all.

I may be way off in my thinking here....but here's whats up..

I have a form that from within its init I call a method called preparedata that will set up the data environment for my report.
Next in Init, I call a method that basically prints the report.
In the preparedata method I check to see if this form was created from within a data entry form. If it is I just fill the cursor with current record's information, and then the method to print the report is called and everything works great.

I am trying to now add some logic that if this form is not called from the data entry form I want to make this current form visible and some how make it possible for the user to input, a reference# to select, for example.

My problem is that the form becomes visible but the execution of the code drops right from the prepare data method and then the printreport method executes before I have a chance to create the cursor or dataenvironment.

I don't think that making this form modal helps this problem. I tried it anyway and it didn't seem to.

Sorry to be so long winded, does this make sense as to what I am trying to do?

Thanks
Previous
Reply
Map
View

Click here to load this message in the networking platform