Opened 11 years ago

Closed 10 years ago

Last modified 10 years ago

#53 closed task (released)

Create WarFoundry save class to store army as file

Reported by: ibboard Owned by: ibboard
Priority: major Milestone: WarFoundry 0.1
Component: WarFoundry-API Version:
Keywords: save xml army Cc:
Blocked By: Blocking:

Description

Creating armies isn't much use if they are lost on save. We need an opposite of a "WarFoundryFactory" that saves an Army object out to a file.

Attachments (3)

FirstArmy.army (218 bytes) - added by ibboard 10 years ago.
First exported army!
ArmyWithUnits.army (318 bytes) - added by ibboard 10 years ago.
Army with units
ArmyWithEquipment.army (374 bytes) - added by ibboard 10 years ago.
Army with equipment

Download all attachments as: .zip

Change History (21)

comment:1 Changed 10 years ago by ibboard

Owner: ibboard deleted

Remove owner so that the team can more easily see bugs. Using default owners seems good at first but is bad practice when a team can be working on any part of the project.

comment:2 Changed 10 years ago by ibboard

Owner: set to ibboard
Status: newaccepted

comment:3 Changed 10 years ago by ibboard

(In r193) Re #53: Make WarFoundry XML saver

  • Make XMLSaver implement Saver interface
  • Strip out old code
  • Start to code converting of objects to XML files
  • Add class to store strings in to Zip files

comment:4 Changed 10 years ago by ibboard

(In r194) Re #53: Add XML saver

  • Add initial stub behind "save as" that saves to a fixed location

Changed 10 years ago by ibboard

Attachment: FirstArmy.army added

First exported army!

comment:5 Changed 10 years ago by ibboard

(In r196) Re #86: Initial GTK# GUI (because of Re #53)

  • Refactor file saving in to a common method
  • Replace fixed location with dialog

comment:6 Changed 10 years ago by ibboard

(In r197) Re #53: Add XML saver

  • Pad out some initial construction of XML for contained units

comment:7 Changed 10 years ago by ibboard

Keywords: save xml army added

comment:8 Changed 10 years ago by ibboard

(In r198) Re #53: Add XML saver

  • Actually add unit elements, since creating them doesn't add them as well!

Changed 10 years ago by ibboard

Attachment: ArmyWithUnits.army added

Army with units

comment:9 Changed 10 years ago by ibboard

(In r199) Re #53: Create XML saver

  • Add saving of unit equipment
  • Add extra property to DTD to indicate whether equipment amount is fixed or a ratio

Changed 10 years ago by ibboard

Attachment: ArmyWithEquipment.army added

Army with equipment

comment:10 Changed 10 years ago by ibboard

If people want to look at the attached army files, they're just Zips with XML in.

comment:11 Changed 10 years ago by ibboard

Resolution: fixed
Status: acceptedclosed

(In r200) Fixes #53: Make XML file saver

  • force file extension
  • Make sure IDs are in valid XML format
  • Remove commented example of file
  • Output contained units

comment:12 Changed 10 years ago by ibboard

(In r201) Re #53: Create XML army saver

  • Fix file extension (noticed while working on re #54)

comment:13 Changed 10 years ago by ibboard

(In r203) Re #54: Add Army support to WarFoundryFactory

  • Stop "custom equipment" node being mandatory
  • Remove unused "ratio" definition
  • Change "integer or ratio" definition to "integer or percentage"
  • Use "integer or percentage" definition in army XSD
  • Add exception to say that required objects were missing (Game System and Race)
  • Throw exceptions on creating army if game system or race is missing

Re #53: Add saving of Army to XML file

  • Add namespace attributes to XML root node

comment:14 Changed 10 years ago by ibboard

(In r207) Re #53: Add XML army saving

  • Make file identifiers public
  • Add army identifier to comment

no-open-ticket

comment:15 Changed 10 years ago by ibboard

(In r218) Re #53: Create WarFoundry save class to store army as file

  • Fix exceptions thrown by official .Net XML parsing of namespace names

Also:

  • Remove unnecessary notification of name change

no-open-ticket

comment:16 Changed 10 years ago by ibboard

released: 1

Mark released changes as released

comment:17 Changed 10 years ago by ibboard

released: 1yes

Mark released fixes as released using radio values

comment:18 Changed 10 years ago by ibboard

Resolution: fixedreleased

Mark fix as released under a previous version

Note: See TracTickets for help on using tickets.