Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
NewClass - do you want to betatest?
Message
From
22/05/2006 15:48:53
Mike Yearwood
Toronto, Ontario, Canada
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01117925
Message ID:
01124067
Views:
26
>Mike,
>
>Thanks for the helpful feedback. Did you encounter no other bugs? Was my English in the doc good enough?

You're welcome. No. I didn't grit my teeth once! It was fine. :) You have a great idea here.

If I could define my naming scheme my way, I could see making this a regular part of my work.

>
>>Hi Peter
>>
>>>The classLIB's name has not been dealt with. The class's name, yes. I'll send a zipfile to you this (europe) evening. Hope you'll like it.
>>
>>Sorry for taking so long to look at this. I finally took a look and here's what I found so far:
>>
>>1 - Start newclass.app
>>2 - Do nothing but hit the Browse New Class table.
>>3 - Hit escape key to close the browse window.
>>4 - ZAP temp table warning appears. Answering no causes duplicate entries to appear in the base class combobox. This seems to be coming from the .LoadValues method. I recommend before doing every ZAP you ...
>>
>>LOCAL m.lcOldSafety
>>m.lcOldSafety = SET("SAFETY")
>>SET SAFETY OFF
>>ZAP
>>SET SAFETY &lcOldSafety
>>
>>Would it be a great hardship to change the save method name to CreateClass instead? IMO that would make the code clearer. I'd reserve "Save" for a way to "save" the contents of the form.
>>
>>Since the form is opening and closing tables, should it not have a private data session? That way you can predetermine SET SAFETY and avoid the off chance that I have opened a table with the alias newclass.
>>
>>I thought your code would allow me to define the structure of my class name. This is what you refer to as a scheme. You can let the developer define the scheme like this:
>>
>>Create a newclass.txt file with this...
>>
>><><><><>
>>
>>A piece of code like this can translate the keywords from the file into the values from your wizard form.
>>
>>LOCAL m.lcFullClassName
>>m.lcFullClassName = FILETOSTR("newclass.txt")
>>m.lcFullClassName = STRTRAN(m.lcFullClassName,"<>",ALLTRIM(thisform.cMyClassesDescriptor))
>>m.lcFullClassName = STRTRAN(m.lcFullClassName,"<>",ALLTRIM(thisform.AbstractClassDescriptor))
>>
>>You could do the same thing for the vcx file name. You may want to make the keywords clearer. ClassType (cbo, txt), ClassName (FullName), EnterpriseCode (my). Then cboMyFullName or MyCboFullName or MyFullNameCbo would all be possible schemes.
>>
>>I'm not sure I'd bother with the abstract/concrete question. No classes in VFP are really forced to be abstract. If the developer wants to identify abstract or concrete, provide a keyword and a field on the form. If the field is left empty, nothing happens in the classname.
>>
>>HTH
>>
>>
>>>
>>>>I would like to try this. Do you allow for specifying the rule for naming the class and the classlib file?
>>>>
>>>>>I have developed an 'Alternative New Class Window'. It is meant for our community and will be made available as freeware. In this phase I need one or two persons who are prepared to proofread the article and test the application. Interested? From the article:
>>>>>
>>>>>When you type ‘CREATE CLASS ?’ in the Command Window, the native New Class dialog window will pop up and after having filled in only three fields a new class can be created. The required fields are
>>>>>1. the class name
>>>>>2. the class it must be based on; in other words the parent class
>>>>>3. the classlib that it must be stored in.
>>>>>
>>>>>That’s all and that’s simple. But I think it is a little bit too simple. Why? It is the class name that troubles me. All text books and all gurus tell us that we must pay special attention to the name of a class. It should be created according to a scheme, a philosophy. For example, the scheme may prescribe that any class’s name starts with certain characters and/or contains a reference to the type of class. ...Blablabla...

>>>>>
>>>>>Get the picture?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform