KSA Validation Test: Difference between revisions

From NSB App Studio
Jump to navigation Jump to search
 
(4 intermediate revisions by the same user not shown)
Line 3: Line 3:


Exercise #2:<br />
Exercise #2:<br />
What should work:
*Save Project As.. AppStudio shouldn’t let users save the project with an invalid name
*Save Project As.. AppStudio shouldn’t let users save the project with an invalid name
*Deploying the app
*Deploying the app
Line 11: Line 10:


Exercise #3:<br />
Exercise #3:<br />
What should work:
*onclick() button event
*basic button and labels properties
*basic button and labels properties


Line 18: Line 15:


Exercise #4:<br />
Exercise #4:<br />
What Should work:
*List ChangeForm property  
*List ChangeForm property  
*Using commas as separators for items in the list:
*Using commas as separators for items in the list:
Line 27: Line 23:


Exercise #5:<br />
Exercise #5:<br />
What Should Work:
*Changing Forms using a Header Bar: rightChangeForm, rightButtonIcon, rightButtonName, rightButtonIconPos, etc
*Changing Forms using a Header Bar: rightChangeForm, rightButtonIcon, rightButtonName, rightButtonIconPos, etc
*Setting up and programming a radio button control:
*Setting up and programming a radio button control:
Line 33: Line 28:
** using RadioButton.getValue(n)
** using RadioButton.getValue(n)
** RadioButton indexes are 1-based
** RadioButton indexes are 1-based


Exercise #6:<br />
Exercise #6:<br />
In this exercise, students make an app that calculates one’s age in days, months and years, given his birthdate. Students are introduced to some useful textbox properties, to the Date datatype, some date functions and to the Checkbox tool.
What should work:<br />
*Textbox properties:
**ReadOnly property
**InputType: Date
*Using the CheckBox tool
**commas as dividers
**checkBox1.getValue(n)
**checkBox indexes are 1-based
*the Date datatype
**TextBox1.value = Date
**the function CDate() to convert text to Date type
**the function DateDiff() using the “d”, “m” or “yyyy” as arguments
*Form.reset()
 
 
Exercise #7:
*image control should support .jpg and .png files
*audio control should support .mp3 files
*Project’s Icon and ChromeIcon properties should work


What should work:<br />
-Textbox properties:
-ReadOnly property
-InputType: Date
-using the CheckBox tool
-commas as dividers
-checkBox1.getValue(n)
-checkBox indexes are 1-based
-the Date datatype
-‘TextBox1.value = Date
-the function CDate() to convert text to Date type
-the function DateDiff() using the “d”, “m” or “yyyy” as arguments
-Form.reset()




Exercise #7:<br />
Exercise #8:<br />
In this exercise students learn to incorporate images and audio files into their app. Students also learn how to add a custom icon to their app.
*Play an audio file on image.onclick() using the commands: audio1.play() audio2.pause()
*Using the select tool to change forms
**Change forms using: Form1.hide(), Form2.show()
*select1.selectedIndex()
*select tool indexes are 0 based


What Should Work:<br />
-image control should support .jpg and .png files
-audio control should support .mp3 files
-Project’s Icon property should work




Exercise 9:
*TextArea’s basic properties
*Saving data entered to a textbox/ textArea:
**create an object using: Dim objectName()
*localStorage.note
*JSON.stringify([ ])
*JSON.parse(string)
*objectName.push()


Exercise #8:<br />
In this exercise students use images, select, and audio controls.
What Should Work:
-Play an audio file on image.onclick() using the commands: audio1.play() audio2.pause()
-Using the select tool to change forms:
-Change forms using: Form1.hide(), Form2.show()
-select1.selectedIndex()
-select tool indexes are 0 based
-select.onchange() is only called if the user chooses an index other than the current selected index.
However, in the book, students are asked to use two identical select tools with “one, two” as items corresponding to the form number the user would like to navigate to. There are two forms in this exercise, so one such select tool for each form. Item “one” (index 0) is the default selected item in both forms. However, if the user selects item “one” while on Form2 to go back to Form1, nothing will happen because .onchange() is not called. The book should note that changing the default selected index in Form2 to 1 (index of item “two”) is necessary for the code to work. Currently the book just says: create a second form, put the same controls, and make the necessary changes to controls properties.




Exercise 10:
*Video control: should support:
**src = video.mp4
**src = url of an mp4 file


Exercise 9:<br />
Exercise 11:
In this exercise, students learn to save data entered to a textArea using localStorage and the JSON function.
*HTMLview control:
What should work:
**scrolling property = True/False
-TextArea’s basic properties
**HTMLview1.refresh()
-Saving data entered to a textbox/ textArea:
**HTMLview1.innerHTML = <iframe height = ‘’, width = ‘’, src = ‘’></iframe>
-create an object using: Dim objectName()
*Controls theme property
-localStorage.note
*Button groupBeginning and groupEnd button properties
-JSON.stringify([ ])
-JSON.parse(string)
-objectName.push()
-Add lines of strings to a textArea
-UBound(Array)
-vbCLRF for new line






