On 1/18/06, Randall <[EMAIL PROTECTED]> wrote:
>
> Thanks Kevin. You're doing a great job with TG. Don't let my
> questions slow down your work. I ask alot of them.
Thanks, and no problem with the questions. You'll probably note that I
don't answer half as many questions as I'd like to, but I have a hard
enough time with email as it is.
> This is what I'm trying to do. I have a widget that subclasses
> TextWidget. Call it MyWidget. MyWidget will be used in several views.
> It includes a hyperlink (in the label) that opens a search dialog in a
> new neatly sized window. The search dialog window returns a value to
> the MyWidget text field. The part I'm stuck on is defining the
> javascript for the widget. It looks like:
>
> widget.javascript = [(widget.JSLink(?, "openwin.js")), ]
Take a look at widgets.base:register_static_directory
There, you tell it where the static directory is for a given package.
JSLink("yourpackage", "openwin.js")
refers to "openwin.js" in the static directory registered for "yourpackage".
Kevin