if I have a udf in my application.cfm file, why doesn�t a cfc in the same dir inherit
the udf function from it? or does it? basically i have this code....
and its giving me the error that follows....
<cfcomponent displayName="getPermissions" hint="NavtrakWebsite Permissions">
<cffunction name="allowed" access="public" output="1" returntype="any">
<cfargument name="userIdNumber" type="numeric" required="Yes"/>
<cfargument name="featureBit" type="string" required="Yes"/>
<cfquery name="getBit" datasource="NavtrakUsers525">
select featureBit, CompanyId from UsersTable
where UserIdnumber = #userIdNumber#
</cfquery>
<!--- This query is used to get the featureBit of the
user. Twill be used later on in the code. --->
<!--- step 1 takes the decimal value of the feature
Bit and using the function from above
changes it to 0's and 1's in a binary string --->
<cfset Binary = #DecToBin(getBit.featureBit)#>
<!--- step 2 & 3 put commas in between each
numeral, so that the binary string, becomes a list, with places that we can manipulate
--->
<cfset List = replace(binary, '1', '1,',
'all')>
<cfset List1 = replace(list, '0', '0,', 'all')>
<!--- step 4 removes the final comma from the
end of the string --->
<cfset ListFinal = left(list1,len(list1) -1)>
<!--- we now reverse the list, so that we have
it the actual way its supps to be. this list is now
indicative of the positions of the features.
--->
<cfset revList = reverse(listFinal)>
<!--- to relate the feature that this section
protects, we get the id value of the field in the database, that relates
to the value of the section, for this one, its
Route Manager --->
<cfquery name="get"
datasource="NavtrakUsers525">
select id from features_Descriptions
where name = '#featureBit#'
</cfquery>
<!--- I needed to get all of the features, so
now, i select the id's of all of them --->
<cfquery name="getOrder"
datasource="NavtrakUsers525">
select id from features_Descriptions
</cfquery>
<!--- Now, to relate the position of this
feature, to the list, we get that position, by relating it to the order of the id's
from the full id's query --->
<cfloop query="getOrder">
<cfif getOrder.id eq #get.Id#>
<cfset ListSpot =
#getOrder.CurrentRow#>
</cfif>
</cfloop>
<cfif NOT (ListGetAt(revList, listSpot, ',')
eq 1)>
<cfset permissions = 0>
<cfelse>
<cfset permissions = 1>
</cfif>
<cfreturn permissions>
</cffunction>
</cfcomponent>
==================================================
Error Occurred While Processing Request
Variable DecToBin is undefined.
The error occurred in C:\Inetpub\wwwroot\permissions.cfc: line 16
14 : <!--- step 1 takes the decimal value of the feature
Bit and using the function from above
15 : changes it to 0's and 1's in a binary string --->
16 : <cfset Binary = #DecToBin(getBit.featureBit)#>
17 : <!--- step 2 & 3 put commas in between each
numeral, so that the binary string, becomes a list, with places that we can manipulate
--->
18 : <cfset List = replace(binary, '1', '1,',
'all')>
==================================================
thanks!
tony weeg
uncertified advanced cold fusion developer
tony at navtrak dot net
www.navtrak.net
office 410.548.2337
fax 410.860.2337
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev'
in the message of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).