Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Relevance between set clock and set point
Message
From
04/03/2002 20:27:35
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00628034
Message ID:
00628182
Views:
13
Unfortunatly, I don't know the answers to these questions. I just did a search for him on google.com. His personal web site is www.theproblemsolver.nl and it looks like he sold his framework to a company called FairTree who can be found at www.fairtree.nl. The framework can be downloaded from there, and has documentation (sort of). The class part of the documentation seems to be missing. Other than that, I just dug into the code.

The reason for a seperate object for each "set command" is because he leaves them instantiated for the life of the app. He could have written one object that had a property for each of the set commands, but the ultimate OOP (notice I used the word 'ultimate' rather than 'true') way to do it is to have a set command object that you subclass for each specific set command instance that you need (ie. One for clock, one for point, one for this, one for that, one for the house that Jack built, etc., etc., etc.).

Other than that, I haven't dug into this framework much. Maybe on a rainy day...

>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.
Brian McCord
President
Sagacity Systems
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform