Thanks to you and others, I understand now that if you change your CFC 
and have already run it inside the application scope, you need to 
reinit.  Your suggested code is very handy for that.  Thanks!

Now...

"....This will cause your initialization code in the application.cfm file to 
fire, which will recreate the object, call the init() method, AND that would 
reload the query data from the database]."

Maybe I'm reading this wrong but that seems to imply, to me, that when 
you instantiate a cfc-object, all methods are called within that class 
and if it's a query, it reads that query from the database and into 
memory and doesn't look at the database again unless you re- instantiate it.

To try to prove this to myself, I brought up my browser, loaded the 
application and displayed the inventory on-screen, then I went into the 
database and manually added an entry.  I then sorted the recordset 
within the browser and my new entry appeared.

This to me means that I wouldn't need to reinit when adding new 
records.  Am I missing something?

After I call the method like thus:
<cfset qryInventory = 
application.inventory.getInventory('#selSortBy#','#selInventoryID#','#selClass_Name#','#selSubClass_Name#','#selSize#')
 
/>

I then output it by just referring to the name of the query like this.

<cfoutput query="qryInventory" startrow="#selStartRow#" 
maxrows="#selMaxRows#">

It seems to me, at least with my CFC's design, that there is no reading 
of the data into the application memory space, thus no need to reinit 
unless I change the CFC itself.  This behavior is what I would expect 
but having said that, is there a 'better', way?



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Check out the new features and enhancements in the
latest product release - download the "What's New PDF" now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:289018
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to