From: John L. <jla...@gm...> - 2013-09-08 06:24:53
|
On Thu, Aug 29, 2013 at 9:32 PM, Paul K <pau...@ya...> wrote: > Hi John, > > I've been trying to add some reaction based on link clicked in > wxLuaHtmlWindow and can't figure out how to set it. > > This is what I've tried: > > wx.wxLuaHtmlWindow.OnLinkClicked = function(self, link) > -- do something > end > > but don't see any reaction (I tried to output something and to call > "error"). > > That should be right. I have never used this function so I don't know what triggers it. In any case I think you should just get the wxHtmlLinkEvent and handle it there, I believe that this also applies for wx 2.8.x too. http://docs.wxwidgets.org/trunk/classwx_html_window.html#a519281dbfbddc163b5e73fd6a10cf90a > What is the right way to set it? Also, I see the code that resets some > internal flag after OnLickClicked is called: > > m_wxlState.SetCallBaseClassFunction(false); // clear flag always > > Does this mean I need to re-set it every time the link is clicked? Thank > you. > > No, this is just an internal wxLua flag for when the Lua code wants to call the base class function, if you call obj:_OnLinkClicked() for example. Regards, John |