Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need to buy or build runtime form designer
Message
De
29/07/2008 11:39:28
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Need to buy or build runtime form designer
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01334923
Message ID:
01334923
Vues:
54
I am trying to build a 'runtime form designer'. It is going **slowly**. If someone has already built this I could probably save a great deal of time. Or, if someone has some ideas on how to effectively build this, this would help. I have done numerous searches here and haven't found anything that fits what I need but I've found lots of related searches.

Here is what I am trying to accomplish:

1) building upon a system that uses (mostly) SCXES - so it would be *IDEAL** to create modifications to SCXES, not forms as classes.

2)Example - I just built a lookup form - it has a grid with about 12 columns. User A wants 6 columns, B wants 8 with font size changed, etc. etc. I can (and have) data driven this so that at Runtime I build the grid programatically, based upon my data. This is good, but only a small part of what I need.

3) I want:
I) the *user* to be able to a) make changes to the form at runtime. e.g. change column width, make column visible or invisible, change header, and, ideally, even add new objects, e.g grid columns for available data and cursor sources (I'm getting there with this part (see below)
and b) to ALSO have those changes be **saved permanently** to a new SCX, if desired.
II) there should be a 'user level' for this functionality that exposes certain simple properties like visible, enabled, font, width, color, etc. there should also be a 'developer level' that exposes all properties, and even allows for revising method code.
The objective is to be able to sit with a user, with a running form, review the changes they want, change them in realtime, come up with various layouts, and then choose the final one.
It is *NOT* sufficient to just store the changed properties to a table and then load them, for the same scx, at runtime. (It's not sufficient - for now, unless I have to settle for this)

4) Where I am so far:
I) developed code that recurses (apologies to Tamor Granor for the word recurses <grin>) through entire form or selected objects on form, using amembers(), and puts results into a cursor.
II) Then I have a grid/property sheet that allows me to change the relevant properties (in the cursor). Then I loop through the cursor and update the actual form properties.
This part is very crude and simple at this point, and will take a lot of work to offer fine control over what can be changed - if someone has already developed a class to do this stuff it would be great.
III) I am trying to work through the details of saving the changes, permanently,to a new copy of the form. This is proving to be very difficult (for me). I've read a bunch of threads on saveas () and saveasclass (), and have tried to implement the solutions proposed, but it's not working right. So far, what I'm doing is:
a) once the user has changed the form properties on the running form, e.g. made columns invisible, changed font size, etc. - I have a save button on the form. The save button does this:

lc_class_name=thisform.Name+'_'+ttoc(datetime(),1) + '_'+sys(2015)
lc_vcx_name_and_path='user_vcxes\user_form_classes'
lc_scx_name_and_path='user_scxes\'+lc_class_name
thisform.SaveAsClass(lc_vcx_name_and_path,lc_class_name)
oform=newobject(lc_class_name,'user_vcxes\user_form_classes')
oform.saveas(lc_scx_name_and_path)

PS - VFP docs say:Use the SaveAs method to create a form or form set and save it as an .scx file. The SaveAs method is only available during an interactive Visual FoxPro session.
not sure what 'interactive' means.


So far:
a) the created vcx can be instantiated as a new form, and it works. But the created form, when called, isn't working right, not sure why yet.. it opens up fine in designer.
b)Can't directly call SaveAs for SCX - only works with VFP base classes.
c)the new vcx class is a form class with ALL the controls on it. That's not what I want. I want the form class used to remain the same, and the new SCX to be based upon my original form class.

Any help appreciated!
Répondre
Fil
Voir

Click here to load this message in the networking platform