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. I have NOT copied the images to the 
.../kitchensink/public/ directory.
The images are showing just as intended so they must be being picked up 
from the location that pygwt.getImageBaseURL() is returning.

It seems to me that I have done the equivalent of what you are doing but 
I don't have a problem, so in what way is your setup different?
Phil

Reply via email to