Let it be known... Peter Watson is my hero! Works like a charm... thanks Peter!
--- In flexcoders@yahoogroups.com, "Peter Watson" <[EMAIL PROTECTED]> wrote: > > This is a known focus issue, I think there's a knowledge base article > somewhere but I can't seem to locate it right now. > > Basically the alert popup doesn't get activated with the System Manager > and can't receive tab focus. > > > > The workaround is to launch the alert in a function, use a doLater() and > then active the popup. > > > > > > Here's an example: > > > > <?xml version="1.0" encoding="utf-8"?> > > <mx:TitleWindow xmlns:mx="http://www.macromedia.com/2003/mxml" > title="Pop" closeButton="true" click="this.deletePopUp();"> > > > > <mx:Script> > > <![CDATA[ > > import mx.managers.SystemManager; > > var myAlert; > > > > function showAlrt(){ > > myAlert = > mx.controls.Alert.show('Try hitting tab or > enter','Alert',mx.controls.Alert.YES|mx.controls.Alert.NO); > > doLater(this, "fixfocus"); > > } > > function fixfocus(){ > > SystemManager.activate(myAlert); > > } > > ]]> > > </mx:Script> > > > > <mx:Button label="Show Alert" click="showAlrt()"/> > > > > </mx:TitleWindow> > > > > > > - pw > > > > ________________________________ > > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On > Behalf Of mrmcfeely8 > Sent: Friday, March 31, 2006 11:16 AM > To: flexcoders@yahoogroups.com > Subject: [flexcoders] Re: Modal popup problem - Flex 1.5 > > > > Here's some sample code that will illustrate the problem: > > /**************** > testApp.mxml > ****************/ > <?xml version="1.0" encoding="utf-8"?> > <mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" > creationComplete="beginTheChaos()" > > > <mx:Script> > <![CDATA[ > function beginTheChaos(){ > mx.managers.PopUpManager.createPopUp(this, > testPopup, true, > undefined); > } > ]]> > </mx:Script> > </mx:Application> > > > /**************** > testPopup.mxml > ****************/ > <?xml version="1.0" encoding="utf-8"?> > <mx:TitleWindow xmlns:mx="http://www.macromedia.com/2003/mxml"> > <mx:Form id="testForm" defaultButton="submitButton"> > <mx:FormItem width="100%" label="Field 1"> > <mx:TextInput id="field1" tabIndex="1" /> > </mx:FormItem> > <mx:FormItem width="100%" label="Field 2"> > <mx:TextInput id="field2" tabIndex="2" /> > </mx:FormItem> > <mx:FormItem width="100%" label="Field 3"> > <mx:TextInput id="field3" tabIndex="3" /> > </mx:FormItem> > </mx:Form> > <mx:ControlBar width="100%" horizontalAlign="center"> > <mx:Button label="Submit" click="mx.controls.Alert.show('Try > hitting > tab or enter','Screwed > up...',mx.controls.Alert.YES|mx.controls.Alert.NO, MovieClip(_root), > undefined, undefined, mx.controls.Alert.YES);" id="submitButton" /> > </mx:ControlBar> > </mx:TitleWindow> > > > Anyone with any thoughts on this? > > > --- In flexcoders@yahoogroups.com, "mrmcfeely8" > <dougkeen+flexcoders@> wrote: > > > > I'm running into a problem that's driving me insane: > > > > If you open a modal popup from a modal popup, it seems like all key > > strokes are captured by the *first* popup, not the top-most popup. > > > > For example, create a modal popup containing a form, and open another > > modal popup with a form from the first popup. If you were to hit TAB > > to cycle through fields on the top-most popup, you'd find that it > > would actually cycle through the fields on the underlying popup! > > > > The specific situation that I'm running into is with a popup that > > contains a form, and if you try submitting that form and there are > > validation errors, a basic Alert is shown notifying the user that > > errors still exist. The problem occurs when the user hits ENTER to > > try and close that Alert. Rather than simulating a click on the > > Alert's default button, it actually simulates a click on the > > underlying Form's default button, which in turn opens up another > Alert!!! > > > > Any ideas? Anyone else run into this problem? > > > > > > > > > -- > 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 > <http://groups.yahoo.com/gads?t=ms&k=Web+site+design+development&w1=Web+ > site+design+development&w2=Computer+software+development&w3=Software+des > ign+and+development&w4=Macromedia+flex&w5=Software+development+best+prac > tice&c=5&s=166&.sig=L-4QTvxB_quFDtMyhrQaHQ> > > Computer software development > <http://groups.yahoo.com/gads?t=ms&k=Computer+software+development&w1=We > b+site+design+development&w2=Computer+software+development&w3=Software+d > esign+and+development&w4=Macromedia+flex&w5=Software+development+best+pr > actice&c=5&s=166&.sig=lvQjSRfQDfWudJSe1lLjHw> > > Software design and development > <http://groups.yahoo.com/gads?t=ms&k=Software+design+and+development&w1= > Web+site+design+development&w2=Computer+software+development&w3=Software > +design+and+development&w4=Macromedia+flex&w5=Software+development+best+ > practice&c=5&s=166&.sig=1pMBCdo3DsJbuU9AEmO1oQ> > > Macromedia flex > <http://groups.yahoo.com/gads?t=ms&k=Macromedia+flex&w1=Web+site+design+ > development&w2=Computer+software+development&w3=Software+design+and+deve > lopment&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=1 > 66&.sig=OO6nPIrz7_EpZI36cYzBjw> > > Software development best practice > <http://groups.yahoo.com/gads?t=ms&k=Software+development+best+practice& > w1=Web+site+design+development&w2=Computer+software+development&w3=Softw > are+design+and+development&w4=Macromedia+flex&w5=Software+development+be > st+practice&c=5&s=166&.sig=f89quyyulIDsnABLD6IXIw> > > > > > > ________________________________ > > YAHOO! GROUPS LINKS > > > > * Visit your group "flexcoders > <http://groups.yahoo.com/group/flexcoders> " on the web. > > * To unsubscribe from this group, send an email to: > [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> > > * Your use of Yahoo! Groups is subject to the Yahoo! Terms of > Service <http://docs.yahoo.com/info/terms/> . > > > > ________________________________ > -- 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/