i've looked through the different example apps, the Forta Spectra book, and discussions on this list and all seem to scope variables somewhat differently. i'm wondering if someone can talk about the different scopes and the best practices. Here are the different scopes i've seen used: 1) request.myVar This is the standard ColdFusion REQUEST scope. Put things here relevant to the current request. 2) request.cfa.myVar request.cfa holds things in the request scope relevant to Spectra 3) request.cfa.appname.myVar request.cfa.appname holds spectra things relevant to the designated application name 4) request.cfa.objectstore.dsn or application.dsn (specifically to find datasource) request.cfa.objectstore.dsn is a variable within request.cfa holding the name of the application data store. If you find the name too long then you can assign it to a shorter name in either the request scope or the application scope.n 5) <cf_ids> from restornet This is a custom tag that automatically builds request scope structures to let you symbolically reference all the types, metadata hierarchies and categories and PLPs that are associated with the restorenet application. You could easily adapt it to your application. Note that it will not work properly if you have two types with the same label. Or you can just assign your UUID numeric values directly to REQUEST or APPLICAITION scope variables. Finally, an application. i'm defining application.AuthorTypeID in application.cfm. It is called on in an edit handler. However, that application scope variable is not available to the edit handler in the webtop. If want this value available to my app and my handlers in webtop, how do i best initialize them? This sounds like a bug in Webtop confusing its Application scope variables with those of the application it is running the edit handler for. Presumably it works OK outside the webtop (e.g. when invoked directly). We use Application scope variables all the time in this way but rarely invoke via the webtop. Be sure to remember to use CFLOCK around all reads/writes of Application scope variables. Cheers, Rich Ragan ---------------------------------------------------------------------------- -- To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=sts&body=sts/spectra_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. ------------------------------------------------------------------------------ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/spectra_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
