Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
jeby #1
Variables Declared in a .cfc
1) If i declare a variable inside the <cfcomponent> and </cfcomponent> tags
it is accessble by all of the functions in the component correct?
2) Are they also accessable outside of the component or do they have to be
returned?
Josh
jeby Guest
-
#39091 [NEW]: Need to force variables to be declared
From: addw at phcomp dot co dot uk Operating system: any PHP version: 5.2.0RC5 PHP Bug Type: Variables related Bug... -
Access ViewStack declared in main app from sub apps
I have two sub applications defined in main application.I have put them inside ViewStack,so that only the desired sub application is rendered, code... -
Moving within a cursor declared in plpgsql function
I have searched the web/archives for a solution to this and have found a few entries to my question but nothing definitive. In essence I have a... -
Name is not declared
I'm getting a BC30451: Name 'pageID' is not declared. I have a user control that contains a simple condition to display one row or another like:... -
BC30451: Name 'BindDataGrid' is not declared.
trying to allow sorting in a datagrid I don't understand error message - can u help ??? sql: ===== SelectCommand = "SELECT * FROM tblA... -
Adam Cameron #2
Re: Variables Declared in a .cfc
> 1) If i declare a variable inside the <cfcomponent> and </cfcomponent> tags
<cfset variables.foo = "bar"><!--- accessible to entire CFC instance --->> it is accessble by all of the functions in the component correct?
> 2) Are they also accessable outside of the component or do they have to be
> returned?
<cfset foo = "bar"><!--- same variables as above, therefore: accessible to
entire CFC instance --->
<cfset var foo = "bar"><!--- (in a function) accessible only to that
function-instance's code --->
<cfset this.foo = "bar"><!--- accessible to the calling code as myObj.foo
--->
HTH.
--
Adam
Adam Cameron Guest



Reply With Quote

