> So, informal poll - who’s using objects for parameter passing ? I’m using object and love them…
Example 1 For example the program which I’m working on creates reports in different formats but use the same data. So I put my code to load the data in one method then use another method to format the data, I have multiple methods, one for each format, but only one data method. I could use process variables, but then I couldn’t use execute on server if I found a particular reports load code needed extra speed by being run on the server. I could use parameters and this would solve the option of optionally executing the load code on the server, but some of the reports need to load dozens of arrays/variables. Objects solve this… I pass an object to the load method with any values needed, it passes back all of the report data in a single object. I can change it to execute on server with no issues, all of the objects and variables are local which makes debugging a lot nicer. It also separates the gathering and presenting logic nicely. Example 2 Formatting address, sometimes I have a country sometimes I have 1, 2, 3, 4 lines of address etc. Adding a parameter and not with objects makes things really easy I love objects, I think if you start using them and get to know them you will love them too :) Neil -- Neil Dennis 4D Developer since 1990 GreaText - Designing Software for the Way You Work 716 East 1850 N North Ogden, UT 84414 mailto:[email protected] http://www.greatext.com/ ********************************************************************** 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] **********************************************************************

