On 23:05 Mon 28 Jan     , muppet wrote:
> I just noticed that versions of gtk+ >= 2.10.0 break my old  
> object_browser; a simple one-line hack makes it work again.
> 
>       http://asofyet.org/muppet/software/gtk2-perl/object_browser-0.008
> 
> object_browser is a little utility which lets you browse the  
> Glib::Object inheritance tree.  If you have Gavin Brown's excellent  
> Gtk2::PodBrowser installed, you even have nicely formatted manual  
> pages.  The tool attempts to be useful with any stable versions of  
> Gtk2 and gtk+ 2.x, but i recommend at least Gtk2 >= 1.040.
> 
> A while back, evil data pixies destroyed the hard disk which contained  
> the CVS repository for this program.  This 0.008 release is built off  
> of the "methodscraper" variant, which contained an attempt to list  
> methods on the object by scraping the symbol table for subroutines.

I like it very much. Unfortunately I see something strange.
I set it up at home and at work in the hospital, where I work as a doctor. Both 
machines
run debian sid.

i install standard debian latest sid packages
1. podbrowser
2. libgtk2-ex-podviewer-perl
and chmod 755 your script object_brower

1. podviewer:

now when I invoke podviewer such as
podviewer Gtk2
it shows nicely a page and I can see the document in the Document window
and if I type Gtk2::index in the Document Entry tab for instance, it is 
equivalent to command line:
podviewer Gtk2::index and I see syntax highlighting of 'hyperlinks to other 
nodes' 
which shows the other nodes in the pages, but I can't click on some of them :(
or better some I can and some I cant.
It is weird buggy and intermittent. The first click often does not work
but the click on a second different hyperlink then works :( very strange.
however when you hover over a 'hyperlinks': down in the status bar it says 'Go 
to Gtk2::TreeStore'
but it wont take you to it, if you click it
 unless you type Gtk2::TreeStore directly in the Document entry tab... 
or __sometimes__ if you chose a second one then it might go to it. strange.
or it might not go to it even then. strange. intermittent behavior.

wait: I notice: in 
podviewer Gtk2
look in the See Also section:
a) if you hover over Gtk2::index it shows in the status button 
Go to Gtk2::Gdk::X11 
but wont take you there.
b) if you hover on Gtk2::Pango it shows in the status section Gtk2::Gdk::Screen
and if you click repeatedly 
sometimes, it does nothing, 
sometimes it takes you to Gtk2::Gdk::Screen!!
sometimes it takes you to Gtk2::Pango (sometimes after showing status 
Gtk2::Pango!!

the status box contents are random and unpredictable! sometimes are unrelated 
to where you end up,
and are randomly associated with either the destination or the hyperlink blue 
text.
Thus Gtk2 hyperlink in see also sometimes leads to something totally different 
from Gtk2 
or may not even click at all! 
Thus look at Document Gtk2::Gdk::Screen and click the Gtk2 link
may do nothing, may lead to Gtk2::Gdk::PangoRenderer

which is amazing and bizarre.

note that podviewer (in libgtk2-ex-podviewer-perl) is a debian prerequisite for 
podviewer.

2. podbrowser:

is very beautiful nice highlighting and color emphasis of shows me the subsets 

Functions
Modules
Pod Documents
Pragmas

subsets and is quite beautiful: I can learn all about perl from it!
and the Modules sections has all of our wonderful documents
including all of Glib (including my new friend 'this is now that" that I am 
trying to grock)
and Glib::Object etc
including my new friend :)
Gnome2::DateEdit

Now this inherits some of the bizarro behavior of podviewer. 
Off the bat here is an example:
The see also sections Gtk2 links are particularly iffy:(.
example:
Go to Gtk2::Gdk::X11  
"see also" section look at link Gtk2
hover over it: 
the about box says
Glib::Param::String
while the click of it takes you to
Gtk2::Builder :(

In Gtk2::builder 
the two early Glib::Error hyperlinks 
hover to show in the status bar
Glib::Param::Double and Glib::Param::String respectively, 
but bizarrely when you click them they take you to
Gtk2::Alignment and Gtk2::Param::String

(oy vey).

3. object_browser-0.008.
which i downloaded from your asofyet link.


./object_browser-0.008
GLib-GObject-WARNING **: /tmp/buildd/glib2.0-2.14.5/gobject/gsignal.c:1617: 
signal `link_clicked' is invalid for instance `0xba6000' at 
./object_browser-0.008 line 137.
tossing non-object Gtk2::TreeModel
tossing non-object Gtk2::TreeModel
tossing non-object Gtk2::TreeModel
tossing non-object Gtk2::Editable
tossing non-object Gtk2::CellEditable
tossing non-object Gtk2::FileChooser
tossing non-object Gtk2::FileChooser
tossing non-object Gtk2::FileChooser
asked to lazy-load Gtk2::Gdk::Bitmap, but that package is not registered at 
/usr/lib/perl5/Glib.pm line 190.

Help says to me:

You don't have Gtk2::PodViewer installed; falling back to plain text. This
could be very ugly and had to read. Please consider getting Gtk2::Podviewer 
from cpan.

(perhaps it means to carp about Gtk2::Podbrowser ? - but as I show above I have 
native debian sid of both)

and indeed the POD section does not show the nice pod with 'hyperlinks' and 
pretty bold sections
and it begins with the Glib::Object level.

Funny this afternoon I seem to remember at my work machine, I recall color in 
the pod browser section of object-browser.
But I will check there again today, I may have faulty recollection.

(Also your object browser needs perl-doc package, which I installed, 
which only comes up as an error after clicking pod sectinon.}

Wait: Debian bizarrely installed 
podbrowser into /usr/bin/podbrowser
but does not give us any corresponding .pm file in 
/usr/share/perl5/Gtk2/PodBrowser.pm say

while libgtk2-ex-podviewer-perl 
gives us
/usr/share/perl5/Gtk2/Ex/PodViewer.pm


also weirdly you are looking in your program for
our $have_podviewer = eval "use Gtk2::PodViewer; 1";
as opposed to Gtk2::Ex::PodViewer which my debian machine has
or Gtk2::PodBrowser which you may actually want but my machine does not have 
because of weird debian packaging:(

Now when I changed the references to from Gtk2::PodViewer to
Gtk2::Ex::PodViewer throughout the program (3 ->new invocations) then I got 
improvement in the
help section (no error on not having PodViewer in help)
but it still is the non syntax highlighted version and does not give hyperlinks 
or allow clicking.
and how to fix it to use PodBrowser (which does not have a .pm file 

debian dpkg -l output
ii  libgtk2-ex-podviewer-perl        0.17-1                           Perl Gtk2 
widget for displaying Plain Old Documentation (POD)

ii  podbrowser                       0.12-1                           
Documentation browser for Perl


Thanks for your work!

Mitchell






> 
> Suggestions and patches welcome.
> 
> --
> zella (crying):  I want...
> us:  What?
> zella (still crying):  I want...  something!
> 
> 
> _______________________________________________
> gtk-perl-list mailing list
> gtk-perl-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gtk-perl-list
_______________________________________________
gtk-perl-list mailing list
gtk-perl-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list

Reply via email to