<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://homeostasis.scs.carleton.ca/wiki/index.php?action=history&amp;feed=atom&amp;title=Mobile_App_Development_2022W_Lecture_10</id>
	<title>Mobile App Development 2022W Lecture 10 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://homeostasis.scs.carleton.ca/wiki/index.php?action=history&amp;feed=atom&amp;title=Mobile_App_Development_2022W_Lecture_10"/>
	<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Mobile_App_Development_2022W_Lecture_10&amp;action=history"/>
	<updated>2026-04-06T06:18:27Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Mobile_App_Development_2022W_Lecture_10&amp;diff=23827&amp;oldid=prev</id>
		<title>Soma: Created page with &quot;==Video==  Video from the lecture given on February 11, 2022 is now available: * [https://homeostasis.scs.carleton.ca/~soma/mad-2022w/lectures/comp1601-2022w-lec10-20220211.m4...&quot;</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Mobile_App_Development_2022W_Lecture_10&amp;diff=23827&amp;oldid=prev"/>
		<updated>2022-02-12T05:57:43Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Video==  Video from the lecture given on February 11, 2022 is now available: * [https://homeostasis.scs.carleton.ca/~soma/mad-2022w/lectures/comp1601-2022w-lec10-20220211.m4...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Video==&lt;br /&gt;
&lt;br /&gt;
Video from the lecture given on February 11, 2022 is now available:&lt;br /&gt;
* [https://homeostasis.scs.carleton.ca/~soma/mad-2022w/lectures/comp1601-2022w-lec10-20220211.m4v video]&lt;br /&gt;
* [https://homeostasis.scs.carleton.ca/~soma/mad-2022w/lectures/comp1601-2022w-lec10-20220211.cc.vtt auto-generated captions]&lt;br /&gt;
Video is also available through Brightspace (Resources-&amp;gt;Zoom Meetings (Recordings, etc.)-&amp;gt;Cloud Recordings tab).  Note that here you&amp;#039;ll also see chat messages.&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Lecture 10&lt;br /&gt;
----------&lt;br /&gt;
&lt;br /&gt;
introduce Assignment 2&lt;br /&gt;
continue with Tutorial 5&lt;br /&gt;
&lt;br /&gt;
Go ahead and download android studio before next Wednesday&lt;br /&gt;
 - give it time to run and update itself&lt;br /&gt;
&lt;br /&gt;
Plain text files can have different line endings&lt;br /&gt;
 - CR, \r &amp;lt;--- old MacOS (like, really old)&lt;br /&gt;
 - LF, \n &amp;lt;--- Linux, UNIX, modern macOS&lt;br /&gt;
 - CR+LF, \r\n &amp;lt;--- windows&lt;br /&gt;
&lt;br /&gt;
When you have a controller in Storyboard that can send events, those events are received by functions that are marked with &amp;quot;@IBAction&amp;quot;&lt;br /&gt;
  - you then have to connect the function to the correct storyboard outlet&lt;br /&gt;
    for the sent event&lt;br /&gt;
&lt;br /&gt;
AnalysisResult view in textanalyzer-2 corresponds to&lt;br /&gt;
updateAnalysis in textanalyzer-3.&lt;br /&gt;
 - updateAnalysis is called in three places&lt;br /&gt;
   - when the first view is displayed&lt;br /&gt;
   - when the user types anything into the input field&lt;br /&gt;
   - when a menu item is selected&lt;br /&gt;
 - but, when is AnalysisResult called?&lt;br /&gt;
   - it is run whenever it needs to be, automatically&lt;br /&gt;
   - it will run when Contentview is put on the screen&lt;br /&gt;
     (because AnalysisResult is included), and it will run&lt;br /&gt;
     whenever mode and userInput change&lt;br /&gt;
       - i.e., when a menu item is selected and when a user types&lt;br /&gt;
       - but these calls are implicit, not explicit, we don&amp;#039;t&lt;br /&gt;
         have to put them in manually, they just happen&lt;br /&gt;
&lt;br /&gt;
Remember, in SwiftUI, when a @State variable changes, any views dependent on those state variables are automatically updated (i.e., their code is re-run)&lt;br /&gt;
&lt;br /&gt;
When you have to do updates manually, it is very easy to skip or to do the wrong ones&lt;br /&gt;
 - then your interface is stale, doesn&amp;#039;t reflect the underlying app state&lt;br /&gt;
 - leads to lots of bugs&lt;br /&gt;
&lt;br /&gt;
That&amp;#039;s why the modern way is to do things more declaratively&lt;br /&gt;
 - tell the system what the screen looks like based on data&lt;br /&gt;
 - the framework figures out when the screen needs to be updated based&lt;br /&gt;
   on changes to designated data&lt;br /&gt;
   &lt;br /&gt;
@State variables are the actual &amp;quot;state&amp;quot;&lt;br /&gt;
@Binding variables are references to @State variables&lt;br /&gt;
 - essentially pointers/call by reference&lt;br /&gt;
&lt;br /&gt;
@State variables are really objects under the hood which do extra work whenever the object&amp;#039;s properties are read from or written to&lt;br /&gt;
 - the set&amp;#039;s and get&amp;#039;s are overridden with extra functionality&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Soma</name></author>
	</entry>
</feed>