[flexcoders] Re: BrowserManager not working

2009-07-14 Thread valdhor
I tried your code and it worked fine (Of course, I ended up in an endless loop 
as it kept loading the same page over and over again).


--- In [email protected], edencane  wrote:
>
> 
> Hi. 
> 
> trace(url1) outputs the server name and port eg. 'www.myserver.com:7070'
> 
> Alex: I am using http:// not file://
> 
> So the problem occurs when I use:
> navigateToURL(u,"_self");
> This loads the url, but whatever information is needed by BrowserManager to
> extract the URL, is not included because when the page loads (this second
> time), the BrowserManager object is null...
> 
> any clues anyone?
> 
> Thanks.
> 
> Kr.
> Luke.
> 
> valdhor-3 wrote:
> > 
> > What does the trace(url1) output? Does it have a # in it somewhere? If so,
> > the browser won't refresh as it is trying to move to an anchor.
> > 
> > 
> > --- In [email protected], edencane  wrote:
> >>
> >> 
> >> Hi. Thanks for your response.
> >> After some more troubleshooting the problem is the following:
> >> 
> >> the URL is returned correctly by the following code:
> >> 
> >> import mx.managers.BrowserManager;
> >> import mx.managers.IBrowserManager;
> >> import mx.utils.URLUtil;
> >> import mx.utils.ObjectUtil;
> >> 
> >> private var bman:IBrowserManager;
> >> private var url1:String;
> >> 
> >> bman = BrowserManager.getInstance();
> >> bman.init();
> >> url1 = URLUtil.getServerNameWithPort(bman.url);
> >> trace(url1);
> >> 
> >> but then I do this:
> >> 
> >> if (true) {
> >> var u:URLRequest = new URLRequest(url1);
> >> navigateToURL(u,"_self");
> >> }
> >> 
> >> Basically I want to reload the original URL on certain conditions.
> >> 
> >> This time when the page loads the bman instance is null.
> >> So the URLRequest object does not contain the information that
> >> BrowserManager needs.
> >> Would this be to do with the request headers...?
> >> 
> >> How can I solve this...?
> >> 
> >> Thanks 
> >> 
> >> Kr.
> >> Luke Vanderfluit
> >> Avid Flex Fan!
> >> 
> >> 
> >> 
> >> 
> >> 
> >> 
> >> 
> >> 
> >> 
> >> 
> >> 
> >> 
> >> 
> >> Alex Harui wrote:
> >> > 
> >> > Compare with the examples.  You're not calling init() and you may need
> >> to
> >> > add an event listener as well.
> >> > 
> >> > Alex Harui
> >> > Flex SDK Developer
> >> > Adobe Systems Inc.
> >> > Blog: http://blogs.adobe.com/aharui
> >> > 
> >> > From: [email protected] [mailto:[email protected]] On
> >> > Behalf Of edencane
> >> > Sent: Thursday, July 09, 2009 1:30 AM
> >> > To: [email protected]
> >> > Subject: [flexcoders] BrowserManager not working
> >> > 
> >> > 
> >> > 
> >> > 
> >> > 
> >> > Hi.
> >> > 
> >> > I want to get the information of the current URL
> >> > 
> >> > This is my code. It aint workin'. What 'm I doing wrong?
> >> > 
> >> > 
> >> > http://www.adobe.com/2006/mxml";
> >> > layout="absolute"
> >> > creationComplete="init()">
> >> > 
> >> > 
> >> > 
> >> > 
> >> > 
> >> > 
> >> > 
> >> > 
> >> > --
> >> > View this message in context:
> >> >
> >> http://www.nabble.com/BrowserManager-not-working-tp24406204p24406204.html
> >> > Sent from the FlexCoders mailing list archive at Nabble.com.
> >> > 
> >> > 
> >> > 
> >> 
> >> -- 
> >> View this message in context:
> >> http://www.nabble.com/BrowserManager-not-working-tp24406204p24454477.html
> >> Sent from the FlexCoders mailing list archive at Nabble.com.
> >>
> > 
> > 
> > 
> > 
> 
> -- 
> View this message in context: 
> http://www.nabble.com/BrowserManager-not-working-tp24406204p24471757.html
> Sent from the FlexCoders mailing list archive at Nabble.com.
>




RE: [flexcoders] Re: BrowserManager not working

2009-07-13 Thread Alex Harui
Also, some BrowserManager features don't work well from file://.  You have to 
run the app from http://

Alex Harui
Flex SDK Developer
Adobe Systems Inc.<http://www.adobe.com/>
Blog: http://blogs.adobe.com/aharui

From: [email protected] [mailto:[email protected]] On Behalf 
Of valdhor
Sent: Monday, July 13, 2009 9:07 AM
To: [email protected]
Subject: [flexcoders] Re: BrowserManager not working





What does the trace(url1) output? Does it have a # in it somewhere? If so, the 
browser won't refresh as it is trying to move to an anchor.

