Bugs

So I found some bugs when creating custom dice. Nothing mission critical here, but it would be nice if you could adress them some time:

- special characters do not work; you already included some special characters (see http://www.ecsoftwareconsulting.com/node/103), but many others (in my case: german umlauts and the minus sign) are missing.
- When the number of placeholders %% doesn't match the number of expression for a face, the import routine gives an error. Unfortunately, the error message includes the whole dice set, not just the face in question (preferrably with a line number). This makes finding the right face a bit of a hassle, especially if you work with custom probabilities :)

Generally it would be nice to have a separat program to create and check the xml-files for custom dice. Right now I create the xml-files on my desktop, then transfer them to sd-card, import them, check the error messages, go back to desktop -> loop until done.

Oh, and when I try to create a custom die in the application, when I enter the dice set name and then hit ok, it gives me an error message saying "Unable to save these changes. At least one die must be defined."

CU
FLo

Opportunities :)

Thank you for taking the time to report these.

  1. When you say special characters don't work, what do you mean? Do you get an error when parsing the XML or do they not render properly when you view them in the application?

    The only characters that require substitution in XML are those that might confuse the parser, which is why the quotes, less-than, and greater-than have these special codes.

    If you are getting an "Invalid Character Found" error, the info at the following link can explain it better than I. XML Encoding

    I haven't tested with a variety of encoding options, so I can't say for sure that the XML parser provided by Android will handle these situations properly. If you have an example XML file, that might help me better understand. You may have to email it to me, though as posting it in the forum can be problematic.

  2. I spent a lot of time trying to provide an indication as to where the problem occurs in an XML file. Some errors are easier to identify than others. Unfortunately, getting the line number is not always possible (XML doesn't really care about lines in the file, it's all about tags), but I will look into it and see if there is something more I can do.
  3. A custom dice assist program is an interesting idea. There are programs out there that will validate XML for you. In general they are referred to as a validating parser. For example: this one found at w3.org. These will validate the XML you use, but to really take advantage of them I will need to prepare a document type definition (DTD) to go along with it. This is definitely something I will look into.
  4. From what you are describing here, it appears that you are trying to save an "empty" dice set. The app will require that you create at least one die and that each die created has at least one face.

1. You were right, I was

1. You were right, I was using the wrong encoding. After switching from ANSI to UTF-8, it worked. Thx.

4. After some more trial&error, I was able to figure out how to add a dice in the app itself. Here is the problem: You have to use the "menu" key and from other apps I'm used to call settings or information about the app with that button, but not main functionality. Maybe you want to add a "Add Dice" and "Add face" button to the UI, that should clear things up.