{"size": 2470, "ext": "js", "max_stars_repo_path": "LMall/shopCart/Source/testPatch.js", "max_stars_repo_name": "liuxiaobaibaibai/LMall", "max_stars_repo_stars_event_min_datetime": "2016-04-14T08:55:18.000Z", "max_stars_repo_stars_event_max_datetime": "2016-04-14T08:55:18.000Z", "max_issues_repo_path": "LMall/shopCart/Source/testPatch.js", "max_issues_repo_name": "liuxiaobaibaibai/LMall", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "LMall/shopCart/Source/testPatch.js", "max_forks_repo_name": "liuxiaobaibaibai/LMall", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 38.0, "max_line_length": 187, "alphanum_fraction": 0.6570850202}

require('lwPersonalVC,UITableView,NSArray,NSIndexPath,UINavigationController')

defineClass("lwPersonalVC", {
    collectionView_didSelectItemAtIndexPath: function(collectionView, indexPath) {
        var cell = (lwPeronalCell * ) collectionView.cellForItemAtIndexPath(indexPath);
        if (cell.titleLabel().text().isEqualToString("我的钱包")) {
            var wallet = lwWalletVC.alloc().init();
            wallet.setTitle("我的钱包");
            wallet.setHidesBottomBarWhenPushed(YES);
            self.navigationController().pushViewController_animated(wallet, YES);
        }
    },
})

defineClass('lwResultVC : UIViewController',{
   viewDidLoad: function() {
        self.ORIGviewDidLoad();
            genView()
   },
   genView: function() {
        var ciew = UIView.alloc().init();
        ciew.setFrame(CGRectMake(0, 0, lW, lH));
        ciew.setBackgroundColor(UIColor.redColor());
        self.view().addSubview(ciew);
   },
})

/** tableviewController*/
defineClass('JPTableViewController : UITableViewController <UIAlertViewDelegate>', {
    dataSource: function() {
        var data = self.getProp('data')
        if (data) return data;
        var data = [];
        for (var i = 0; i < 20; i ++) {
            data.push("cell from js " + i);
    }
    self.setProp_forKey(data, 'data')
        return data;
    },
    numberOfSectionsInTableView: function(tableView) {
        return 1;
    },
    tableView_numberOfRowsInSection: function(tableView, section) {
        return self.dataSource().count();
    },
    tableView_cellForRowAtIndexPath: function(tableView, indexPath) {
        var cell = tableView.dequeueReusableCellWithIdentifier("cell")
        if (!cell) {
            cell = require('UITableViewCell').alloc().initWithStyle_reuseIdentifier(0, "cell")
        }
        cell.textLabel().setText(self.dataSource().objectAtIndex(indexPath.row()))
        return cell
    },
    tableView_heightForRowAtIndexPath: function(tableView, indexPath) {
        return 50
    },
    tableView_didSelectRowAtIndexPath: function(tableView, indexPath) {
        // self.navigationController().popToRootViewControllerAnimated(YES)
        tableView.deselectRowAtIndexPath_animated(indexPath, YES);
        require('UIAlertView');
        var alert = UIAlertView.alloc().initWithTitle_message_delegate_cancelButtonTitle_otherButtonTitles("提示", self.dataSource().objectAtIndex(indexPath.row()), self, "确定", "取消", null);
        alert.show();
    },
})