Hello Johannes, To make things simple, I added a method in the file findtext.cc which is as under: The purpose of this method is to access "Textblock" from the file findtext.cc. ----------------------------------------------------------------------------------------------- /* RMP */ void FindtextState::getLink (void) { MSG("\n RMP: getLink function"); Textblock *textblock = new dw::Textblock (false); textblock->getNextLink (); } /* RMP */ ----------------------------------------------------------------------------------------------- I have included "textblock.hh" in the file 'findtext.cc'. I still get an error like shown below: ============================================================ ../dw/libDw-core.a(findtext.o): In function `dw::core::FindtextState::getLink()': /home/rmarathe/dillo-2.2/dw/findtext.cc:299: undefined reference to `dw::Textblock::Textblock(bool)' /home/rmarathe/dillo-2.2/dw/findtext.cc:301: undefined reference to `dw::Textblock::getNextLink()' collect2: ld returned 1 exit status make[2]: *** [dw-imgbuf-mem-test] Error 1 make[2]: Leaving directory `/home/rmarathe/dillo-2.2/test' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/rmarathe/dillo-2.2' make: *** [all] Error 2 ============================================================
From the file findtext.cc it seems we are not able to get hold of the constructor or any other methods in TextBlock class. Please let me know the changes that are needed to make the above work.
I can do a code clean-up later once the above starts working. regards, Rajesh Marathe. On Fri, Mar 19, 2010 at 10:55 PM, Johannes Hofmann <Johannes.Hofmann@gmx.de>wrote:
Hi,
On Fri, Mar 19, 2010 at 10:26:25AM +0530, Rajesh Marathe wrote:
Hi,
I am trying to implement the support for using the tab or other keyboard keys to set focus on web page links. As part of this, I started out with adding a new Class and would like to use some sort of iterator in this class. I would also like to use the 'Textblock' object to retrieve the style->x_link for a word. However, when I try to initialize the Textblock object in my new class, I get a linker error. The details are as under:
The basic skeletal code for new class is: ======================================== findlinks.cc
namespace dw { namespace core {
FindLinks::FindLinks () { widget = NULL; iterator = NULL;
}
FindLinks::~FindLinks () { if (iterator) delete iterator; }
void FindLinks::getlink (void) { MSG("\n Hi !! I came to findlinks"); Textblock *textblock = new Textblock (false);
}
I have included "dw/textblock.hh" in the above file and also included core.hh.
I guess it's because Textblock is in the dw namespace, not dw::core, so removing "namespace core {" in the above example should fix it. Alternatively you could use "new dw::Textblock (false);".
Compilation goes through but I end up with a linker error as under: ===================================================================== ../dw/libDw-core.a(findlinks.o): In function `dw::core::FindLinks::getlink()': /home/rmarathe/dillo-2.2/dw/findlinks.cc:25: undefined reference to `dw::Textblock::Textblock(bool)' collect2: ld returned 1 exit status
I believe that I still need to use "iterator" and the Textblock" classes to implement this feature. Am I using the Textblock in a right way or am I missing something in the above code ? Please do let me know,
Hm, I can't really tell from the code above. I would expect some code that uses the existing iterator mechanism to walk through a page and find links and buttons, and so on. Maybe you could use findtext.cc as an example.
Regards, Johannes
PS: The keyboard navigation feature would be highly appreciated!
_______________________________________________ Dillo-dev mailing list Dillo-dev@dillo.org http://lists.auriga.wearlab.de/cgi-bin/mailman/listinfo/dillo-dev