• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

The value returned from the onApplicationStart function is not of type boolean

New Here ,
Mar 10, 2015 Mar 10, 2015

Copy link to clipboard

Copied

getting the following error when using this statement:

The value returned from the onApplicationStart function is not of type boolean. 

  If the component name is specified as a return type, it is possible that either a definition file for the component cannot be found or is not accessible.    

component

 

this.name = "customoptionexample1";

this.wschannels = [{name="bidchannel", cfclistener="bidListener"}];

 

boolean function onApplicationStart()

 

  application.bidvalue = 1;

Views

1.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Mar 10, 2015 Mar 10, 2015

Copy link to clipboard

Copied

Where is your return value ?

This function requires a true or false return.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 10, 2015 Mar 10, 2015

Copy link to clipboard

Copied

I am not changing the return value this is coming from application.cfc

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Mar 10, 2015 Mar 10, 2015

Copy link to clipboard

Copied

What I mean is where is that part  of the code. This function should looks something like this:

public boolean function onApplicationStart(){

     application.bidvalue = 1;

     //other stuff

     return true;

}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 10, 2015 Mar 10, 2015

Copy link to clipboard

Copied

OK, thx... I copy the code from Using WebSocket to broadcast messages

some of the sample are not working.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Mar 10, 2015 Mar 10, 2015

Copy link to clipboard

Copied

LATEST

Doesn't surprise me that Adobes own samples are not working. Seen it before.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Mar 10, 2015 Mar 10, 2015

Copy link to clipboard

Copied

As shown here... Application.cfc | Learn CF in a Week

You should just have the below.  You don't shouldn't set a return type.

function onApplicationStart() {

    // your code here

       return true;

}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation