GtkChamplain API broke somewhere from 0.6->0.8



Hi hackers!

In case you don't remember me, (as far as I'm aware) I'm the only
developer using libchamplain in a Python application via the
introspection bindings rather than static bindings.

Up until now, I've been developing against stock Fedora 14 packages,
which used libchamplain 0.6, and I haven't had too many problems. The
app runs, it has a few crashing bugs, but it can be described as
usable.

A few weeks ago, I had my first bug report from a user of my app. He
was running Arch linux, which (at least at the time of his bug report)
was using libchamplain 0.8. He told me he was getting this error when
he ran my program:

Traceback (most recent call last):
  File "./gottengeography.py", line 1835, in <module>
    if __name__ == "__main__": GottenGeography().main()
  File "./gottengeography.py", line 717, in __init__
    self.map_view = self.champlain.get_view()
AttributeError: 'Embed' object has no attribute 'get_view'

This error is bizarre to me because the documentation online clearly
shows that get_view is a legit method on the Embed object, and I don't
even begin to know where to troubleshoot something so broken as this.
There are also absolutely no hits on Google for this either, so I'm
definitely breaking new ground here. Anyway, at the time I just told
my user to downgrade to 0.6 because that was the only thing that I
knew for sure would work.

Fast forward to today, I've finally successfully got jhbuild set up to
install all the newest fun GNOME technologies on my Fedora 14 box, and
I'm now myself getting this error. I'm not using 0.8, I'm using the
latest git master (commit e378c141cd23fac3cc35ae7c091ca7dfdf1653c0).

I've confirmed that get_view is present in GtkChamplain-0.10.gir, here:

    <class name="Embed"
[snip]
      <method name="get_view"
              c:identifier="gtk_champlain_embed_get_view"
              version="0.4"
              introspectable="0">
        <doc xml:whitespace="preserve">Gets a #ChamplainView from the
#GtkChamplainEmbed object.</doc>
        <return-value>
          <doc xml:whitespace="preserve">a #ChamplainView ready to be used</doc>
          <type name="Champlain.View" c:type="ChamplainView*"/>
        </return-value>
      </method>

So I really don't know why this isn't working. The method is in the
.gir file so I know it exists, I'm using it according to what the
documentation describes (and supposedly this hasn't changed since 0.4,
and I had it working in 0.6), and yet the error message continues to
say that the method just doesn't exist.

What could cause this? How do I fix it?

Thanks.

-- 
http://exolucere.ca


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