Problem with candidates , function argument syntax, pointer

Hi i an trying to call a function but i am not sure how to give it the right input arguments. I get following error when trying to compile:

/Users/Toebs/Documents/Arduino_Build/Pusher_test_toebs/Pusher_test_toebs.cpp:36: error: no matching function for call to 'PusherClient::bindAll(const String&, const String&)'

/Users/Toebs/GrowBox/libraries/ArduinoPusherClient/PusherClient.h:56: note: candidates are: void PusherClient::bindAll(void (*)(const String&, const String&))

I am trying to use this function:

void PusherClient::bindAll(EventDelegate delegate) 
{
    _bindAllDelegate = delegate;
}

ANd this is from the .h file. This is bugging me, i dont really know how to read the syntax

typedef void (*EventDelegate)(const String& name, const String& data);

I have attached the project files :slight_smile:

ArduinoPusherClient.zip (39 KB)

private_channels.ino (953 Bytes)

PusherClient::bindAll(const String&, const String&)
void PusherClient::bindAll(void (*)(const String&, const String&))

Looks like you are trying to pass two strings to bindAll() when what it wants is an EventDelegate (pointer to a function that takes two strings as arguments and returns void).

If your EventDelegate function is called delegate:

 void delegate(String name, String data) {}"

You should pass that name to bindAll():
[code]PusherClient::bindAll(delegate);

[/code]