<?xml version="1.0" encoding="utf-8"?>
<Application>
	<AppTitle>Untitled Application</AppTitle>
	<AppShortName>MyApp</AppShortName>
	<Author>Author name</Author>
	<Version>1.0</Version>
	<DesignDeviceName>Apple iPhone 6 Plus</DesignDeviceName>
	<VariablesScanned>False</VariablesScanned>
	<PageWidth>414</PageWidth>
	<PageHeight>736</PageHeight>
	<AutoSizeWidth>False</AutoSizeWidth>
	<AutoSizeHeight>False</AutoSizeHeight>
	<HideScrollbars>False</HideScrollbars>
	<PublishPlatform>WebApp</PublishPlatform>
	<EmptyBuildFolder>False</EmptyBuildFolder>
	<AppIcon>C:\Users\ronni\OneDrive\Documents\VisualNeoWeb\Libraries\img\default-icon.png</AppIcon>
	<LanguageCode>en</LanguageCode>
	<ThemeColor>#000000</ThemeColor>
	<MobileOSTypes>[AndroidOS,iOS,WindowsPhoneOS]</MobileOSTypes>
	<WindowState>normal</WindowState>
	<TitleBar>True</TitleBar>
	<Sizeable>True</Sizeable>
	<MaximizeBtn>False</MaximizeBtn>
	<MinimizeBtn>True</MinimizeBtn>
	<SystemMenu>True</SystemMenu>
	<ContextMenu>False</ContextMenu>
	<AlwaysOnTop>False</AlwaysOnTop>
	<ShowInTaskbar>True</ShowInTaskbar>
	<SingleInstance>False</SingleInstance>
	<ChromeKioskMode>False</ChromeKioskMode>
	<startup>... align top of pages with top of Browser Content Area; DO NOT ALTER
TopCenterApp

... add any project start-up commands below
.First we need to create an empty array to store the data
CreateEmptyArray [mydata]

.Then we populate the array with data
.double click on any command to bring up the code wizard and better understand what&apos;s happening.

.id field has a unique value per row
.Loop 0 2 [idnumber]
.  neoTableSetData [mydata] [idnumber] &quot;id&quot; [idnumber]
.EndLoop

.first row
neoTableSetData [mydata] 0 &quot;id&quot; 0
neoTableSetData [mydata] 0 &quot;name&quot; &quot;John Lennon&quot;
neoTableSetData [mydata] 0 &quot;gender&quot; &quot;M&quot;
neoTableSetData [mydata] 0 &quot;dob&quot; &quot;09/10/1940&quot;


.second row
neoTableSetData [mydata] 1 &quot;id&quot; 1
neoTableSetData [mydata] 1 &quot;name&quot; &quot;Walt Disney&quot;
neoTableSetData [mydata] 1 &quot;gender&quot; &quot;M&quot;
neoTableSetData [mydata] 1 &quot;dob&quot; &quot;05/12/1901&quot;

.third row
neoTableSetData [mydata] 2 &quot;id&quot; 2
neoTableSetData [mydata] 2 &quot;name&quot; &quot;Steve Jobs&quot;
neoTableSetData [mydata] 2 &quot;gender&quot; &quot;M&quot;
neoTableSetData [mydata] 2 &quot;dob&quot; &quot;24/02/1955&quot;</startup>
	<Components>
		<FunctionList name="Subroutines">
			<Components>
				<Function name="eventManager">
					<Code>... log this event
If [currentLoggedEventsObject] != &quot;&quot;
   GetObjectHTML &quot;[currentLoggedEventsObject]&quot; [currentEventData]
   SetVar [thisEventData] &quot;[neoTableEvent]: &quot;
   If [neoTableEvent] == &quot;click&quot;
      SetVar [thisEventData] &quot;[thisEventData][neoTableField]&quot;
      StringifyJSON [neoTableRow] [neoTableRowString]
      SetVar [thisEventData] &quot;[thisEventData]&lt;br/&gt;[neoTableRowString]&quot;
   EndIf
   If [neoTableEvent] == &quot;pagechange&quot;
      SetVar [thisEventData] &quot;[thisEventData][neoTablePage]&quot;
   EndIf
   If [neoTableEvent] == &quot;search&quot;
      SetVar [thisEventData] &quot;[thisEventData][neoTableSearch]&quot;
   EndIf
   SetObjectHTML &quot;[currentLoggedEventsObject]&quot; &quot;[currentEventData]&lt;br/&gt;[thisEventData]&quot;
EndIf</Code>
				</Function>
			</Components>
		</FunctionList>
		<LibraryList name="Libraries"/>
		<PageList name="Main">
			<Components>
				<Page id="NewPage">
					<pageenter>SetVar &quot;[currentLoggedEventsObject]&quot; &quot;ViewsLoggedEventsInfo&quot;</pageenter>
					<Components>
						<PushButton id="ViewsLoadData">
							<left>102px</left>
							<top>20px</top>
							<width>86px</width>
							<height>30px</height>
							<style>font-size:9pt</style>
							<caption>Load Data</caption>
							<kind>warning</kind>
							<click>.retrieve data stored in LocalStorage
neoGetItem &quot;mylist&quot; [myitems2] &quot;&quot;
ParseJSON &quot;[myitems2]&quot; [mydata]
.retrieve deleted IDs
neoGetItem &quot;myListIDGone&quot; [myitems1] &quot;&quot;
ParseJSON &quot;[myitems1]&quot; [mydataDel]


... Reset any previous column definitions
neoTableResetColumns &quot;ViewsContainer&quot;

... setup columns; IMPORTANT: column numbers MUST start at 1
neoTableSetColumn &quot;ViewsContainer&quot; 1 &quot;id&quot; &quot;ID&quot; &quot;20px&quot; false false true &quot;&quot;
neoTableSetColumn &quot;ViewsContainer&quot; 2 &quot;name&quot; &quot;Name&quot; &quot;80px&quot; true false true &quot;&quot;
neoTableSetColumn &quot;ViewsContainer&quot; 3 &quot;gender&quot; &quot;Gender&quot; &quot;10px&quot; false false true &quot;&quot;
neoTableSetColumn &quot;ViewsContainer&quot; 4 &quot;dob&quot; &quot;Birthday&quot; &quot;30px&quot; false false true &quot;&quot;




... define user permissions
neoTableInitTable &quot;ViewsContainer&quot; &quot;&quot; 0 &quot;Table&quot; false true false false false &quot;eventManager&quot;

... load Data
neoTableLoadData &quot;ViewsContainer&quot; [mydata]
neoTableHideColumn &quot;ViewsContainer&quot; &quot;id&quot;

. retrieve total rows
ArrayLen [mydata] [totalRows]


