Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Textbox with R format
Message
From
07/07/2005 11:50:18
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01029824
Message ID:
01029994
Views:
16
>>Probably you're using buffering and it's a new record. empty() # isnull().
>>Or your save routine is checking GetFldState().
>>Doesn't it happen if you don't have R and inptmask? I've never used R.
>>Cetin
>
>The question is: how should we handle this situation? If the phone is empty, we don't want a warning, but we don't want to save this record either. The GetFldState is going to report a change, so the logic in Save is this:
>
>1) Check rules
>2) Is something is wrong, show a message and stop
>3) Otherwise proceed with save.
>
>==============================
>In our case we do not want to save an empty record. So, should we return false from Check Rules method, but just do not display any messages, so the save would not happen? However, we do want to save the rest of the info...
>
>What could be my options here?

"If the phone is empty, we don't want a warning, but we don't want to save this record either."
Do not warn and do not proceed to save routine then (actually isn't that Save routine already doing these checks). I do something like this:
* myEditorButtons::SaveRecord
if .BeforeSave()
 .Save()
 .AfterSave()
endif
I do not use GetFldState() and explicitly check my rules.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform