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;
Copy link to clipboard
Copied
Where is your return value ?
This function requires a true or false return.
Copy link to clipboard
Copied
I am not changing the return value this is coming from application.cfc
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;
}
Copy link to clipboard
Copied
OK, thx... I copy the code from Using WebSocket to broadcast messages
some of the sample are not working.
Copy link to clipboard
Copied
Doesn't surprise me that Adobes own samples are not working. Seen it before.
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;
}