On Wed, Feb 22, 2012 at 5:33 AM, Jesse Vander Does
<[email protected]> wrote:
>> i always start from cut/paste copying one of the examples so i
>> absolutely never have this problem, period. even after working with
> I do the same thing, that's why all of my projects are called hello world.
*lol*
> Nonetheless, sometimes I still have issues.
yes it's not perfect.
>> > I now have looked through the html5 api as well as have done more google
>> > searching, reading through the pyjamas api and a few more experiments.
>> > A
>> > few notes for the record.
>> >
>> > The closest thing to Window.setLocation seems to be window.location or
>> > possible window.location.href as location is an object in the javascript
>> > api, but seems to be a string in the pyjs api.
>>
>> yep. that's it. now look at the code in Window.py - do *not* treat
>>
>> the pyjamas code-base as some sort of stupid "black box".
>
> I never treat pyjs as stupid black box,
super!
> as I mentioned above I always have
> pyjs api, which links to the source, open. Were you suggesting I dig into
> the the compiler, never done that.
yeah that's a bit scarey, that is :)
> Anyways, I finally have a sense of what
> is going on and want share what I've found in case other people find it
> useful or my understanding can be improved or corrected.
>
> The Window.setLocation was attempting to redirect the iframe. I don't fully
> understand the importance of the iframe to pyjs, but I do know that it is.
> My work around has been to call through to javascript with this line of
> code:
>
> JS("""top.location.href = "service/login/"+provider """)
>
> This sets the location for the top most browser window and gets my web app
> working.
ok you shouldn't need to do that as a JS() block - just
top.location.href = ..... should do
but yes, you could also probably do this:
Window.getLocation().href = "service/login"+provider.
l.