Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Relevance between set clock and set point
Message
 
 
À
04/03/2002 17:16:15
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00628034
Message ID:
00628176
Vues:
21
Hi Brian,

Yes, I found how these methods are called and it seems like this project is using the entire framework written by Maurice. So, since it looks familiar to you, can you please shed some light about who is Maurice, where this framework came from and is it possible to get rid of unrelevant stuff? For instance, why he designed class for each VFP settings instead of creating just one class to save and restore them all? Is this framework documented somewhere? Did you use it?

The only thing, which I like so far, is the Search form..., which is pretty generic and works well...

>If you are using the entire framework that Maurice wrote, the code you are looking for is in the setsettings method of the baseapp class. Let me know how it turns out.
>
>
>>>Nadya,
>>>
>>>A couple of questions. What class does the set_clock inherit from. Since the saveit method uses a DODEFAULT(), can you post the default code. Perhaps that will shed some light on the reason for using the point object (unless Maurice answers first) :)
>>>
>>
>>Hi Brian,
>>
>>I doubt, that Maurice will answer, since the last time this developer visit UT was in 1998.
>>Here is the default code:
>>SaveIt:
>>*
>>* Save the old setting
>>*
>>LPARAMETERS tuP1, tuP2, tuP3, tuP4, tuP5
>>
>>THIS.cCommand    = ALLTRIM(tuP1)
>>THIS.cOldSetting = TRIM(PADR(SET(THIS.cCommand), 50))
>>
>>DoIt:
>>*
>>* Set the new value
>>*
>>LPARAMETERS tuP1, tuP2, tuP3, tuP4, tuP5
>>LOCAL lcCommand, lcValue
>>
>>IF TYPE('tuP2') = 'C'
>>   *
>>   * A new setting was requested so set it
>>   *
>>   lcValue = ALLTRIM(tuP2)
>>
>>   lcCommand = 'SET ' + THIS.cCommand + ' ' + lcValue
>>   &lcCommand
>>ENDIF
>>
>>UnDoIt:
>>*
>>* Reset the old value
>>*
>>LOCAL lcCommand
>>*
>>* A new setting was requested so set it
>>*
>>lcCommand = 'SET ' + THIS.cCommand + ' ' + THIS.cOldSetting
>>&lcCommand
>>
>>This class in turn is based on DoUndo class with the following code in Init method:
>>*
>>* Change a settings and reset it when the object is destroyed
>>*
>>LPARAMETERS tuP1, tuP2, tuP3, tuP4, tuP5
>>
>>*
>>* Save the old setting
>>*
>>THIS.SaveIt(tuP1, tuP2, tuP3, tuP4, tuP5)
>>
>>*
>>* Change to the new setting
>>*
>>THIS.DoIt(tuP1, tuP2, tuP3, tuP4, tuP5)
>>
>>Now, is it possible for the normal developer to understand all of this without any program documentation? :)
>>
>>>
>>>
>>>>Hi everybody,
>>>>
>>>>I got a Data Entry application project to finish, which was started by my colleague. I found, what it uses lots of classes, which seem to be originated from Maurice De Beijer (developer from Netherlands). This developer has classes like set_point, set_clock, set_confirm, etc. for each possible VFP setting. In set_clock SaveIt method I see this code:
>>>>
>>>>*
>>>>* Save the old setting
>>>>*
>>>>LPARAMETERS tuP1, tuP2, tuP3, tuP4, tuP5
>>>>LOCAL loPoint
>>>>
>>>>loPoint = CreateObject('Set_Point', '.')
>>>>
>>>>DODEFAULT(tuP1, tuP2, tuP3, tuP4, tuP5)
>>>>
>>>>THIS.cSet1 = TRIM(PADR(SET(THIS.cCommand, 1), 50))
>>>>
>>>>I'm trying to understand, why set_clock calls set_point object - is it by mistake or with some sense? Currently this application displayes time at the upper right corner of the screen, but the width of it is not enough, so I can not see seconds portion. How can I increase this width?
>>>>
>>>>Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform