On Tue, Apr 24, 2012 at 6:09 PM, lkcl luke <[email protected]> wrote:

> On Tue, Apr 24, 2012 at 5:19 PM, Phil Charlesworth
> <[email protected]> wrote:
> > On 24/04/12 15:37, Vsevolod Fedorov wrote:
> >> On 04/24/12 18:29, lkcl luke wrote:
> >>
> >>> rhhhmm.... i knew there was a reason why i was reluctant about the
> >>> getImageBaseURL thing (pygwt.py). ok, a workaround is to just go "if
> >>> not getModuleBaseURL.startswith("http://";) or https:// or better yet,
> >>> if it startswith "file://" then return pyjdinitpth+blahblah.
> >>>
> >>
> >>> for now however please just hack Tree.py and other uses of
> >>> pygwt.getImageBaseUrl to pass in images=True ok? ... or think of a
> >>> modification or other solution :) l.
> >>>
> >> May be just return getModuleBaseURL(), like this:
> >> ----
> >> diff --git a/library/pygwt.py b/library/pygwt.py
> >> index 1c3477c..650012a 100644
> >> --- a/library/pygwt.py
> >> +++ b/library/pygwt.py
> >> @@ -42,7 +42,5 @@ def getImageBaseURL(images=False):
> >>                return getModuleBaseURL() + images + '/'
> >>            else:
> >>                return getModuleBaseURL() + "images/"
> >> -    elif pyjd.is_desktop:
> >> -        return pyjd.pyjdinitpth + "/library/pyjamas/ui/public/"
> >>        else:
> >>            return getModuleBaseURL()
> >> ---
> >> With this patch all is working as before.
> >>
> >> Otherwise, it is bad when public/ directory structure must be different
> >> for pyjd and pyjs.
> >>
> >> Seva
> >>
> > Seva,
> > Not sure I understand your problem. As a test I am running the
> > KitchenSink example under pyjd on Windows 7.  The URL for pyjd.setup is
> > 'http://localhost/examples/kitchensink/public/KitchenSink.html', so the
> > html file is being served by the local server.
> >
> > When I click on the Trees page link, pygwt.getImageBaseURL() gets called
> > with no arguments and is returning
> > 'C:\pyjamas/library/pyjamas/ui/public/', which is where the images for
> > the Tree widget are by default.
>
>  yes.  he does not have any images in
> c:\pyjamas\library\pyjamas\ui\public.  he has images on
> http://localhost/location/images
>
>  l.
>
Oh, why not? They are part of the distribution. If he is using different
images, in the public/images directory of his application, he just needs to
construct the Trees with Images = True.
I don't see a good reason to modify pygwt.getImageBaseURL().
P.

Reply via email to