Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cancel button
Message
 
To
26/06/2000 13:25:30
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00384118
Message ID:
00384742
Views:
25
Hi William,
Unfortunately I can’t give you a very detailed response.

Here are some specific answers:
-Your code is probably OK.
-There are many other ways.
-I believe the “recommended” buffering mode is 5 (table/optimistic)
-Remove the GO BOTTOM statement after APPEND BLANK
-You should use custom properties of the form instead of memory variables for adding/editing

Here are some general answers:
Yes, you need to understand what you are doing - you didn’t want to hear that :)
Our way to refresh our controls and buttons is:
  -use the refresh method of buttons for enabling/disabling  
      if thisform.adding or thisform.editing
         this.enabled=.T. 
      else
         this.enabled=.F. 
      endif
      Depending on the button, the .T.,.F. will differ, i.e. we want the
      navigation buttons disabled while editing, but the save button enabled.
  -use the when method of data bound controls to control access
      return (thisform.adding or thisform.editing)
The ideea is that objects should take care of themselves as much as possible.

We have most code at the class level, and it is a little more complex than the above. For example our textbox class will check in the when method code if there is a form property called adding or editing - using pemstatus() - and then use those properties to control access. Our Add button class will enable or disable itself based on editmode rights of the user, will change the caption to Add or Save following a click on it, and will perform the appropriate action of adding a blank record or saving the new record.

It is worth checking UT for articles/books on form design, class design, buffering…

I’ll be on vacation for the next month, so I won’t be able to help more.

Good luck,

dz
Doru
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform