[flexcoders] inline combobox in text
Hi. I want to have a combobox in the middle of some text. So basically: StringComboBoxString or Lorem ipsum dolor sit amet, consectetuer adipiscing elit combobox with options at dui eu sem porttitor facilisis. How do I do this...? Any ideas would be appreciated. Kind regards. Luke Vanderfluit. -- View this message in context: http://old.nabble.com/inline-combobox-in-text-tp27510337p27510337.html Sent from the FlexCoders mailing list archive at Nabble.com.
[flexcoders] child component listens for event on parent
Hi. Im trying to get a child component to listen for an event that happens on tabchange in the parent. The parent is an application with a TabNavigator object. When the tabchanges I want the the child component to carry out some stuff. In the parent Ive got: mx:Metadata [Event(name=buttonLabelEvent, type= flash.events.Event)] /mx:Metadata then in the tabChange function Ive got: var bLEvent:Event = new Event(buttonLabelEvent); dispatchEvent(bLEvent); Now I want to listen for this event in a child component. There are several instances of the childcomponent (which is basically a form containing a combobox) in the main application. I want every instance of the childcomponent to listen and act when a tabchange occurs in the main component. So far in the component I have: creationComplete=postInit() Then in postInit I have: this.addEventListener(Application.application.buttonLabelEvent, buttonLabelHandler); However, this is not right. how do I do this...? Thanks for help... Kind regards. Luke Vanderfluit. -- View this message in context: http://www.nabble.com/child-component-listens-for-event-on-parent-tp25466734p25466734.html Sent from the FlexCoders mailing list archive at Nabble.com.
Re: [flexcoders] child component listens for event on parent
I was able to get the event happening by changing the component code to be: private function postInit():void { Application.application.addEventListener(buttonLabelEvent, buttonLabelHandler); } but now the event seems to trigger 3 times for every tab change but doesnt trigger on the first tab change... And the app takes forever to compile as well... Something still not right.. Please help.. edencane wrote: Hi. Im trying to get a child component to listen for an event that happens on tabchange in the parent. The parent is an application with a TabNavigator object. When the tabchanges I want the the child component to carry out some stuff. In the parent Ive got: mx:Metadata [Event(name=buttonLabelEvent, type= flash.events.Event)] /mx:Metadata then in the tabChange function Ive got: var bLEvent:Event = new Event(buttonLabelEvent); dispatchEvent(bLEvent); Now I want to listen for this event in a child component. There are several instances of the childcomponent (which is basically a form containing a combobox) in the main application. I want every instance of the childcomponent to listen and act when a tabchange occurs in the main component. So far in the component I have: creationComplete=postInit() Then in postInit I have: this.addEventListener(Application.application.buttonLabelEvent, buttonLabelHandler); However, this is not right. how do I do this...? Thanks for help... Kind regards. Luke Vanderfluit. -- View this message in context: http://www.nabble.com/child-component-listens-for-event-on-parent-tp25466734p25467780.html Sent from the FlexCoders mailing list archive at Nabble.com.
Re: [flexcoders] BrowserManager not working
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 flexcoders@yahoogroups.com, edencane lukevanderfl...@... 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: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of edencane Sent: Thursday, July 09, 2009 1:30 AM To: flexcoders@yahoogroups.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? ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute creationComplete=init() mx:Script ![CDATA[ import mx.managers.BrowserManager; import mx.utils.URLUtil; import mx.controls.Alert; import mx.rpc.events.ResultEvent; import mx.collections.ArrayCollection; import mx.managers.IBrowserManager; import mx.utils.URLUtil; [Bindable] private var bman:IBrowserManager; [Bindable] private var foogie:String = bar; private function init():void { bman = BrowserManager.getInstance(); //bman.init(); trace(BMAN + bman); var baseURL:String = bman.base; var url:String = bman.url; bman.setTitle(foogoie); var fullURL:String = mx.utils.URLUtil.getFullURL(url, url); trace (BASEURL + baseURL + URL + fullURL); } ]] /mx:Script mx:Text id=foo x=94 y=97 text={bman.url}/ /mx:Application -- 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] BrowserManager not working
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: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of edencane Sent: Thursday, July 09, 2009 1:30 AM To: flexcoders@yahoogroups.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? ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute creationComplete=init() mx:Script ![CDATA[ import mx.managers.BrowserManager; import mx.utils.URLUtil; import mx.controls.Alert; import mx.rpc.events.ResultEvent; import mx.collections.ArrayCollection; import mx.managers.IBrowserManager; import mx.utils.URLUtil; [Bindable] private var bman:IBrowserManager; [Bindable] private var foogie:String = bar; private function init():void { bman = BrowserManager.getInstance(); //bman.init(); trace(BMAN + bman); var baseURL:String = bman.base; var url:String = bman.url; bman.setTitle(foogoie); var fullURL:String = mx.utils.URLUtil.getFullURL(url, url); trace (BASEURL + baseURL + URL + fullURL); } ]] /mx:Script mx:Text id=foo x=94 y=97 text={bman.url}/ /mx:Application -- 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] 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? ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute creationComplete=init() mx:Script ![CDATA[ import mx.managers.BrowserManager; import mx.utils.URLUtil; import mx.controls.Alert; import mx.rpc.events.ResultEvent; import mx.collections.ArrayCollection; import mx.managers.IBrowserManager; import mx.utils.URLUtil; [Bindable] private var bman:IBrowserManager; [Bindable] private var foogie:String = bar; private function init():void { bman = BrowserManager.getInstance(); //bman.init(); trace(BMAN + bman); var baseURL:String = bman.base; var url:String = bman.url; bman.setTitle(foogoie); var fullURL:String = mx.utils.URLUtil.getFullURL(url, url); trace (BASEURL + baseURL + URL + fullURL); } ]] /mx:Script mx:Text id=foo x=94 y=97 text={bman.url}/ /mx:Application -- View this message in context: http://www.nabble.com/BrowserManager-not-working-tp24406204p24406204.html Sent from the FlexCoders mailing list archive at Nabble.com.