--- In [email protected]<mailto:flexcoders%40yahoogroups.com>, 
edencane  wrote:
>
>
> Hi. Thanks for your response.
> After some more troubleshooting the problem is the following:
>
> the URL is returned correctly by the following code:
>
> import mx.managers.BrowserManager;
> import mx.managers.IBrowserManager;
> import mx.utils.URLUtil;
> import mx.utils.ObjectUtil;
>
> private var bman:IBrowserManager;
> private var url1:String;
>
> bman = BrowserManager.getInstance();
> bman.init();
> url1 = URLUtil.getServerNameWithPort(bman.url);
> trace(url1);
>
> but then I do this:
>
> if (true) {
> var u:URLRequest = new URLRequest(url1);
> navigateToURL(u,"_self");
> }
>
> Basically I want to reload the original URL on certain conditions.
>
> This time when the page loads the bman instance is null.
> So the URLRequest object does not contain the information that
> BrowserManager needs.
> Would this be to do with the request headers...?
>
> How can I solve this...?
>
> Thanks
>
> Kr.
> Luke Vanderfluit
> Avid Flex Fan!
>
>
>
>
>
>
>
>
>
>
>
>
>
> Alex Harui wrote:
> >
> > Compare with the examples. You're not calling init() and you may need to
> > add an event listener as well.
> >
> > Alex Harui
> > Flex SDK Developer
> > Adobe Systems Inc.<http://www.adobe.com/>
> > Blog: http://blogs.adobe.com/aharui
> >
> > From: [email protected]<mailto:flexcoders%40yahoogroups.com> 
> > [mailto:[email protected]<mailto:flexcoders%40yahoogroups.com>] On
> > Behalf Of edencane
> > Sent: Thursday, July 09, 2009 1:30 AM
> > To: [email protected]<mailto:flexcoders%40yahoogroups.com>
> > Subject: [flexcoders] BrowserManager not working
> >
> >
> >
> >
> >
> > Hi.
> >
> > I want to get the information of the current URL
> >
> > This is my code. It aint workin'. What 'm I doing wrong?
> >
> > 
> > http://www.adobe.com/2006/mxml";
> > layout="absolute"
> > creationComplete="init()">
> >
> > 
> > 
> > 
> > 
> >
> >
> > 
> > --
> > View this message in context:
> > http://www.nabble.com/BrowserManager-not-working-tp24406204p24406204.html
> > Sent from the FlexCoders mailing list archive at Nabble.com.
> >
> >
> >
>
> --
> View this message in context: 
> http://www.nabble.com/BrowserManager-not-working-tp24406204p24454477.html
> Sent from the FlexCoders mailing list archive at Nabble.com.
>



[flexcoders] Re: BrowserManager not working

2009-07-13 Thread valdhor
What does the trace(url1) output? Does it have a # in it somewhere? If so, the 
browser won't refresh as it is trying to move to an anchor.


--- In [email protected], edencane  wrote:
>
> 
> Hi. Thanks for your response.
> After some more troubleshooting the problem is the following:
> 
> the URL is returned correctly by the following code:
> 
> import mx.managers.BrowserManager;
> import mx.managers.IBrowserManager;
> import mx.utils.URLUtil;
> import mx.utils.ObjectUtil;
> 
> private var bman:IBrowserManager;
> private var url1:String;
> 
> bman = BrowserManager.getInstance();
> bman.init();
> url1 = URLUtil.getServerNameWithPort(bman.url);
> trace(url1);
> 
> but then I do this:
> 
> if (true) {
> var u:URLRequest = new URLRequest(url1);
> navigateToURL(u,"_self");
> }
> 
> Basically I want to reload the original URL on certain conditions.
> 
> This time when the page loads the bman instance is null.
> So the URLRequest object does not contain the information that
> BrowserManager needs.
> Would this be to do with the request headers...?
> 
> How can I solve this...?
> 
> Thanks 
> 
> Kr.
> Luke Vanderfluit
> Avid Flex Fan!
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Alex Harui wrote:
> > 
> > Compare with the examples.  You're not calling init() and you may need to
> > add an event listener as well.
> > 
> > Alex Harui
> > Flex SDK Developer
> > Adobe Systems Inc.
> > Blog: http://blogs.adobe.com/aharui
> > 
> > From: [email protected] [mailto:[email protected]] On
> > Behalf Of edencane
> > Sent: Thursday, July 09, 2009 1:30 AM
> > To: [email protected]
> > Subject: [flexcoders] BrowserManager not working
> > 
> > 
> > 
> > 
> > 
> > Hi.
> > 
> > I want to get the information of the current URL
> > 
> > This is my code. It aint workin'. What 'm I doing wrong?
> > 
> > 
> > http://www.adobe.com/2006/mxml";
> > layout="absolute"
> > creationComplete="init()">
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > --
> > View this message in context:
> > http://www.nabble.com/BrowserManager-not-working-tp24406204p24406204.html
> > Sent from the FlexCoders mailing list archive at Nabble.com.
> > 
> > 
> > 
> 
> -- 
> View this message in context: 
> http://www.nabble.com/BrowserManager-not-working-tp24406204p24454477.html
> Sent from the FlexCoders mailing list archive at Nabble.com.
>