<commit_before>/**
 * @file SingleView0Controller.swift
 * @brief Define SingleView0Controller. class
 * @par Copyright
 *   Copyright (C) 2021 Steel Wheels Project
 */

import CoconutData
import KiwiControls
import Cocoa
import Foundation

public class SingleViewController: KCSingleViewController
{
	public override init(parentViewController parent: KCMultiViewController){
		super.init(parentViewController: parent)
	}

	public required init?(coder: NSCoder) {
		super.init(coder: coder)
	}

	public override func loadContext() -> KCView? {
		NSLog("load context")
		let result = KCCollectionView()
		let newval = allocateValue()
		result.store(data: newval)
		result.set(callback:{
			(_ section: Int, _ item: Int) -> Void in 
			NSLog("selected section=\(section), item=\(item)")
		})
		result.isSelectable = true
		return result
	}

	public override func viewDidLoad() {
		CNLog(logLevel: .detail, message: "viewDidLoad")
		super.viewDidLoad()
	}

	#if os(OSX)
	public override func viewWillAppear() {
		CNLog(logLevel: .detail, message: "viewWillAppear")
		super.viewWillAppear()
		doDumpView(message: "Last viewWillAppear")
	}
	#else
	public override func viewWillAppear(_ animated: Bool) {
		CNLog(logLevel: .detail, message: "viewWillAppear")
		super.viewWillAppear(animated)
		doDumpView(message: "Last viewWillAppear")
	}
	#endif

	#if os(OSX)
	public override func viewDidAppear() {
		CNLog(logLevel: .detail, message: "viewDidAppear")
		super.viewDidAppear()
		doDumpView(message: "Last viewDidAppear")
	}
	#else
	public override func viewDidAppear(_ animated: Bool) {
		CNLog(logLevel: .detail, message: "viewDidAppear")
		super.viewDidAppear(animated)
		doDumpView(message: "Last viewDidAppear")
	}
	#endif

	private func allocateValue() -> CNCollection {
		let newelm0: Array<CNCollection.Item> = [
			.image(CNSymbol.shared.URLOfSymbol(type: .chevronForward)),
			.image(CNSymbol.shared.URLOfSymbol(type: .chevronBackward))<commit_msg>test: Update to test new symbols<commit_after>/**
 * @file SingleView0Controller.swift
 * @brief Define SingleView0Controller. class
 * @par Copyright
 *   Copyright (C) 2021 Steel Wheels Project
 */

import CoconutData
import KiwiControls
import Cocoa
import Foundation

public class SingleViewController: KCSingleViewController
{
	public override init(parentViewController parent: KCMultiViewController){
		super.init(parentViewController: parent)
	}

	public required init?(coder: NSCoder) {
		super.init(coder: coder)
	}

	public override func loadContext() -> KCView? {
		NSLog("load context")
		let result = KCCollectionView()
		let newval = allocateValue()
		result.store(data: newval)
		result.set(callback:{
			(_ section: Int, _ item: Int) -> Void in 
			NSLog("selected section=\(section), item=\(item)")
		})
		result.isSelectable = true
		return result
	}

	public override func viewDidLoad() {
		CNLog(logLevel: .detail, message: "viewDidLoad")
		super.viewDidLoad()
	}

	#if os(OSX)
	public override func viewWillAppear() {
		CNLog(logLevel: .detail, message: "viewWillAppear")
		super.viewWillAppear()
		doDumpView(message: "Last viewWillAppear")
	}
	#else
	public override func viewWillAppear(_ animated: Bool) {
		CNLog(logLevel: .detail, message: "viewWillAppear")
		super.viewWillAppear(animated)
		doDumpView(message: "Last viewWillAppear")
	}
	#endif

	#if os(OSX)
	public override func viewDidAppear() {
		CNLog(logLevel: .detail, message: "viewDidAppear")
		super.viewDidAppear()
		doDumpView(message: "Last viewDidAppear")
	}
	#else
	public override func viewDidAppear(_ animated: Bool) {
		CNLog(logLevel: .detail, message: "viewDidAppear")
		super.viewDidAppear(animated)
		doDumpView(message: "Last viewDidAppear")
	}
	#endif

	private func allocateValue() -> CNCollection {
		let newelm0: Array<CNCollection.Item> = [
			.image(CNSymbol.shared.URLOfSymbol(type: .chevronForward)),
			.image(CNSymbol.shared.URLOfSymbol(type: .chevronBackward)),
			.image(CNSymbol.shared.URLOfSymbol(type: .rectangle)),
			.image(CNSymbol.shared.URLOfSymbol(type: .rectangleFilled))
{'fraction_non_alphanumeric': 0.11687669878922659, 'fraction_numerical': 0.003459352606869286, 'mean_word_length': 5.18960244648318, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '3221390', 'n_tokens_mistral': 1457, 'n_tokens_neox': 1338, 'n_words': 306}