In addition, consider this:

When you use formsets, you are really using just one form, divided into 
different parts. Think of it as windows that look at the same data from 
different angles.

It has to do with data sessions: formsets are all the same data session. 
Let me give you an example:

Say you have just one table and you use a three form formset. In the 
first form you look at one record, divided into as many textboxes as 
there are fields in the table. In the second form you have exactly the 
same layout as in the first one. In the third form, you have a grid 
giving you a view of a number of records in the same table. If you 
navigate the grid, every time you pass from one record to the next, the 
data in the first and second forms show the record you just hit. There 
is no way that you can freeze the data in the first form and see a 
differente record in the second form, because you are in the same data 
session and move the pointer in the same table.

Now, if you use a page frame, you have exactly the same scenario. The 
difference here is that you deal with just one form and do not need to 
navigate to three different forms if you make a change. You do not have 
to refer to thisformset.form2.text5.value, you just refer to 
thisform.pageframe1.page2.value. You might say it does not make any 
difference, but if you have to deal with a 16 page formset as once had 
to, and try to change something _visually_ in form 13th, you will know 
what I mean. With a pageframe you just click on the page 13th tab and 
you're there.

I spoke of data sessions. In the 16 form scenario I mentioned, I would 
rather use 16 different forms with private data sessions and would be 
able to look at different records of the same table at the same time. 
Moving the pointer in one of the forms will affect just that form, and 
the others would not change. Incidentally, I fell in the formset trap 
ages ago, when I was a rooky in VFP and built this complicated 
accounting routine. But of course, I had no idea then of what private 
data sessions meant and how they could save time in terms of clarity of 
code, ease of programming and expanded functionality.

Pay heed to what others tell you here: stay away from formsets!

Rafael Copquin


El 08/07/2011 18:17, Jarvis, Matthew escribió:
>>> FormSets are entirely separate forms in a set, nothing at all like a
>>> PageFrame on a form.  Do yourself a favor and stay away from
> FormSets.
>> Ah, so it's more like "FormSets *can* be used to create a tabbed form,
> but
>> PageFrames *are* used to do them"?
>>
>> I, frankly, don't see the reason why one would stick a bunch of forms
>> together unless they were a tabbed set (though, granted, I haven't
> really
>> thought too much about it), so I've no issue with staying away from
>> FormSets.
>>
> Joel-
>
> FormSets are evil - run like hell away from them unless you very much
> enjoy pulling your hair out and drinking heavily....
>
> Besides that - these are two entirely different beasts. Let me see if I
> remember all of this (haven't done any of this in years)...
>
> Think of it this way:
>
> A tabbed form is created using a PageFrame
>
> A PageFrame is an object on a Form.
>
> (grasping top of head) A set of Forms *can* be grouped together to
> create what is called a FormSet.
>
> (reaching for bottle) Control of Formsets is then an exercise in
> futility - you will never understand where you are or what you are
> doing, and when the form or control contained on it doesn't work
> correctly, you will spend HOURS and HOURS trying to track it down, until
> you give up and disgard the idea of using FormSets in the first
> place.....
>
> DON'T USE FORMSETS
>
> Thanks,
>
> Matthew Jarvis || Business Systems Analyst
> IT Department
> McKenzie-Willamette Medical Center
> 1460 G Street, Springfield, OR  97477 || Ph: 541-744-6092 || Fax:
> 541-744-6145
> --------------------------------------------------------------------------
> Disclaimer: This electronic message may contain information that is
> Proprietary, Confidential, or legally privileged or protected. It
> is intended only for the use of the individual(s) and entity named
> in the message. If you are not an intended recipient of this
> message, please notify the sender immediately and delete the
> material from your computer. Do not deliver, distribute or copy
> this message and do not disclose its contents or take any action in
> reliance on the information it contains.
>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/4e1af5d6.90...@fibertel.com.ar
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to