[flexcoders] Re: PopUpManager and FocusManager
used callLater instead of waiting on the event to dispatch. That worked callLater(setNewFocus) function setNewFocus():void { focusManager.setFocus(this.augmentPackageForm.insuranceValue); } --- In flexcoders@yahoogroups.com, Joshua w...@... wrote: This is driving me nuts. I have a form that has several textInputs in it. When you tab out of a textInput and you have entered something that is not currently in the database I create a Popupwindow with another form in it so the user can add more details (Quick Add for Quickbooks style) about the new text entry. I'm trying to get the form that is in the popupmanager to get the focus and it kinda works... meaning it looks like it has focus (blue box), but when I start typing I start filling out the next field in the original form (behind the popup). I have the form component that 'pops up', implementing IFocusManagerContainer and have tried just about everything to get this to work. this.augmentPackageWindow = new TitleWindow; this.augmentPackageForm = new IndivdualizePackageForm; this.augmentPackageWindow.addChild(this.augmentPackageForm); this.augmentPackageWindow.addEventListener( Event.ADDED_TO_STAGE, setAugmentFocus); PopUpManager.addPopUp( this.augmentPackageWindow, this, true ); PopUpManager.centerPopUp( this.augmentPackageWindow ); in the function setAugmentFocus i have stuff like var oldFm:FocusManager = new FocusManager(this); oldFm.deactivate; var fm:FocusManager = new FocusManager(this.augmentPackageForm); fm.activate(); fm.setFocus(this.augmentPackageForm.insuranceValue); and like I said, when I run this the focus actually goes to the insurance Value field in the augmentPackageForm which is a child in the augmentPackageWindow, but as soon as I start typing I begin to fill out the next field in the underlying form. Help Please!
[flexcoders] Re: PopUpManager Module Components
One of my modules that I converted to ModuleTitleWindow is complaining about mx:states it says it could not resolve mc:states to a component implementation. It was working before so what happened and how do I put it right? - Stephen Brown
Re: [flexcoders] Re: PopUpManager Module Components
Did you really type mc:states? On 2/3/10 5:04 AM, criptopus sd_br...@ntlworld.com wrote: One of my modules that I converted to ModuleTitleWindow is complaining about mx:states it says it could not resolve mc:states to a component implementation. It was working before so what happened and how do I put it right? - Stephen Brown -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
[flexcoders] Re: PopUpManager Module Components
Could possibly be, but any evidence to the fact has been swept under the carpet as I change it to states for a while and it worked. I have set it back to mx:states again and all is okay. *whistles gently*. However ModuleTitleWindow is currently ModuleTitleWindow and desn't want to be called mx:ModuleTitleWindow or anything else for that matter. Not up on namespaces so I have left it as is for now. may want to name it something in the future though, looks better. - Stephen
[flexcoders] Re: PopUpManager Module Components
RSL's? Sorry lost me, I have only been programming in Flex for 3 months and object orientated programming for 2 years. Could you or anyone else make what was said a little bit more understandable for a novice? --- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote: Sounds like a config/build issue. If you are using RSLs make sure the main app is using RSLs and the module isn't. Otherwise, check the link-reports of both SWFs to see who is responsible for TitleWindow On 2/1/10 5:17 PM, criptopus sd_br...@... wrote: When I tried the code I got the following error... I'm getting VerifyError: Error #1014: Class mx.containers::TitleWindow could not be found. - Stephen --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote: On my blog On 2/1/10 9:11 AM, criptopus sd_brown@ wrote: Can anybody give me a simple example of how I would set up a PopUp to load as a module? -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
[flexcoders] Re: PopUpManager Module Components
Got the program working, but just don't have the knowledge to implement it in my program. It just complains endlessly when I try to change my program. I have one file index.mxml and a directory comps with popup componets in and their are sub directories with more popup components from those popup components. My problems is where to put the ILoginDialog.as ModuleTitleWindow.as or equivelent for my comps enclosed LoginDialog.mxml's or equivelent and how to keep them all talking and happy, oh and neat. Going for a strong cup of coffee and to shake my head a bit. - Stephen
Re: [flexcoders] Re: PopUpManager Module Components
You could put them in a SWC that all projects share. On 2/2/10 11:41 AM, criptopus sd_br...@ntlworld.com wrote: Got the program working, but just don't have the knowledge to implement it in my program. It just complains endlessly when I try to change my program. I have one file index.mxml and a directory comps with popup componets in and their are sub directories with more popup components from those popup components. My problems is where to put the ILoginDialog.as ModuleTitleWindow.as or equivelent for my comps enclosed LoginDialog.mxml's or equivelent and how to keep them all talking and happy, oh and neat. Going for a strong cup of coffee and to shake my head a bit. - Stephen -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
[flexcoders] Re: PopUpManager Module Components
Only one project, multiple components. - Stephen --- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote: You could put them in a SWC that all projects share. On 2/2/10 11:41 AM, criptopus sd_br...@... wrote: Got the program working, but just don't have the knowledge to implement it in my program. It just complains endlessly when I try to change my program. I have one file index.mxml and a directory comps with popup componets in and their are sub directories with more popup components from those popup components. My problems is where to put the ILoginDialog.as ModuleTitleWindow.as or equivelent for my comps enclosed LoginDialog.mxml's or equivelent and how to keep them all talking and happy, oh and neat. Going for a strong cup of coffee and to shake my head a bit. - Stephen -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
Re: [flexcoders] Re: PopUpManager Module Components
You are using modules, correct? Then you have multiple SWFs. If you’ve put them all in one project that’s fine, then all you need to do is put those files somewhere where they can all see them in their source-paths. On 2/2/10 12:27 PM, criptopus sd_br...@ntlworld.com wrote: Only one project, multiple components. - Stephen --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aha...@... wrote: You could put them in a SWC that all projects share. On 2/2/10 11:41 AM, criptopus sd_br...@... wrote: Got the program working, but just don't have the knowledge to implement it in my program. It just complains endlessly when I try to change my program. I have one file index.mxml and a directory comps with popup componets in and their are sub directories with more popup components from those popup components. My problems is where to put the ILoginDialog.as ModuleTitleWindow.as or equivelent for my comps enclosed LoginDialog.mxml's or equivelent and how to keep them all talking and happy, oh and neat. Going for a strong cup of coffee and to shake my head a bit. - Stephen -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
[flexcoders] Re: PopUpManager Module Components
The following works but is rather useless = private var test:IUIComponent; private var module:IModuleInfo; private function openTest():void { module=ModuleManager.getModule(comps/admnCntr/test.swf); module.addEventListener(ModuleEvent.READY, dispTest); module.load(); } private function dispTest(e:Event):void { test=module.factory.create() as IUIComponent; PopUpManager.addPopUp(test, Application.application as DisplayObject, true); PopUpManager.centerPopUp(test); } This seems to load but test fails to open a popup as it is null? private var test:Itest; private var module:IModuleInfo; private function openTest():void { module=ModuleManager.getModule(comps/admnCntr/test.swf); module.addEventListener(ModuleEvent.READY, dispTest); module.load(); } private function dispTest(e:Event):void { test=module.factory.create() as Itest; PopUpManager.addPopUp(test, Application.application as DisplayObject, true); PopUpManager.centerPopUp(test); } My directory structure == . | admnCntr.mxml | grpsCntr.mxml | instCntr.mxml | librCntr.mxml | userCntr.mxml | +---admnCntr | admnArti.mxml | admnAsha.mxml | admnCata.mxml | admnGlry.mxml | admnGrps.mxml | admnMedi.mxml | admnMemb.mxml | admnShar.mxml | admnStry.mxml | admnUser.mxml | test.mxml | +---grpsCntr | grpsRequest.mxml | +---instCntr | | cataList.mxml | | instArti.mxml | | instAsst.mxml | | instFold.mxml | | instGrps.mxml | | instMshpGrp.mxml | | instMshpMbr.mxml | | instUsrs.mxml | | | +---cataList | | cataEdit.mxml | | | +---instArti | | artiEdit.mxml | | | +---instAsst | | asstEdit.mxml | | | +---instFold | | foldEdit.mxml | | | +---instGrps | | grpsEdit.mxml | | | \---instUsrs | usrsEdit.mxml | +---librCntr | | librArti.mxml | | librFold.mxml | | | +---librArti | | | acesEdit.mxml | | | artiEdit.mxml | | | contView.mxml | | | | | +---contView | | | contEdit.mxml | | | contPrev.mxml | | | mapPlay.mxml | | | vidiPlay.mxml | | | | | \---itemRend | | med1Type.mxml | | med2Type.mxml | | | \---librFold | | acesEdit.mxml | | foldEdit.mxml | | mediEdit.mxml | | | \---itemRend | tickBox.mxml | tickRqBox.mxml | \---userCntr userAmend.mxml userRequest.mxml userSignIn.mxml userSignOut.mxml Most of which are popups so unsure of anywhere I could put this so that they would all see it? - Stephen
Re: [flexcoders] Re: PopUpManager Module Components
If “test” is null, then the thing loaded did not implement Itest. Each module’s mxml file must have: mx:Module ... Implements=”Itest” ... You can store Itest.as anywhere and point to it with the project properties source-path. On 2/2/10 3:03 PM, criptopus sd_br...@ntlworld.com wrote: The following works but is rather useless = private var test:IUIComponent; private var module:IModuleInfo; private function openTest():void { module=ModuleManager.getModule(comps/admnCntr/test.swf); module.addEventListener(ModuleEvent.READY, dispTest); module.load(); } private function dispTest(e:Event):void { test=module.factory.create() as IUIComponent; PopUpManager.addPopUp(test, Application.application as DisplayObject, true); PopUpManager.centerPopUp(test); } This seems to load but test fails to open a popup as it is null? private var test:Itest; private var module:IModuleInfo; private function openTest():void { module=ModuleManager.getModule(comps/admnCntr/test.swf); module.addEventListener(ModuleEvent.READY, dispTest); module.load(); } private function dispTest(e:Event):void { test=module.factory.create() as Itest; PopUpManager.addPopUp(test, Application.application as DisplayObject, true); PopUpManager.centerPopUp(test); } My directory structure == . | admnCntr.mxml | grpsCntr.mxml | instCntr.mxml | librCntr.mxml | userCntr.mxml | +---admnCntr | admnArti.mxml | admnAsha.mxml | admnCata.mxml | admnGlry.mxml | admnGrps.mxml | admnMedi.mxml | admnMemb.mxml | admnShar.mxml | admnStry.mxml | admnUser.mxml | test.mxml | +---grpsCntr | grpsRequest.mxml | +---instCntr | | cataList.mxml | | instArti.mxml | | instAsst.mxml | | instFold.mxml | | instGrps.mxml | | instMshpGrp.mxml | | instMshpMbr.mxml | | instUsrs.mxml | | | +---cataList | | cataEdit.mxml | | | +---instArti | | artiEdit.mxml | | | +---instAsst | | asstEdit.mxml | | | +---instFold | | foldEdit.mxml | | | +---instGrps | | grpsEdit.mxml | | | \---instUsrs | usrsEdit.mxml | +---librCntr | | librArti.mxml | | librFold.mxml | | | +---librArti | | | acesEdit.mxml | | | artiEdit.mxml | | | contView.mxml | | | | | +---contView | | | contEdit.mxml | | | contPrev.mxml | | | mapPlay.mxml | | | vidiPlay.mxml | | | | | \---itemRend | | med1Type.mxml | | med2Type.mxml | | | \---librFold | | acesEdit.mxml | | foldEdit.mxml | | mediEdit.mxml | | | \---itemRend | tickBox.mxml | tickRqBox.mxml | \---userCntr userAmend.mxml userRequest.mxml userSignIn.mxml userSignOut.mxml Most of which are popups so unsure of anywhere I could put this so that they would all see it? - Stephen -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
[flexcoders] Re: PopUpManager Module Components
Yup! that was it, marvellous. Can't believe I missed that off. You have been very patient, thanks a lot for your help. Yes, I would be interested in squireling away Itest rather than leaving it in the root project folder as I will need to build a number of them one for each popup nearly. How do I use project properties source-path to tidy up the file structure? - Stephen --- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote: If test is null, then the thing loaded did not implement Itest. Each module's mxml file must have: mx:Module ... Implements=Itest ... You can store Itest.as anywhere and point to it with the project properties source-path. On 2/2/10 3:03 PM, criptopus sd_br...@... wrote: The following works but is rather useless = private var test:IUIComponent; private var module:IModuleInfo; private function openTest():void { module=ModuleManager.getModule(comps/admnCntr/test.swf); module.addEventListener(ModuleEvent.READY, dispTest); module.load(); } private function dispTest(e:Event):void { test=module.factory.create() as IUIComponent; PopUpManager.addPopUp(test, Application.application as DisplayObject, true); PopUpManager.centerPopUp(test); } This seems to load but test fails to open a popup as it is null? private var test:Itest; private var module:IModuleInfo; private function openTest():void { module=ModuleManager.getModule(comps/admnCntr/test.swf); module.addEventListener(ModuleEvent.READY, dispTest); module.load(); } private function dispTest(e:Event):void { test=module.factory.create() as Itest; PopUpManager.addPopUp(test, Application.application as DisplayObject, true); PopUpManager.centerPopUp(test); } My directory structure == . | admnCntr.mxml | grpsCntr.mxml | instCntr.mxml | librCntr.mxml | userCntr.mxml | +---admnCntr | admnArti.mxml | admnAsha.mxml | admnCata.mxml | admnGlry.mxml | admnGrps.mxml | admnMedi.mxml | admnMemb.mxml | admnShar.mxml | admnStry.mxml | admnUser.mxml | test.mxml | +---grpsCntr | grpsRequest.mxml | +---instCntr | | cataList.mxml | | instArti.mxml | | instAsst.mxml | | instFold.mxml | | instGrps.mxml | | instMshpGrp.mxml | | instMshpMbr.mxml | | instUsrs.mxml | | | +---cataList | | cataEdit.mxml | | | +---instArti | | artiEdit.mxml | | | +---instAsst | | asstEdit.mxml | | | +---instFold | | foldEdit.mxml | | | +---instGrps | | grpsEdit.mxml | | | \---instUsrs | usrsEdit.mxml | +---librCntr | | librArti.mxml | | librFold.mxml | | | +---librArti | | | acesEdit.mxml | | | artiEdit.mxml | | | contView.mxml | | | | | +---contView | | | contEdit.mxml | | | contPrev.mxml | | | mapPlay.mxml | | | vidiPlay.mxml | | | | | \---itemRend | | med1Type.mxml | | med2Type.mxml | | | \---librFold | | acesEdit.mxml | | foldEdit.mxml | | mediEdit.mxml | | | \---itemRend | tickBox.mxml | tickRqBox.mxml | \---userCntr userAmend.mxml userRequest.mxml userSignIn.mxml userSignOut.mxml Most of which are popups so unsure of anywhere I could put this so that they would all see it? - Stephen -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
[flexcoders] Re: PopUpManager Module Components
Yup! that sorted it out, and adding classes folder worked as well. Thanks for your time and effort, you have been really patient, I will mention you in my acknowledgements when I write my dissertation. - Stephen --- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote: If test is null, then the thing loaded did not implement Itest. Each module's mxml file must have: mx:Module ... Implements=Itest ... You can store Itest.as anywhere and point to it with the project properties source-path. On 2/2/10 3:03 PM, criptopus sd_br...@... wrote: The following works but is rather useless = private var test:IUIComponent; private var module:IModuleInfo; private function openTest():void { module=ModuleManager.getModule(comps/admnCntr/test.swf); module.addEventListener(ModuleEvent.READY, dispTest); module.load(); } private function dispTest(e:Event):void { test=module.factory.create() as IUIComponent; PopUpManager.addPopUp(test, Application.application as DisplayObject, true); PopUpManager.centerPopUp(test); } This seems to load but test fails to open a popup as it is null? private var test:Itest; private var module:IModuleInfo; private function openTest():void { module=ModuleManager.getModule(comps/admnCntr/test.swf); module.addEventListener(ModuleEvent.READY, dispTest); module.load(); } private function dispTest(e:Event):void { test=module.factory.create() as Itest; PopUpManager.addPopUp(test, Application.application as DisplayObject, true); PopUpManager.centerPopUp(test); } My directory structure == . | admnCntr.mxml | grpsCntr.mxml | instCntr.mxml | librCntr.mxml | userCntr.mxml | +---admnCntr | admnArti.mxml | admnAsha.mxml | admnCata.mxml | admnGlry.mxml | admnGrps.mxml | admnMedi.mxml | admnMemb.mxml | admnShar.mxml | admnStry.mxml | admnUser.mxml | test.mxml | +---grpsCntr | grpsRequest.mxml | +---instCntr | | cataList.mxml | | instArti.mxml | | instAsst.mxml | | instFold.mxml | | instGrps.mxml | | instMshpGrp.mxml | | instMshpMbr.mxml | | instUsrs.mxml | | | +---cataList | | cataEdit.mxml | | | +---instArti | | artiEdit.mxml | | | +---instAsst | | asstEdit.mxml | | | +---instFold | | foldEdit.mxml | | | +---instGrps | | grpsEdit.mxml | | | \---instUsrs | usrsEdit.mxml | +---librCntr | | librArti.mxml | | librFold.mxml | | | +---librArti | | | acesEdit.mxml | | | artiEdit.mxml | | | contView.mxml | | | | | +---contView | | | contEdit.mxml | | | contPrev.mxml | | | mapPlay.mxml | | | vidiPlay.mxml | | | | | \---itemRend | | med1Type.mxml | | med2Type.mxml | | | \---librFold | | acesEdit.mxml | | foldEdit.mxml | | mediEdit.mxml | | | \---itemRend | tickBox.mxml | tickRqBox.mxml | \---userCntr userAmend.mxml userRequest.mxml userSignIn.mxml userSignOut.mxml Most of which are popups so unsure of anywhere I could put this so that they would all see it? - Stephen -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
[flexcoders] Re: PopUpManager Module Components
When I tried the code I got the following error... I'm getting VerifyError: Error #1014: Class mx.containers::TitleWindow could not be found. - Stephen --- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote: On my blog On 2/1/10 9:11 AM, criptopus sd_br...@... wrote: Can anybody give me a simple example of how I would set up a PopUp to load as a module? -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
Re: [flexcoders] Re: PopUpManager Module Components
Sounds like a config/build issue. If you are using RSLs make sure the main app is using RSLs and the module isn’t. Otherwise, check the link-reports of both SWFs to see who is responsible for TitleWindow On 2/1/10 5:17 PM, criptopus sd_br...@ntlworld.com wrote: When I tried the code I got the following error... I'm getting VerifyError: Error #1014: Class mx.containers::TitleWindow could not be found. - Stephen --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aha...@... wrote: On my blog On 2/1/10 9:11 AM, criptopus sd_br...@... wrote: Can anybody give me a simple example of how I would set up a PopUp to load as a module? -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
[flexcoders] Re: PopUpManager
are you allowed to say that on a yahoo forum? ps. I was looking at google when I found this, so yes, google is my friend! --- In flexcoders@yahoogroups.com, David Gironella [EMAIL PROTECTED] wrote: Here can find information: http://blog.flexexamples.com/2007/08/14/changing-a-modal-alert-controls-blur -transparency-and-transparency-color/ Google is your friend!!! Giro. -Mensaje original- De: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] En nombre de tchredeemed Enviado el: lunes, 21 de julio de 2008 16:42 Para: flexcoders@yahoogroups.com Asunto: [flexcoders] PopUpManager Does anyone know how to change the color/alpha of the background when using a popupmanager to add a popup to the screen? Not being able to do this has caused me to create my own popups, which might not be the best way to do it :) HALP! -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
[flexcoders] Re: PopUpManager
actually, i dont see how to use that with the popupmanager, that works with alerts, and the solution below steps into mx_internal, which I would rather avoid... --- In flexcoders@yahoogroups.com, tchredeemed [EMAIL PROTECTED] wrote: are you allowed to say that on a yahoo forum? ps. I was looking at google when I found this, so yes, google is my friend! --- In flexcoders@yahoogroups.com, David Gironella giro@ wrote: Here can find information: http://blog.flexexamples.com/2007/08/14/changing-a-modal-alert-controls-blur -transparency-and-transparency-color/ Google is your friend!!! Giro. -Mensaje original- De: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] En nombre de tchredeemed Enviado el: lunes, 21 de julio de 2008 16:42 Para: flexcoders@yahoogroups.com Asunto: [flexcoders] PopUpManager Does anyone know how to change the color/alpha of the background when using a popupmanager to add a popup to the screen? Not being able to do this has caused me to create my own popups, which might not be the best way to do it :) HALP! -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
[flexcoders] Re: PopUpManager
also, i can use global {}, but id rather use a popupmanager specific style... might not be possible? --- In flexcoders@yahoogroups.com, tchredeemed [EMAIL PROTECTED] wrote: are you allowed to say that on a yahoo forum? ps. I was looking at google when I found this, so yes, google is my friend! --- In flexcoders@yahoogroups.com, David Gironella giro@ wrote: Here can find information: http://blog.flexexamples.com/2007/08/14/changing-a-modal-alert-controls-blur -transparency-and-transparency-color/ Google is your friend!!! Giro. -Mensaje original- De: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] En nombre de tchredeemed Enviado el: lunes, 21 de julio de 2008 16:42 Para: flexcoders@yahoogroups.com Asunto: [flexcoders] PopUpManager Does anyone know how to change the color/alpha of the background when using a popupmanager to add a popup to the screen? Not being able to do this has caused me to create my own popups, which might not be the best way to do it :) HALP! -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
RE: [flexcoders] Re: PopUpManager
Background of the popup? You specify that by making a selector of the name of the MXML file that defines the popup. Backgorund of the app behind the popup? You have to specify the modalTransparency and related styles From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of tchredeemed Sent: Monday, July 21, 2008 7:58 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: PopUpManager also, i can use global {}, but id rather use a popupmanager specific style... might not be possible? --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , tchredeemed [EMAIL PROTECTED] wrote: are you allowed to say that on a yahoo forum? ps. I was looking at google when I found this, so yes, google is my friend! --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , David Gironella giro@ wrote: Here can find information: http://blog.flexexamples.com/2007/08/14/changing-a-modal-alert-controls- blur http://blog.flexexamples.com/2007/08/14/changing-a-modal-alert-controls -blur -transparency-and-transparency-color/ Google is your friend!!! Giro. -Mensaje original- De: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] En nombre de tchredeemed Enviado el: lunes, 21 de julio de 2008 16:42 Para: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Asunto: [flexcoders] PopUpManager Does anyone know how to change the color/alpha of the background when using a popupmanager to add a popup to the screen? Not being able to do this has caused me to create my own popups, which might not be the best way to do it :) HALP! -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo ! Groups Links
[flexcoders] Re: PopupManager causes RangeError: Error #2006: adding a popup window
Alex -- I just saw that you had responded to my older post -- I haven't been monitoring it since I found my own work-around. Yes, you have correctly identified the situation that the itemEditEnd is called twice (for two different cells). You asked the question what's the user task goal and what are you really trying to popup?. In this case the user has entered some text into a datagrid cell that is ambiguous. The pop-up provides a list of the possible matches for the user-entered text along with some additional information about each choice and a couple of buttons to choose one or cancel out. (This is a Flight Planning type of application for pilots. If they enter SAN they may have wanted the San Diego airport. *Or* they may have wanted one of the 17 other locations that start with SAN... such as SANGO, SANFI, SANFD, etc.) This particular use-case is used in a number of other commercial Flight Planners, so the use of a pop-up is quite expected in this user community. My current pop-up code seems to be working OK at this point. I have actually implemented your suggestions about setting focus to the button in the popup on creationComplete. Hope this explanation of how this is being used can be helpful in the future as you look at issues such as focus in the AdvancedDataGrid and consider all of the possible use-cases that may be out there. I'm sure it's quite a job! --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: The DataGrid does not like having popups come up during edit sessions. It is trying to manage focus between editors as the popup tries to take away the focus. There's also a 'problem' in your code that itemEditEnd can be called twice, once as you leave the cell, and again as the dg tries to move to a new cell and you lose focus to the popup and have to kill that editor too. I'd add logic as to whether you have a popup up or not, I would also regenerate the popup every time instead of re-using it and set focus in the creationComplete handler to the button in the popup. There may still be cases that won't work. I'd try to avoid this kind of UI if possible, popups are rather jarring. What are you really trying to popup? What's the user task goal? From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of wpbarto Sent: Tuesday, December 11, 2007 2:14 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] PopupManager causes RangeError: Error #2006: adding a popup window I saw something else similar in flexcoders, but the information didn't seem to apply to this case. I can create a popup window from a button's click handler, but THE SAME CODE used when editing a DataGrid cell FAILS! Is it a bug or a mis-use of PopupManager?? Thanks for any help! Top part of Error stack: RangeError: Error #2006: The supplied index is out of bounds. at flash.display::DisplayObjectContainer/addChildAt() at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal: http://www.adobe.com/2006/flex/mx/internal: :rawChildren_addChildAt() at mx.managers::SystemManager/addChild() at mx.managers::PopUpManagerImpl/addPopUp() at mx.managers::PopUpManager$/addPopUp() at TestPopup/::onCellEdit() at TestPopup/__pointGrid_itemEditEnd() at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEv entFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.core::UIComponent/dispatchEvent() at mx.controls::DataGrid/::endEdit() at mx.controls::DataGrid/::deactivateHandler() at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEv entFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.core::UIComponent/dispatchEvent() at mx.controls::DataGrid/::endEdit() This is the smallest example I can create: [File1: TestPopup.mxml] == ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml layout=absolute applicationComplete=onAppComplete() mx:Script ![CDATA[ import mx.managers.PopUpManager; import mx.collections.ArrayCollection; import mx.events.DataGridEvent; import mx.events.DataGridEventReason; private var popWin:MyPopupWindow = null; private var curData:ArrayCollection; // items for datagrid private var items:ArrayCollection; // items for pop up private function onAppComplete():void { curData = new ArrayCollection(); curData.addItem( { ident:ORD, cityname:Chicago, IL } ); curData.addItem( { ident:ATL, cityname:Atlanta, GA } ); curData.addItem( { ident:DEN, cityname:Denver, CO } ); curData.addItem( { ident:, cityname: } ); // one blank pointGrid.rowCount = 5; pointGrid.dataProvider = curData; items = new ArrayCollection(); items.addItem( {ident:JFK, cityname:New York, NY} ); items.addItem( {ident:LAX, cityname:Los Angeles, CA} ); items.addItem( {ident:SEA,
Re: [flexcoders] Re: PopupManager causes RangeError: Error #2006: adding a popup window
The problem in your code friend is because you´re trying to add itens to an datagrid without existing first. you can only add that if you have already created the container for it. so addChild or initiate the popup before you do that. and will works. regards Igor Costa www.igorcosta.org www.igorcosta.com On Dec 12, 2007 1:49 AM, wpbarto [EMAIL PROTECTED] wrote: Additional Info: This problem is apparantly caused by MULTIPLE itemEditEnd events dispatched from the DataGrid, exacerbated by the fact that the PopupManager code is not reentrant or doesn't handle concurrency. Looks like Flash player can interrupt part of a running script (PopupManager's addPopup thread) and begin additional events. So: 1. Why is dataGrid sending 4-5 (!) itemEditEnd events for one edit action? 2. Shouldn't PopupManager be reliable and opaque without developers having to code around it's quirks? (Don't get me wrong--I love Flex; just don't like banging my head over framework issues. I have enough banging for my own issues!) --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, wpbarto [EMAIL PROTECTED] wrote: I saw something else similar in flexcoders, but the information didn't seem to apply to this case. I can create a popup window from a button's click handler, but THE SAME CODE used when editing a DataGrid cell FAILS! Is it a bug or a mis-use of PopupManager?? Thanks for any help! Top part of Error stack: RangeError: Error #2006: The supplied index is out of bounds. at flash.display::DisplayObjectContainer/addChildAt() at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal: :rawChildren_addChildAt() at mx.managers::SystemManager/addChild() at mx.managers::PopUpManagerImpl/addPopUp() at mx.managers::PopUpManager$/addPopUp() at TestPopup/::onCellEdit() at TestPopup/__pointGrid_itemEditEnd() at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEv entFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.core::UIComponent/dispatchEvent() at mx.controls::DataGrid/::endEdit() at mx.controls::DataGrid/::deactivateHandler() at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEv entFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.core::UIComponent/dispatchEvent() at mx.controls::DataGrid/::endEdit() This is the smallest example I can create: [File1: TestPopup.mxml] == ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute applicationComplete=onAppComplete() mx:Script ![CDATA[ import mx.managers.PopUpManager; import mx.collections.ArrayCollection; import mx.events.DataGridEvent; import mx.events.DataGridEventReason; private var popWin:MyPopupWindow = null; private var curData:ArrayCollection; // items for datagrid private var items:ArrayCollection; // items for pop up private function onAppComplete():void { curData = new ArrayCollection(); curData.addItem( { ident:ORD, cityname:Chicago, IL } ); curData.addItem( { ident:ATL, cityname:Atlanta, GA } ); curData.addItem( { ident:DEN, cityname:Denver, CO } ); curData.addItem( { ident:, cityname: } ); // one blank pointGrid.rowCount = 5; pointGrid.dataProvider = curData; items = new ArrayCollection(); items.addItem( {ident:JFK, cityname:New York, NY} ); items.addItem( {ident:LAX, cityname:Los Angeles, CA} ); items.addItem( {ident:SEA, cityname:Seattle, WA} ); } private function onClick():void { if(popWin == null) { popWin = new MyPopupWindow(); popWin.itemChoices = items; } PopUpManager.addPopUp(popWin, this, true); PopUpManager.centerPopUp(popWin); } private function onCellEdit(event:DataGridEvent):void { if(event.reason == DataGridEventReason.CANCELLED) return; if(popWin == null) { popWin = new MyPopupWindow(); popWin.itemChoices = items; } PopUpManager.addPopUp(popWin, this, true); PopUpManager.centerPopUp(popWin); } ]] /mx:Script mx:VBox mx:Label text=Clicking the button creates popup OK: / mx:Button id=theButton label=Click Me click=onClick()/ mx:Label text=However, editing a cell FIRST fails: / mx:DataGrid id=pointGrid itemEditEnd=onCellEdit(event) editable=true mx:columns mx:DataGridColumn id=identCol width=50 dataField=ident headerText=Ident/ mx:DataGridColumn id=citynameCol width=90 dataField=cityname headerText=City/Name paddingLeft=1 paddingRight=1/ /mx:columns /mx:DataGrid /mx:VBox /mx:Application [File2: MyPopupWindow.mxml] == ?xml version=1.0 encoding=utf-8? mx:Panel xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute width=400 height=300 title=The Popup Window mx:DataGrid id=selItemList dataProvider={itemChoices} width=100% height=100% mx:columns
[flexcoders] Re: PopupManager causes RangeError: Error #2006: adding a popup window
Additional Info: This problem is apparantly caused by MULTIPLE itemEditEnd events dispatched from the DataGrid, exacerbated by the fact that the PopupManager code is not reentrant or doesn't handle concurrency. Looks like Flash player can interrupt part of a running script (PopupManager's addPopup thread) and begin additional events. So: 1. Why is dataGrid sending 4-5 (!) itemEditEnd events for one edit action? 2. Shouldn't PopupManager be reliable and opaque without developers having to code around it's quirks? (Don't get me wrong--I love Flex; just don't like banging my head over framework issues. I have enough banging for my own issues!) --- In flexcoders@yahoogroups.com, wpbarto [EMAIL PROTECTED] wrote: I saw something else similar in flexcoders, but the information didn't seem to apply to this case. I can create a popup window from a button's click handler, but THE SAME CODE used when editing a DataGrid cell FAILS! Is it a bug or a mis-use of PopupManager?? Thanks for any help! Top part of Error stack: RangeError: Error #2006: The supplied index is out of bounds. at flash.display::DisplayObjectContainer/addChildAt() at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal: :rawChildren_addChildAt() at mx.managers::SystemManager/addChild() at mx.managers::PopUpManagerImpl/addPopUp() at mx.managers::PopUpManager$/addPopUp() at TestPopup/::onCellEdit() at TestPopup/__pointGrid_itemEditEnd() at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEv entFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.core::UIComponent/dispatchEvent() at mx.controls::DataGrid/::endEdit() at mx.controls::DataGrid/::deactivateHandler() at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEv entFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.core::UIComponent/dispatchEvent() at mx.controls::DataGrid/::endEdit() This is the smallest example I can create: [File1: TestPopup.mxml] == ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute applicationComplete=onAppComplete() mx:Script ![CDATA[ import mx.managers.PopUpManager; import mx.collections.ArrayCollection; import mx.events.DataGridEvent; import mx.events.DataGridEventReason; private var popWin:MyPopupWindow = null; private var curData:ArrayCollection;// items for datagrid private var items:ArrayCollection; // items for pop up private function onAppComplete():void { curData = new ArrayCollection(); curData.addItem( { ident:ORD, cityname:Chicago, IL } ); curData.addItem( { ident:ATL, cityname:Atlanta, GA } ); curData.addItem( { ident:DEN, cityname:Denver, CO } ); curData.addItem( { ident:, cityname: } ); // one blank pointGrid.rowCount = 5; pointGrid.dataProvider = curData; items = new ArrayCollection(); items.addItem( {ident:JFK, cityname:New York, NY} ); items.addItem( {ident:LAX, cityname:Los Angeles, CA} ); items.addItem( {ident:SEA, cityname:Seattle, WA} ); } private function onClick():void { if(popWin == null) { popWin = new MyPopupWindow(); popWin.itemChoices = items; } PopUpManager.addPopUp(popWin, this, true); PopUpManager.centerPopUp(popWin); } private function onCellEdit(event:DataGridEvent):void { if(event.reason == DataGridEventReason.CANCELLED) return; if(popWin == null) { popWin = new MyPopupWindow(); popWin.itemChoices = items; } PopUpManager.addPopUp(popWin, this, true); PopUpManager.centerPopUp(popWin); } ]] /mx:Script mx:VBox mx:Label text=Clicking the button creates popup OK: / mx:Button id=theButton label=Click Me click=onClick()/ mx:Label text=However, editing a cell FIRST fails: / mx:DataGrid id=pointGrid itemEditEnd=onCellEdit(event) editable=true mx:columns mx:DataGridColumn id=identCol width=50 dataField=ident headerText=Ident/ mx:DataGridColumn id=citynameCol width=90 dataField=cityname headerText=City/Name paddingLeft=1 paddingRight=1/ /mx:columns /mx:DataGrid /mx:VBox /mx:Application [File2: MyPopupWindow.mxml] == ?xml version=1.0 encoding=utf-8? mx:Panel xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute width=400 height=300 title=The Popup Window mx:DataGrid id=selItemList dataProvider={itemChoices} width=100% height=100% mx:columns mx:DataGridColumn id=identCol dataField=ident headerText=Ident/
[flexcoders] Re: PopUpManager Memory Leak 10 children???
The question I have is why doesn't the garbage collector reclaim _any_ of the memory? It is probably more of a bug with the flash runtime as opposed to flex. I am not going to file a bug report as this is something that will most likely never happen in a real world situation. Thanks, geoff
Re: [flexcoders] Re: PopUpManager quick help
its cool, i actually got it figured out for what i need. What i was looking for actually was to center the popup to the stage. so I just created this class that I extend from instead.. It makes sense now that if you want to center inside of the parent object, you use PopUpManager.centerPopUp. or you can jsut specify the x and y, in this classes case, the stage width and height.package{ import mx.core.Application; import mx.containers.TitleWindow; import mx.events.FlexEvent; import mx.events.ResizeEvent; /** * a class that handles centering itself in the entire application window, * does a center when the swf is resized, or when you call codeselfCenter/code * from one of it's subclassed implementations */ public class SelfCenteringTitleWindowPopUp extends TitleWindow {/** * constructor */ public function SelfCenteringTitleWindowPopUp() { super(); addEventListener( FlexEvent.CREATION_COMPLETE, handleCreationComplete ); }/** * when the creation of the TitleWindow is complete, add listener for resize events * @param fe */ protected function handleCreationComplete( fe:FlexEvent ):void { Application.application.addEventListener( ResizeEvent.RESIZE, selfCenterFromResize ); }/** * the resize event handler method, uses codeselfCenter/code * @param re */ protected function selfCenterFromResize( re:ResizeEvent ):void { selfCenter(); }/** * the method that does the centering of this popup */ protected function selfCenter():void { x = ( Application.application.width - width ) / 2; y = ( Application.application.height - height ) / 2; } }}MXML:::?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml layout=horizontal creationComplete=initApp() mx:Script import Startup;private function initApp():void { var st:Startup = new Startup(); } /mx:Script/mx:ApplicationStartup.as::: package{ import mx.managers.PopUpManager; import mx.containers.Canvas; import AddSubscriptionModal; public class Startup { public function Startup() { var cn:Canvas = new Canvas(); Application.application.addChild( cn ); var asm:AddSubscriptionModal = PopUpManager.createPopUp( cn, AddSubscriptionModal, true ) as AddSubscriptionModal; } }}AddSubscriptionModal.as:::package{ import mx.managers.PopUpManager; import mx.events.CloseEvent; import SelfCenteringTitleWindowPopUp; public class AddSubscriptionModal extends SelfCenteringTitleWindowPopUp { public function AddSubscriptionModal() { doInit(); addEventListener( CloseEvent.CLOSE , handleCloseModal ); }private function doInit():void { title = test; showCloseButton = true; width = 400; height = 200; selfCenter(); }private function handleCloseModal( ce:CloseEvent ):void { PopUpManager.removePopUp( this ); } }} I appreciate your help though..smithOn 9/18/06, Tim Hoff [EMAIL PROTECTED] wrote: Perhaps it's because you are using AS to create the canvas. Possibly a race condition (asynchronous) is occurring as the canvas is resized and the popup is centered. You could always just use mx:Canvas in your main application class instead. It all gets turned into AS anyway. Sorry that I couldn't be of more help -TH --- In flexcoders@yahoogroups.com, aaron smith [EMAIL PROTECTED] wrote: doesnt seem to work correctly. It actually puts the popup in the negative window space. (see attachment) I wonder why it would do that. is it something to do with canvas / percentWidth / percentHeight. i've event tried commenting that out and it still only puts it at 0,0. On 9/18/06, Tim Hoff [EMAIL PROTECTED] wrote: Hi Aaron, This code will center the popup relative to the popups's parent. In your case cn. PopUpManager.centerPopUp(asm); -TH --- In flexcoders@yahoogroups.com flexcoders% 40yahoogroups.com, aaron smith beingthexemplarylists@ wrote: I'm trying to understand the popup manager better, i created a quick test just to get it working and test it out.. most works fine but having problems understanding how to center the popup.. here is my code: MXML::: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml layout=horizontal creationComplete=initApp() mx:Script import Startup; private function initApp():void { var st:Startup = new Startup(); } /mx:Script /mx:Application Startup.as::: package { import mx.managers.PopUpManager; import mx.containers.Canvas; import mx.core.Application; import mx.containers.TitleWindow; import AddSubscriptionModal; public class Startup { public function Startup() { var cn:Canvas = new Canvas(); cn.percentWidth = 100; cn.percentHeight = 100; Application.application.addChild( cn ); var asm:AddSubscriptionModal = PopUpManager.createPopUp ( cn, AddSubscriptionModal, true )
[flexcoders] Re: PopUpManager quick help
Hi Aaron, This code will center the popup relative to the popups's parent. In your case cn. PopUpManager.centerPopUp(asm); -TH --- In flexcoders@yahoogroups.com, aaron smith [EMAIL PROTECTED] wrote: I'm trying to understand the popup manager better, i created a quick test just to get it working and test it out.. most works fine but having problems understanding how to center the popup.. here is my code: MXML::: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=horizontal creationComplete=initApp() mx:Script import Startup; private function initApp():void { var st:Startup = new Startup(); } /mx:Script /mx:Application Startup.as::: package { import mx.managers.PopUpManager; import mx.containers.Canvas; import mx.core.Application; import mx.containers.TitleWindow; import AddSubscriptionModal; public class Startup { public function Startup() { var cn:Canvas = new Canvas(); cn.percentWidth = 100; cn.percentHeight = 100; Application.application.addChild( cn ); var asm:AddSubscriptionModal = PopUpManager.createPopUp ( cn, AddSubscriptionModal, true ) as AddSubscriptionModal; } } } AddSubscriptionModal.as::: package { import mx.containers.TitleWindow; import mx.managers.PopUpManager; import mx.events.CloseEvent; public class AddSubscriptionModal extends TitleWindow { public function AddSubscriptionModal() { doInit(); addEventListener( CloseEvent.CLOSE, handleCloseModal ); } private function doInit():void { title = test; showCloseButton = true; width = 400; height = 200; //PopUpManager.centerPopUp( this ); //this causes an run-time error, not sure why?? } private function handleCloseModal( ce:CloseEvent ):void { PopUpManager.removePopUp( this ); } } } I am wondering if giving the createPopUp method the canvas as parent is the problem? can someone glance at this quick and see if you can help? or does someone have an example already? thanks all! smith -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] Re: PopUpManager quick help
doesnt seem to work correctly. It actually puts the popup in the negative window space. (see attachment)I wonder why it would do that. is it something to do with canvas / percentWidth / percentHeight. i've event tried commenting that out and it still only puts it at 0,0. On 9/18/06, Tim Hoff [EMAIL PROTECTED] wrote: Hi Aaron, This code will center the popup relative to the popups's parent. In your case cn. PopUpManager.centerPopUp(asm); -TH --- In flexcoders@yahoogroups.com, aaron smith [EMAIL PROTECTED] wrote: I'm trying to understand the popup manager better, i created a quick test just to get it working and test it out.. most works fine but having problems understanding how to center the popup.. here is my code: MXML::: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml layout=horizontal creationComplete=initApp() mx:Script import Startup; private function initApp():void { var st:Startup = new Startup(); } /mx:Script /mx:Application Startup.as::: package { import mx.managers.PopUpManager; import mx.containers.Canvas; import mx.core.Application; import mx.containers.TitleWindow; import AddSubscriptionModal; public class Startup { public function Startup() { var cn:Canvas = new Canvas(); cn.percentWidth = 100; cn.percentHeight = 100; Application.application.addChild( cn ); var asm:AddSubscriptionModal = PopUpManager.createPopUp ( cn, AddSubscriptionModal, true ) as AddSubscriptionModal; } } } AddSubscriptionModal.as::: package { import mx.containers.TitleWindow; import mx.managers.PopUpManager; import mx.events.CloseEvent; public class AddSubscriptionModal extends TitleWindow { public function AddSubscriptionModal() { doInit(); addEventListener( CloseEvent.CLOSE, handleCloseModal ); } private function doInit():void { title = test; showCloseButton = true; width = 400; height = 200; //PopUpManager.centerPopUp( this ); //this causes an run-time error, not sure why?? } private function handleCloseModal( ce:CloseEvent ):void { PopUpManager.removePopUp( this ); } } } I am wondering if giving the createPopUp method the canvas as parent is the problem? can someone glance at this quick and see if you can help? or does someone have an example already? thanks all! smith __._,_.___ -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Software development tool Software development Software development services Home design software Software development company Your email settings: Individual Email|Traditional Change settings via the Web (Yahoo! ID required) Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe __,_._,___ attachment: popup_centering.jpg
[flexcoders] Re: PopupManager breaks ComboBox
Never Mind, the solution is to put PopUpManagerChildList.POPUP as the 4th argument of the createPopup() method -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com SPONSORED LINKS Web site design development Computer software development Software design and development Macromedia flex Software development best practice YAHOO! GROUPS LINKS Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[flexcoders] Re: popupmanager . . . position the window?
In my experience, this technique is unreliable. --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: You can do popup.centerPopUp(centerRef: MovieClip). If you do not pass the centerRef, it centers on the window that contains the createPopUp() -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Re: popupmanager . . . position the window?
Here are two utility functions that I use to handle popups. One will center the popup, the other will align it to the top, right edge. It was a lot of trial and error to get something which worked all the time in Flex. Not sure why such an simple, common task was so painful. Note that Flex has a centerPopup function call in the API, but it is unreliable. class Util { public static var singleton : Util = new Util(); public static function showPopUpCentered(windowClass:Object, modal:Boolean, initVars:Object):Object { var popup = mx.managers.PopUpManager.createPopUp( _root, windowClass, modal, initVars); popup.centerPopUp( MovieClip(mx.core.Application.application) ); return popup; } public static function showPopUpRightMost(windowClass:Object, modal:Boolean, initVars:Object):Object { var popup = mx.managers.PopUpManager.createPopUp( _root, windowClass, modal, initVars); popup.addEventListener(creationComplete, singleton, moveRightMost); return(popup); } public function creationComplete(event) { event.target.move((mx.core.Application.application.tabStack == undefined ? mx.core.Application.application.width : (mx.core.Application.application.tabStack.width + mx.core.Application.application.tabStack.x)) - event.target.width, mx.core.Application.application.tabStack == undefined ? 0 : mx.core.Application.application.tabStack.y); } } Notes on showPopUpRightMost: 1) You have to wait until the popup is fully created before you can use it's size. I used a creationComplete event listener on a singleton of the Util class. There are other ways to do this (which probably would be better suited to standlone code snippets like this) 2) The guts of the implementation, creationComplete, looks to see if the application has a top level tabStack component. If it finds a tabStack, it uses that instead of the application window. You can choose another component to align to, or you can strip out this code entirely. Now for the $1000 question, what effect does adding deferred: true to the popups init vars really do? P.S. Someone else on this list provided the magic incantations for showPopUpCentered. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Re: PopUpManager
A solution to my own question: function interval() { this.setStyle( dropShadow, false ); clearInterval( this.intervalNumber ); doLater( this, deletePopUp ); } But this seems like a hack, and the fact that the dropShadow stays around seems like a bug? Anyone seen this before? Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] Re: PopUpManager
Yes, if you, typically, do a deletePopUp when the event was triggered by the popup itself, there's some kind of reference to the popup kept around. I've found that if I do something like this: function initApp() { popup = PopUpManager.createPopUp(this, TitleWindow, true); popup.addEventListener(click, this); } function click() { doLater(this, removePopUp); } function removePopUp() { popup.deletePopUp(); } It's ok but if I were to immediately remove it, the dropshadow still is there. Anyway, the above works all the time. - Original Message - From: kaibabsowats [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Wednesday, April 20, 2005 1:31 PM Subject: [flexcoders] Re: PopUpManager A solution to my own question: function interval() { this.setStyle( dropShadow, false ); clearInterval( this.intervalNumber ); doLater( this, deletePopUp ); } But this seems like a hack, and the fact that the dropShadow stays around seems like a bug? Anyone seen this before? Yahoo! Groups Links Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Re: PopUpManager
Thanks, I'll give it a try. I say a doLater example some where but must have implemented it wrong. --- In flexcoders@yahoogroups.com, JesterXL [EMAIL PROTECTED] wrote: Yes, if you, typically, do a deletePopUp when the event was triggered by the popup itself, there's some kind of reference to the popup kept around. I've found that if I do something like this: function initApp() { popup = PopUpManager.createPopUp(this, TitleWindow, true); popup.addEventListener(click, this); } function click() { doLater(this, removePopUp); } function removePopUp() { popup.deletePopUp(); } It's ok but if I were to immediately remove it, the dropshadow still is there. Anyway, the above works all the time. - Original Message - From: kaibabsowats [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Wednesday, April 20, 2005 1:31 PM Subject: [flexcoders] Re: PopUpManager A solution to my own question: function interval() { this.setStyle( dropShadow, false ); clearInterval( this.intervalNumber ); doLater( this, deletePopUp ); } But this seems like a hack, and the fact that the dropShadow stays around seems like a bug? Anyone seen this before? Yahoo! Groups Links Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Re: PopUpManager
Ok I am sick and am not thinking right. Excuse my other post's misspellings (say=saw). But the doLater is not the issue. Its the timer. I dont want to do it on a click event but a timed event with setInterval. The click makes sense because the PopUp has been rendered but with a timed function (setInterval) it seems to get mixed up somewhere. --- In flexcoders@yahoogroups.com, JesterXL [EMAIL PROTECTED] wrote: Yes, if you, typically, do a deletePopUp when the event was triggered by the popup itself, there's some kind of reference to the popup kept around. I've found that if I do something like this: function initApp() { popup = PopUpManager.createPopUp(this, TitleWindow, true); popup.addEventListener(click, this); } function click() { doLater(this, removePopUp); } function removePopUp() { popup.deletePopUp(); } It's ok but if I were to immediately remove it, the dropshadow still is there. Anyway, the above works all the time. - Original Message - From: kaibabsowats [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Wednesday, April 20, 2005 1:31 PM Subject: [flexcoders] Re: PopUpManager A solution to my own question: function interval() { this.setStyle( dropShadow, false ); clearInterval( this.intervalNumber ); doLater( this, deletePopUp ); } But this seems like a hack, and the fact that the dropShadow stays around seems like a bug? Anyone seen this before? Yahoo! Groups Links Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Re: PopUpManager
The word from Macromedia is that you need the doLater when calling deletePopUp from a timer listener. Some operations in actionscript get executed at different time frames due to how the display manager works. Sequences of code actions is an illusion that is mostly true in Flash. In the case of a popup closing via an interval timer, deletePopUp code is being called at an unexpected time and the display cleanup operations occur at the wrong time. Feels like a bug to me The Horrid Details: The doLater function synchronizes with the frame rate of the Flex application. When you use doLater, the function is called after the current frame code has executed. This is a good time because the UI has had a chance to respond to your ActionScript commands. Basically, your ActionScript code that affects the UI is queued until the end of the current frame, then it is batch-executed on the UI. I think there is even some optimization done so that if you change a Text field with 50 AS statements, only the last is actually seen. The setInterval code can happen on a clock-tick, so you could have it go off between UI code calls, thus mucking up the display. --- In flexcoders@yahoogroups.com, kaibabsowats [EMAIL PROTECTED] wrote: Thanks, I'll give it a try. I say a doLater example some where but must have implemented it wrong. Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/