<commit_before>//
// Autogenerated by gaxb at 05:04:35 PM on 02/19/15
//

import UIKit

public class GestureRecognizer: GestureRecognizerBase {
	
	public var recognizer:UIGestureRecognizer?
	private lazy var helper = GestureRecognizerHelper()
	
	public override func gaxbPrepare() {
		super.gaxbPrepare()
		
		if let recognizer = recognizer {
			
			if cancelsTouchesInView != nil {
				recognizer.cancelsTouchesInView = cancelsTouchesInView!
			}
			if delaysTouchesBegan != nil {
				recognizer.delaysTouchesBegan = delaysTouchesBegan!
			}
			if delaysTouchesEnded != nil {
				recognizer.delaysTouchesEnded = delaysTouchesEnded!
			}
			
			if onStateChange != nil {
				helper.delegate = self;
				recognizer.addTarget(helper, action: Selector("recognizerStateDidChange:"))
			}
		}
	}
	
	public override func gaxbDidPrepare() {
		super.gaxbDidPrepare()
		
		//TODO: clean up this pyramid once swift 1.2 is out
		if let recognizer = recognizer {
			if let view = view {
				
				let viewObj:AnyObject? = (scope() as? Object)?.objectForId(view)
				if let referencedView = viewObj as? View {
					referencedView.view.addGestureRecognizer(recognizer)
				}
			}
		}
	}
	
	func recognizerStateDidChange(recognizer:UIGestureRecognizer) {
		if onStateChange != nil {
			let (scopeObject: AnyObject?, name) = self.parseNotification(onStateChange)
			if name != nil {
				NSNotificationCenter.defaultCenter().postNotificationName(name!, object: scopeObject)
			}
		}
	}
}

class GestureRecognizerHelper: NSObject {
	weak var delegate: GestureRecognizer?<commit_msg>doing a little swift 1.2 cleanup<commit_after>//
// Autogenerated by gaxb at 05:04:35 PM on 02/19/15
//

import UIKit

public class GestureRecognizer: GestureRecognizerBase {
	
	public var recognizer:UIGestureRecognizer?
	private lazy var helper = GestureRecognizerHelper()
	
	public override func gaxbPrepare() {
		super.gaxbPrepare()
		
		if let recognizer = recognizer {
			
			if cancelsTouchesInView != nil {
				recognizer.cancelsTouchesInView = cancelsTouchesInView!
			}
			if delaysTouchesBegan != nil {
				recognizer.delaysTouchesBegan = delaysTouchesBegan!
			}
			if delaysTouchesEnded != nil {
				recognizer.delaysTouchesEnded = delaysTouchesEnded!
			}
			
			if onStateChange != nil {
				helper.delegate = self;
				recognizer.addTarget(helper, action: Selector("recognizerStateDidChange:"))
			}
		}
	}
	
	public override func gaxbDidPrepare() {
		super.gaxbDidPrepare()
		
		//TODO: clean up this pyramid once swift 1.2 is out
		if let recognizer = recognizer, view = view, referencedView = (scope() as? Object)?.objectForId(view) as? View {
			referencedView.view.addGestureRecognizer(recognizer)
		}
	}
	
	func recognizerStateDidChange(recognizer:UIGestureRecognizer) {
		if onStateChange != nil {
			let (scopeObject: AnyObject?, name) = self.parseNotification(onStateChange)
			if name != nil {
				NSNotificationCenter.defaultCenter().postNotificationName(name!, object: scopeObject)
			}
		}
	}
}

class GestureRecognizerHelper: NSObject {
	weak var delegate: GestureRecognizer?
{'fraction_non_alphanumeric': 0.09064232148679491, 'fraction_numerical': 0.0097815454841865, 'mean_word_length': 4.0130718954248366, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7465512', 'n_tokens_mistral': 1224, 'n_tokens_neox': 996, 'n_words': 223}