<commit_before><Page loaded="loaded">
	<ScrollView>
		<StackLayout>
			<Label text="Frames" cssClass="title" textWrap="true" />
			<Label text="Navigation between pages of your app can be done by interacting with the the Frame module." textWrap="true" cssClass="text" />
			<Label text="All apps have a topmost frame, which has a reference to the navigate() function. To access the topmost frame, call the topmost() function:" textWrap="true" cssClass="text" />

			<GridLayout columns="10,*" rows="auto">
				<StackLayout cssClass="codeSidebar">
				</StackLayout>
				<StackLayout col="1" cssClass="code">
					<Label text="var frameModule = require('ui/frame');" textWrap="true" />
					<Label text="var topmost = frameModule.topmost();" textWrap="true" />
				</StackLayout>
			</GridLayout>
			<Label text=" " textWrap="true" />
			
			<!-- by Page Name -->
			<Label text="Navigate by Page Name" cssClass="subTitle" textWrap="true" />
			<Label text="The easiest way to navigate to a page is to navigate by page name." textWrap="true" cssClass="text" />

			<Button text="Navigate by Page Name" tap="navigateByPageName" />

			<GridLayout columns="10,*" rows="auto">
				<StackLayout cssClass="codeSidebar">
				</StackLayout>
				<StackLayout col="1" cssClass="code">
					<Label text="topmost.navigate('samples/by-page-name');" textWrap="true" />
				</StackLayout>
			</GridLayout>
			<Label text=" " textWrap="true" />
			
			<!-- by function -->
			<Label text="Navigate by Function" cssClass="subTitle" textWrap="true" />
			<Label text="A dynamic method of navigating is to use a function that returns a page object. This method works well when you need to construct the resulting page dynamically based upon data." textWrap="true" cssClass="text" />

			<Button text="Navigate by Function" tap="navigateByFunction" />

			<GridLayout columns="10,*" rows="auto">
				<StackLayout cssClass="codeSidebar">
				</StackLayout>
				<StackLayout col="1" cssClass="code">
					<Label text="var pageFactory = function () {" textWrap="true" />
					<Label text="  label.text = 'This page was navi...';" textWrap="true" />
					<Label text="  label.cssClass = 'text';" textWrap="true" />
					<Label text="  label.textWrap = true;" textWrap="true" />
					<Label text="  var page = new pageModule.Page();" textWrap="true" />
					<Label text="  page.content = label;" textWrap="true" />
					<Label text="  return page;" textWrap="true" />
					<Label text="}" textWrap="true" />
					<Label text=" " textWrap="true" />
					<Label text="exports.navigateByFunction = function (args) {" textWrap="true" />
					<Label text="  topmost.navigate(pageFactory);" textWrap="true" />
					<Label text="}" textWrap="true" />
				</StackLayout>
			</GridLayout>
			<Label text=" " textWrap="true" />

			<!-- more control -->
			<Label text="More Control" cssClass="subTitle" textWrap="true" />
			<Label text="You have have a greater degree of control over the navigation process by using an instance of the NavigationEntry class." textWrap="true" cssClass="text" />
			<Label text="One reason to use this approach is to pass app data (or context) between pages." textWrap="true" />

			<Button text="Navigate with More Control" tap="navigateWithMoreControl" />

			<GridLayout columns="10,*" rows="auto">
				<StackLayout cssClass="codeSidebar">
				</StackLayout>
				<StackLayout col="1" cssClass="code">
					<Label text="exports.navigateWithMoreControl = function (args) {" textWrap="true" />
					<Label text="  var navigationEntry = {" textWrap="true" />
					<Label text="    moduleName: 'views/nav/samples/more-control'," textWrap="true" />
					<Label text="    context: { data: 'Hello NativeScripters!' }" textWrap="true" />
					<Label text="  };" textWrap="true" />
					<Label text="  topmost.navigate(navigationEntry);" textWrap="true" />
					<Label text="}" textWrap="true" />
				</StackLayout>
			</GridLayout>
			<Label text=" " textWrap="true" />
			
		</StackLayout>
	</ScrollView>
