Search Results

Search found 111 results on 5 pages for 'dispatchevent'.

Page 3/5 | < Previous Page | 1 2 3 4 5  | Next Page >

  • how to wait multiple function processing to finish

    - by user351412
    I have a problem about multiple function processing , listed as below code, the main function is btnEvalClick, I have try to use alter native 1and 2 to wait the function not move to next record before theprocessed function finish, but it does not work //private function btnEvalClick(event:Event):void { // var i:int; // for(i= 0; i < (dataArr1.length); i++) { // dispatchEvent( new FlexEvent('test') ); // callfunc1('cydatGMX'); //call function 1 // callfun2('cydatGMO'); //call function 1 // editSave(); //save record (HTTP) //## Alternative 1 //if (String(event) == 'SAVEOK') { // RecMov('next'); //move record if save = OK //} //## Alternative 2 //while (waitfc == '') // if waitfc not 'OK' continue looping //{ // z = z + 1; //} // RecMov('next'); //Move to next record to process //} //private function callfunc1(tasal:String):void { // var mySO :SharedObject; // var myDP: Array; // var i:int; // var prm:Array; // try // { // mySO = SharedObject.getLocal(tasal,'/'); // prm = mySO.data.txt.split('?'); // for(i=0; i < (prm.length - 1); i++) { // myDP = prm[i].toString().split('^'); // if ( myDP[0].toString() == String(dataArr1[dg].MatrixCDCol)){ // myDPX = myDP; // break; // } // } // } // catch (err:Error) { // Alert.show('Limit object creation fail (' + tasal + '), please retry ); // } //} //private function editSave():void //{ // var parameters:* = // { // 'CertID': CertIDCol.text, 'AssetID': AssetIDCol.text, 'CertDate': cdt, //'Ccatat': CcatatCol.text, 'CertBy': CertByCol.text, 'StatusID': StatusIDCol.text, //'UpdDate': lele, 'UpdUsr': ApplicationState.instance.luNm }; // doRequest('Update', parameters, saveItemHandler); //} //private function doRequest(method_name:String, parameters:Object, callback:Function):void // { // add the method to the parameters list // parameters['method'] = (method_name + 'ASC'); // gateway.request = parameters; // var call:AsyncToken = gateway.send(); // call.request_params = gateway.request; // call.handler = callback; // } //private function saveItemHandler(e:Object):void // { // if (e.isError) // { // Alert.show('Error: ' + e.data.error); // } // else // { // Alert.show('Record Saved..'); // waitfc = 'OK'; // dispatchEvent( new FlexEvent('SAVEOK') ); // } // }

    Read the article

  • ActionScript 2: Event doesn't fire?

    - by Pascal Schuster
    So I have a soundHandler class that's supposed to play sounds and then point back to a function on the timeline when the sound has completed playing. But somehow, only one of the sounds plays when I try it out. EDIT: After that sound plays, nothing happens, even though I have EventHandlers set up that are supposed to do something. Here's the code: import mx.events.EventDispatcher; class soundHandler { private var dispatchEvent:Function; public var addEventListener:Function; public var removeEventListener:Function; var soundToPlay; var soundpath:String; var soundtype:String; var prefix:String; var mcname:String; public function soundHandler(soundpath:String, prefix:String, soundtype:String, mcname:String) { EventDispatcher.initialize(this); _root.createEmptyMovieClip(mcname, 1); this.soundpath = soundpath; this.soundtype = soundtype; this.prefix = prefix; this.mcname = mcname; } function playSound(file, callbackfunc) { _root.soundToPlay = new Sound(_root.mcname); _global.soundCallbackfunc = callbackfunc; _root.soundToPlay.onLoad = function(success:Boolean) { if (success) { _root.soundToPlay.start(); } }; _root.soundToPlay.onSoundComplete = function():Void { trace("Sound Complete: "+this.soundtype+this.prefix+this.file+".mp3"); trace(arguments.caller); dispatchEvent({type:_global.soundCallbackfunc}); trace(this.toString()); trace(this.callbackfunction); }; _root.soundToPlay.loadSound("../sound/"+soundpath+"/"+soundtype+prefix+file+".mp3", true); _root.soundToPlay.stop(); } } Here's the code from the .fla file: var playSounds:soundHandler = new soundHandler("signup", "su", "s", "mcs1"); var file = "000"; playSounds.addEventListener("sixtyseconds", this); playSounds.addEventListener("transition", this); function sixtyseconds() { trace("I am being called! Sixtyseconds"); var phase = 1; var file = random(6); if (file == 0) { file = 1; } if (file<10) { file = "0"+file; } file = phase+file; playSounds.playSound(file, "transition"); } function transition() { trace("this works"); } playSounds.playSound(file, "sixtyseconds"); I'm at a total loss for this one. Have been wasting hours to figure it out already. Any help will be deeply appreciated.

    Read the article

  • Triggering click events from within a FF sandbox

    - by user220591
    I am trying to trigger a click event on an element on a page from within a Firefox sandbox. I have tried using jQuery's .click() as well as doing: var evt = document.createEvent("HTMLEvents"); evt.initEvent("click", true, false ); toClick[0].dispatchEvent(evt); Has anyone been able to trigger a click event on a page in the browser through a sandbox? I can get the DOM element fine, but triggering the event is a different story.

    Read the article

  • flash as2: how can i create custom event with parameters ?

    - by ufk
    Hiya. I would like to be able to create custom event with parameters and to dispatch them when needed. in as3 i can create a class that extends flash.events.Event, add parameters to it's constructor and then use addEventListener and dispatchEvent where required. how can I do so in ActionScript 2 ? thanks!

    Read the article

  • Game Over function is not working Starling

    - by aNgeLyN omar
    I've been following a tutorial over the web but it somehow did not show something about creating a game over function. I am new to the Starling framework and Actionscript so I'm kind of still trying to find a way to make it work. Here's the complete snippet of the code. package screens { import flash.geom.Rectangle; import flash.utils.getTimer; import events.NavigationEvent; import objects.GameBackground; import objects.Hero; import objects.Item; import objects.Obstacle; import starling.display.Button; import starling.display.Image; import starling.display.Sprite; import starling.events.Event; import starling.events.Touch; import starling.events.TouchEvent; import starling.text.TextField; import starling.utils.deg2rad; public class InGame extends Sprite { private var screenInGame:InGame; private var screenWelcome:Welcome; private var startButton:Button; private var playAgain:Button; private var bg:GameBackground; private var hero:Hero; private var timePrevious:Number; private var timeCurrent:Number; private var elapsed:Number; private var gameState:String; private var playerSpeed:Number = 0; private var hitObstacle:Number = 0; private const MIN_SPEED:Number = 650; private var scoreDistance:int; private var obstacleGapCount:int; private var gameArea:Rectangle; private var touch:Touch; private var touchX:Number; private var touchY:Number; private var obstaclesToAnimate:Vector.<Obstacle>; private var itemsToAnimate:Vector.<Item>; private var scoreText:TextField; private var remainingLives:TextField; private var gameOverText:TextField; private var iconSmall:Image; static private var lives:Number = 2; public function InGame() { super(); this.addEventListener(starling.events.Event.ADDED_TO_STAGE, onAddedToStage); } private function onAddedToStage(event:Event):void { this.removeEventListener(Event.ADDED_TO_STAGE, onAddedToStage); drawGame(); scoreText = new TextField(300, 100, "Score: 0", "MyFontName", 35, 0xD9D919, true); remainingLives = new TextField(600, 100, "Lives: " + lives +" X ", "MyFontName", 35, 0xD9D919, true); iconSmall = new Image(Assets.getAtlas().getTexture("darnahead1")); iconSmall.x = 360; iconSmall.y = 40; this.addChild(iconSmall); this.addChild(scoreText); this.addChild(remainingLives); } private function drawGame():void { bg = new GameBackground(); this.addChild(bg); hero = new Hero(); hero.x = stage.stageHeight / 2; hero.y = stage.stageWidth / 2; this.addChild(hero); startButton = new Button(Assets.getAtlas().getTexture("startButton")); startButton.x = stage.stageWidth * 0.5 - startButton.width * 0.5; startButton.y = stage.stageHeight * 0.5 - startButton.height * 0.5; this.addChild(startButton); gameArea = new Rectangle(0, 100, stage.stageWidth, stage.stageHeight - 250); } public function disposeTemporarily():void { this.visible = false; } public function initialize():void { this.visible = true; this.addEventListener(Event.ENTER_FRAME, checkElapsed); hero.x = -stage.stageWidth; hero.y = stage.stageHeight * 0.5; gameState ="idle"; playerSpeed = 0; hitObstacle = 0; bg.speed = 0; scoreDistance = 0; obstacleGapCount = 0; obstaclesToAnimate = new Vector.<Obstacle>(); itemsToAnimate = new Vector.<Item>(); startButton.addEventListener(Event.TRIGGERED, onStartButtonClick); //var mainStage:InGame =InGame.current.nativeStage; //mainStage.dispatchEvent(new Event(Event.COMPLETE)); //playAgain.addEventListener(Event.TRIGGERED, onRetry); } private function onStartButtonClick(event:Event):void { startButton.visible = false; startButton.removeEventListener(Event.TRIGGERED, onStartButtonClick); launchHero(); } private function launchHero():void { this.addEventListener(TouchEvent.TOUCH, onTouch); this.addEventListener(Event.ENTER_FRAME, onGameTick); } private function onTouch(event:TouchEvent):void { touch = event.getTouch(stage); touchX = touch.globalX; touchY = touch.globalY; } private function onGameTick(event:Event):void { switch(gameState) { case "idle": if(hero.x < stage.stageWidth * 0.5 * 0.5) { hero.x += ((stage.stageWidth * 0.5 * 0.5 + 10) - hero.x) * 0.05; hero.y = stage.stageHeight * 0.5; playerSpeed += (MIN_SPEED - playerSpeed) * 0.05; bg.speed = playerSpeed * elapsed; } else { gameState = "flying"; } break; case "flying": if(hitObstacle <= 0) { hero.y -= (hero.y - touchY) * 0.1; if(-(hero.y - touchY) < 150 && -(hero.y - touchY) > -150) { hero.rotation = deg2rad(-(hero.y - touchY) * 0.2); } if(hero.y > gameArea.bottom - hero.height * 0.5) { hero.y = gameArea.bottom - hero.height * 0.5; hero.rotation = deg2rad(0); } if(hero.y < gameArea.top + hero.height * 0.5) { hero.y = gameArea.top + hero.height * 0.5; hero.rotation = deg2rad(0); } } else { hitObstacle-- cameraShake(); } playerSpeed -= (playerSpeed - MIN_SPEED) * 0.01; bg.speed = playerSpeed * elapsed; scoreDistance += (playerSpeed * elapsed) * 0.1; scoreText.text = "Score: " + scoreDistance; initObstacle(); animateObstacles(); createEggItems(); animateItems(); remainingLives.text = "Lives: "+lives + " X "; if(lives == 0) { gameState = "over"; } break; case "over": gameOver(); break; } } private function gameOver():void { gameOverText = new TextField(800, 400, "Hero WAS KILLED!!!", "MyFontName", 50, 0xD9D919, true); scoreText = new TextField(800, 600, "Score: "+scoreDistance, "MyFontName", 30, 0xFFFFFF, true); this.addChild(scoreText); this.addChild(gameOverText); playAgain = new Button(Assets.getAtlas().getTexture("button_tryAgain")); playAgain.x = stage.stageWidth * 0.5 - startButton.width * 0.5; playAgain.y = stage.stageHeight * 0.75 - startButton.height * 0.75; this.addChild(playAgain); playAgain.addEventListener(Event.TRIGGERED, onRetry); } private function onRetry(event:Event):void { playAgain.visible = false; gameOverText.visible = false; scoreText.visible = false; var btnClicked:Button = event.target as Button; if((btnClicked as Button) == playAgain) { this.dispatchEvent(new NavigationEvent(NavigationEvent.CHANGE_SCREEN, {id: "playnow"}, true)); } disposeTemporarily(); } private function animateItems():void { var itemToTrack:Item; for(var i:uint = 0; i < itemsToAnimate.length; i++) { itemToTrack = itemsToAnimate[i]; itemToTrack.x -= playerSpeed * elapsed; if(itemToTrack.bounds.intersects(hero.bounds)) { itemsToAnimate.splice(i, 1); this.removeChild(itemToTrack); } if(itemToTrack.x < -50) { itemsToAnimate.splice(i, 1); this.removeChild(itemToTrack); } } } private function createEggItems():void { if(Math.random() > 0.95){ var itemToTrack:Item = new Item(Math.ceil(Math.random() * 10)); itemToTrack.x = stage.stageWidth + 50; itemToTrack.y = int(Math.random() * (gameArea.bottom - gameArea.top)) + gameArea.top; this.addChild(itemToTrack); itemsToAnimate.push(itemToTrack); } } private function cameraShake():void { if(hitObstacle > 0) { this.x = Math.random() * hitObstacle; this.y = Math.random() * hitObstacle; } else if(x != 0) { this.x = 0; this.y = 0; lives--; } } private function initObstacle():void { if(obstacleGapCount < 1200) { obstacleGapCount += playerSpeed * elapsed; } else if(obstacleGapCount !=0) { obstacleGapCount = 0; createObstacle(Math.ceil(Math.random() * 5), Math.random() * 1000 + 1000); } } private function animateObstacles():void { var obstacleToTrack:Obstacle; for(var i:uint = 0; i<obstaclesToAnimate.length; i++) { obstacleToTrack = obstaclesToAnimate[i]; if(obstacleToTrack.alreadyHit == false && obstacleToTrack.bounds.intersects(hero.bounds)) { obstacleToTrack.alreadyHit = true; obstacleToTrack.rotation = deg2rad(70); hitObstacle = 30; playerSpeed *= 0.5; } if(obstacleToTrack.distance > 0) { obstacleToTrack.distance -= playerSpeed * elapsed; } else { if(obstacleToTrack.watchOut) { obstacleToTrack.watchOut = false; } obstacleToTrack.x -= (playerSpeed + obstacleToTrack.speed) * elapsed; } if(obstacleToTrack.x < -obstacleToTrack.width || gameState == "over") { obstaclesToAnimate.splice(i, 1); this.removeChild(obstacleToTrack); } } } private function checkElapsed(event:Event):void { timePrevious = timeCurrent; timeCurrent = getTimer(); elapsed = (timeCurrent - timePrevious) * 0.001; } private function createObstacle(type:Number, distance:Number):void{ var obstacle:Obstacle = new Obstacle(type, distance, true, 300); obstacle.x = stage.stageWidth; this.addChild(obstacle); if(type >= 4) { if(Math.random() > 0.5) { obstacle.y = gameArea.top; obstacle.position = "top" } else { obstacle.y = gameArea.bottom - obstacle.height; obstacle.position = "bottom"; } } else { obstacle.y = int(Math.random() * (gameArea.bottom - obstacle.height - gameArea.top)) + gameArea.top; obstacle.position = "middle"; } obstaclesToAnimate.push(obstacle); } } }

    Read the article

  • Tapestry / JDBC - Storing Date

    - by Ben
    So Im using Tapestry and trying to store a date from a beaneditform into a simple Access database. It wont work, Im getting Null pointer exceptions and I cannot understand why. String onSuccess() { System.out.println("in on success!"); String nextPage = null; try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); connection = DriverManager.getConnection("jdbc:odbc:FYP_Users"); DateFormat df = new SimpleDateFormat("dd/MM/yyyy"); Date ed = occasion.getEventDate(); String reportDate = df.format(ed); statement.executeUpdate("INSERT INTO Events (UserName, EventName, EventDate, EventTime, EventDetails, People, Rating) " + "VALUES ('" + login.getUserName() + "', '" + occasion.getEventName()+ "', '" + reportDate + "', '" + occasion.getEventTime() + "', '" + occasion.getEventDetails() + "', '" + occasion.getPeople() + "', '"+ "1" +"')"); connection.close(); occasion = new Occasion(); //occasion.setUserName(occasion.getUserName()); occasion.setEventName(occasion.getEventName()); occasion.setEventDate(occasion.getEventDate()); occasion.setEventTime(occasion.getEventTime()); occasion.setEventDetails(occasion.getEventDetails()); occasion.setPeople(occasion.getPeople()); //occasion.setRating(occasion.getRating()); nextPage = "UserIndex"; } catch (SQLException e) {e.printStackTrace();} catch (ClassNotFoundException e) {e.printStackTrace();} return nextPage; } Stack trace java.util.Calendar.setTime(Unknown Source) java.text.SimpleDateFormat.format(Unknown Source) java.text.SimpleDateFormat.format(Unknown Source) java.text.DateFormat.format(Unknown Source) myappj.pages.CreateOccasion.onSuccess(CreateOccasion.java:61) myappj.pages.CreateOccasion.dispatchComponentEvent(CreateOccasion.java) org.apache.tapestry5.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:902) org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1081) org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.triggerContextEvent(InternalComponentResourcesImpl.java:263) org.apache.tapestry5.corelib.components.Form._$advised$onAction(Form.java:398) org.apache.tapestry5.corelib.components.Form$onAction$invocation_128ef468876.invokeAdvisedMethod(Form$onAction$invocation_128ef468876.java) org.apache.tapestry5.internal.services.AbstractComponentMethodInvocation.proceed(AbstractComponentMethodInvocation.java:71) org.apache.tapestry5.ioc.internal.services.LoggingAdvice.advise(LoggingAdvice.java:37) org.apache.tapestry5.internal.transform.LogWorker$1.advise(LogWorker.java:54) org.apache.tapestry5.internal.services.AbstractComponentMethodInvocation.proceed(AbstractComponentMethodInvocation.java:80) org.apache.tapestry5.corelib.components.Form.onAction(Form.java) org.apache.tapestry5.corelib.components.Form.dispatchComponentEvent(Form.java) org.apache.tapestry5.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:910) org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1081) org.apache.tapestry5.internal.services.ComponentEventRequestHandlerImpl.handle(ComponentEventRequestHandlerImpl.java:75) org.apache.tapestry5.internal.services.ImmediateActionRenderResponseFilter.handle(ImmediateActionRenderResponseFilter.java:42) $ComponentEventRequestHandler_128ef45bf4a.handle($ComponentEventRequestHandler_128ef45bf4a.java) org.apache.tapestry5.internal.services.AjaxFilter.handle(AjaxFilter.java:42) $ComponentEventRequestHandler_128ef45bf4a.handle($ComponentEventRequestHandler_128ef45bf4a.java) org.apache.tapestry5.services.TapestryModule$36.handle(TapestryModule.java:2164) $ComponentEventRequestHandler_128ef45bf4a.handle($ComponentEventRequestHandler_128ef45bf4a.java) $ComponentEventRequestHandler_128ef45bea5.handle($ComponentEventRequestHandler_128ef45bea5.java) org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handleComponentEvent(ComponentRequestHandlerTerminator.java:43) $ComponentRequestHandler_128ef45be99.handleComponentEvent($ComponentRequestHandler_128ef45be99.java) org.apache.tapestry5.internal.services.ComponentEventDispatcher.dispatch(ComponentEventDispatcher.java:46) $Dispatcher_128ef45be9b.dispatch($Dispatcher_128ef45be9b.java) $Dispatcher_128ef45be92.dispatch($Dispatcher_128ef45be92.java) org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:245) org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26) $RequestHandler_128ef45be93.service($RequestHandler_128ef45be93.java) org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:778) $RequestHandler_128ef45be93.service($RequestHandler_128ef45be93.java) org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:767) $RequestHandler_128ef45be93.service($RequestHandler_128ef45be93.java) org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85) $RequestHandler_128ef45be93.service($RequestHandler_128ef45be93.java) myappj.services.AppModule$1.service(AppModule.java:90) $RequestFilter_128ef45be8e.service($RequestFilter_128ef45be8e.java) $RequestHandler_128ef45be93.service($RequestHandler_128ef45be93.java) org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90) org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:81) org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85) org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103) $RequestHandler_128ef45be93.service($RequestHandler_128ef45be93.java) $RequestHandler_128ef45be88.service($RequestHandler_128ef45be88.java) org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:197) org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53) $HttpServletRequestHandler_128ef45be8a.service($HttpServletRequestHandler_128ef45be8a.java) org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62) $HttpServletRequestFilter_128ef45be87.service($HttpServletRequestFilter_128ef45be87.java) $HttpServletRequestHandler_128ef45be8a.service($HttpServletRequestHandler_128ef45be8a.java) org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:726) $HttpServletRequestHandler_128ef45be8a.service($HttpServletRequestHandler_128ef45be8a.java) $HttpServletRequestHandler_128ef45be85.service($HttpServletRequestHandler_128ef45be85.java) org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:127) org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360) org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:722) org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:404) org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) org.mortbay.jetty.Server.handle(Server.java:324) org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505) org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:842) org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648) org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380) org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395) org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)

    Read the article

  • Flex Error: Repeater is not executing.

    - by creativepragmatic
    Hello Everyone, I have been trying to get a Repeater to work since yesterday. It works the first time it has been loaded with data but the second time, it is loaded, the following error results with the debugger higlighting a row with the statement isHandlingEvent = false; in the watcherFired method of the Binding class. This happens whether the Repeater is updated by setting its dataProvider or if a bound variable is changed. Thank you in advance for any help, Orville Error: Repeater is not executing. at mx.core::Repeater/get currentItem()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\core\Repeater.as:305] at ()[F:\Projects\Flex\PrintPortal\src\ch\printportal\site\view\Shop.mxml:362] at Function/http://adobe.com/AS3/2006/builtin::apply() at mx.binding::Binding/wrapFunctionCall()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\binding\Binding.as:287] at ()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\binding\RepeatableBinding.as:139] at Function/http://adobe.com/AS3/2006/builtin::apply() at mx.binding::Binding/wrapFunctionCall()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\binding\Binding.as:287] at mx.binding::RepeatableBinding/recursivelyProcessIDArray()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\binding\RepeatableBinding.as:148] at mx.binding::RepeatableBinding/execute()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\binding\RepeatableBinding.as:105] at mx.binding::BindingManager$/executeBindings()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\binding\BindingManager.as:138] at mx.core::Container/executeBindings()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\core\Container.as:3252] at mx.core::Container/createComponentFromDescriptor()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\core\Container.as:3726] at mx.core::Container/createComponentsFromDescriptors()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\core\Container.as:3536] at mx.core::Container/createChildren()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\core\Container.as:2632] at mx.core::UIComponent/initialize()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\core\UIComponent.as:5370] at mx.core::Container/initialize()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\core\Container.as:2569] at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\core\UIComponent.as:5267] at mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::childAdded()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\core\Container.as:3348] at mx.core::Container/addChildAt()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\core\Container.as:2260] at mx.core::Container/addChild()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\core\Container.as:2183] at mx.core::Container/createComponentFromDescriptor()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\core\Container.as:3724] at mx.core::Repeater/createComponentFromDescriptor()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\core\Repeater.as:734] at mx.core::Repeater/createComponentsFromDescriptors()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\core\Repeater.as:786] at mx.core::Repeater/recreate()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\core\Repeater.as:1075] at mx.core::Repeater/execute()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\core\Repeater.as:1095] at mx.core::Repeater/set dataProvider()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\core\Repeater.as:402] at ()[F:\Projects\Flex\PrintPortal\src\ch\printportal\site\view\Shop.mxml:358] at Function/http://adobe.com/AS3/2006/builtin::call() at mx.binding::Binding/innerExecute()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\binding\Binding.as:375] at Function/http://adobe.com/AS3/2006/builtin::apply() at mx.binding::Binding/wrapFunctionCall()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\binding\Binding.as:287] at mx.binding::Binding/execute()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\binding\Binding.as:230] at mx.binding::Binding/watcherFired()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\binding\Binding.as:396] at mx.binding::Watcher/notifyListeners()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\binding\Watcher.as:299] at mx.binding::PropertyWatcher/eventHandler()[C:\autobuild\galaga\frameworks\projects\framework\src\mx\binding\PropertyWatcher.as:327] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at ch.printportal.site.model::ModelLocator/dispatchEvent()[F:\Projects\Flex\PrintPortal\src\ch\printportal\site\model\ModelLocator.as:73] at ch.printportal.site.model::ModelLocator/set arrCategoryView2Products()[F:\Projects\Flex\PrintPortal\src\ch\printportal\site\model\ModelLocator.as:71] at ch.printportal.site.command::GetProductsCommand/result()[F:\Projects\Flex\PrintPortal\src\ch\printportal\site\command\GetProductsCommand.as:47] at mx.rpc::AsyncToken/http://www.adobe.com/2006/flex/mx/internal::applyResult()[C:\autobuild\galaga\frameworks\projects\rpc\src\mx\rpc\AsyncToken.as:199] at mx.rpc.events::ResultEvent/http://www.adobe.com/2006/flex/mx/internal::callTokenResponders()[C:\autobuild\galaga\frameworks\projects\rpc\src\mx\rpc\events\ResultEvent.as:172] at mx.rpc::AbstractOperation/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[C:\autobuild\galaga\frameworks\projects\rpc\src\mx\rpc\AbstractOperation.as:199] at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()[C:\autobuild\galaga\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:263] at mx.rpc::Responder/result()[C:\autobuild\galaga\frameworks\projects\rpc\src\mx\rpc\Responder.as:46] at mx.rpc::AsyncRequest/acknowledge()[C:\autobuild\galaga\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:74] at NetConnectionMessageResponder/resultHandler()[C:\autobuild\galaga\frameworks\projects\rpc\src\mx\messaging\channels\NetConnectionChannel.as:514] at mx.messaging::MessageResponder/result()[C:\autobuild\galaga\frameworks\projects\rpc\src\mx\messaging\MessageResponder.as:199]

    Read the article

  • Error in loading component property (Swing GUI Forms)

    - by Christo Du Preez
    For no apparent reason all my Swing GUI forms using components linked to org.jdesktop.beansbinding.Converter started generating errors when trying to open the Design View: Error Error in loading component property: [JPanel]-filterTextField-converter. Cannot load property type class org.jdesktop.beansbinding.Converter. The property cannot be loaded. Errors occurred in loading... I'm currently using Netbeans 6.8. I opened my project in Netbeans 6.7.1 and all was fine but after a while the same thing happened. Looking at the .form and .java files and comparing it to previous backups, everything looks fine. Even my Netbeans tutorial project no longer works. What can cause this. Any suggestions would greatly be appreciated. After further investigation this is taken from my IDE's log : INFO: msg org.openide.ErrorManager$AnnException: msg at org.openide.ErrorManager$AnnException.findOrCreate(ErrorManager.java:867) at org.openide.ErrorManager$DelegatingErrorManager.annotate(ErrorManager.java:650) at org.netbeans.modules.form.GandalfPersistenceManager.annotateException(GandalfPersistenceManager.java:230) at org.netbeans.modules.form.GandalfPersistenceManager.annotateException(GandalfPersistenceManager.java:240) at org.netbeans.modules.form.GandalfPersistenceManager.getPropertyType(GandalfPersistenceManager.java:2362) at org.netbeans.modules.form.GandalfPersistenceManager.loadProperty(GandalfPersistenceManager.java:2041) at org.netbeans.modules.form.GandalfPersistenceManager.loadBindingProperties(GandalfPersistenceManager.java:2627) at org.netbeans.modules.form.GandalfPersistenceManager.loadComponent(GandalfPersistenceManager.java:900) at org.netbeans.modules.form.GandalfPersistenceManager.restoreComponent(GandalfPersistenceManager.java:845) at org.netbeans.modules.form.GandalfPersistenceManager.loadComponent(GandalfPersistenceManager.java:979) at org.netbeans.modules.form.GandalfPersistenceManager.restoreComponent(GandalfPersistenceManager.java:845) at org.netbeans.modules.form.GandalfPersistenceManager.loadNonVisuals(GandalfPersistenceManager.java:695) at org.netbeans.modules.form.GandalfPersistenceManager.loadForm(GandalfPersistenceManager.java:529) at org.netbeans.modules.form.GandalfPersistenceManager.loadForm(GandalfPersistenceManager.java:290) at org.netbeans.modules.form.FormEditor$3.run(FormEditor.java:339) at org.netbeans.modules.form.FormLAF$2.run(FormLAF.java:287) at org.openide.util.Mutex.doEventAccess(Mutex.java:1355) at org.openide.util.Mutex.readAccess(Mutex.java:317) at org.netbeans.modules.form.FormLAF.executeWithLookAndFeel(FormLAF.java:272) at org.netbeans.modules.form.FormEditor.loadFormData(FormEditor.java:337) at org.netbeans.modules.form.FormEditor.loadForm(FormEditor.java:266) at org.netbeans.modules.form.FormEditorSupport.loadForm(FormEditorSupport.java:306) at org.netbeans.modules.form.FormEditorSupport$3.run(FormEditorSupport.java:457) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:597) at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:125) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) Caused by: java.lang.ClassNotFoundException: Will not load class org.jdesktop.beansbinding.Converter arbitrarily from one of ModuleCL@738d08[org.jdesktop.beansbinding] and ModuleCL@167e3a5[javax.beans.binding] starting from SystemClassLoader[556 modules]; see http://wiki.netbeans.org/DevFaqModuleCCE at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:241) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at org.netbeans.modules.form.project.FormClassLoader.findClass(FormClassLoader.java:83) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) at org.netbeans.modules.form.project.ClassPathUtils.loadClass(ClassPathUtils.java:95) at org.netbeans.modules.form.FormUtils.loadClass(FormUtils.java:1445) at org.netbeans.modules.form.PersistenceObjectRegistry.loadClass(PersistenceObjectRegistry.java:95) at org.netbeans.modules.form.GandalfPersistenceManager.getClassFromString(GandalfPersistenceManager.java:5516) at org.netbeans.modules.form.GandalfPersistenceManager.getPropertyType(GandalfPersistenceManager.java:2348) ... 27 more msg Error in loading component property: Other Components-mainPanel-jTextField1-converter Cannot load property type class org.jdesktop.beansbinding.Converter. The property cannot be loaded. Can someone please help me with this issue. This is still not resolved and not being able to edit my Forms or loosing binding properties every time I need to edit a Form is a real pain and time consuming! Any help would greatly be appreciated. Thanx.

    Read the article

  • Why am I getting 'Argument count mismatch' error here?

    - by Leon
    I have a Document class, Intro class and Nav class. The Intro class runs first, then sends a custom dispatch event to run the Nav class, but I'm getting this error: removed Intro ArgumentError: Error #1063: Argument count mismatch on com.secrettowriting.StanPlayer.ui::Navigation/addNav(). Expected 0, got 1. at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at com.secrettowriting.StanPlayer.display::Intro/removeIntro() at flash.utils::Timer/_timerDispatch() at flash.utils::Timer/tick() The addNav function in the Navigation class should expect 0 arguments/variables and I'm not sending any arguments/variables to it, which is why I'm confused as to why it's saying I'm getting 1. My Document Class: public function HomePlayer():void { if (stage) init(); else addEventListener(Event.ADDED_TO_STAGE, init); } private function init(e:Event = null):void { removeEventListener(Event.ADDED_TO_STAGE, init); stage.scaleMode = StageScaleMode.NO_SCALE; stage.align = StageAlign.TOP_LEFT; // Use when Live //videoURL = this.loaderInfo.parameters.theVIDEO; // Get the Video URL from HTML // Remove when video testing ready videoURL = "videos/WhatDifferentiatesUs.flv"; drawNav(); drawIntro(); } private function drawIntro():void { intro = new Intro(); intro.drawIntro(); intro.addEventListener("onComplete", nav.addNav); stage.addChild(intro); } private function drawNav():void { nav = new Navigation(); nav.drawNav(); stage.addChild(nav); } Intro Class: Public function Intro():void { if (stage) init(); else addEventListener(Event.ADDED_TO_STAGE, init); } private function init(e:Event = null):void { removeEventListener(Event.ADDED_TO_STAGE, init); } public function drawIntro():void { introMov = new IntroMov(); introMov.alpha = 0; addChild(introMov); TweenLite.to(introMov, 3, {alpha:1}); // Timer introFader = new Timer(INTRO_DELAY); introFader.addEventListener(TimerEvent.TIMER, fadeIntro); introFader.start(); introRemover = new Timer(INTRO_DELAY); introRemover.addEventListener(TimerEvent.TIMER, removeIntro); } private function fadeIntro(e:TimerEvent):void { if (i < 30){ i++ } else if (i == 30){ TweenLite.to(introMov, 1.5, {alpha:0}); introFader.removeEventListener(TimerEvent.TIMER, fadeIntro); introRemover.start(); } } private function removeIntro(e:TimerEvent):void { if (n < 10){ n++ } else if (n == 10){ introRemover.removeEventListener(TimerEvent.TIMER, removeIntro); removeChild(introMov); trace("removed Intro"); dispatchEvent (new CustomEvent(CustomEvent.COMPLETE, {})); // ? Intro to Navigation } } Navigation Class functions: public function drawNav():void { weAreA = new WeAreA(); weAreA.alpha = 0; weAreA.x = 20; weAreA.y = 35; introText = new IntroText(); introText.alpha = 0; introText.x = 20; introText.y = 124; chooseAVideo = new ChooseAVideo(); chooseAVideo.alpha = 0; chooseAVideo.x = 20; chooseAVideo.y = 336; } public function addNav():void { addChild(weAreA); addChild(introText); addChild(chooseAVideo); TweenLite.to(weAreA, 2, {alpha:1}); TweenLite.to(introText, 3, {alpha:1}); TweenLite.to(introText, 3, {alpha:1}); }

    Read the article

  • move carat to the end of a text input field AND make the end visible

    - by user322384
    I'm going insane. I have an autosuggest box where users choose a suggestion. On the next suggestion selection the value of the text input box exceeds its size. I can move the carat to the end of the input field crossbrowser, no problem. But on Chrome and Safari I cannot SEE the carat at the end. The end of the text is not visible. Is there a way to move the carat to the end of a text input field AND have the end of the field visible so that the user is not confused about where the input carat went? what I got so far: <html> <head><title>Field update test</title></head> <body> <form action="#" method="POST" name="testform"> <p>After a field is updated the carat should be at the end of the text field AND the end of the text should be visible</p> <input type="text" name="testbox" value="" size="40"> <p><a href="javascript:void(0);" onclick="add_more_text();">add more text</a></p> </form> <script type="text/javascript"> <!-- var count = 0; function add_more_text() { var textfield = document.testform.elements['testbox']; textfield.blur(); textfield.focus(); if (count == 0) textfield.value = ''; // clear old count++; textfield.value = (count ? textfield.value : '') + ", " + count + ": This is some sample text"; // move to the carat to the end of the field if (textfield.setSelectionRange) { textfield.setSelectionRange(textfield.value.length, textfield.value.length); } else if (textfield.createTextRange) { var range = textfield.createTextRange(); range.collapse(true); range.moveEnd('character', textfield.value.length); range.moveStart('character', textfield.value.length); range.select(); } // force carat visibility for some browsers if (document.createEvent) { // Trigger a space keypress. var e = document.createEvent('KeyboardEvent'); if (typeof(e.initKeyEvent) != 'undefined') { e.initKeyEvent('keypress', true, true, null, false, false, false, false, 0, 32); } else { e.initKeyboardEvent('keypress', true, true, null, false, false, false, false, 0, 32); } textfield.dispatchEvent(e); // Trigger a backspace keypress. e = document.createEvent('KeyboardEvent'); if (typeof(e.initKeyEvent) != 'undefined') { e.initKeyEvent('keypress', true, true, null, false, false, false, false, 8, 0); } else { e.initKeyboardEvent('keypress', true, true, null, false, false, false, false, 8, 0); } textfield.dispatchEvent(e); } } // --> </script> </body> </html> Thanks

    Read the article

  • Flex HTTPService security error using Safari

    - by Ryan M
    I'm using the HTTPService object in actionscript to send some data to a php file on another server which then inserts the data to a database. I set up the crossdomain.xml file in the root of the directory that contains the php file to get around any security issues. Everything works fine on Firfox 3.5 (on mac and pc) and on IE 7 & 8. When testing on Safari 4 I get an error which would be expected when a crossdomain.xml doesn't exist. [RPC Fault faultString="Security error accessing url" faultCode="Channel.Security.Error" faultDetail="Destination: DefaultHTTP"] at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler() at mx.rpc::Responder/fault() at mx.rpc::AsyncRequest/fault() at DirectHTTPMessageResponder/securityErrorHandler() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::URLLoader/redirectEvent() Any ideas on how to get this to work on Safari? It's seems as if Safari isn't accessing the crossdomain.xml file.

    Read the article

  • Clear validation on textInput when validation is not enabled

    - by Jon
    Hi, I've created a custom textInput componenet that handles it's own validation using a private validator. The validation is enabled depending on the state of the component i.e. validation is enable when the components state is "edit". However, when the state changes from edit the internal validator is set to not enabled but the validation errors on the textbox do not clear - the textInput still has the red border and on mouseover the validation errors come up. What I want to happen is that when a validator is disabled the error formatting and error messages clear from the text input control. Does anyone have any idea how to do this I tried setting the internal validator instance to enabled = false and dispatching a new focusOutEvent as below but the validation error formatting is still applied to the textInput contrl. _validatorInstance.enabled = false; //clear the validation errors if any dispatchEvent(new FocusEvent(FocusEvent.FOCUS_OUT)); Any ideas? Thanks Jon

    Read the article

  • reference parent class function in AS 3.0

    - by vasion
    I am trying to run a function of the main class, but even with casting it does not work. I get this error TypeError: Error #1009: Cannot access a property or method of a null object reference. at rpflash.communication::RPXMLReader/updateplaylist() at rpflash.communication::RPXMLReader/dataHandler() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::XMLSocket/scanAndSendEvent() this is the main class code package{ import flash.display.MovieClip; import rpflash.communication.RPXMLReader; public class Main extends MovieClip{ var reader:RPXMLReader = new RPXMLReader(); public function Main(){ trace('Main actionscript loaded'); } public function test(){ trace('test worked');} } } and this is the function trying to call it: private function updateplaylist(){ //xml to string var xmls:String= xml.toXMLString(); trace('playlist updated debug point'); MovieClip(this.parent).test();} what am i doing wrong?

    Read the article

  • Java Swing GUI exception - Exception in thread "AWT-EventQueue-0" java.util.NoSuchElementException:

    - by rgksugan
    I get this exception when i run my application. I dont have any idea what is going wrong here. Can someone help please. Exception in thread "AWT-EventQueue-0" java.util.NoSuchElementException: Vector Enumeration at java.util.Vector$1.nextElement(Vector.java:305) at javax.swing.plaf.basic.BasicTableHeaderUI.getPreferredSize(BasicTableHeaderUI.java:778) at javax.swing.JComponent.getPreferredSize(JComponent.java:1634) at javax.swing.ViewportLayout.preferredLayoutSize(ViewportLayout.java:78) at java.awt.Container.preferredSize(Container.java:1599) at java.awt.Container.getPreferredSize(Container.java:1584) at javax.swing.JComponent.getPreferredSize(JComponent.java:1636) at javax.swing.ScrollPaneLayout.layoutContainer(ScrollPaneLayout.java:702) at java.awt.Container.layout(Container.java:1421) at java.awt.Container.doLayout(Container.java:1410) at java.awt.Container.validateTree(Container.java:1507) at java.awt.Container.validate(Container.java:1480) at javax.swing.RepaintManager.validateInvalidComponents(RepaintManager.java:669) at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:124) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:597) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

    Read the article

  • problem processing xml in flex3

    - by john
    Hi All, First time here asking a question and still learning on how to format things better... so sorry about the format as it does not look too well. I have started learning flex and picked up a book and tried to follow the examples in it. However, I got stuck with a problem. I have a jsp page which returns xml which basically have a list of products. I am trying to parse this xml, in other words go through products, and create Objects for each product node and store them in an ArrayCollection. The problem I believe I am having is I am not using the right way of navigating through xml. The xml that is being returned from the server looks like this: <?xml version="1.0" encoding="ISO-8859-1"?><result type="success"> <products> <product> <id>6</id> <cat>electronics</cat> <name>Plasma Television</name> <desc>65 inch screen with 1080p</desc> <price>$3000.0</price> </product> <product> <id>7</id> <cat>electronics</cat> <name>Surround Sound Stereo</name> <desc>7.1 surround sound receiver with wireless speakers</desc> <price>$1000.0</price> </product> <product> <id>8</id> <cat>appliances</cat> <name>Refrigerator</name> <desc>Bottom drawer freezer with water and ice on the door</desc> <price>$1200.0</price> </product> <product> <id>9</id> <cat>appliances</cat> <name>Dishwasher</name> <desc>Large capacity with water saver setting</desc> <price>$500.0</price> </product> <product> <id>10</id> <cat>furniture</cat> <name>Leather Sectional</name> <desc>Plush leather with room for 6 people</desc> <price>$1500.0</price> </product> </products></result> And I have flex code that tries to iterate over products like following: private function productListHandler(e:JavaFlexStoreEvent):void { productData = new ArrayCollection(); trace(JavaServiceHandler(e.currentTarget).response); for each (var item:XML in JavaServiceHandler(e.currentTarget).response..product ) { productData.addItem( { id:item.id, item:item.name, price:item.price, description:item.desc }); } } with trace, I can see the xml being returned from the server. However, I cannot get inside the loop as if the xml was empty. In other words, JavaServiceHandler(e.currentTarget).response..product must be returning nothing. Can someone please help/point out what I could be doing wrong. My JavaServiceHandler class looks like this: package com.wiley.jfib.store.data { import com.wiley.jfib.store.events.JavaFlexStoreEvent; import flash.events.Event; import flash.events.EventDispatcher; import flash.net.URLLoader; import flash.net.URLRequest; public class JavaServiceHandler extends EventDispatcher { public var serviceURL:String = ""; public var response:XML; public function JavaServiceHandler() { } public function callServer():void { if(serviceURL == "") { throw new Error("serviceURL is a required parameter"); return; } var loader:URLLoader = new URLLoader(); loader.addEventListener(Event.COMPLETE, handleResponse); loader.load(new URLRequest(serviceURL)); // var httpService:HTTPService = new HTTPService(); // httpService.url = serviceURL; // httpService.resultFormat = "e4x"; // httpService.addEventListener(Event.COMPLETE, handleResponse); // httpService.send(); } private function handleResponse(e:Event):void { var loader:URLLoader = URLLoader(e.currentTarget); response = XML(loader.data); dispatchEvent(new JavaFlexStoreEvent(JavaFlexStoreEvent.DATA_LOADED) ); // var httpService:HTTPService = HTTPService(e.currentTarget); // response = httpService.lastResult.product; // dispatchEvent(new JavaFlexStoreEvent(JavaFlexStoreEvent.DATA_LOADED) ); } } } Even though I refer to this as mine and it is not in reality. This is from a Flex book as a code sample which does not work, go figure. Any help is appreciated. Thanks john

    Read the article

  • Programmatically press "Left" key in a text input

    - by Anurag
    I am trying to programmatically fire a key event to go left in a text box, but not having any luck. The input element has focus and the cursor is at the end. I'm trying to get the cursor to move left one step - before the letter "F". ABCDEF| Here's the code so far: HTML <input id="a" type="text" /> Javascript var keyEvent = document.createEvent("KeyboardEvent"); var keyLocation = '0x00'; var keyIdentifier = "Left"; keyEvent.initKeyboardEvent("keypress", true, true, window, keyIdentifier, keyLocation, false); $("a").dispatchEvent(keyEvent); Saved a quick demo on jsfiddle if you want to see the whole code - http://jsfiddle.net/Vsafv/ I am not interested in making this cross-browser (just get it working in Chrome). Thanks for any help.

    Read the article

  • Emulate clicking a link with Javascript that works with IE

    - by Tam
    I want to have java script clicking a link on the page..I found something on the net that suggests adding a function like this: function fireEvent(obj,evt){ var fireOnThis = obj; if( document.createEvent ) { var evObj = document.createEvent('MouseEvents'); evObj.initEvent( evt, true, false ); fireOnThis.dispatchEvent(evObj); } else if( document.createEventObject ) { fireOnThis.fireEvent('on'+evt); } } Then call it using: fireEvent(document.getElementById('edit_client_link'),'click'); This seems to work fine for FF but with IE it doesn't work! Any ideas?

    Read the article

  • call flex initComplete at a specific time

    - by dubbeat
    Hi, Below is the overriden on complete function for a preloader in Flex. private function initComplete(e:Event):void { //dispatchEvent(new Event(Event.COMPLETE)); cp.status.text="Configuring... Please Wait"; } What I want to do is when the app has finsihed loading I want to change the preloaders text to "configuring". Then I want to go and do a bunch of setup stuff in my code. Once I've done all the setup I wanted how can I get the Preloader to dispatch its Event.complete from else where in my code? I tried Application.application.preloader but it comes up null. So I guess my question really is how to access a preloader from anywhere in my application. Would a better approach be to have all setup classes as members of my preloader class?

    Read the article

  • Magento: Why do controller action predispatch events not fire if the controller is rewritten?

    - by mattalexx
    Why do controller action predispatch events not fire if the controller is rewritten? Here is a snippet of store/app/code/core/Mage/Core/Controller/Varien/Action.php: abstract class Mage_Core_Controller_Varien_Action { // [...] public function preDispatch() { // [...] if ($this->_rewrite()) { return; // [What is the purpose if this?] } // [...] // [This is where my event needs to be firing, but this code never gets // executed because the controller is rewritten] Mage::dispatchEvent( 'controller_action_predispatch_'.$this->getFullActionName(), array('controller_action'=>$this) ); } // [...] } I don't know where to start fixing this problem. Anyone out there ever dealt with this before?

    Read the article

  • Simulate Click Javascript

    - by Belgin Fish
    Hi, I'm just wondering how I can have javascript simulate a click on a element. Currently I have <script type="text/javascript"> function simulateClick(control) { if (document.all) { control.click(); } else { var evObj = document.createEvent('MouseEvents'); evObj.initMouseEvent('click', true, true, window, 1, 12, 345, 7, 220, false, false, true, false, 0, null ); control.dispatchEvent(evObj); } } </script> <a href="http://www.google.com" id="mytest1">test 1</a><br> <script type="text/javascript"> simulateClick(document.getElementById('mytest1')); </script> But it's not working :( Any ideas?

    Read the article

  • FLEX: why the event is only listened by the dispatcher component ?

    - by Patrick
    hi, I've a parent (Canvas) with many children (LinkButtons) The linkButtons trigger an event to communicate between them: dispatchEvent(new SameBookmarkEvent("SameBookmarkEvent", bookmark.name)); and all linkButtons have a listener this.addEventListener("SameBookmarkEvent", highlightMe); ... private function highlightMe(e:SameBookmarkEvent):void { //do something } Now, the issue is that the event is only listened by the dispatcher child. In other words, only the child triggering the event, is receiving it. I was wondering what's wrong with it, and if I should add a listener to the parent (Canvas)... I basically need the children (LinkButton) communicate between them

    Read the article

  • Trigger Event after values have been commited for validation purposes

    - by www.jefferyfernandez.id.au
    I have a Flex component with a form and on creationComplete, I load some data onto the form textInputs. After the Form TextInputs have got their values, I want to trigger an event so the Parent of the component can validate the values on the TextInputs and based on the validation results, I perform some enable/disable of other interfaces. I have the following dispatch code: this.dispatchEvent(new PersonalDetailsEvent(PersonalDetailsEvent.LOADED_DATA_EVENT)); The event is dispatched and is captured by the parent. But upon performing the validation, some TextInputs always fail the validation. I thought it could be because of a race condition and so I used callLater() with same results. So in the end I am now using a timer to dispatch the event which is not ideal. Does anyone have a solution to this problem. It is really annoying that a timer needs to be used for this scenario.

    Read the article

  • [Flash Builder Profiler] Why some function have been called

    - by HarryWang
    1 Create a project use flex sdk 3.4 2 Create a new mxml app Testadd.mxml 3 Add a source jpg Any.jpg content of Testadd.mxml just two line. [Embed(source="Any.jpg")] public var NotUsedSource:Class; I think this just defined a class which represent some data. And I never use it or initialize any instance of it in this app. 4 Profile this app, when it is profiling I click the resize button of IE servral times. 5 From the profiled data a function named Testadd_NotUsedSource.flash.events:IEventDispatcher:dispatchEvent is been called 6 My question is why this function has been called. I have the screenshot but can't add to this post.

    Read the article

  • Magento, NGINX, PHP-FPM, APC, MEMCACHED, 16gb Ram CentOS, Spiking PHP-FPM to 100% CPU

    - by Terry Dunford
    I have been trying to resolve my issue of spiking cpu caused by php-fpm processes. I've reduced the php-fpm config settings to: pm = ondemand pm.max_children = 12 pm.start_servers = 2 pm.min_spare_servers = 2 pm.max_spare_servers = 10 pm.max_requests = 500 php_admin_value[memory_limit] = 128M Problem still exists. I'm running a Joomla main site (which is having no problems) and a Magento store in a sub-directory. My server is a Linux CentOS, running NGINX, APC, Memcached, Full Page Cache and php-fpm. My server has 8 cores and 16gb dedicated ram. My host has shut down my server several times the past week because my php-fpm processes are consuming the entire network. A lot of the individual php-fpm processes are getting over 50% cpu. I've hired several "professionals" and none of them was able to help me, so now broke and stumped, I'm turning to you guys for help. So any suggestions would be greatly appreciated. I turned on slow php logs and here are some of the latest results: [01-Apr-2012 14:26:12] [pool magento] pid 21537 script_filename = /home/flyfish/www/flyshop/index.php [0x0000000011a394f8] _renderStraightjoin() /home/flyfish/www/flyshop/lib/Varien/Db/Select.php:397 [0x0000000011a39158] _renderStraightjoin() /home/flyfish/www/flyshop/lib/Zend/Db/Select.php:705 [0x0000000011a38f30] assemble() /home/flyfish/www/flyshop/lib/Zend/Db/Select.php:1343 [0x00007fffbb6d6e50] __toString() unknown:0 [0x0000000011a38630] _prepareQuery() /home/flyfish/www/flyshop/lib/Varien/Db/Adapter/Pdo/Mysql.php:409 [0x0000000011a38270] _prepareQuery() /home/flyfish/www/flyshop/lib/Varien/Db/Adapter/Pdo/Mysql.php:388 [0x0000000011a38008] query() /home/flyfish/www/flyshop/lib/Zend/Db/Adapter/Abstract.php:734 [0x0000000011a375c8] fetchAll() /home/flyfish/www/flyshop/app/code/core/Mage/Catalog/Model/Resource/Product/Type/Configurable/Attribute/Collection.php:196 [0x0000000011a370e0] _loadLabels() /home/flyfish/www/flyshop/app/code/core/Mage/Catalog/Model/Resource/Product/Type/Configurable/Attribute/Collection.php:129 [0x0000000011a369a0] _afterLoad() /home/flyfish/www/flyshop/lib/Varien/Data/Collection/Db.php:536 [0x0000000011a364a8] load() /home/flyfish/www/flyshop/app/code/core/Mage/Catalog/Model/Product/Type/Configurable.php:253 [0x0000000011a35968] getConfigurableAttributes() /home/flyfish/www/flyshop/app/code/core/Mage/Catalog/Model/Product/Type/Configurable.php:330 [0x0000000011a35590] getUsedProducts() /home/flyfish/www/flyshop/app/code/core/Mage/Catalog/Model/Product/Type/Configurable.php:458 [0x0000000011a35410] isSalable() /home/flyfish/www/flyshop/app/code/core/Mage/Catalog/Model/Product.php:1264 [0x0000000011a35098] isAvailable() /home/flyfish/www/flyshop/app/code/core/Mage/Catalog/Model/Product.php:1244 [0x0000000011a34fa8] isSalable() /home/flyfish/www/flyshop/app/code/core/Mage/Catalog/Model/Product.php:1308 [0x0000000011a33998] isSaleable() /home/flyfish/www/flyshop/app/design/frontend/moxy/default/template/rokmagemodules/rokmage-categoryview/rokmage-categoryview.phtml:122 [0x0000000011a331f0] +++ dump failed [01-Apr-2012 14:26:44] [pool magento] pid 21531 script_filename = /home/flyfish/www/flyshop/index.php [0x0000000011a37768] _loadPrices() /home/flyfish/www/flyshop/app/code/core/Mage/Catalog/Model/Resource/Product/Type/Configurable/Attribute/Collection.php:251 [0x0000000011a37280] _loadPrices() /home/flyfish/www/flyshop/app/code/core/Mage/Catalog/Model/Resource/Product/Type/Configurable/Attribute/Collection.php:132 [0x0000000011a36b40] _afterLoad() /home/flyfish/www/flyshop/lib/Varien/Data/Collection/Db.php:536 [0x0000000011a36648] load() /home/flyfish/www/flyshop/app/code/core/Mage/Catalog/Model/Product/Type/Configurable.php:253 [0x0000000011a35b08] getConfigurableAttributes() /home/flyfish/www/flyshop/app/code/core/Mage/Catalog/Model/Product/Type/Configurable.php:330 [0x0000000011a35730] getUsedProducts() /home/flyfish/www/flyshop/app/code/core/Mage/Catalog/Model/Product/Type/Configurable.php:458 [0x0000000011a355b0] isSalable() /home/flyfish/www/flyshop/app/code/core/Mage/Catalog/Model/Product.php:1264 [0x0000000011a35238] isAvailable() /home/flyfish/www/flyshop/app/code/core/Mage/Catalog/Model/Product.php:1244 [0x0000000011a35148] isSalable() /home/flyfish/www/flyshop/app/code/core/Mage/Catalog/Model/Product.php:1308 [0x0000000011a33b38] isSaleable() /home/flyfish/www/flyshop/app/design/frontend/moxy/default/template/rokmagemodules/rokmage-categoryview/rokmage-categoryview.phtml:122 [0x0000000011a33390] +++ dump failed [01-Apr-2012 14:27:01] [pool magento] pid 21528 script_filename = /home/flyfish/www/flyshop/index.php [0x0000000011ff67a8] execute() /home/flyfish/www/flyshop/lib/Zend/Db/Statement/Pdo.php:228 [0x0000000011ff6518] _execute() /home/flyfish/www/flyshop/lib/Varien/Db/Statement/Pdo/Mysql.php:110 [0x0000000011ff5e90] _execute() /home/flyfish/www/flyshop/lib/Zend/Db/Statement.php:300 [0x0000000011ff5a20] execute() /home/flyfish/www/flyshop/lib/Zend/Db/Adapter/Abstract.php:479 [0x0000000011ff5438] query() /home/flyfish/www/flyshop/lib/Zend/Db/Adapter/Pdo/Abstract.php:238 [0x0000000011ff5078] query() /home/flyfish/www/flyshop/lib/Varien/Db/Adapter/Pdo/Mysql.php:389 [0x0000000011ff4e98] query() /home/flyfish/www/flyshop/lib/Zend/Db/Adapter/Abstract.php:825 [0x0000000011ff4948] fetchOne() /home/flyfish/www/flyshop/app/code/core/Mage/Catalog/Model/Resource/Category/Flat.php:1161 [0x0000000011ff4678] getProductCount() /home/flyfish/www/flyshop/app/code/core/Mage/Catalog/Model/Category.php:801 [0x0000000011ff33e0] getProductCount() /home/flyfish/www/flyshop/app/code/local/Extendware/EWLayeredNav/Model/Library/Plugin/Catalog/Layer/Filter/Category.php:54 [0x0000000011ff2da0] _initItemsData() /home/flyfish/www/flyshop/app/code/local/Extendware/EWLayeredNav/Model/Library/Plugin/Catalog/Layer/Filter/Category.php:23 [0x0000000011ff2818] _getItemsData() /home/flyfish/www/flyshop/app/code/local/Extendware/EWLayeredNav/Model/Library/Plugin/Catalog/Layer/Filter/Category.php:119 [0x0000000011ff26b0] _initItems() /home/flyfish/www/flyshop/app/code/core/Mage/Catalog/Model/Layer/Filter/Abstract.php:120 [0x0000000011ff2598] getItems() /home/flyfish/www/flyshop/app/code/core/Mage/Catalog/Model/Layer/Filter/Abstract.php:109 [0x0000000011ff2480] getItemsCount() /home/flyfish/www/flyshop/app/code/core/Mage/Catalog/Block/Layer/Filter/Abstract.php:126 [0x0000000011ff22b8] getItemsCount() /home/flyfish/www/flyshop/var/cache/extendware/ewcore/overrides/Mage/Catalog/Block/Layer/View/67dcc5dfa9c44bd3a205b75a08193105.php:218 [0x0000000011ff2088] canShowOptions() /home/flyfish/www/flyshop/var/cache/extendware/ewcore/overrides/Mage/Catalog/Block/Layer/View/67dcc5dfa9c44bd3a205b75a08193105.php:233 [0x0000000011ff14f8] canShowBlock() /home/flyfish/www/flyshop/app/design/frontend/moxy/default/template/extendware/ewlayerednav/catalog/layer/view.phtml:6 [0x0000000011ff0d50] +++ dump failed [01-Apr-2012 14:27:04] [pool magento] pid 21529 script_filename = /home/flyfish/www/flyshop/index.php [0x0000000012468ff8] execute() /home/flyfish/www/flyshop/lib/Zend/Db/Statement/Pdo.php:228 [0x0000000012468d68] _execute() /home/flyfish/www/flyshop/lib/Varien/Db/Statement/Pdo/Mysql.php:110 [0x00000000124686e0] _execute() /home/flyfish/www/flyshop/lib/Zend/Db/Statement.php:300 [0x0000000012468270] execute() /home/flyfish/www/flyshop/lib/Zend/Db/Adapter/Abstract.php:479 [0x0000000012467c88] query() /home/flyfish/www/flyshop/lib/Zend/Db/Adapter/Pdo/Abstract.php:238 [0x00000000124678c8] query() /home/flyfish/www/flyshop/lib/Varien/Db/Adapter/Pdo/Mysql.php:389 [0x0000000012467660] query() /home/flyfish/www/flyshop/lib/Zend/Db/Adapter/Abstract.php:734 [0x0000000012467248] fetchAll() /home/flyfish/www/flyshop/lib/Varien/Data/Collection/Db.php:687 [0x00000000124668f0] _fetchAll() /home/flyfish/www/flyshop/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php:1045 [0x0000000012466288] _loadEntities() /home/flyfish/www/flyshop/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php:869 [0x0000000012465fb0] load() /home/flyfish/www/flyshop/app/code/core/Mage/Review/Model/Observer.php:78 [0x0000000012465d10] catalogBlockProductCollectionBeforeToHtml() /home/flyfish/www/flyshop/app/code/core/Mage/Core/Model/App.php:1303 [0x0000000012464c28] _callObserverMethod() /home/flyfish/www/flyshop/app/code/core/Mage/Core/Model/App.php:1278 [0x00000000124649e0] dispatchEvent() /home/flyfish/www/flyshop/app/Mage.php:416 [0x0000000012464290] dispatchEvent() /home/flyfish/www/flyshop/app/code/core/Mage/Catalog/Block/Product/List.php:163 [0x0000000012463760] _beforeToHtml() /home/flyfish/www/flyshop/var/ait_rewrite/6bfe16ca572eea47db567910902c6209.php:864 [0x00000000124633b0] toHtml() /home/flyfish/www/flyshop/var/ait_rewrite/6bfe16ca572eea47db567910902c6209.php:584 [0x0000000012462e30] _getChildHtml() /home/flyfish/www/flyshop/var/ait_rewrite/6bfe16ca572eea47db567910902c6209.php:528 [0x0000000012462d38] getChildHtml() /home/flyfish/www/flyshop/var/cache/extendware/ewcore/overrides/Mage/Catalog/Block/Category/View/6362e7526f5dcb27e7f8b0b414b59004.php:85 [0x00000000124629f0] getProductListHtml() /home/flyfish/www/flyshop/app/code/local/Extendware/EWLayeredNav/Block/Override/Mage/Catalog/Category/View.php:20 [01-Apr-2012 14:27:55] [pool magento] pid 21536 script_filename = /home/flyfish/www/flyshop/index.php [0x0000000011a35010] execute() /home/flyfish/www/flyshop/lib/Zend/Db/Statement/Pdo.php:228 [0x0000000011a34d80] _execute() /home/flyfish/www/flyshop/lib/Varien/Db/Statement/Pdo/Mysql.php:110 [0x0000000011a346f8] _execute() /home/flyfish/www/flyshop/lib/Zend/Db/Statement.php:300 [0x0000000011a34288] execute() /home/flyfish/www/flyshop/lib/Zend/Db/Adapter/Abstract.php:479 [0x0000000011a33ca0] query() /home/flyfish/www/flyshop/lib/Zend/Db/Adapter/Pdo/Abstract.php:238 [0x0000000011a338e0] query() /home/flyfish/www/flyshop/lib/Varien/Db/Adapter/Pdo/Mysql.php:389 [0x0000000011a33700] query() /home/flyfish/www/flyshop/lib/Zend/Db/Adapter/Abstract.php:825 [0x0000000011a33368] fetchOne() /home/flyfish/www/flyshop/app/code/core/Mage/Eav/Model/Resource/Entity/Type.php:71 [0x0000000011a33238] getAdditionalAttributeTable() /home/flyfish/www/flyshop/app/code/core/Mage/Eav/Model/Resource/Entity/Attribute.php:483 [0x0000000011a32be8] getAdditionalAttributeTable() /home/flyfish/www/flyshop/app/code/core/Mage/Eav/Model/Resource/Entity/Attribute.php:500 [0x0000000011a32860] _afterLoad() /home/flyfish/www/flyshop/app/code/core/Mage/Eav/Model/Resource/Entity/Attribute.php:108 [0x0000000011a32330] loadByCode() /home/flyfish/www/flyshop/app/code/core/Mage/Eav/Model/Entity/Attribute/Abstract.php:118 [0x0000000011a31350] loadByCode() /home/flyfish/www/flyshop/app/code/core/Mage/Eav/Model/Config.php:423 [0x0000000011a30ce8] getAttribute() /home/flyfish/www/flyshop/app/code/core/Mage/Catalog/Helper/Output.php:156 [0x0000000011a30208] categoryAttribute() /home/flyfish/www/flyshop/app/design/frontend/base/default/template/catalog/category/view.phtml:47 [0x0000000011a2fa60] +++ dump failed [01-Apr-2012 14:27:56] [pool magento] pid 21530 script_filename = /home/flyfish/www/flyshop/index.php [0x0000000011a35b10] updateParamDefaults() /home/flyfish/www/flyshop/var/ait_rewrite/78778b0d1ad4bf93e846365bd2fbf33f.php:276 [0x0000000011a35750] updateParamDefaults() /home/flyfish/www/flyshop/var/ait_rewrite/78778b0d1ad4bf93e846365bd2fbf33f.php:326 [0x0000000011a351f0] getSkinBaseUrl() /home/flyfish/www/flyshop/var/ait_rewrite/78778b0d1ad4bf93e846365bd2fbf33f.php:482 [0x0000000011a350a8] getSkinUrl() /home/flyfish/www/flyshop/var/ait_rewrite/6bfe16ca572eea47db567910902c6209.php:981 [0x0000000011a32468] getSkinUrl() /home/flyfish/www/flyshop/app/code/local/Extendware/EWMinify/Block/Override/Mage/Page/Html/Head.php:126 [0x0000000011a30ca8] getCssJsHtml() /home/flyfish/www/flyshop/app/code/local/Extendware/EWCore/Block/Override/Mage/Page/Html/Head.php:55 [0x0000000011a30978] getCssJsHtml() /home/flyfish/www/flyshop/app/code/local/MageWorx/SeoSuite/Block/Page/Html/Head.php:41 [0x0000000011a2fd10] getCssJsHtml() /home/flyfish/www/flyshop/app/design/frontend/moxy/default/template/rokmagemodules/rokmage-modalheader/rokmage-head.phtml:26 [0x0000000011a2f568] +++ dump failed [01-Apr-2012 14:28:28] [pool magento] pid 21527 script_filename = /home/flyfish/www/flyshop/index.php [0x0000000010c7bba0] execute() /home/flyfish/www/flyshop/lib/Zend/Db/Statement/Pdo.php:228 [0x0000000010c7b910] _execute() /home/flyfish/www/flyshop/lib/Varien/Db/Statement/Pdo/Mysql.php:110 [0x0000000010c7b288] _execute() /home/flyfish/www/flyshop/lib/Zend/Db/Statement.php:300 [0x0000000010c7ae18] execute() /home/flyfish/www/flyshop/lib/Zend/Db/Adapter/Abstract.php:479 [0x0000000010c7a830] query() /home/flyfish/www/flyshop/lib/Zend/Db/Adapter/Pdo/Abstract.php:238 [0x0000000010c7a470] query() /home/flyfish/www/flyshop/lib/Varien/Db/Adapter/Pdo/Mysql.php:389 [0x0000000010c7a168] query() /home/flyfish/www/flyshop/lib/Zend/Db/Adapter/Abstract.php:808 [0x0000000010c79558] fetchPairs() /home/flyfish/www/flyshop/app/code/core/Mage/Catalog/Model/Resource/Product/Collection.php:840 [0x0000000010c79240] addCountToCategories() /home/flyfish/www/flyshop/app/code/community/Mage/Catalog/Block/Navigation.php:133 [0x0000000010c71d48] getCurrentChildCategories() /home/flyfish/www/flyshop/app/design/frontend/base/default/template/rokmagemodules/rokmage-magemenus/rokmage-magemenu-left.phtml:139 [0x0000000010c715a0] +++ dump failed [01-Apr-2012 14:28:28] [pool magento] pid 21577 script_filename = /home/flyfish/www/flyshop/index.php [0x0000000011a3a8d8] execute() /home/flyfish/www/flyshop/lib/Zend/Db/Statement/Pdo.php:228 [0x0000000011a3a648] _execute() /home/flyfish/www/flyshop/lib/Varien/Db/Statement/Pdo/Mysql.php:110 [0x0000000011a39fc0] _execute() /home/flyfish/www/flyshop/lib/Zend/Db/Statement.php:300 [0x0000000011a39b50] execute() /home/flyfish/www/flyshop/lib/Zend/Db/Adapter/Abstract.php:479 [0x0000000011a39568] query() /home/flyfish/www/flyshop/lib/Zend/Db/Adapter/Pdo/Abstract.php:238 [0x0000000011a391a8] query() /home/flyfish/www/flyshop/lib/Varien/Db/Adapter/Pdo/Mysql.php:389 [0x0000000011a38f40] query() /home/flyfish/www/flyshop/lib/Zend/Db/Adapter/Abstract.php:734 [0x0000000011a37cc0] fetchAll() /home/flyfish/www/flyshop/app/code/core/Mage/Catalog/Model/Resource/Category/Flat.php:276 [0x0000000011a37b20] _loadNodes() /home/flyfish/www/flyshop/app/code/core/Mage/Catalog/Model/Resource/Category/Flat.php:1229 [0x0000000011a379a0] getChildrenCategories() /home/flyfish/www/flyshop/app/code/core/Mage/Catalog/Model/Category.php:841 [0x0000000011a37690] getChildrenCategories() /home/flyfish/www/flyshop/app/code/community/Mage/Catalog/Block/Navigation.php:130 [0x0000000011a30198] getCurrentChildCategories() /home/flyfish/www/flyshop/app/design/frontend/base/default/template/rokmagemodules/rokmage-magemenus/rokmage-magemenu-left.phtml:139 [0x0000000011a2f9f0] +++ dump failed [01-Apr-2012 14:28:48] [pool magento] pid 21629 script_filename = /home/flyfish/www/flyshop/index.php [0x00002ac987e2cb48] _loadPrices() /home/flyfish/www/flyshop/app/code/core/Mage/Catalog/Model/Resource/Product/Type/Configurable/Attribute/Collection.php:252 [0x00002ac987e2c660] _loadPrices() /home/flyfish/www/flyshop/app/code/core/Mage/Catalog/Model/Resource/Product/Type/Configurable/Attribute/Collection.php:132 [0x00002ac987e2bf20] _afterLoad() /home/flyfish/www/flyshop/lib/Varien/Data/Collection/Db.php:536 [0x00002ac987e2ba28] load() /home/flyfish/www/flyshop/app/code/core/Mage/Catalog/Model/Product/Type/Configurable.php:253 [0x00002ac987e2aee8] getConfigurableAttributes() /home/flyfish/www/flyshop/app/code/core/Mage/Catalog/Model/Product/Type/Configurable.php:330 [0x00002ac987e2ab10] getUsedProducts() /home/flyfish/www/flyshop/app/code/core/Mage/Catalog/Model/Product/Type/Configurable.php:458 [0x00002ac987e2a990] isSalable() /home/flyfish/www/flyshop/app/code/core/Mage/Catalog/Model/Product.php:1264 [0x00002ac987e2a618] isAvailable() /home/flyfish/www/flyshop/app/code/core/Mage/Catalog/Model/Product.php:1244 [0x00002ac987e2a528] isSalable() /home/flyfish/www/flyshop/app/code/core/Mage/Catalog/Model/Product.php:1308 [0x00002ac987e28f18] isSaleable() /home/flyfish/www/flyshop/app/design/frontend/moxy/default/template/rokmagemodules/rokmage-categoryview/rokmage-categoryview.phtml:122 [0x00002ac987e28770] +++ dump failed ___________________________________________ A snippet of the Latest php-fpm error log: [01-Apr-2012 14:26:12] WARNING: [pool magento] child 21537, script '/home/flyfish/www/flyshop/index.php' (request: "GET /flyshop/index.php") executing too slow (5.265105 sec), logging [01-Apr-2012 14:26:12] ERROR: failed to ptrace(PEEKDATA) pid 21537: Input/output error (5) [01-Apr-2012 14:26:44] WARNING: [pool magento] child 21531, script '/home/flyfish/www/flyshop/index.php' (request: "GET /flyshop/index.php") executing too slow (5.268434 sec), logging [01-Apr-2012 14:26:44] ERROR: failed to ptrace(PEEKDATA) pid 21531: Input/output error (5) [01-Apr-2012 14:27:01] WARNING: [pool magento] child 21528, script '/home/flyfish/www/flyshop/index.php' (request: "GET /flyshop/index.php") executing too slow (6.656633 sec), logging [01-Apr-2012 14:27:01] ERROR: failed to ptrace(PEEKDATA) pid 21528: Input/output error (5) [01-Apr-2012 14:27:04] WARNING: [pool magento] child 21529, script '/home/flyfish/www/flyshop/index.php' (request: "GET /flyshop/index.php") executing too slow (5.211136 sec), logging [01-Apr-2012 14:27:55] WARNING: [pool magento] child 21536, script '/home/flyfish/www/flyshop/index.php' (request: "GET /flyshop/index.php") executing too slow (5.207001 sec), logging [01-Apr-2012 14:27:55] ERROR: failed to ptrace(PEEKDATA) pid 21536: Input/output error (5) [01-Apr-2012 14:27:56] WARNING: [pool magento] child 21530, script '/home/flyfish/www/flyshop/index.php' (request: "GET /flyshop/index.php") executing too slow (5.503186 sec), logging [01-Apr-2012 14:27:56] ERROR: failed to ptrace(PEEKDATA) pid 21530: Input/output error (5) [01-Apr-2012 14:28:28] WARNING: [pool magento] child 21577, script '/home/flyfish/www/flyshop/index.php' (request: "GET /flyshop/index.php") executing too slow (5.722625 sec), logging [01-Apr-2012 14:28:28] WARNING: [pool magento] child 21527, script '/home/flyfish/www/flyshop/index.php' (request: "GET /flyshop/index.php") executing too slow (5.122326 sec), logging [01-Apr-2012 14:28:28] ERROR: failed to ptrace(PEEKDATA) pid 21527: Input/output error (5) [01-Apr-2012 14:28:28] ERROR: failed to ptrace(PEEKDATA) pid 21577: Input/output error (5) [01-Apr-2012 14:28:48] WARNING: [pool magento] child 21629, script '/home/flyfish/www/flyshop/index.php' (request: "GET /flyshop/index.php") executing too slow (5.446961 sec), logging [01-Apr-2012 14:28:48] ERROR: failed to ptrace(PEEKDATA) pid 21629: Input/output error (5) _____________________________________________ I also noticed that the server is not using much memory: Mem: 16777216k total, 1204040k used, 15573176k free My.conf settings: query_cache_size = 128M innodb_buffer_pool_size = 512M open-files-limit = 8192 table_cache=4096 I just noticed that someone changed my innodb_buffer_pool_size to 512M. Shouldn't this be set to 80% of available ram? So I have 16gb ram so it should be set at 12G; however, I set it at 10G. What do you think? I made that change and restart everything. Php-fpm is still spiking cpu. Here is just 1 php-fpm process: 23942 user 17 0 507m 99m 27m R 90.9%CPU 0.6 0:03.46 php-fpm I'm sure there may be more information you will need to help, so just let me know what you guys need to help me figure this out. Thank you.

    Read the article

  • YouTube API Security Error Flex

    - by 23tux
    Hi, I've tried to use the YoutTube API within a Flex project. But i got this error: *** Security Sandbox Violation *** SecurityDomain 'http://www.youtube.com/apiplayer?version=3' tried to access incompatible context 'file:///Users/YouTubePlayer/bin-debug/YouTubePlayer.html' Here are the two files: <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/halo" minWidth="1024" minHeight="768" xmlns:youtube="youtube.*" creationComplete="init();"> <fx:Script> <![CDATA[ [Bindable] private var ready:Boolean = true; private function init():void { Security.allowInsecureDomain("*"); Security.allowDomain("*"); Security.allowDomain('www.youtube.com'); Security.allowDomain('youtube.com'); Security.allowDomain('s.ytimg.com'); Security.allowDomain('i.ytimg.com'); } private function changing():void { /* trace("currentTime: " + player.getCurrentTime()); trace("startTime: " + player.startTime); trace("stopTime: " + player.stopTime); timeSlider.value = player.getCurrentTime() */ } private function startPlaying():void { player.play(); } private function checkStartSlider():void { if(startSlider.value > stopSlider.value) stopSlider.value = startSlider.value + 1; } private function checkStopSlider():void { if(stopSlider.value < startSlider.value) startSlider.value = stopSlider.value - 1; } ]]> </fx:Script> <s:VGroup> <youtube:Player id="player" videoID="DVFvcVuWyfE" change="changing();" ready="ready=true"/> <s:HGroup> <s:Button label="play" click="startPlaying();" /> </s:HGroup> <s:HGroup> <s:HSlider id="timeSlider" width="250" minimum="0" maximum="{player.stopTime}" snapInterval=".01" enabled="{ready}"/> <s:Label id="currentTimeLbl" text="current time: 0" /> </s:HGroup> <s:HGroup> <s:HSlider id="startSlider" width="250" minimum="0" maximum="{player.stopTime}" snapInterval=".01" change="checkStartSlider();" enabled="{ready}" value="0"/> <s:Label id="startTimeLbl" text="start time: {player.startTime}" /> </s:HGroup> <s:HGroup> <s:HSlider id="stopSlider" width="250" minimum="0" maximum="{player.stopTime}" snapInterval=".01" change="checkStopSlider();" enabled="{ready}" value="{player.stopTime}"/> <s:Label id="stopTimeLbl" text="stop time: {player.stopTime}" /> </s:HGroup> </s:VGroup> </s:Application> Here is the player package youtube { import flash.display.Loader; import flash.events.Event; import flash.events.TimerEvent; import flash.net.URLRequest; import flash.system.Security; import flash.utils.Timer; import mx.core.UIComponent; [Event(name="change", type="flash.events.Event")] [Event(name="ready", type="flash.events.Event")] public class Player extends UIComponent { private var player:Object; private var loader:Loader; private var _startTime:Number = 0; private var _stopTime:Number = 0; private var _videoID:String; private var metadataTimer:Timer = new Timer(200); private var playTimer:Timer = new Timer(200); public function Player() { // The player SWF file on www.youtube.com needs to communicate with your host // SWF file. Your code must call Security.allowDomain() to allow this // communication. Security.allowInsecureDomain("*"); Security.allowDomain("*"); // This will hold the API player instance once it is initialized. loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.INIT, onLoaderInit); loader.load(new URLRequest("http://www.youtube.com/apiplayer?version=3")); } private function onLoaderInit(event:Event):void { addChild(loader); loader.content.addEventListener("onReady", onPlayerReady); loader.content.addEventListener("onError", onPlayerError); loader.content.addEventListener("onStateChange", onPlayerStateChange); loader.content.addEventListener("onPlaybackQualityChange", onVideoPlaybackQualityChange); } private function onPlayerReady(event:Event):void { // Event.data contains the event parameter, which is the Player API ID trace("player ready:", Object(event).data); // Once this event has been dispatched by the player, we can use // cueVideoById, loadVideoById, cueVideoByUrl and loadVideoByUrl // to load a particular YouTube video. player = loader.content; // Set appropriate player dimensions for your application player.setSize(0, 0); } private function onPlayerError(event:Event):void { // Event.data contains the event parameter, which is the error code trace("player error:", Object(event).data); } private function onPlayerStateChange(event:Event):void { // Event.data contains the event parameter, which is the new player state trace("player state:", Object(event).data); } private function onVideoPlaybackQualityChange(event:Event):void { // Event.data contains the event parameter, which is the new video quality trace("video quality:", Object(event).data); } [Bindable] public function get videoID():String { return _videoID; } public function set videoID(value:String):void { _videoID = value; } [Bindable] public function get stopTime():Number { return _stopTime; } public function set stopTime(value:Number):void { _stopTime = value; } [Bindable] public function get startTime():Number { return _startTime; } public function set startTime(value:Number):void { _startTime = value; } public function play():void { if(_videoID!="") { player.loadVideoById(_videoID, 0); // add the event listener, so that all 200 milliseconds is an event dispatched metadataTimer.addEventListener(TimerEvent.TIMER, metadataTimeHandler); // if the timer is running, stop and reset it if(metadataTimer.running) metadataTimer.reset(); else metadataTimer.start(); } } private function metadataTimeHandler(e:TimerEvent):void { if(player.getDuration() > 0) { startTime = 0; stopTime = player.getDuration(); metadataTimer.reset(); metadataTimer.stop(); metadataTimer.removeEventListener(TimerEvent.TIMER, metadataTimeHandler); player.playVideo(); playTimer.addEventListener(TimerEvent.TIMER, playTimerHandler); dispatchEvent(new Event("ready")); } } private function playTimerHandler(e:TimerEvent):void { if(getCurrentTime() > _stopTime) { seekTo(startTime); } dispatchEvent(new Event(Event.CHANGE)); } public function getCurrentTime():Number { if(!player.getCurrentTime()) return 0; else return player.getCurrentTime(); } public function seekTo(time:uint):void { player.seekTo(time); } } } Hope someone can help. thx, tux

    Read the article

< Previous Page | 1 2 3 4 5  | Next Page >