Shoutbox

BrowserControl - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: BrowserControl (/showthread.php?tid=93645)

BrowserControl by zeroip on 01-23-2010 at 08:34 PM

Why this doest'n work? (error code: -2146828283)

code:
var MyWindow = MsgPlus.CreateWnd("Windows.xml", "WndSettings");

var WebControl = MyWindow.Browser_GetInterface("BroInternet");
WebControl.Navigate2("http://www.msgpluslive.net");

code:

               <Control xsi:type="BrowserControl" Id="BroInternet">
                        <Position Top="5" Width="180" Left="5"/>
                </Control>


RE: BrowserControl by matty on 01-24-2010 at 02:58 AM

Does the window open? If not make sure the XML file is saved as in UNICODE.


RE: BrowserControl by zeroip on 01-24-2010 at 02:58 PM

yes the window is open ;) and xml is in unicode just the browser doesnt work :\


RE: BrowserControl by Eljay on 01-24-2010 at 03:29 PM

You need to specify the height of the control.


RE: BrowserControl by zeroip on 01-24-2010 at 05:09 PM

but why i got a console error? becaus of height?!


RE: BrowserControl by Eljay on 01-24-2010 at 05:40 PM

quote:
Originally posted by zeroip
but why i got a console error? becaus of height?!

Well without the height, the control isn't valid so it doesn't get created with the window. Therefore, the call to Browser_GetInterface can't possibly return a valid object because there is no control to "get".

---

Maybe Plus! should provide information as to why things don't load instead of just skipping over invalid controls. Just a simple debug message such as "Parameter Position/Height missing" would be very helpful.

I know the Interface Tester is available but it's something of a pain to use during development :P

RE: BrowserControl by zeroip on 01-24-2010 at 08:39 PM

okay i will try it thx


RE: BrowserControl by zeroip on 01-24-2010 at 08:42 PM

code:
                <Control xsi:type="BrowserControl" Id="BroInternet">
                        <Position Top="5" Height="180" Width="180" Left="5"/>
                </Control>

it doesnt work....
RE: BrowserControl by Eljay on 01-24-2010 at 08:51 PM

Well there must be some other error within your code. I have exactly the code you posted here and it works fine. Do you still get errors in the debugging console? If so, post the exact errors here as it might help us determine the error.

I have attached the small example I created to test it out in case that somehow helps.


RE: BrowserControl by zeroip on 01-25-2010 at 01:35 PM

the problem is the error codes in my console are german cuz of i am german xD
Edit: Thx it Woks!