Highlighted

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

New Here ,
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.1K

Likes

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

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

New Here ,
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.1K

Likes

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
Mar 10, 2015 0
Advocate ,
Mar 10, 2015

Copy link to clipboard

Copied

Where is your return value ?

This function requires a true or false return.

Likes

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
Reply
Loading...
Mar 10, 2015 0
New Here ,
Mar 10, 2015

Copy link to clipboard

Copied

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

Likes

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
Reply
Loading...
Mar 10, 2015 0
Advocate ,
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;

}

Likes

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
Reply
Loading...
Mar 10, 2015 0
New Here ,
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.

Likes

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
Reply
Loading...
Mar 10, 2015 0
haxtbh LATEST
Advocate ,
Mar 10, 2015

Copy link to clipboard

Copied

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

Likes

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
Reply
Loading...
Mar 10, 2015 1
Engaged ,
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;

}

Likes

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
Reply
Loading...
Mar 10, 2015 0