What does this project method look like?

Case of
:(form event=<???>)
  case of
   :(Last object = <variable or field>)
     do stuff

????


On Fri, 21 Apr 2017 07:49:11 -0500, John DeSoi via 4D_Tech wrote:
> I recently embarked on an automated testing project and implemented 
> the advantages you mention by automatically generating *one* project 
> method per form that contains all of the object method and form 
> method code. The only other task was to create wrappers for Form 
> event and OBJECT Get pointer to allow them to be programmatically 
> manipulated.
> 
> So no rewriting of the form is necessary, no need to call a project 
> method from every object method, and no need to maintain an enormous 
> case statement for a form with lots of object methods. The "form 
> controller" idea others have mentioned might be nice for newer 
> projects, but would be a huge amount of work for legacy projects 
> where object names did not exist. My generated code has lots of 
> "Field1", "Field2", "Button1" names because object names never 
> mattered when the forms were created.
> 
> John DeSoi, Ph.D.
> 
> 
>> On Apr 20, 2017, at 4:34 PM, David Adams via 4D_Tech 
>> <[email protected]> wrote:
>> 
>> Using a project method in place of a a form method/object scripts has a
>> couple of other advantages. If you pass in the event code, then you can:
>> 
>> * Create custom event codes ('redraw', 'close' or something more like a
>> message)
>> 
>> * Emulate form activity (useful for testing)
>> 
>> * Leverage your existing code with CALL FORM. Your CALL FORM call invokes
>> the form handler method and passes in whatever event or data is required.
> 
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:[email protected]
> **********************************************************************
---------------
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to