</Page><commit_msg>fixed more-contorl nav example code<commit_after><Page loaded="loaded">
	<ScrollView>
		<StackLayout>
			<Label text="Frames" cssClass="title" textWrap="true" />
			<Label text="Navigation between pages of your app can be done by interacting with the the Frame module." textWrap="true" cssClass="text" />
			<Label text="All apps have a topmost frame, which has a reference to the navigate() function. To access the topmost frame, call the topmost() function:" textWrap="true" cssClass="text" />

			<GridLayout columns="10,*" rows="auto">
				<StackLayout cssClass="codeSidebar">
				</StackLayout>
				<StackLayout col="1" cssClass="code">
					<Label text="var frameModule = require('ui/frame');" textWrap="true" />
					<Label text="var topmost = frameModule.topmost();" textWrap="true" />
				</StackLayout>
			</GridLayout>
			<Label text=" " textWrap="true" />
			
			<!-- by Page Name -->
			<Label text="Navigate by Page Name" cssClass="subTitle" textWrap="true" />
			<Label text="The easiest way to navigate to a page is to navigate by page name." textWrap="true" cssClass="text" />

			<Button text="Navigate by Page Name" tap="navigateByPageName" />

			<GridLayout columns="10,*" rows="auto">
				<StackLayout cssClass="codeSidebar">
				</StackLayout>
				<StackLayout col="1" cssClass="code">
					<Label text="topmost.navigate('samples/by-page-name');" textWrap="true" />
				</StackLayout>
			</GridLayout>
			<Label text=" " textWrap="true" />
			
			<!-- by function -->
			<Label text="Navigate by Function" cssClass="subTitle" textWrap="true" />
			<Label text="A dynamic method of navigating is to use a function that returns a page object. This method works well when you need to construct the resulting page dynamically based upon data." textWrap="true" cssClass="text" />

			<Button text="Navigate by Function" tap="navigateByFunction" />

			<GridLayout columns="10,*" rows="auto">
				<StackLayout cssClass="codeSidebar">
				</StackLayout>
				<StackLayout col="1" cssClass="code">
					<Label text="var pageFactory = function () {" textWrap="true" />
					<Label text="  label.text = 'This page was navi...';" textWrap="true" />
					<Label text="  label.cssClass = 'text';" textWrap="true" />
					<Label text="  label.textWrap = true;" textWrap="true" />
					<Label text="  var page = new pageModule.Page();" textWrap="true" />
					<Label text="  page.content = label;" textWrap="true" />
					<Label text="  return page;" textWrap="true" />
					<Label text="}" textWrap="true" />
					<Label text=" " textWrap="true" />
					<Label text="exports.navigateByFunction = function (args) {" textWrap="true" />
					<Label text="  topmost.navigate(pageFactory);" textWrap="true" />
					<Label text="}" textWrap="true" />
				</StackLayout>
			</GridLayout>
			<Label text=" " textWrap="true" />

			<!-- more control -->
			<Label text="More Control" cssClass="subTitle" textWrap="true" />
			<Label text="You have have a greater degree of control over the navigation process by using an instance of the NavigationEntry class." textWrap="true" cssClass="text" />
			<Label text="One reason to use this approach is to pass app data (or context) between pages." textWrap="true" />

			<Button text="Navigate with More Control" tap="navigateWithMoreControl" />

			<GridLayout columns="10,*" rows="auto">
				<StackLayout cssClass="codeSidebar">
				</StackLayout>
				<StackLayout col="1" cssClass="code">
					<Label text="exports.navigateWithMoreControl = function (args) {" textWrap="true" />
					<Label text="  var navigationEntry = {" textWrap="true" />
					<Label text="    moduleName: 'views/nav/samples/more-control/more-control'," textWrap="true" />
					<Label text="    context: { data: 'Hello NativeScripters!' }" textWrap="true" />
					<Label text="  };" textWrap="true" />
					<Label text="  topmost.navigate(navigationEntry);" textWrap="true" />
					<Label text="}" textWrap="true" />
				</StackLayout>
			</GridLayout>
			<Label text=" " textWrap="true" />
			
		</StackLayout>
	</ScrollView>
</Page>
{'fraction_non_alphanumeric': 0.1624736646424588, 'fraction_numerical': 0.0029743462634775064, 'mean_word_length': 3.950920245398773, 'pattern_counts': {'":': 0, '<': 147, '<?xml version=': 0, '>': 147, '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': '1335632', 'n_tokens_mistral': 2818, 'n_tokens_neox': 2375, 'n_words': 699}