RevBrowser in WindowsXP

Bringing the internet highway into your project? Building FTP, HTTP, email, chat or other client solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

andres
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 68
Joined: Thu Jan 04, 2007 2:24 am

RevBrowser in WindowsXP

Post by andres » Thu Apr 17, 2008 5:00 pm

Hello

I am having a problem when opening a RevBrowser instance in WinXP. Instead of opening it inside the card, it launches the Explorer browser.

This problem does not happen in the OSX version. And when I run the compiled Browser Sampler on the WinXP machine it works fine.

Any clues?
Andres

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Thu Apr 17, 2008 5:02 pm

Andres,

What are you trying to load in the browser, which script are you using to do that, and what do you see exactly when the page loads in Explorer?

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

andres
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 68
Joined: Thu Jan 04, 2007 2:24 am

Post by andres » Thu Apr 17, 2008 5:10 pm

Hello Mark

Thanks for the quick response.

I am trying to load the Facebook login page for web applications.

http://www.facebook.com/login.php?api_k ... popup=true

When the page loads in explorer it shows what it is supposed to show inside the application.

Let me give you more details: At startup, the browser is not loaded, it is loaded with a button, but it is hidden until a string is found on the page contents.

[code]
put tBrowserId into sBrowserId
revBrowserSet sBrowserId, "visible", "false"
revBrowserSet sBrowserId, "showborder", true
revBrowserSet sBrowserId, "rect", the rect of image "browserimage"
[/code]

Thanks again.
Andres

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Thu Apr 17, 2008 5:27 pm

Hi Andres,

In RevOnline, under the user name Mark, you will find a very simple stack with the name RevBrowserTest. Do you see the same problem if you try to load the URL with that stack?

Looking at the URL, I wonder whether changing popup=true into popup=false might make a difference.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

andres
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 68
Joined: Thu Jan 04, 2007 2:24 am

Post by andres » Thu Apr 17, 2008 5:51 pm

Hello Mark

I downloaded your stack, compiled it for Windows and ran it.

It loads the same URL without a problem. There is an execution error window when pressing the "Close" button but I don't think that is the problem now.

The popup=true is just a parameter within the url, it does not open a new window, it is sent to Facebook for them to know that the login window has to be clean, without borders or menus.

Another detail is that the image used to get the rect coordenates for the browser, is hidden. But I don't think this is a problem either.

What else do you suggest?

Andres

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Thu Apr 17, 2008 7:03 pm

Hi Andres,

Now we now that your stack is the problem and not Facebook or revBrowser.

Can you post the part of the code that sets the URL?

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

andres
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 68
Joined: Thu Jan 04, 2007 2:24 am

Post by andres » Thu Apr 17, 2008 7:19 pm

Yes Mark...

Code: Select all

    local tWindowId
    put the windowid of this stack into tWindowId
    local tBrowserId
    put revBrowserOpen(tWindowId, "http://www.facebook.com/login.php?api_key=XXX&v=1.0&popup=true") into tBrowserId
    IF tBrowserId is not an integer THEN
        answer "Error opening browser: " & tBrowserId
        exit altBrowserOn
    END IF
    put tBrowserId into sBrowserId
    revBrowserSet sBrowserId, "visible", "true"
    revBrowserSet sBrowserId, "showborder", true
    revBrowserSet sBrowserId, "rect", the rect of image "browserimage"
I have disabled everything in the middle (content control), and now the Explorer is not opening, but the browser inside the card is not shown.

When running the code on a different new stack I get the same problem.

I am now running it in a different XP machine and I see the same problem.

Andres

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Thu Apr 17, 2008 7:35 pm

Andres,

I took your script and made a stack. It works fine, without any problems. If you want, you can have a look at the stack "Browser Stack for Andres" in my user account on RevOnline and test it. Let me know what happens.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

andres
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 68
Joined: Thu Jan 04, 2007 2:24 am

Post by andres » Thu Apr 17, 2008 7:35 pm

Hello Mark

Let me correct my previous statement...

When running the code on a different new stack I DON'T get the same problem.

Could it be the fact that the window is a custom shape one with some transparency?

Andres

andres
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 68
Joined: Thu Jan 04, 2007 2:24 am

Post by andres » Thu Apr 17, 2008 7:45 pm

Yes Mark

The problem is generated by the custom shape window.

I just added the custom shape to the clean stack and the revbrowser does not show in WinXP.

Do you know how to fix this?

Andres

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Thu Apr 17, 2008 10:04 pm

Hi Andres,

I have uploaded a new stack to RevOnline, with custom windowshape. It works fine for me.

Do you set the window shape before or after opening thebrowser? After setting a custom window shape, the window ID changes and Rev will nolonger know which window to attach the existing browser to.

You need to close browsers before setting the windowShape and re-open them after setting it.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

andres
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 68
Joined: Thu Jan 04, 2007 2:24 am

Post by andres » Thu Apr 17, 2008 11:20 pm

Hello Mark

The window shape is always the same. Never changed.

I will send you my sample file via email for you to review.

Thanks
Andres

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Thu Apr 17, 2008 11:25 pm

That's fine, Andres. Did you test the new stack that I put on RevOnline?

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

andres
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 68
Joined: Thu Jan 04, 2007 2:24 am

Post by andres » Thu Apr 17, 2008 11:34 pm

Hello Mark

I checked the new stack and it works.

I hope you can find what is wrong in the one I sent you.

Andres

andres
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 68
Joined: Thu Jan 04, 2007 2:24 am

Post by andres » Thu Apr 17, 2008 11:53 pm

Hello Mark

On your stack, if I ad the background image (the one used in the file I sent you) and make it the window shape, the Win version does not work.

What could be happening?

The color of the image? This one is black.
The size of the image? This one is bigger.
Transparency?
Name with extension .jpg?

Andres

Post Reply