Commits

Anonymous committed 3c12eee

These demos didn't know the difference between dialogs and windows yet. Fixed.

  • Participants
  • Parent commits cb76117
  • Branches 2.1

Comments (0)

Files changed (4)

Mac/Demo/PICTbrowse/ICONbrowse.py

 	def open(self, id, contents):
 		self.id = id
 		FrameWork.DialogWindow.open(self, ID_MAIN)
-		self.wid.SetDialogDefaultItem(MAIN_SHOW)
+		self.dlg.SetDialogDefaultItem(MAIN_SHOW)
 		self.contents = contents
-		self.ctl = self.wid.GetDialogItemAsControl(MAIN_LIST)
+		self.ctl = self.dlg.GetDialogItemAsControl(MAIN_LIST)
 		h = self.ctl.GetControlData_Handle(Controls.kControlListBoxPart, 
 				Controls.kControlListBoxListHandleTag)
 		self.list = List.as_List(h)

Mac/Demo/PICTbrowse/PICTbrowse.py

 	def open(self, id, contents):
 		self.id = id
 		FrameWork.DialogWindow.open(self, ID_MAIN)
-		self.wid.SetDialogDefaultItem(MAIN_SHOW)
+		self.dlg.SetDialogDefaultItem(MAIN_SHOW)
 		self.contents = contents
-		self.ctl = self.wid.GetDialogItemAsControl(MAIN_LIST)
+		self.ctl = self.dlg.GetDialogItemAsControl(MAIN_LIST)
 		h = self.ctl.GetControlData_Handle(Controls.kControlListBoxPart, 
 				Controls.kControlListBoxListHandleTag)
 		self.list = List.as_List(h)

Mac/Demo/PICTbrowse/PICTbrowse2.py

 		
 	def fitrect(self):
 		"""Return self.pictrect scaled to fit in window"""
-		graf = self.wid.GetWindowPort()
+		graf = self.dlg.GetWindowPort()
 		screenrect = graf.portRect
 		picwidth = self.pictrect[2] - self.pictrect[0]
 		picheight = self.pictrect[3] - self.pictrect[1]
 	def open(self, id, contents):
 		self.id = id
 		FrameWork.DialogWindow.open(self, ID_MAIN)
-		self.wid.SetDialogDefaultItem(MAIN_SHOW)
+		self.dlg.SetDialogDefaultItem(MAIN_SHOW)
 		self.contents = contents
-		self.ctl = self.wid.GetDialogItemAsControl(MAIN_LIST)
+		self.ctl = self.dlg.GetDialogItemAsControl(MAIN_LIST)
 		h = self.ctl.GetControlData_Handle(Controls.kControlListBoxPart, 
 				Controls.kControlListBoxListHandleTag)
 		self.list = List.as_List(h)

Mac/Demo/PICTbrowse/oldPICTbrowse.py

 	def open(self, id, contents):
 		self.id = id
 		FrameWork.DialogWindow.open(self, ID_MAIN)
-		self.wid.SetDialogDefaultItem(MAIN_SHOW)
-		tp, h, rect = self.wid.GetDialogItem(MAIN_LIST)
+		self.dlg.SetDialogDefaultItem(MAIN_SHOW)
+		tp, h, rect = self.dlg.GetDialogItem(MAIN_LIST)
 		rect2 = rect[0]+1, rect[1]+1, rect[2]-17, rect[3]-17	# Scroll bar space
 		self.list = List.LNew(rect2, (0, 0, 1, len(contents)), (0,0), 0, self.wid,
 				0, 1, 1, 1)
 			self.parent.showPICT(resid)
 		
 	def do_rawupdate(self, window, event):
-		tp, h, rect = self.wid.GetDialogItem(MAIN_LIST)
+		tp, h, rect = self.dlg.GetDialogItem(MAIN_LIST)
 		Qd.SetPort(self.wid)
 		Qd.FrameRect(rect)
 		self.list.LUpdate(self.wid.GetWindowPort().visRgn)