Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Someone Has Got to Be Doing This (grid questions)
Message
De
27/03/2003 10:48:13
Charlie Schreiner
Myers and Stauffer Consulting
Topeka, Kansas, États-Unis
 
 
À
26/03/2003 14:22:36
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00770335
Message ID:
00770763
Vues:
11
Hi Jim,
You have at least two choices. You can force the user to click on Add for each new record, or you can allow them to just start typing. In Word you get a blank document initially. If you don't make any changes, Word doesn't say, "Do you want to save?" It knows that Document1 is useless.
For many business objects our framework adds just one record. If you make no changes, or the changes are not significant, I don't save. The default behavior for the UserModified method is to check for changes. Sometimes I overwrite or add on to that behavior.
Sometimes the DefaultNumberOfRecords is 100. The time is takes to add these records is .01 seconds so the user doesn't notice. Same for the TABLEREVERT part.
Allan Cooper's About Face influenced me in this regard. I don't ever want to have to choose Add or Save for that matter. The system should be smart enough to 'read my mind'.
In an Invoice Form, you might have the occational one that has more than 100 line items. One can deal with this various ways. I might check as the user moves from line to line and if there are 100 new items that are unsaved, ask if a save should be done. Our AddNewType determines how blank records are added and how the DefaultNumberOfRecords is observed.
AddNewType = 2 
Options are 0, 1, 2, 3, or 4.
0 means don't ever add any records.
1 means to ensure that there is a new record in the view and point at it.
2 means to observe the DefaultNumberOfRecords. Ensure the total number
  of records is the DefaultNumberOfRecords.
3 means to add the DefaultNumberOfRecords to the view. Ensure there
  are the DefaultNumberOfRecords of new records.
4 means to autoadd 1 record when there are none, but otherwise do nothing.
>Hi Charlie,
>
>"add as many as is ever needed..." Now how would one determine that?? Do I project company growth over the next X years and add accordingly? Seems like a lot of bloat to me... or am I misreading you here?
>
>What kind of determination do you use in UserModified()? Let's say I crank through 5 or 10 items - oops, number 3 was a boo boo - I'll just blank out the product id field. Do you throw the entire record away? Just looking for other methods of how to handle such things and to what extent you read your user's minds :-)
>
>>Or just add as many as is ever needed and check for user modified records in the save. Ignore any that are unmodified by the user.
>>In our business object class, we have DefaultNumberOfRecords and AddType to control how and if the blank records get added. We have UserModified() to determine if the appended record is worth validating.
>>
>>>Got users that like data entry in a grid :-) Me too ...
>>>
>>>Buffer the table, prompt the user for "How many?", append the requisite number of new records and let them have at it.
>>
Charlie
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform