Loading...

openbd@googlegroups.com

[Prev] Thread [Next]  |  [Prev] Date [Next]

Re: [OpenBD] cfreturn 0 is not returning anything minifiredragon Wed Feb 29 09:00:46 2012

Here is some code clocks on CFC Side I have tested: 

<cffunction name="logOut" output="no" access="private" returntype="any"> 
<cfif isdefined("Session.MM_Username")><cfset StructDelete(Session, 
"MM_Username")></cfif> 
<cfif isdefined("Session.MM_UserID")><cfset StructDelete(Session, 
"MM_UserID")></cfif> 
<cfif isdefined("Session.MM_Lvl")><cfset StructDelete(Session, 
"MM_Lvl")></cfif> 

<cfreturn "0" /> 
</cffunction> 

RESPONSE: 0 

<cffunction name="logOut" output="no" access="private" returntype="boolean"> 
<cfif isdefined("Session.MM_Username")><cfset StructDelete(Session, 
"MM_Username")></cfif> 
<cfif isdefined("Session.MM_UserID")><cfset StructDelete(Session, 
"MM_UserID")></cfif> 
<cfif isdefined("Session.MM_Lvl")><cfset StructDelete(Session, 
"MM_Lvl")></cfif> 

<cfreturn "0" /> 
</cffunction> 

RESPONSE: No response in FireBug or ajax return 

<cffunction name="logOut" output="no" access="private" returntype="boolean"> 
<cfif isdefined("Session.MM_Username")><cfset StructDelete(Session, 
"MM_Username")></cfif> 
<cfif isdefined("Session.MM_UserID")><cfset StructDelete(Session, 
"MM_UserID")></cfif> 
<cfif isdefined("Session.MM_Lvl")><cfset StructDelete(Session, 
"MM_Lvl")></cfif> 

<cfreturn 0 /> 
</cffunction> 

RESPONSE: No response in FireBug or ajax return 

<cffunction name="logOut" output="no" access="private" returntype="numeric"> 
<cfif isdefined("Session.MM_Username")><cfset StructDelete(Session, 
"MM_Username")></cfif> 
<cfif isdefined("Session.MM_UserID")><cfset StructDelete(Session, 
"MM_UserID")></cfif> 
<cfif isdefined("Session.MM_Lvl")><cfset StructDelete(Session, 
"MM_Lvl")></cfif> 

<cfreturn 0 /> 
</cffunction> 

RESPONSE: No response in FireBug or ajax return 


<cffunction name="logOut" output="no" access="private" returntype="boolean"> 
<cfif isdefined("Session.MM_Username")><cfset StructDelete(Session, 
"MM_Username")></cfif> 
<cfif isdefined("Session.MM_UserID")><cfset StructDelete(Session, 
"MM_UserID")></cfif> 
<cfif isdefined("Session.MM_Lvl")><cfset StructDelete(Session, 
"MM_Lvl")></cfif> 

<cfreturn 1 /> 
</cffunction> 

REPONSE: True 

Server Info 
struct 
bluedragon      struct 
builddate       2012-02-05 01:01:01 GMT 
edition         8 
level   GPL 
releasedate     1 January 2012 
state   alpha 
version         2.1 
coldfusion      struct 
appserver       Apache Tomcat/7.0.23 
installkit      [empty string] 
productlevel    GPL 
productname     BlueDragon 
productversion  2,1 
rootdir         /home/kingofsweetsstore/public_html/ 
supportedlocales        Malay (Malaysia), Arabic (Qatar), Icelandic (Iceland), 
Finnish (Finland), English (Malta), Italian (Switzerland), Dutch (Belgium), 
Arabic (Saudi Arabia), Arabic (Iraq), Spanish (Puerto Rico), Spanish (Chile), 
German (Austria), English (United Kingdom), Spanish (Panama), Arabic (Yemen), 
Macedonian (Macedonia), English (Canada), Vietnamese (Vietnam), Dutch 
(Netherlands), Spanish (United States), Chinese (China), Spanish (Honduras), 
English (United States), Arabic (Morocco), Indonesian (Indonesia), English 
(South Africa), Korean (South Korea), Arabic (Tunisia), Serbian (Serbia), 
Belarusian (Belarus), Chinese (Taiwan), Arabic (Sudan), Spanish (Bolivia), 
Arabic (Algeria), Spanish (Argentina), Arabic (United Arab Emirates), French 
(Canada), Lithuanian (Lithuania), Arabic (Syria), Russian (Russia), French 
(Belgium), Spanish (Spain), Hebrew (Israel), Danish (Denmark), Spanish (Costa 
Rica), Chinese (Hong Kong), Catalan (Spain), Thai (Thailand), Ukrainian 
(Ukraine), Spanish (Dominican Republic), Spanish (Venezuela), Polish (Poland), 
Arabic (Libya), Arabic (Jordan), Hungarian (Hungary), Spanish (Guatemala), 
Spanish (Paraguay), Bulgarian (Bulgaria), Croatian (Croatia), Romanian 
(Romania), French (Luxembourg), English (Singapore), Spanish (Ecuador), Serbian 
(Bosnia and Herzegovina), Spanish (Nicaragua), Spanish (El Salvador), Hindi 
(India), Greek (Greece), Slovenian (Slovenia), Italian (Italy), Japanese 
(Japan), German (Luxembourg), French (Switzerland), Maltese (Malta), Arabic 
(Bahrain), Serbian (Montenegro), Portuguese (Brazil), Norwegian (Norway), 
German (Switzerland), Chinese (Singapore), Arabic (Kuwait), Arabic (Egypt), 
Irish (Ireland), Spanish (Peru), Czech (Czech Republic), Turkish (Turkey), 
Spanish (Uruguay), English (Ireland), English (India), Arabic (Oman), Serbian 
(Serbia and Montenegro), Albanian (Albania), Portuguese (Portugal), Latvian 
(Latvia), Slovak (Slovakia), Spanish (Mexico), English (Australia), English 
(New Zealand), Swedish (Sweden), Arabic (Lebanon), German (Germany), Spanish 
(Colombia), English (Philippines), Estonian (Estonia), Greek (Cyprus), French 
(France), Dutch (Belgian),French (Canadian),Norwegian (Bokmal),Dutch 
(Standard),French (Standard),Norwegian (nynorsk),English (Australian),French 
(Swiss),Portuguese (Brazilian),English (Canadian),German (Austrian),Portuguese 
(Standard),English (New Zealand),German (Standard),Spanish (Mexican),English 
(UK),German (Swiss),Spanish (Modern),English (US),Italian (Standard),Spanish 
(Standard),French (Belgian),Italian (Swiss),Swedish, ms_MY, ar_QA, is_IS, 
fi_FI, pl, en_MT, it_CH, nl_BE, ar_SA, ar_IQ, es_PR, es_CL, fi, de_AT, da, 
en_GB, es_PA, sr, ar_YE, mk_MK, mk, en_CA, vi_VN, nl_NL, es_US, zh_CN, es_HN, 
en_US, fr, th, ar, ar_MA, lv, de, in_ID, hr, en_ZA, ko_KR, ar_TN, in, ja, 
sr_RS, be_BY, zh_TW, ar_SD, pt, is, ja_JP, es_BO, ar_DZ, ms, es_AR, ar_AE, 
fr_CA, sl, es, lt_LT, sr_ME, ar_SY, ru_RU, fr_BE, es_ES, bg, iw_IL, sv, en, iw, 
da_DK, es_CR, zh_HK, zh, ca_ES, th_TH, uk_UA, es_DO, es_VE, pl_PL, ar_LY, 
ar_JO, it, uk, hu_HU, ga, es_GT, es_PY, bg_BG, hr_HR, sr_BA, ro_RO, fr_LU, no, 
lt, en_SG, es_EC, sr_BA, es_NI, sk, ru, mt, es_SV, nl, hi_IN, et, el_GR, sl_SI, 
it_IT, ja_JP, de_LU, fr_CH, mt_MT, ar_BH, sq, vi, sr_ME, pt_BR, no_NO, el, 
de_CH, zh_SG, ar_KW, ar_EG, ga_IE, es_PE, cs_CZ, tr_TR, cs, es_UY, en_IE, 
en_IN, ar_OM, sr_CS, ca, be, sr, ko, sq_AL, pt_PT, lv_LV, sr_RS, sk_SK, es_MX, 
en_AU, no_NO, en_NZ, sv_SE, ro, ar_LB, de_DE, th_TH, tr, es_CO, en_PH, et_EE, 
el_CY, hu, fr_FR 
os      struct 
additionalinformation   Oracle Corporation 1.7.0_02 
arch    amd64 
name    Linux 
version         2.6.18-274.12.1.el5 


I think that answers your question. And this was not working on the "Released" 
version either. I get the same results. 

----- Original Message -----
From: "Stephen Moretti" <[EMAIL PROTECTED]> 
To: [EMAIL PROTECTED] 
Sent: Wednesday, February 29, 2012 8:23:27 AM 
Subject: Re: [OpenBD] cfreturn 0 is not returning anything 



On 29 February 2012 11:54, Alan Williamson < [EMAIL PROTECTED] > wrote: 



Sorry chaps ... i do not see the bug here. 






Disregarding all the surrounding bumf about using 0 and 1 instead of false and 
true and the guff about using really old code. 



minifiredragon states : 


<blockquote>
Just a side note tried <cfreturn 0 /> and <cfreturn false /> and it does not 
return anything. 
</blockquote>





Shouldn't a function with return type of boolean at least return "false"? 


In which case this could be a bug and the questions should be: 


    • Do you have a test case outside of the stuff you're currently working on 
that also shows a method with a return type of boolean returning false that 
returns "nothing"? 
    • What is the "nothing"? Empty string? 
    • If you use the result of the function in a condition, does the code fail 
or does it correctly equate to "false"? 
    • What version of OpenBD is being used? 
    • on what operating system? 
    • and which java container and version? 



Regards 


Stephen 
-- Stephen Moretti 
Blog : http://nil.checksite.co.uk/ 
Twitter : http://twitter.com/mr_nil 

More Twitter : http://twitter.com/CFOverflow 


-- 
online documentation: http://openbd.org/manual/ 
google+ hints/tips: https://plus.google.com/115990347459711259462 
http://groups.google.com/group/openbd?hl=en 

-- 
online documentation: http://openbd.org/manual/
   google+ hints/tips: https://plus.google.com/115990347459711259462
     http://groups.google.com/group/openbd?hl=en