On May 10, 2007, at 8:45 PM, Catherine wrote:

>
> Hi!
>
> I've just submitted my first TG widget to the CogBin - xcbl (
> http://cheeseshop.python.org/pypi/xcbl/0.1 ).  Yaaay!  It's called
> Extensible CheckBox List, and it's just like (and inherits from) the
> CheckBox List, except it's... well, extensible.  It includes an
> "Other: " field for the user to fill in more options beyond what was
> originally specified.
>
> http://catherine.devlin.googlepages.com/xcbl.html
>
> Everything seems to be working OK - though it's my first, fumbling
> upload to the Cheeseshop, so I'd appreciate anybody who'd like to
> install it, take a look, and critique/correct.
>
> My problem - the new widget isn't showing up in the Widget Browser.  I
> can't figure out why, and can't really find any documentation to help
> me.
>
> I suspect I may be leaving something out of my WidgetDescription.  I
> virtually copied the description for the ordinary CheckBoxList, like
> so:
>
> class ExtensibleCheckBoxListDesc(WidgetDescription):
>     name = "Extensible CheckBox List"
>     for_widget =
> ExtensibleCheckBoxList("your_extensible_checkbox_list",
>                               options=[(1, "Python"),
>                                        (2, "Java"),
>                                        (3, "Pascal"),
>                                        (4, "Ruby")],
>                               default=[1,4])
>
> Does anybody know what else I have to do to get it into the Widget
> Browser?  Is there a list of requirements for a valid
> WidgetDescription?  If I did something wrong, would the error be
> logged somewhere?
>
> The only other thing I can think of that I might have goofed up is
> setup.py, so I'm attaching that - though I don't see anything wrong
> with it, I'm also only working by imitation and don't know quite what
> it's supposed to have.
>
> Thanks for any help... and I hope some of you will find
> ExtensibleCheckBoxList handy!
>

Seems that you're missing the entry_point declaration in setup.py,  
try adding something like these lines:

     entry_points = """
     [turbogears.widgets]
     xcbl = path.to.your.widgets.module
     """

Then reinstall and it should appear (the widget description looks fine).

Thanks for sharing it! :)

Alberto

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to