.We want the search field to stay there but not visible at all.
.So we make it tiny, and without borders.
BeginJS
  $(&quot;#ViewsContainer input[type=text]&quot;).css(&quot;height&quot;,&quot;1px&quot;);
  $(&quot;#ViewsContainer input[type=text]&quot;).css(&quot;width&quot;,&quot;1px&quot;);
  $(&quot;#ViewsContainer input[type=text]&quot;).css(&quot;padding&quot;,&quot;0px&quot;);
  $(&quot;#ViewsContainer input[type=text]&quot;).css(&quot;border&quot;,&quot;0px solid rgba(0,0,0,0&quot;);
EndJS</click>
						</PushButton>
						<PushButton id="ViewsToggle">
							<left>301px</left>
							<top>129px</top>
							<width>88px</width>
							<height>28px</height>
							<style>font-size:9pt</style>
							<caption>Toggle View</caption>
							<click>neoTableToggleView &quot;ViewsContainer&quot;</click>
						</PushButton>
						<PushButton id="PushButton5">
							<left>7px</left>
							<top>20px</top>
							<width>80px</width>
							<height>30px</height>
							<caption>new</caption>
							<kind>success</kind>
							<click>. This demo is adpted from the neoTableTutorialPart1.neoapp demo
... Reset any previous column definitions
neoTableResetColumns &quot;ViewsContainer&quot;

... setup columns; IMPORTANT: column numbers MUST start at 1
neoTableSetColumn &quot;ViewsContainer&quot; 1 &quot;id&quot; &quot;ID&quot; &quot;20px&quot; false false true &quot;&quot;
neoTableSetColumn &quot;ViewsContainer&quot; 2 &quot;name&quot; &quot;Name&quot; &quot;80px&quot; true false true &quot;&quot;
neoTableSetColumn &quot;ViewsContainer&quot; 3 &quot;gender&quot; &quot;Gender&quot; &quot;10px&quot; false false true &quot;&quot;
neoTableSetColumn &quot;ViewsContainer&quot; 4 &quot;dob&quot; &quot;Birthday&quot; &quot;30px&quot; false false true &quot;&quot;



... define user permissions
neoTableInitTable &quot;ViewsContainer&quot; &quot;&quot; 0 &quot;Table&quot; false true false false false &quot;eventManager&quot;

... load Data
neoTableLoadData &quot;ViewsContainer&quot; [mydata]
neoTableHideColumn &quot;ViewsContainer&quot; &quot;id&quot;

. retrieve total rows
ArrayLen [mydata] [totalRows]
SetVar [mydataDel] &quot;&quot;

. do remember to check on PROJECT &gt; EVENT section for sample user data

.We want the search field to stay there but not visible at all.
.So we make it tiny, and without borders.
BeginJS
  $(&quot;#ViewsContainer input[type=text]&quot;).css(&quot;height&quot;,&quot;1px&quot;);
  $(&quot;#ViewsContainer input[type=text]&quot;).css(&quot;width&quot;,&quot;1px&quot;);
  $(&quot;#ViewsContainer input[type=text]&quot;).css(&quot;padding&quot;,&quot;0px&quot;);
  $(&quot;#ViewsContainer input[type=text]&quot;).css(&quot;border&quot;,&quot;0px solid rgba(0,0,0,0&quot;);
EndJS</click>
						</PushButton>
						<Paragraph id="Paragraph3">
							<left>5px</left>
							<top>533px</top>
							<width>399px</width>
							<height>75px</height>
							<style>color:#000000;font-size:9pt</style>
							<text>Selected data: &lt;br&gt;[neoTableRow]</text>
						</Paragraph>
						<PushButton id="PushButton6">
							<left>103px</left>
							<top>58px</top>
							<width>85px</width>
							<height>31px</height>
							<caption>save</caption>
							<click>. to save the current data to the LocalStorage, if need be
StringifyJSON [mydata] [myitems2]
neoSetItem &quot;mylist&quot; [myitems2] &quot;&quot;</click>
						</PushButton>
						<Container id="Container1">
							<left>6px</left>
							<top>200px</top>
							<width>400px</width>
							<height>278px</height>
							<style>background-color:#fff;border-style:solid;border-width:1px;overflow-x:scroll;overflow-y:auto</style>
							<Components>
								<Container id="ViewsContainer">
									<left>0px</left>
									<top>0px</top>
									<width>385px</width>
									<height>278px</height>
									<style>font-size:10pt;background-color:#ECECEC;border-radius:5px;padding-bottom:15px;padding-left:15px;padding-right:15px;padding-top:15px;cursor:pointer;overflow-x:auto;overflow-y:auto</style>
								</Container>
							</Components>
						</Container>
						<PushButton id="PushButton7">
							<left>212px</left>
							<top>167px</top>
							<width>80px</width>
							<height>30px</height>
							<caption>search</caption>
							<click>BeginJS
  $(&quot;#ViewsContainer input[type=text]&quot;).val($App.search);
  $(&quot;#ViewsContainer input[type=text]&quot;).focus();
  $(&quot;#TextInput1&quot;).focus();
EndJS</click>
						</PushButton>
						<PushButton id="PushButton1">
							<left>200px</left>
							<top>55px</top>
							<width>80px</width>
							<height>30px</height>
							<caption>delete</caption>
							<kind>danger</kind>
							<click>StringifyJSON [neoTableRow] [s1]
beginJS
  var obj = JSON.parse($App.s1);
  $App.selectedID  = obj.id;
endJS
.jsalert &quot;[selectedID]&quot;

.neoTableDeleteRowById &quot;ViewsContainer&quot; [selectedID]
ArrayDelItem [mydata] [selectedID]

.keep track of deleted IDs
StringifyJSON [mydataDel] [myitems1]
neoSetItem &quot;myListIDGone&quot; [myitems1] &quot;&quot;

. now save the data
StringifyJSON [mydata] [myitems2]
neoSetItem &quot;mylist&quot; [myitems2] &quot;&quot;
. reload the data
neoGetItem &quot;mylist&quot; [myitems2] &quot;&quot;
ParseJSON &quot;[myitems2]&quot; [mydata]
.refresh updated data to table
neoTableLoadData &quot;ViewsContainer&quot; [mydata]</click>
						</PushButton>
						<Paragraph id="Paragraph1">
							<left>222px</left>
							<top>493px</top>
							<width>163px</width>
							<height>24px</height>
							<text>ID selected: [selectedID]</text>
						</Paragraph>
						<PushButton id="PushButton3">
							<left>200px</left>
							<top>20px</top>
							<width>80px</width>
							<height>30px</height>
							<caption>insert</caption>
							<kind>primary</kind>
							<click>. I tried adding strings like
. {&quot;name&quot;: &quot;John Denver&quot;,&quot;gender&quot;: &quot;M&quot;,&quot;dob&quot;: &quot;31/12/1943&quot;}
. without success due to &quot;&quot;&quot; used.
. Q1. Let me know how to set the strimgs correctly so that it&apos;s acceptable


. ========== For now, using simple steps... ===========
. Check for total row in the data
ArrayLen [mydata] [totalRow]

. as [totalRow] starts from 1 (and not 0), we can consider that as the next row counter
neoTableSetData [mydata] [totalRow] &quot;id&quot; [totalRow]
neoTableSetData [mydata] [totalRow] &quot;name&quot; &quot;John Denver&quot;
neoTableSetData [mydata] [totalRow] &quot;gender&quot; &quot;M&quot;
neoTableSetData [mydata] [totalRow] &quot;dob&quot; &quot;31/12/1943&quot;


. best to put repeated codes like below in Subroutines... *)
. now need to save the data to LocalStorage
StringifyJSON [mydata] [myitems2]
SetItem &quot;mylist&quot; [myitems2]
. reload the data from LocalStorage
neoGetItem &quot;mylist&quot; [myitems2] &quot;&quot;
ParseJSON &quot;[myitems2]&quot; [mydata]
.refresh updated data back to table
neoTableLoadData &quot;ViewsContainer&quot; [mydata]</click>
						</PushButton>
						<Paragraph id="Paragraph4">
							<left>7px</left>
							<top>493px</top>
							<width>158px</width>
							<height>19px</height>
							<text>Total Rows: [totalRows]</text>
						</Paragraph>
						<Paragraph id="Paragraph5">
							<left>7px</left>
							<top>61px</top>
							<width>94px</width>
							<height>47px</height>
							<style>font-size:8pt</style>
							<text>click NEW for 1st time.Or to reset data stored in the device/browser&apos;s LocalStorage</text>
						</Paragraph>
						<TextInput id="TextInput1">
							<left>7px</left>
							<top>168px</top>
							<width>200px</width>
							<height>28px</height>
							<variable>[search]</variable>
							<place_holder>Search user name</place_holder>
							<change>. decided to put below command in the SEARCH button
.BeginJS
.  $(&quot;#ViewsContainer input[type=text]&quot;).val($App.search);
.  $(&quot;#ViewsContainer input[type=text]&quot;).focus();
.  $(&quot;#TextInput1&quot;).focus();
.EndJS</change>
						</TextInput>
						<PushButton id="PushButton4">
							<left>301px</left>
							<top>167px</top>
							<width>90px</width>
							<height>30px</height>
							<caption>reset list</caption>
							<click>BeginJS
  $(&quot;#ViewsContainer input[type=text]&quot;).val(&quot;&quot;);
  $(&quot;#ViewsContainer input[type=text]&quot;).focus();
  $(&quot;#TextInput1&quot;).focus();
EndJS</click>
						</PushButton>
					</Components>
				</Page>
			</Components>
		</PageList>
		<PageList name="Master">
			<Components>
				<Page id="MasterPage"/>
			</Components>
		</PageList>
		<PageList name="Dialog">
			<Components>
				<Page id="NewDialog">
					<Components>
						<DialogContainer id="DialogContainer1">
							<left>0px</left>
							<top>0px</top>
							<width>414px</width>
							<height>736px</height>
							<close_button>False</close_button>
						</DialogContainer>
					</Components>
				</Page>
			</Components>
		</PageList>
	</Components>
</Application>
