[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash-dev] fltk builds all fail now on Debian

From: strk
Subject: Re: [Gnash-dev] fltk builds all fail now on Debian
Date: Tue, 13 Mar 2007 19:05:38 +0100

On Tue, Mar 13, 2007 at 05:43:52PM +0000, Martin Guy wrote:
> >Gui* gui = <whatever it is>;
> >bind1st(mem_fun(Gui::menu_quit),  gui)
> Sorry, I don't understand. At present it has:
>    file->begin();
>    new Item("Open",                    0, 
>    callback_cast(menu_fltk_open_file));
>    new Item("Save as",                 0,
> callback_cast(menu_fltk_save_file_as));
>    new Item("Quit",                    0, callback_cast(menu_quit));
>    file->end();
> Can u say what lines I need to replace the "Quit" line with, or
> (better) an implementation of a new menu_fltk_quit to be used in this
> context instead of menu_quit, but defined in terms of menu-quit?
> I can then probably fix all the others.

I belive that callback_cast casts  the given argument to a function
taking no args and returning void:


Now, menu_quit *did* take no args when it was a static method, but
now that it is a non-static method takes an implicit first arg
(the 'this' pointer). So you need to create a function that takes
the gui pointer as first argument.
I guess it needs understanding of the fltk event handlers internals, which
I don't have. Do you have a 'gui' instance pointer available in that
function ?

        bind1st( mem_fun(MyClass::nonstatic_method), myInstance )

Should return a functor acting as a proxy to the real call.
Ie: the functor takes no args, but internally calls


>    M
> _______________________________________________
> Gnash-dev mailing list
> address@hidden


 ()   ASCII Ribbon Campaign
 /\   Keep it simple! 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]