1. *** New version of B4J is available ***
    B4J v7.8
    Dismiss Notice

Android Question Help with Code from js to b4a

Discussion in 'Android Questions' started by walmo, May 6, 2019.

  1. walmo

    walmo Member Licensed User

    Please can someone help with this code.
    I need to exute in b4a.
    Thanks

    Code:
    /
    **
     * @module wifi basic
     * @class wifi basic
     */
    define([ 
    'jquery', 'knockout', 'config/config', 'service', 'underscore' ],

        function ($, ko, config, 
    service, _) {

            var securityModes = _.map(config.AUTH_MODES, function (item) {
                
    return new Option(item.name, item.value);
            
    });

            var wep_modes = _.map(config.WEP_MODES, function (item) {
                return new Option(item.name, item.value);
            });
           
            var waittimeOption = _.map(config.WAITTIMES, function(item) {
                   return new Option(item.name, item.value);
            });

            function maxStationOption(max) {
                var options = [];
                for (var i = 1; i <= max; i++) {
                    options.push(new Option(i, i));
                }
                return options;
            }
           
           /* function waittimeOption() {
                var options = [];
                options.push(new Option(5, 5));
                options.push(new Option(10, 10));
                var lan = service.getLanguage();
                //showAlert(lan.Language);
                if(lan.Language=='en'){
                    options.push(new Option("no never", -1));
                }else{
                    options.push(new Option("永不", -1));
                }
                return options;
            }*/

            /**
             * wifi basic view model
             * @class WifiBasicVM
             */
    Thanks
     
  2. Computersmith64

    Computersmith64 Well-Known Member Licensed User

    What are you trying to do with this code?

    - Colin.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice