Timer problem - best practices of iOS?

Hey there,

I use a global 'idle timer' and for some reason, once the application is started the first time that the timer event is started, it's going to launch dozens of times.

After the regular events 1.2 all becomes normal. Any idea or advice?

Using the AIR SDK 2.7

Best,

Cedric

Hello

I wrote of workaround for timer and setTimeOut:

https://github.com/jonasmonnier/Mobilo/tree/master/src/com/Mobilo/time

A Timer:

var id:int = Interval.create(method, delay, repeatCount);

A timeout:

var id:int = Timeout.create(method, delay, params);

Examples here:

https://github.com/jonasmonnier/Mobilo/tree/master/src/test

They are all based on my class Tick to use a unique ENTER_FRAME

Tags: Adobe AIR

Similar Questions

  • Airport Extreme, Time Capsule best practices configuration

    I searched for articles showing exactly what are the settings that I would see in my Airport Extreme Time Capsule. I put in place of the years before, but more recently WIFI was slow or choked several times a day. Our internet service provider recently upgraded its network, even though they claim that any slowdown is not their problem. I made sure the Time Machine backups do not cause them selfs. The Capsule is connected via CAT5 to the modem. All devices can connect wirelessly to the network.

    Base Station name is unique. Network is not hidden. Password is super strong. Wireless security is WPA/WPA2 Personal, just in case the older devices need to connect. In the window of the wireless Options, 5 GHz network name is disabled. 2.4 and 5 GHz channels is set to automatic. Router mode network is DHCP and NAT.

    I don't know if we're even using the 5 GHz mode. I want to make sure that we are optimizing on the installer. Any help is very appreciated.

    Wireless security is WPA/WPA2 Personal

    It's bad... AC is optimized to WPA2 and you will suffer significant slow down with WPA1. Even if your TC is former model Wireless N, that customers with AC wireless cards will not work as well.

    Use an AP gradually charge for older clients N or G... almost nothing today will be limited to the WPA1 unless it is very old and very slow.

    Name of the 5 GHz network is unchecked. 2.4 and 5 GHz channels is set to automatic. Router mode network is DHCP and NAT.

    The Apple 2.4 ghz speed limit... and always have.

    You will get the wrong speed on 2.4 ghz and is therefore the only way to improve the speed force customers to 5 GHz that can usefully use it.

    Check the 5 GHz range and give it a different name for the principal name wireless... It's the only way you can force clients to use the 5 GHz.

    How old and exactly which model is the TC? The base A1xxx please if you do not know.

    Age affects things. Routers wireless for some reason any servant of quality have a service life of about 3 years... the TC is actually worse than average... being more stressed to the load of the hard drive.

    I made sure the Time Machine backups do not cause them selfs.

    You actually turn off TM? Sometimes the TM always works, even when people think it's the start.

    more recently WIFI was slow or choked several times per day

    It's what I expected with TM still working on a computer.

  • Add 2nd HARD drive to Time Capsule - best practices?

    Hello

    I have an iMac running El Capitan at the end of 2012, supporting up to a 4th Gen 2 TB Time Capsule. The total size of my backup is 1.05 to. Incremental backups take the total space used on the TC to about 1.6 TB.

    Fear of the HARD drive TC will: phut that I, as a "belt and Suspenders" approach, yesterday signed a 2 TB Western Digital Elements HARD drive for the TC and other introduced Time Machine backups. He is currently conducting his first backup to the new HARD drive to the Mac OS extended (journaled) format.

    The iMac and the TC are connected via 200AV Homeplugs.

    I have two questions if you don't mind...

    Should I have copied the existing backups from the drive HARD internal TC for the new drive external HARD first, so that two backups are ongoing for the same item, with the same 'history', as they save in alternation? What is wise or even possible? As is stands, the new hard drive back up the iMac from scratch so if the TC HDD died, I'd lose all historical backups (they date back to March 2015), with just a very recent version on the new HARD drive.

    The progress of the backup on the new disk, while that connected to the TC, is slow. After that 11 hours I'm only 16 GB to 1.05 TB - it has not yet calculated the time remaining yet :-) I assumed connecting via Homeplug iMac would be more robust than the Wi - Fi for such a transfer of data. I appreciate there are several factors at play here - the size of the files, the indexing of the backup, the speed of the Homeplugs, age / my wiring standard, etc. etc.

    I would have been better connecting this direct drive new external DRIVE in the iMac, the first backup, then connect it to the TC to continue it's incremental backups replacing? Yet once, is it still possible?

    Thank you very much for any help. After spending only to Mac a few years back I love TM - I have never found a Windows backup system that has worked for me the way of TM.

    See you soon.

    Should I have copied the existing backups from the drive HARD internal TC for the new drive external HARD first, so that two backups are continue from the same point with the same "historical."

    IMHO you do it the correct way back up again.

    The story is not so important after a few weeks and months... If the computer was stolen for example... what you want to do is to restore the computer as is... and what you were doing last year is really little relevant... Even if the TC Gen4 goes wrong, the story is never likely to be lost by the TC Gen4... it just needs the disc removed to put in the work. But it's the current image of the computer which is always the most important.

    We found copy of the enormously successful backups. Although in this case it would have been possible to do an archive... always if you asked the question of what you need to do... Myself and several others here always recommend a new clean as backup being the most reliable method.

    I would have been better connecting this direct drive new external DRIVE in the iMac, the first backup, then connect it to the TC to continue it's incremental backups replacing? Yet once, is it still possible?

    This is a good question... EOP adapters can be very slow. Slower than wireless AV200 are a pretty old standard and the actual speed could be all about 30Mbps down... It might surprise you... and indeed there have been measured before.

    The problem is that Time Machine backs up differently on the local network FC drives... When you plug the USB key into the TC then it's a network drive and the backup will not be recognized.

    Pondini wrote a method to get around this.

    Here see Q18.

    http://pondini.org/TM/FAQ.html

    I have not tried... Bob Timmons that's regular shows here has and discovered that it was not reliable. In my view, that a backup is too important to fiddling so.

    However, leaving the USB drive plugged into the Mac and keep the local backup of very good sense. It is much faster and more reliable than the backups over the network.

    If you really want to have the backup on the WD drive plugged into the TC, then I recommend do you via ethernet... Remove the TC of the network if it is too far for a patch lead... you can save the current configuration (export from the main menu of airport utility), then plug it into the computer directly with a short patch lead... and the USB in the TC, the backup will be much more quick... less than one full day (24 hours) for 1 TB if all goes well. Once completed you can then put the TC via the USB back in the network location.

  • Fusion 2 & Time Machine - best practices

    With regard to the use of Time Machine backup virtual machines: my best reading of the various positions is "it works but don't do it."

    (1) unusual can happen to the virtual machine. SCARY

    (2) the backup drive will be consumed quickly. I always check this by looking at the rate at which free space is consumed. A tech rep Apple is said to be "file deltas" are stored - i.e. If the file then change only the changed items are written on the next backup, not the entire file. From there, I concluded that Time Machine is looking at allowance individual disk (blocks) units. This seems to be just what is called for with a file of the machine virtual multi GB. Hmm... not sure that I am continuously on the ground here.

    In any case, can someone provide the consensus of the bottom line - I should exclude the virtual machines from Time Machine backups or not?

    Best regards

    Robert

    RobertVaessen wrote:

    A tech rep Apple is said to be "file deltas" are stored - i.e. If the file then change only the changed items are written on the next backup, not the entire file.

    Either Apple technology does not know what he was talking about or you misunderstood or both.

    From there, I concluded that Time Machine is looking at allowance individual disk (blocks) units.

    This isn't how Time Machine works.  After the initial backup, which is a backup full, he then made incremental backups at the level of the file system not at the level of the block, and as such, there is more of that potential do not have all of the files that make up the full package of Virtual Machine backed up in its entirety.

    In any case, can someone provide the consensus of the bottom line - I should exclude the virtual machines from Time Machine backups or not?

    While Time Machine can back up and restore a virtual machine with success there are a number of conditions that can cause this to fail and without warning, and therefore it is not considered reliable for backup of Virtual Machines under normal conditions.

    AFAIC backup is valid of a Virtual Machine is when it is done with the Virtual Machine to stop, not suspended and closed merger and the entire Virtual Machine is copied to another location in which one has a little bit duplicate of the complete set of the VM total at this point in time, and nothing less.

  • What best practices to remove a host server data store without emptying the contents of the data store

    Hi all

    This question was probably asked a million times. the best practice to remove a host server data store without emptying the contents of the data store?

    I have two clusters and I moved host group A to group B. host A is now to see data from Cluster Both A store and Group B datastore. We want that host A to store data in Cluster B. The Cluster a data store is not and can not be empty coz VM A Cluster using data warehouses. So I just unpreset the data LUN to host A store and Reanalyze the data store? Or there is a better way to do it?

    Thank you all

    Yes that's what I meant - should have specified where virtual machines are running.

  • Material LV real-time Ethernet com best practices

    Hello

    I just started to learn the LV in real-time, and until I get a new cRIO I just played with a former PSC-2220.

    Everything works, I am reading the tutorals nice about RT and deployment/running example to this target applications.

    However, I don't know what is the best practice, the IP address of this device handling. For easy installation, after a device reset (and install the new RT runtimes, etc) I put just the HW to obtain the dynamic IP address of my router (DHCP). My laptop connects to the same router via wifi.

    However, since after a few resets the target Gets a new IP (192.168.0.102, previous IP was... (104), I have to manually change the IP address in my project. Is it possible that the LV auto detects the target in my project? In addition, it seems that MAX retains the old information and creates a new line for the same target... so I guess that if the problem persists, MAX is going to fill? See screenshots below.

    As a solution, I'll try to use static IP for the target, so it must always use the same IP address.

    What is the common procedure to avoid this kind of problems? Just using static IP? Or miss me him too something else here?

    Thank you!

    I just always use static IP addresses.  It avoids just all kinds of questions, especially if you have several systems on the same network.

  • I have the time to default iPhone 4 iOS 7.1.2 iPhone App not updated since the last 3 days and also checked all the settings for location and also set as new iPhone always present problem... Please try to fix... Thanx

    I have the time to default iPhone 4 iOS 7.1.2 iPhone App not updated since the last 3 days and also checked all the settings for location and also set as new iPhone always present problem... Please try to fix... Thanx

    Turn off your device and turn it on again. If this does not help, sign out of your account and reconnect.

    In addition, you can try to reset your settings.

    • Press and hold the sleep/wake button
    • Press and hold the Home button
    • Press and hold both buttons until the display turns off and on again with the Apple logo on the subject.

    Alternatively, you can go to settings - general - reset - Reset all settings

  • My IPhone 6s did the update of battery charge you change the time manually or time zone. I wonder if the problem is in the IOS or mobile phone? I say that because I changed my IPhone in a Bar in engineering (Brazil) 6, precisely because of this problem an

    My IPhone 6s did the update of battery charge you change the time manually or time zone. I wonder if the problem is in the IOS or mobile phone? I say this because I have changed my 6 IPhone in a Bar of genius (Brazil), precisely because of this problem, and the new cell has exactly the same problem

    This is a known, problem if the time is not set correctly.

    us-not-displaying-accurate-battery-data http://AppleInsider.com/articles/16/01/16/Apple-promises-Fix-for-iPhone-6S-6S-pl

  • What are the best practices for creating only time data types, and not the Date

    Hi gurus,

    We use 12 c DB and we have a requirement to create the column with datatype of time only, if someone please describe what are the best practices for the creation of this.

    I would strongly appreciate ideas and suggestions.

    Kind regards
    Ranjan

    Hello

    How do you intend to use the time?

    If you are going to combine with DATEs or timestamps from a other source, then an INTERVAL DAY TO SECOND or NUMBER may be better.

    Will you need to perform arithmetic operations on time, for example, increase the time to 20%, or take an average?   If so, the NUMBER would be preferable.

    You are just going to display it?  In this case, DAY INTERVAL in SECONDS, DATE or VARCHAR2 would work.

    As Blushadow said, it depends.

  • Best practices to develop and test AIR iOS multitouch applications

    I plan to change our practice of XCode/Objective C iPhone development in the AIR to take advantage of a larger pool of talent in the House. The biggest concern I have right now tests the functionality multitouch - the prospect of having to make the incremental generation, the sizing and deployment just to test and refine aspects multitouch of our projects is daunting, if not downright depressing.

    What tools / services or techniques have been developed to facilitate what is without a doubt one of the most frequent problems developing for multitouch iOS using a development based on Office AIR environment?

    @tomaugerdotcom

    Something like this might help: https://testflightapp.com/

    Concevably, you could roll your own service internal if what an individual does not suit you. (I have no knowledge about how they do it, but should not be difficult to understand since the rules binding Apple would only a few possibilities).

    USB app install and debugging is not supported on iOS. You must use wireless.

    Another option specifically for multi-touch dev/test, is to use an Android device.

  • Measurement on the side time server? Best practices for the turn-based game

    Hello

    What would be the best practice for measuring time in a turn based game?

    I was looking at the timeout of the room, but to use that it would mean that, for each round, I put users in a new room?

    Is there a way where I can measure time serverside and keep users in the same room?

    If so, I could use php, otherwise, we would need java that allows to measure a time race.

    See you soon,.

    G

    Hello

    You can definitely use PHP or Java - we provide integration of server

    libraries for either. I don't know exactly what is the use case, so I can't

    comment on what makes the most sense, but if it is not information which must be

    totally secure, grading on the client can be a viable approach also.

    Nigel

  • Best practices for the universal iOS app? SWF or SWC?

    Hello

    I'm trying to draw a box for my property which helps keep memory low load at run time for an application universal iOS and ran across the following article about the swc files.

    http://www.flashrealtime.com/compiling-big-air-SWF-to-iOS/

    However, it is not clear how this method would be beneficial from a point of view of memory. The files don't always loaded in execution?

    Or should I look at the swf files with code deleted and marked from the main swf in the ipa? (sounds like more work!)

    Please help educate a noob!

    Thank you!

    Some files may get loaded during execution even if you use swcs (video, xml, etc.), but the content that has traditionally been loaded as a swf should be compiled in your main swf.  This is not because it is more efficient, it's just to get around restrictive TOS of Apple memory.  So rather than load a module.swf in your application, you instantiate class of the module.swf document the same way you instancierait any other class, and instead of unloading it when you want to free the memory that you need on a null all references to that object (and all the objects that it created) cannot be reclaimed by garbage collection.

  • encoding issue "best practices."

    I'm about to add several command objects to my plan, and the source code will increase accordingly. I would be interested in advice on good ways to break the code into multiple files.

    I thought I had a source file (and a header file) for each command object. Does this cause problems when editing and saving the file .uir? When I run the Code-> target... file command, it seems that it changes the file target for all objects, not only that I am currently working on.

    At least, I would like to have all my routines of recall in one file other than the file that contains the main(). Is it a good/bad idea / is not serious? Is there something special I need to know this?

    I guess what I'm asking, what, how much freedom should I when it comes to code in locations other than what the editor of .uir seems to impose? Before I go down, I want to assure you that I'm not going to open a can of worms here.

    Thank you.

    I'm not so comfortable coming to "best practices", maybe because I am partially a self-taught programmer.

    Nevertheless, some concepts are clear to me: you are not limited in any way in how divide you your code in separate files. Personally, I have the habit of grouping panels that are used for a consistent set of functions (e.g. all the panels for layout tests, all the panels for execution of / follow-up... testing) in a single file UIR and related reminders in a single source file, but is not a rigid rule.

    I have a few common callback functions that are in a separate source file, some of them very commonly used in all of my programs are included in my own instrument driver and installed controls in code or in the editor of the IUR.

    When you use the IUR Editor, you can use the Code > target file Set... feature in menu to set the source file where generated code will go. This option can be changed at any time while developing, so ideally, you could place a button on a Panel, set a routine reminder for him, set the target file and then generate the code for this control only (Ctrl + G or Code > Generate > menu control reminders function). Until you change the target file, all code generated will go to the original target file, but you can move it to another source after that time.

  • Best practices for the application of page multi Landscape/Portrait

    Hello
    I am looking for information on track to develop auto guide demand in pure actionscript with new components of qnx.fuse, but there is not a good example in real code. Every time I tried to make it resizable layout to get deformated fluid only components in portrait or landscape mode.

    I have a simple application with the point main and 3 displays:

    public class Main extends NavigatorSprite
    {
        public function Main()
        {
            addEventListener(Event.ADDED_TO_STAGE, init); 
    
            stage.nativeWindow.visible = true;
            stage.scaleMode = StageScaleMode.NO_SCALE;
            stage.align = StageAlign.TOP_LEFT;
            stage.nativeWindow.activate();
        }
        private function init(e:Event):void
        {
            removeEventListener(Event.ADDED_TO_STAGE, init);
            navigator.pushView(View1);
        }
    }
    
    public class View1 extends ViewSprite
    {
    
        private var container:Container;
        private var button_two:LabelButton;
        private var button_three:LabelButton;
    
        public function View1
        {
            addEventListener(Event.ADDED_TO_STAGE, init);
        }
    
        private function init(e:Event):void
        {
            removeEventListener(Event.ADDED_TO_STAGE, init);
    
            container = new Container();
            var layout:RowLayout = new RowLayout();
            container.layout = layout;
    
            button_two = new LabelButton();
            button_two.label = "to page 2";
            button_two.width = 150;
            button_two.height = 45;
            button_two.addEventListener(MouseEvent.CLICK, handleTwoClicked);
            container.addChild(button_two);
    
            button_three = new LabelButton();
            button_three.label = "to page 3";
            button_three.width = 150;
            button_three.height = 45;
            button_three.addEventListener(MouseEvent.CLICK, handleThreeClicked);
            container.addChild(button_three);
    
            addChild(container);
        } 
    
        private function handleTwoClicked(e:Event):void
        {
            navigator.pushView(View2);
        }
    
        private function handleThreeClicked(e:Event):void
        {
            navigator.pushView(View3);
        }
    }
    
    public class View2 extends ViewSprite
    {
    
        private var container:Container;
        private var back:BackButton;
    
        public function View2
        {
            addEventListener(Event.ADDED_TO_STAGE, init);
        }
    
        private function init(e:Event):void
        {
            removeEventListener(Event.ADDED_TO_STAGE, init);
    
            container = new Container();
            var layout:RowLayout = new RowLayout();
            container.layout = layout;
    
            back = new BackButton();
            back.label = "Back";
            back.width = 100;
            back.height = 45;
            back.addEventListener(MouseEvent.CLICK, goBack);
            container.addChild(back);
    
            addChild(container);
        } 
    
        private function goBack(e:Event):void
        {
            navigator.popView();
        }
    }
    
    public class View3 extends ViewSprite
    {
    
        private var container:Container;
        private var back:BackButton;
    
        public function View3
        {
            addEventListener(Event.ADDED_TO_STAGE, init);
        }
    
        private function init(e:Event):void
        {
            removeEventListener(Event.ADDED_TO_STAGE, init);
    
            container = new Container();
            var layout:RowLayout = new RowLayout();
            container.layout = layout;
    
            back = new BackButton();
            back.label = "Back";
            back.width = 100;
            back.height = 45;
            back.addEventListener(MouseEvent.CLICK, goBack);
            container.addChild(back);
    
            addChild(container);
        } 
    
        private function goBack(e:Event):void
        {
            navigator.popView();
        }
    }
    

    Is there for example some best practices how to modify this code to have pages and components with the same sizes in portrait and landscape? On presentation buttons size always 150 width and height 45 and wil containers have stageWidth and stageHeight.

    Thank you if someone could help with this problem

    Hello

    Try listening to a shift in focus screen with this code:

    stage.addEventListener(Event.RESIZE, onResizeHandler, false, 0, true);
    

    You can only change the width/height of your components to the event based on the width/height of the floor.

    I will guard against specifying specific sizes, if you want your code to work on devices BB10. I recommend using %'s.

    Kind regards

    Dustin

  • Best practices for color use in Adobe CC?

    Hi all

    Is there an article that describes the best practices for use of color in Adobe CC?

    I produce a mixture of viewing online (PDF, for the most part) and real world print projects - often with the obligation for both. I recently updated my PANTONE + bridge books for the first time in ages and I am suddenly confused by the use of Lab colors in the Adobe Suite (Illustrator and InDesign).

    Everything I found online, looks like Lab color mode preferred to use because it is device independent. And perceptual (on screen), it looks much closer to the color, it is trying to represent. But when I mark a Spot color Illustrator rectangle using laboratory coordinates, to the sides of a rectangle using PANTONE + bridge CP and then export it to PDF, the version of CP to mix CMYK color corresponds exactly to my Pantone book - while the version of laboratory (after converted to CMYK using the ink Manager) is far away.

    I have this fantasy to manage only a single Illustrator or InDesign file for both worlds (PDF) printed and online. Is not possible in practice?

    Any info describing the basic definitions of the color modes - or even a book tracing more than use them in the real world - would be much appreciated!

    Thank you

    Bob

    Here are a few best practices you can already do.

    1 make sure that your color settings are synchronized on all applications.

    2. use a CMYK profile appropriate for your print output. Lab spot colors convert to CMYK values based on the CMYK icc profile.

    3. include icc profiles when save or export pdf files

    In theory, your imagination is possible today. It requires color management and the use of icc profiles. You can place RGB images in InDesign and use Pantone colors in your objects. The problem lies in the printers. If a printer uses a RIP with built in Pantone library, the colors will match when printing. Unfortunately, this kind of CUT is more expensive and not enough printers use them. Most of them is always manually approximate CMYK values composition given Pantone colors.

Maybe you are looking for

  • problems connecting to an external monitor with extended workspace

    I have a MacBook Pro (retina, 13 inches, early 2015) with OS X El Capitan. I can not connect an external monitor as extended workspace (mirror works). Any help and suggestions please.

  • Thunderbird 31.3.0 crashes at launch in Yosemite 10.10.1... wtf?

    I tried it in safe mode of TB, in OSX safe mode, I tried to roll back the version. Crash IDs: BP-f21226f7-826e-4a53-ae18-b49e42141219BP-aa4cb1c5-b1bd-4FF5-B280-823882141219BP-09a376b2-6db7-43A7-9512-909852141219BP-0986cf93-DB02-4B07-8670-b1ce62141219

  • I can create a new folder, but it does not appear under my "Inbox".

    I made sure that under 'View', my ball is then to display files "All". I do see the new folder as a subfolder of my Inbox, but it does not appear. I try to do it again, and he says that there are already? I can't understand what is wrong! Jackie

  • Need a fan cooling for Satellite A50 542

    HelloI have a SA50-542 and the cooling fan has packed in.No indication as to where I might be able to get a new one? Many thanks dan

  • 630 HP: Windows Update

    Dear Sir.I use hp 630 laptop with windows 7. the configuration of my laptop - intel i3 - 2310 m, 2 GB ram, intel hd 3000 graphics. Yes sir indicate please can I put windows 7 to windows 10. What caught 10 windows support my pc... Please Sir give me s