Exercise 12:
*Textbox input type: search
*Button Icon and Iconpos properties
*Line tool and its basic properties
*document.getElementsByTagName( )[ ]
*document.createElement()
*.src .async .appendChild()
*encodeURIComponent(string)
*CInt(decimal number)
*image1.firstChild.src






Exercise 10:<br />
Exercise 13:
Students learn to use a video control using a video saved on the computer, or using the url of an mp4 file online.
What Should Work:
What Should Work:
-Video control: should support:
*Textbox input type: file
-src = video.mp4
*FileReader() object .readAsDataUrl( )
-src = url of an mp4 file
*Dim e = Event ‘for capturing a picture
*img.src=e.target.result
*setTimeOut()
*PictureBox1.getContext()
*Mail a picture using:
**location ="mailto:" & "?subject=" & "&body=" +"<img src='" & PictureBox1.toDataURL() & "'/>"
 
 
 
Exercise 14:
*HTMLview:
**HTMLview1.refresh()
**HTMLview1.innerHTML with src = ‘.pdf’ or src = ‘video embed url’
*Footerbar:
**footerbar.changeForm property:
*Twitter control
**api property = follow:
**api property = widget

Latest revision as of 17:15, 4 June 2014

KSA Validation Test

Exercise #2:

  • Save Project As.. AppStudio shouldn’t let users save the project with an invalid name
  • Deploying the app
  • Adding the app to Homescreen


Exercise #3:

  • basic button and labels properties


Exercise #4:

  • List ChangeForm property
  • Using commas as separators for items in the list:
  • The list dividers property
  • Basic tooltip properties


Exercise #5:

  • Changing Forms using a Header Bar: rightChangeForm, rightButtonIcon, rightButtonName, rightButtonIconPos, etc
  • Setting up and programming a radio button control:
    • calling RadioButton1_onchange()
    • using RadioButton.getValue(n)
    • RadioButton indexes are 1-based


Exercise #6:
What should work:

  • Textbox properties:
    • ReadOnly property
    • InputType: Date
  • Using the CheckBox tool
    • commas as dividers
    • checkBox1.getValue(n)
    • checkBox indexes are 1-based
  • the Date datatype
    • TextBox1.value = Date
    • the function CDate() to convert text to Date type
    • the function DateDiff() using the “d”, “m” or “yyyy” as arguments
  • Form.reset()


Exercise #7:

  • image control should support .jpg and .png files
  • audio control should support .mp3 files
  • Project’s Icon and ChromeIcon properties should work


Exercise #8:

  • Play an audio file on image.onclick() using the commands: audio1.play() audio2.pause()
  • Using the select tool to change forms
    • Change forms using: Form1.hide(), Form2.show()
  • select1.selectedIndex()
  • select tool indexes are 0 based


Exercise 9:

  • TextArea’s basic properties
  • Saving data entered to a textbox/ textArea:
    • create an object using: Dim objectName()
  • localStorage.note
  • JSON.stringify([ ])
  • JSON.parse(string)
  • objectName.push()


Exercise 10:

  • Video control: should support:
    • src = video.mp4
    • src = url of an mp4 file

Exercise 11:

  • HTMLview control:
    • scrolling property = True/False
    • HTMLview1.refresh()
    • HTMLview1.innerHTML = <iframe height = ‘’, width = ‘’, src = ‘’></iframe>
  • Controls theme property
  • Button groupBeginning and groupEnd button properties


Exercise 12:

  • Textbox input type: search
  • Button Icon and Iconpos properties
  • Line tool and its basic properties
  • document.getElementsByTagName( )[ ]
  • document.createElement()
  • .src .async .appendChild()
  • encodeURIComponent(string)
  • CInt(decimal number)
  • image1.firstChild.src


Exercise 13: What Should Work:

  • Textbox input type: file
  • FileReader() object .readAsDataUrl( )
  • Dim e = Event ‘for capturing a picture
  • img.src=e.target.result
  • setTimeOut()
  • PictureBox1.getContext()
  • Mail a picture using:
    • location ="mailto:" & "?subject=" & "&body=" +"<img src='" & PictureBox1.toDataURL() & "'/>"


Exercise 14:

  • HTMLview:
    • HTMLview1.refresh()
    • HTMLview1.innerHTML with src = ‘.pdf’ or src = ‘video embed url’
  • Footerbar:
    • footerbar.changeForm property:
  • Twitter control
    • api property = follow:
    • api property = widget