Hi.
The typical way to address a function in BindEvent () context is to write @functionname ().
Shall a function from a different namespace, say a module, be addressed, this does not work.
The syntax @module::functionname () is simply not valid.
Likewise writing module::functionname () won't return a valid pointer to that function.
What can i do ?
How to address a function from a different namespace ?
Re: How to address a function from a different namespace ?
Code: Select all
DeclareModule first
Declare function ()
EndDeclareModule
DeclareModule second
Declare init ()
EndDeclareModule
second::init ()
Module first
Procedure function ()
debug 1
EndProcedure
EndModule
Module second
Procedure init ()
bg = OpenWindow (#PB_Any, 0, 0, 0, 0, "", #PB_Window_Background)
BindEvent (#PB_Event_SizeWindow, first::function (), bg) ; TODO: doesn't work !!!
EndProcedure
EndModule
Re: How to address a function from a different namespace ?
Hello es_91,
put the '@' - sign in front of the functionname:
Greetings ... Peter
put the '@' - sign in front of the functionname:
Code: Select all
BindEvent (#PB_Event_SizeWindow, first::@function(), bg)
Re: How to address a function from a different namespace ?
oh dear!
Thank you so much.
Thank you so much.