Also, here is a link to a set of OO "definitions" (actually a lexicon as the author states) that someone posted the other day to the Mach-ii list. I thought it was pretty well laid out and in terms that a CF programmer, new to OO, could read and hopefully understand. I wanted to do something like this after I took a Mach-ii training session from Hal Helms and Ben Edwards a few years ago (back when I drank the OO Kool-Aid) for my own well being, but like most things I never found the time. I agree with about 97.3% of what he writes on his site. Definitely worth the read: http://www.dougboude.com/documents/dougboudeslexicon.cfm Also, once you have played around a bit and are getting a good grasp on things then this link might be helpful as well: http://code.google.com/p/cfcgenerator/ I actually don't care for code generators but this one is pretty slick and helpful to "see" the OO approach at an object level. It also helps with consistent method naming conventions across the board as well (the real reason I like it). Promise me and the group that you will not use this "crutch" until you feel comfortable with the OO world. Deal? (note: my apologies if Dave shared either of these links at Tuesday's meeting, unfortunately I could not attend due to dad duties.) Best of luck with your adventures in OO, welcome to the varsity team. (no flame wars please, just a small joke there) -JSLucido
_____ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of AHMED EL-RASHEEDY Sent: Thursday, September 13, 2007 6:39 PM To: Dallas/Fort Worth ColdFusion User Group Mailing List Subject: Re: [DFW CFUG] Ack! I need help from an OO-type person Hi Chris, Try putting your structure that is declared outside the methods in the "this" scope. Something like <cfset this.instance = structNew() /> then <cfset this.instance.test = "ChrisRocks" /> Ahmed El-Rasheedy On 9/13/07, Christopher Jordan <[EMAIL PROTECTED]> wrote: Okay, So I'm trying to implement *some* of what I saw the other night, and it's not working. I've got a CFC called LienApplication.cfc and it contains an init function that takes a loan number, runs three queries, and then sets several instance variables with values returned from each of the queries. I'm using all the setters I wrote to set those values. Then I return 'this' (without the quotes... you know what I mean). The problem is that if I try to instantiate the cfc and then dump the subsequent object it's empty! No methods, no properties.. nothin'! However, if I view it through the CFC introspection stuff (like Dave showed us the other night), I can see all my methods. I'm at a loss! I'.ve done this sort of thing before (once or twice) without any problems, but now I'm trying to use the getters and setters idea. I should also mention that I tried shortening up my init function to just: <cffunction name="init" access="public" returntype="LienApplication"> <cfset instance.test = "ChrisRocks"> <cfreturn this> </cffunction> (yes, instance is a structure declared outside of the function just below the cfcomponent tag) I still get nothing! :o( If instead of trying to just do a <cfdump var="#myobj#"> I try to do something like <cfdump var="#getCustomerFirstName()#"> I get an error telling me that "Element Instance.CustomerFirstName is undefined in Variables". :o( I'll reprint my entire cfc here (and attach it as well) for anyone who thinks they'd like to take a look at it and could help me out. I've got to run home and celebrate my mother's birthday, but I'll be online later this evening to see if anyone has responded. Thanks so much everyone! Chris -- http://cjordan.us _______________________________________________ Reply to DFWCFUG: [email protected] Subscribe/Unsubscribe: http://lists1.safesecureweb.com/mailman/listinfo/list List Archives: http://www.mail-archive.com/list%40list.dfwcfug.org/ <http://www.mail-archive.com/list%40dfwcfug.org/> http://www.mail-archive.com/list%40dfwcfug.org/ DFWCFUG Sponsors: www.instantspot.com/ <http://www.teksystems.com/> www.teksystems.com/
_______________________________________________ Reply to DFWCFUG: [email protected] Subscribe/Unsubscribe: http://lists1.safesecureweb.com/mailman/listinfo/list List Archives: http://www.mail-archive.com/list%40list.dfwcfug.org/ http://www.mail-archive.com/list%40dfwcfug.org/ DFWCFUG Sponsors: www.instantspot.com/ www.teksystems.com/
