Etoys Inbox: Skeleton-Richo.7.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Etoys Inbox: Skeleton-Richo.7.mcz

commits-2
Ricardo Moran uploaded a new version of Skeleton to project Etoys Inbox:
http://source.squeak.org/etoysinbox/Skeleton-Richo.7.mcz

==================== Summary ====================

Name: Skeleton-Richo.7
Author: Richo
Time: 18 October 2011, 4:08:37 pm
UUID: 8c669cd9-b51d-9241-b237-7b74cda89f4f
Ancestors: Skeleton-Richo.6

Added importing/exporting of formulas if the #showFormula preference is on.

=============== Diff against Skeleton-Richo.6 ===============

Item was changed:
  ----- Method: Player>>exportDataToFile (in category '*skeleton-data i/o') -----
  exportDataToFile
  [self saveCSVFile: self csvFileName separator: self csvSeparator]
  on: Error do: [:err| ^ self inform: err description]!

Item was changed:
  ----- Method: Player>>openCSVFile:separator: (in category '*skeleton-data i/o') -----
  openCSVFile: filePath separator: separator
  FileStream
  readOnlyFileNamed: filePath
  do: [:file || values rows columns |
  values := (CSVParser on: file)
  useDelimiter: separator;
  rows.
  rows := values size.
  columns := values first size.
  self setTotalRows: rows + 1;
  setTotalColumns: columns + 1.
  1 to: rows do: [:r|
  1 to: columns do: [:c |
  ((values at: r) at: c ifAbsent: nil)
+ ifNotNil: [:aString || cell |
+ cell := self sheet assuredCellAt: c @ r.
+ (aString beginsWith: '=')
+ ifTrue: [cell formula: aString]
+ ifFalse: [cell contents: aString]
+ ]]]].!
- ifNotNil: [:aString |
- (self sheet assuredCellAt: c @ r) contents: aString]]]].!

Item was changed:
  ----- Method: Player>>rows (in category '*skeleton-base') -----
  rows
  ^ (1 to: self getTotalRows - 1) collect: [:r |
+ (1 to: self getTotalColumns - 1) collect: [:c || cell |
+ cell := self sheet cellAt: c @ r.
+ (cell hasFormula and: [self sheetMorph showFormula])
+ ifTrue: [cell formula asString]
+ ifFalse: [cell contents asString]]]!
- (1 to: self getTotalColumns - 1) collect: [:c |
- (self sheet cellAt: c @ r) contents]]!

Item was added:
+ ----- Method: SkSheetMorph>>color: (in category 'accessing') -----
+ color: aColor
+ super color: aColor.
+ sheet fillStyle: aColor.
+ self title color: aColor makeForegroundColor!

Item was added:
+ ----- Method: SkSheetMorph>>fillStyle: (in category 'accessing') -----
+ fillStyle: aFillStyle
+ self color: aFillStyle!

Item was added:
+ ----- Method: SkSheetMorph>>showFormula (in category 'autogenerated') -----
+ showFormula
+ ^ sheet showFormula
+ !

Item was added:
+ ----- Method: SkSheetMorph>>title (in category 'accessing') -----
+ title
+ ^ self pageControls findA: UpdatingStringMorph!

_______________________________________________
etoys-dev mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/etoys-dev