David T. Lewis uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-dtl.166.mcz ==================== Summary ==================== Name: Tools-dtl.166 Author: dtl Time: 1 February 2010, 8:04:57.707 pm UUID: 3361fc54-f770-4131-8132-2c4d7d91344a Ancestors: Tools-dtl.165 FileChooser fixes (class examples were broken). Implement FileChooser class>>new to bypass new behavior in superclass FileList, not appropriate for FileChooser. Correct spelling errors in method names. Note: FileChooser is unreferenced in the image. It was introduced in Squeak 3.9, but is not used in Squeak 3.9 or Squeak trunk. It has a rather Etoys look about it, but does not appear to be used in Etoys. =============== Diff against Tools-dtl.165 =============== Item was changed: ----- Method: FileChooser class>>example3 (in category 'examples') ----- example3 "Open file chooser with a system window UI that has a caption pane and shows only picture files." "FileChooser example3" | fc stream | fc := FileChooser new. + fc initializeAsSystemWindowWithCaptionPane. - fc initalizeAsSystemWindowWithCaptionPane. fc setCaption: 'Select a picture file' translated. fc setSuffixes: {'png' . 'gif' . 'bmp' . 'jpg' . 'jpeg' }. stream := fc open. stream ifNotNil: [(Form fromBinaryStream: stream) asMorph openInHand].! Item was changed: ----- Method: FileChooser class>>example2 (in category 'examples') ----- example2 "Open file chooser with a system window UI." "FileChooser example2" | fc stream | fc := FileChooser new. + fc initializeAsSystemWindow. - fc initalizeAsSystemWindow. stream := fc open. stream inspect.! Item was added: + ----- Method: FileChooser>>initializeAsSystemWindowWithCaptionPane (in category 'initialization') ----- + initializeAsSystemWindowWithCaptionPane + self initializeBasicParameters. + self createSystemWindowUIWithCaptionPane.! Item was added: + ----- Method: FileChooser>>initializeAsSystemWindow (in category 'initialization') ----- + initializeAsSystemWindow + self initializeBasicParameters. + self createSystemWindowUI.! Item was changed: ----- Method: FileChooser class>>example1 (in category 'examples') ----- example1 "Open file chooser with the standard dialog box UI." "FileChooser example1" | fc stream | fc := FileChooser new. + fc initializeAsDialogBox. - fc initalizeAsDialogBox. stream := fc open. stream inspect.! Item was added: + ----- Method: FileChooser>>initializeBasicParameters (in category 'initialization') ----- + initializeBasicParameters + self showShortFileNames: true. + self setDirectory: FileDirectory default.! Item was added: + ----- Method: FileChooser>>initializeAsDialogBox (in category 'initialization') ----- + initializeAsDialogBox + self initializeBasicParameters. + self createDialogBoxUI. + self morphicView + useRoundedCorners; + color: Preferences menuColor; + adoptPaneColor: Preferences menuLineColor. + self + setCaptionColor: Preferences menuTitleColor; + setButtonColor: Preferences menuColor.! Item was added: + ----- Method: FileChooser class>>new (in category 'instance creation') ----- + new + "Superclass may attempt to initialize to a specific default directory. Bypass + that behavior." + + ^ self basicNew initialize! Item was changed: ----- Method: FileChooser class>>example4 (in category 'examples') ----- example4 "Open file chooser with a customized dialog box UI. The order of the messages is important. In general, call the initialize method first, then modify things, and finally call open." "FileChooser example4" | fc stream | fc := FileChooser new. + fc initializeAsDialogBox. - fc initalizeAsDialogBox. fc setDirectory: FileDirectory root. fc setSuffixes: {'png' . 'gif' . 'bmp' . 'jpg' . 'jpeg' }. fc setCaption: 'Select a picture file' translated. fc morphicView borderColor: Color black; borderWidth: 2; color: Color white. fc setPaneColor: Color gray muchLighter. fc captionPane color: Color orange muchLighter. fc okButton color: Color green muchLighter. fc cancelButton color: Color blue muchLighter. fc morphicView position: 20@20. stream := fc open. stream ifNotNil: [(Form fromBinaryStream: stream) asMorph openInHand].! Item was removed: - ----- Method: FileChooser>>initalizeAsDialogBox (in category 'initialization') ----- - initalizeAsDialogBox - self initalizeBasicParameters. - self createDialogBoxUI. - self morphicView - useRoundedCorners; - color: Preferences menuColor; - adoptPaneColor: Preferences menuLineColor. - self - setCaptionColor: Preferences menuTitleColor; - setButtonColor: Preferences menuColor.! Item was removed: - ----- Method: FileChooser>>initalizeAsSystemWindow (in category 'initialization') ----- - initalizeAsSystemWindow - self initalizeBasicParameters. - self createSystemWindowUI.! Item was removed: - ----- Method: FileChooser>>initalizeAsSystemWindowWithCaptionPane (in category 'initialization') ----- - initalizeAsSystemWindowWithCaptionPane - self initalizeBasicParameters. - self createSystemWindowUIWithCaptionPane.! Item was removed: - ----- Method: FileChooser>>initalizeBasicParameters (in category 'initialization') ----- - initalizeBasicParameters - self showShortFileNames: true. - self setDirectory: FileDirectory default.! |
Free forum by Nabble | Edit this page |