<commit_before>//
//  main.swift
//  SwiftlyFunc
//
//  Created by <NAME> on 10/28/15.
//  Copyright © 2015 <NAME>. All rights reserved.
//

import UIKit


func main(application:UIApplication, userView:UIView, launchReasons:[NSObject:AnyObject]?)->(UIApplication,UIView,[NSObject:AnyObject]?,Bool){
    
    //Example: creating handlers for application events
    addApplicationEventHandler(application, theEventType: AppEventType.appDidBecomeActive){
        
        print("in became active")
    }
    
    //Example: creating handlers for touch events
    let aButton = getViewByUniqueID(userView, anID: "theButton") as! UIButton
    
    addTouchEventHandler(aButton, touchEventType:UIControlEvents.TouchDown){(theEvent:UIEvent) -> Void in
        print("\(aButton.uniqueID!) using the down handler at \(theEvent.allTouches()!.first!.locationInView(aButton))")
    }
    addTouchEventHandler(aButton, touchEventType:UIControlEvents.TouchUpInside){(theEvent:UIEvent) -> Void in
        
        print("\(aButton.uniqueID!) using the end inside handler at \(theEvent.allTouches()!.first!.locationInView(aButton))")

    }
    
    addTouchEventHandler(aButton, touchEventType:UIControlEvents.TouchUpOutside){(theEvent:UIEvent) -> Void in
        
        print("\(aButton.uniqueID!) using the end outside handler at \(theEvent.allTouches()!.first!.locationInView(userView))")

    }
    
    //Example: creating handlers for gesture events
    
    let theImage = getViewByUniqueID(userView, anID: "chalkImage")
    
    if let theRecognizer = getGestureRecognizerByUniqueID(theImage!, anID: "imageTap"){
        addTouchEventHandler(theRecognizer){
            print("\(theRecognizer.uniqueID!) activated")
        }
    }
   
    return (application,userView,launchReasons,true)
}<commit_msg>made the console messages more descriptive.<commit_after>//
//  main.swift
//  SwiftlyFunc
//
//  Created by <NAME> on 10/28/15.
//  Copyright © 2015 <NAME>. All rights reserved.
//

import UIKit


func main(application:UIApplication, userView:UIView, launchReasons:[NSObject:AnyObject]?)->(UIApplication,UIView,[NSObject:AnyObject]?,Bool){
    
    //Example: creating handlers for application events
    addApplicationEventHandler(application, theEventType: AppEventType.appDidBecomeActive){
        
        print("in became active")
    }
    
    //Example: creating handlers for touch events
    let aButton = getViewByUniqueID(userView, anID: "theButton") as! UIButton
    
    addTouchEventHandler(aButton, touchEventType:UIControlEvents.TouchDown){(theEvent:UIEvent) -> Void in
        print("\(aButton.uniqueID!) using the down handler at \(theEvent.allTouches()!.first!.locationInView(aButton))")
    }
    addTouchEventHandler(aButton, touchEventType:UIControlEvents.TouchUpInside){(theEvent:UIEvent) -> Void in
        
        print("\(aButton.uniqueID!) using the end inside handler at \(theEvent.allTouches()!.first!.locationInView(aButton))")

    }
    
    addTouchEventHandler(aButton, touchEventType:UIControlEvents.TouchUpOutside){(theEvent:UIEvent) -> Void in
        
        print("\(aButton.uniqueID!) using the end outside handler at \(theEvent.allTouches()!.first!.locationInView(userView))")

    }
    
    //Example: creating handlers for gesture events
    
    let theImage = getViewByUniqueID(userView, anID: "chalkImage")
    
    if let theRecognizer = getGestureRecognizerByUniqueID(theImage!, anID: "imageTap"){
        addTouchEventHandler(theRecognizer){
            print("\(theRecognizer.uniqueID!) activated at \(theRecognizer.locationInView(theImage))")
        }
    }
   
    return (application,userView,launchReasons,true)
}
{'fraction_non_alphanumeric': 0.11856091578086672, 'fraction_numerical': 0.005451076587626056, 'mean_word_length': 3.8353096179183135, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4803601', 'n_tokens_mistral': 1142, 'n_tokens_neox': 1073, 'n_words': 213}