Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

IOS - Event focus is not fired on IOS

$
0
0

Hi everyone,

I'm developing an app for Android and IOS devices, the app runs on android devices but on IOS devices I have a strange behavior, the event focus is not properly fired. I have already saw the titanium documentation and depending on it the event focus runs also on IOS devices

below some information about my developing environment Titanium SDK 3.3.0 GA OS : OS X 10.8.5

Code :

var focusWin =  function()
    {
 
        //btnClub.removeEventListener('click',showAutoClub);
        lblHelp.removeEventListener('click',showTutorial);
        win.removeEventListener('app:vehicleWindow.open',openVehicleWindow);
        Barcode.removeEventListener('success', scan_success);
        Barcode.removeEventListener('cancel', scan_cancel);
        btnMyScann.removeEventListener('click', btnMyScann_click);
        btnScann.removeEventListener('click', btnScann_click);
        btnSettings.removeEventListener('click', btnSettings_click);
        switch (parseInt(as.userLevel))
        {
            case 1:
                // ML
                btnGeo.removeEventListener('click', btnGeo_click);
            break;
            case 5:
            case 6:
            case 10:
            case 15:
                // TO DO
            break;
            case 4:
                // ML
                btnGestLotti.removeEventListener('click', btnGestLotti_click);
            break;
        }
        switch (parseInt(as.userLevel))
        {
            case 4:
            case 5:
            case 6:
            case 10:
            case 15:    
                // ML
                btnVetrina.removeEventListener('click', btnInVetrina_click);
            break;
            default:
                // ML
                btnClub.removeEventListener('click', showAutoClub);
            break;
        }
 
        //btnClub.addEventListener('click',showAutoClub);
        lblHelp.addEventListener('click',showTutorial);
        win.addEventListener('app:vehicleWindow.open',openVehicleWindow);
        Barcode.addEventListener('success', scan_success);
        Barcode.addEventListener('cancel', scan_cancel);
        btnMyScann.addEventListener('click', btnMyScann_click);
        btnScann.addEventListener('click', btnScann_click);
        btnSettings.addEventListener('click', btnSettings_click);
        switch (parseInt(as.userLevel))
        {
            case 1:
                // ML
                btnGeo.addEventListener('click', btnGeo_click);
            break;
            case 5:
            case 6:
            case 10:
            case 15:
                // TO DO
            break;
            case 4:
                // ML
                btnGestLotti.addEventListener('click', btnGestLotti_click);
            break;
        }
        switch (parseInt(as.userLevel))
        {
            case 4:
            case 5:
            case 6:
            case 10:
            case 15:    
                // ML
                btnVetrina.addEventListener('click', btnInVetrina_click);
            break;
            default:
                // ML
                btnClub.addEventListener('click', showAutoClub);
            break;
        }
    };
    win.addEventListener('focus',focusWin);
is there a work around in order to solve this issue?

Look forward your reply Regards Andrea


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>