Results 1 to 3 of 3

Thread: Connect to signals

  1. #1
    Peasant
    Join Date
    Nov 2006
    Posts
    6

    Default Connect to signals

    When using a SlotContainer with the CL_Keyboard and CL_Mouse signals I get the error:

    Code:
    error: no matching function for call to CL_SlotContainer::connect(CL_Signal_v1<const CL_InputEvent&>&, void (*)(const CL_InputEvent&))'
    For the following code:

    Code:
    slots.connect(window->sig_window_close(), &Core::on_window_close);
    slots.connect(CL_Keyboard::sig_key_down(), &Core::on_key_down);
    The first line works fine, but the second produces the error.

    Thanks, Dom.

  2. #2
    ClanLib Developer
    Join Date
    Sep 2006
    Location
    Bergen, Norway
    Posts
    588

    Default

    How does your on_key_down function look like?

  3. #3
    Peasant
    Join Date
    Nov 2006
    Posts
    6

    Default

    The receiving code is this:

    Code:
    void Core::on_key_down(const CL_InputEvent& e);
    Which works for

    Code:
    slot_key_down = CL_Keyboard::sig_key_down().connect(&Core::on_key_down);
    but not for the CL_SlotContainer.

Similar Threads

  1. Can't connect to licensing server...
    By in forum Funeral Quest
    Replies: 1
    Last Post: 03-30-2003, 05:06 AM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •