Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Endless loop - need a hand to get out
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00706602
Message ID:
00707063
Views:
24
Those users - they should get a life - when are they going to stop bugging us - can't they see we're busy:-)


>Thanks a lot for the tips, Terry. I think, I fixed the original problem by some complicated workaround. I think, your solution may be better, but I use the same control in grid and on the form...
>
>Today I was playing with this project and found lots of other problems. Some of my original workarounds seem to not work quite right. So, I tried to implement another workaround... I never saw a project before, which would be that sensitive... I fix one problem and it causes another problem in the different place, I fix it and then the original problem re-appears and so on... May be if I wrote this project from scratch, it would not have all these endless problems, I don't know... And by the way, the problems, I found today, were not even on the test list. She indicated bunch of different problems, which I'm only trying to get into...
>
>I would not mention the fact, that each time, I'm trying to concentrate on this darn thing, the user comes in saying, that something doesn't work and I need to fix it immediatelly...
>
>>Nadya
>>I used to ask a Valid Event to help with data validataion - I USE too! I have learned that using combinations of LostFocus, Tag, and When is seems [more] understandable (does anyone really know what valid is up to?)
>>
>>These are a few guidelines:
>>1) Off subject: But to prevent a Grids re-firing of an After/Before RowColumnChange, I will place trans(recno()) in the Grids tag. The After/BeforeRowColumnChange will as the question:
>>
if transform(recno())#oGrid1.tag && Don't fire the AfterChange event
>>
>>2) To prevent focus until a valid state is complete, I use When.
>>For example:
>>Lets say txtBoxMortRate cannot accept an entry until the txtLender entry is complete and the txtMortAmt has been entered. In the txtMortRate WHEN event I would have a statement like this:
>>
return !empty(.txtLender.Value) and LenderIsValid(.txtLender.Value) and;
>>            !empty(.txtMortAmt.Value) and MortAmtIsValid(.txtMortAmt.Value)
>>
>>I have nothing against Valid - except he has his own rules. Its easier to fire a 'custom' validation off LostFocus and use When to control downstream focus. In some (well most - err all) cases, when my projects start a 'fresh' form, every thing is turned off until appropriate entries are completed. For example: Why have a save button enabled for a blank form, etc.
>>
>>Let us know how it go!
>>
>>>Hi everybody,
>>>
>>>Ok, now after I explained my frustration I hope to get some help on the following problem:
>>>
>>>I have a grid on a form to type additional mortgage info. E.g. each main sale/mortgage record may have up to 5 additional mortgage records.
>>>
>>>In the grid I have a method to validate user's entry. Some code is in BeforeRowColChange, AfterRowColChange, textbox.Valid, Valid method of the grid, etc.
>>>
>>>Everything seems to be working now except for the following:
>>>
>>>I have a validation, that if Lender is not empty, Mortgage should be not empty too. In addition, user must re-type Amount using separate form.
>>>
>>>Now this is that happening: I type amount, re-type it, then click in a control on a page (outside of the grid). I get a message, that Amount could not be empty if Lender is not empty. It looks like the Valid of the grid fires before the valid of grid's column textbox fires, e.g. the value, I typed, have not been written to the table yet, therefore this message is issued.
>>>
>>>How should I fix this problem? I suppose, in Grid's Valid event I have to ensure, that valid of ActiveColumn textbox already fired... Can you give me a hint, please?
>>>
>>>My manager just came and said, that DataEntry is my first priority, sorry...
>>>
>>>Oh, well...
Imagination is more important than knowledge
Previous
Reply
Map
View

Click here to load this message in the networking platform