(saveFormat "2.0")
(date "Tue 19/Dec/1995 09:23:29 MST")
(veerev "3.2")
(platform "HP9000s700")
(SaveCF no)
(filterNAN 0)
(component 0 ROOTCONTEXT
 (name "Unbuild Record Example")
 (implementation
  (retainGlobals YES)
  (locked no)
  (trigMode rad)
  (nextID 14)
  (component 0 RECCONST
   (interface
	(output 1
	 (name "Record")
	 (lock name constraints)
	)
   )
   (implementation
	(value Record
	 (numDims 1)
	 (size 4)
	 (schema
	  (numFields 5)
	  (fieldName "Name"
	   (type Text)
	  )
	  (fieldName "EmplNo"
	   (type Int32)
	  )
	  (fieldName "Address"
	   (type Text)
	  )
	  (fieldName "City"
	   (type Text)
	  )
	  (fieldName "Zip"
	   (type Int32)
	  )
	 )
	 (data 
	  (record
	   ( "Name" "John Smith")
	   ( "EmplNo" 555333)
	   ( "Address" "401 E. First St.")
	   ( "City" "Central City, USA")
	   ( "Zip" 54321)
	  )
	  (record
	   ( "Name" "Don Jones")
	   ( "EmplNo" 554433)
	   ( "Address" "9000 SE County Rd. 12")
	   ( "City" "Central City, USA")
	   ( "Zip" 54321)
	  )
	  (record
	   ( "Name" "Susan Smith")
	   ( "EmplNo" 332244)
	   ( "Address" "121 Second St.")
	   ( "City" "Central City, USA")
	   ( "Zip" 54321)
	  )
	  (record
	   ( "Name" "Joe Baker")
	   ( "EmplNo" 121212)
	   ( "Address" "888 N. Apple St.")
	   ( "City" "Middletown, USA")
	   ( "Zip" 54322)
	  )
	 )
	)
   )
  )
  (component 1 TEXTDISPLAY
   (name "Name")
   (interface
	(input 1
	 (name "Data")
	)
   )
   (implementation
   )
  )
  (component 2 TEXTDISPLAY
   (name "EmplNo")
   (interface
	(input 1
	 (name "Data")
	)
   )
   (implementation
   )
  )
  (component 3 FROMRECORD
   (interface
	(input 1
	 (name "Record Data")
	 (requires
	  (datatype Record)
	 )
	 (lock name constraints)
	)
	(output 1
	 (name "Name List")
	 (tag "Name List")
	 (lock name constraints)
	 (optional yes)
	)
	(output 2
	 (name "Type List")
	 (tag "Type List")
	 (lock name constraints)
	 (optional yes)
	)
	(output 3
	 (name "Name")
	 (tag "A")
	 (lock constraints)
	 (optional yes)
	)
	(output 4
	 (name "EmplNo")
	 (tag "B")
	 (lock constraints)
	 (optional yes)
	)
	(output 5
	 (name "Address")
	 (lock constraints)
	 (optional yes)
	)
	(output 6
	 (name "City")
	 (lock constraints)
	 (optional yes)
	)
	(output 7
	 (name "Zip")
	 (lock constraints)
	 (optional yes)
	)
   )
  )
  (component 4 TEXTDISPLAY
   (name "Name List")
   (interface
	(input 1
	 (name "Data")
	)
   )
   (implementation
   )
  )
  (component 5 TEXTDISPLAY
   (name "Type List")
   (interface
	(input 1
	 (name "Data")
	)
   )
   (implementation
   )
  )
  (component 6 TEXTDISPLAY
   (name "Address")
   (interface
	(input 1
	 (name "Data")
	)
   )
   (implementation
   )
  )
  (component 7 TEXTDISPLAY
   (name "City")
   (interface
	(input 1
	 (name "Data")
	)
   )
   (implementation
   )
  )
  (component 8 TEXTDISPLAY
   (name "Zip")
   (interface
	(input 1
	 (name "Data")
	)
   )
   (implementation
   )
  )
  (component 11 CONTEXT
   (name "Press For")
   (description2 10
	"This User Object is the outermost \"context\""
	"for the InfoAbout help device.  Within this"
	"device is the pop-up panel containing the info"
	"Notepad.  If all you can see is a device with"
	"\"Press For\", you should double-click the left"
	"mouse button on the Press For to restore the"
	"Panel View of the device.  To see how this device"
	"operates, click on the Info About button first,"
	"then press the Detail button in the \"Press For\""
	"title bar."
   )
   (implementation
	(locked no)
	(trigMode deg)
	(nextID 4)
	(component 0 TOGGLE25
	 (name "Info About")
	 (description2 24
	  "This is a toggle device with the name changed to"
	  "reflect it\'s function.  The output of the device"
	  "is \"0\" when the button is up, and \"1\" when the"
	  "button is down.  "
	  ""
	  "A Reset Control Input terminal has been added to"
	  "to always pop the button back out after showing"
	  "the pop-up help (Info About This Example) User"
	  "Object."
	  ""
	  "The Toggle has set the \"AutoExecute\" option to let"
	  "it operate even when the RUN button in the title"
	  "bar has not been pressed.  Note, however, that"
	  "AutoExecute only works when no other threads are"
	  "operating, either from their Start buttons or from"
	  "the RUN button."
	  ""
	  "To allow the Toggle to operate when other threads"
	  "are running, an Until Break device repeatedly lets"
	  "the Toggle device output it\'s current value (based"
	  "on the button state) to the If/Then.  Thus, when"
	  "RUN is pressed, the InfoAbout toggle output is"
	  "still monitored for \"1\"."
	  ""
	 )
	 (interface
	  (input 1
	   (type control)
	   (name "Reset")
	   (lock name constraints)
	   (optional yes)
	  )
	  (output 1
	   (lock name constraints)
	  )
	 )
	 (implementation
	  (value Int32
	   (data  0)
	  )
	  (autoTrigger on)
	  (initValue Int32
	   (data  0)
	  )
	 )
	)
	(component 2 CONTEXT
	 (name "Info About This Example")
	 (description2 10
	  "This is a User Object that has both a detail view"
	  "and a Panel view.  If this device is visible as"
	  "an icon, you must double-click the left mouse"
	  "button to \"open up\" the non-iconic view."
	  ""
	  "Since the User Object has both a Panel and Detail"
	  "view, when you double-click on the icon, you will"
	  "first see the Panel view.  To see the components"
	  "of the User Object, press the Detail button in"
	  "the \"Info About This Example\" title bar."
	 )
	 (implementation
	  (locked no)
	  (trigMode deg)
	  (nextID 2)
	  (popupMoveable)
	  (component 0 NOTE
	   (name "NotePad")
	   (description2 11
		"This notepad is displayed as a Show on Execute"
		"panel to present the information to the reader."
		""
		"It has been \"Added to Panel\" of the \"Info About"
		"This Example\" user object, thus it is not "
		"necessary to keep it as an open device inside the"
		"Detail view; you can edit the notepad from the"
		"Panel view of this User Object.  You can also"
		"set/clear the \"Enable Edit\" flag in this Notepad\'s"
		"Object Menu to keep the pop-up notepad from being"
		"altered by the user."
	   )
	   (implementation
		(text2 16
		  "PURPOSE: Illustrates using UnBuild Record to retrieve record fields."
		  ""
		  "USER INPUT REQUIRED: Press \"Run\"."
		  ""
		  "EXPLANATION:"
		  "\tOne way to retrieve fields from a record is to use the GetField object.  "
		  "    Another, often more efficient way to retrieve several or all fields from"
		  "    a record is to use the UnBuild Record object.  The UnBuild Record object"
		  "    not only allows you to add outputs for every field in the record, but "
		  "    provides Name List and Type List outputs. These outputs list the name and"
		  "    type of each field in the record."
		  ""
		  "\tIn this example the Record Constant is actually an 1D array of records.  "
		  "    The UnBuild Record object outputs 1D arrays of the type of the field for"
		  "    each field output, where the value of each element is the value of the"
		  "    field in the corresponding record."
		)
	   )
	  )
	  (component 1 CONFIRM25
	   (name "DONE")
	   (description2 7
		"This tiny \"thread\" begins running when the "
		"enclosing UserObject is executed.  When the user"
		"acknowledges the OK/DONE button, there is nothing"
		"left to execute, so the thread ends.  Since there"
		"are not other threads running, the User Object"
		"is completed and will exit, removing the Show on"
		"Execute pop-up display."
	   )
	   (interface
		(output 1
		 (name "Go")
		 (lock name constraints)
		)
	   )
	   (implementation
		(component enterButton yes)
		(component escapeButton yes)
	   )
	  )
	  (configuration
	  )
	  (ShowOnExecPanel
	   (geometry 5 34 794 446)
	   (panel
		(geometry 105 238 790 425)
		(widget 0 detail
		 (title off)
		 (borderStyle flat)
		 (geometry 112 245 778 358)
		 (editing disabled)
		)
		(widget 1 detail
		 (title off)
		 (borderStyle flat)
		 (geometry 468 613 67 39)
		)
	   )
	  )
	 )
	)
	(component 3 IFTHENELSE
	 (name "!= 0")
	 (description2 10
	  "This device tests the value of the data input"
	  "and either executes the \"Info About This Device\""
	  "User object when the input is \"1\", or terminates"
	  "the current iteration of the Until Break device."
	  ""
	  "If no threads are running, the Toggle can generate"
	  "it\'s output data whenever the button is changed"
	  "(using the Toggle\'s AutoExecute mode).  In this"
	  "case, either the User Object is executed or the"
	  "Autoexecute sequence terminates."
	 )
	 (interface
	  (input 1
	   (name "A")
	   (optional yes)
	  )
	  (output 1
	   (name "Then")
	   (lock name constraints)
	  )
	  (output 2
	   (name "Else")
	   (lock name constraints)
	  )
	 )
	 (implementation
	  (expr "a!=0")
	 )
	)
	(configuration
	 (connect D2:0 D0:1)
	 (connect D2:1 D1:0)
	 (connect D0:1 D2:1)
	)
   )
  )
  (component 12 NOTE
   (name "Warranty Disclaimer")
   (implementation
	(text2 7
	  "This example is provided "
	  "as an illustration \"as is\","
	  "and Hewlett-Packard Company"
	  "makes no warranty of any "
	  "kind with regard to this"
	  "example."
	  ""
	)
   )
  )
  (configuration
   (connect D3:3 D1:1)
   (connect D3:4 D2:1)
   (connect D0:1 D3:1)
   (connect D3:1 D4:1)
   (connect D3:2 D5:1)
   (connect D3:5 D6:1)
   (connect D3:6 D7:1)
   (connect D3:7 D8:1)
  )
 )
 (viewFor -1
  (active detail)
  (detail
   (geometry 0 53 900 447)
   (configuration
	(viewFor 0
	 (active detail)
	 (icon
	 )
	 (detail
	  (geometry 39 144 302 292)
	  (formatters
	  )
	 )
	)
	(viewFor 1
	 (active detail)
	 (icon
	  (geometry 0 0 46 0)
	 )
	 (detail
	  (geometry 639 264 182 93)
	 )
	)
	(viewFor 2
	 (active detail)
	 (icon
	  (geometry 0 0 78 0)
	 )
	 (detail
	  (geometry 665 399 171 103)
	 )
	)
	(viewFor 3
	 (active detail)
	 (icon
	  (geometry 382 333 136 74)
	  (iconImage "unbuild.icn")
	 )
	 (detail
	  (geometry 460 263 6 214)
	 )
	 (terminals on)
	)
	(viewFor 4
	 (active detail)
	 (icon
	  (geometry 0 0 110 0)
	 )
	 (detail
	  (geometry 397 106 147 109)
	 )
	)
	(viewFor 5
	 (active detail)
	 (icon
	  (geometry 0 0 110 0)
	 )
	 (detail
	  (geometry 605 115 151 110)
	 )
	)
	(viewFor 6
	 (active detail)
	 (icon
	  (geometry 0 0 78 0)
	 )
	 (detail
	  (geometry 665 550 231 101)
	 )
	)
	(viewFor 7
	 (active detail)
	 (icon
	  (geometry 0 0 46 0)
	 )
	 (detail
	  (geometry 374 544 253 92)
	 )
	)
	(viewFor 8
	 (active detail)
	 (icon
	  (geometry 0 0 46 0)
	 )
	 (detail
	  (geometry 165 539 171 103)
	 )
	)
	(viewFor 11
	 (active panel)
	 (icon
	  (geometry 695 148 110 25)
	 )
	 (panel
	  (geometry 41 692 319 77)
	  (widget 0 detail
	   (title off)
	   (borderStyle flat)
	   (geometry 144 710 114 39)
	   (scaled on)
	   (format button)
	  )
	 )
	 (detail
	  (geometry 54 135 912 591)
	  (configuration
	   (viewFor 0
		(active detail)
		(icon
		 (geometry -40 -7 81 15)
		)
		(detail
		 (geometry 253 361 114 39)
		 (scaled on)
		 (format button)
		)
		(title off)
	   )
	   (viewFor 2
		(active icon)
		(icon
		 (geometry 392 438 217 25)
		)
		(detail
		 (geometry 67 190 866 520)
		 (configuration
		  (viewFor 0
		   (active icon)
		   (icon
			(geometry 461 448 78 25)
		   )
		   (detail
			(geometry 76 242 848 437)
			(editing disabled)
		   )
		  )
		  (viewFor 1
		   (active detail)
		   (icon
			(geometry -22 -7 45 15)
		   )
		   (detail
			(geometry 471 512 58 37)
		   )
		   (title off)
		  )
		 )
		 (stackingOrder 1 0)
		)
	   )
	   (viewFor 3
		(active icon)
		(icon
		 (geometry 427 368 46 25)
		)
		(detail
		 (geometry 349 328 73 64)
		)
		(terminals on)
	   )
	   (connect D2:0 D0:1
		(points 5 450 395 450 420 230 420 230 380 250 380)
	   )
	   (connect D2:1 D1:0
		(points 3 475 370 500 370 500 435)
	   )
	   (connect D0:1 D2:1
		(points 2 369 380 424 380)
	   )
	  )
	  (stackingOrder 0 2 1)
	 )
	)
	(viewFor 12
	 (active icon)
	 (icon
	  (geometry 391 716 338 48)
	  (iconImage "disclaim.icn")
	  (label off)
	 )
	 (detail
	  (geometry 685 104 251 153)
	  (editing enabled)
	 )
	)
	(connect D3:3 D1:1
	 (points 4 548 340 580 340 580 310 636 310)
	)
	(connect D3:4 D2:1
	 (points 4 548 370 590 370 590 450 662 450)
	)
	(connect D0:1 D3:1
	 (points 4 343 290 350 290 350 370 372 370)
	)
	(connect D3:1 D4:1
	 (points 6 548 280 560 280 560 230 370 230 370 160 394 160)
	)
	(connect D3:2 D5:1
	 (points 4 548 310 570 310 570 170 602 170)
	)
	(connect D3:5 D6:1
	 (points 6 548 400 580 400 580 460 650 460 650 600 662 600)
	)
	(connect D3:6 D7:1
	 (points 6 548 430 570 430 570 510 360 510 360 590 371 590)
	)
	(connect D3:7 D8:1
	 (points 6 548 460 560 460 560 500 140 500 140 590 162 590)
	)
   )
   (stackingOrder 0 10 9 4 3 8 7 6 5 1
	 2)
  )
  (titleBg "Gray")
  (titleFg "Black")
  (numberFormats
   (realFormat standard)
   (realSigDigits 4)
   (realRadixSpec 4)
   (integerBase decimal)
  )
 )
)
