Lee Feigenbaum wrote:
> [snip]
>> and then try this expression
>>    .quantity * .cost
>> Please note the spaces surrounding *. The expression parser is flaky 
>> at the moment.
> ...but I can't get this to work. I get the error:
>
> """
> Caught exception: TabularView: Error processing configuration of 
> tabular view.
>
> Details: Error: Extra text found at the end of the code
> """
>
> I'm doing stuff like:
>
> <div ex:role="exhibit-view"
>      ...
>      ex:columns=".foo, .bar, .x * .y"
>      ...
> >
It was a bug in my already flaky expression parser... I've just 
committed a fix. Could you try again and see if it works for you now?

By the way, if you're using FireBug, then it's quite easy to try what 
works and what doesn't by going to a page that has Exhibit and then 
executing something like this in FireBug's console:

    try { Exhibit.Expression.parse(".x * .y") } catch (e) { 
console.log(e); }

FireBug really makes my work so much easier...

>> Cool! What other formats can you think of that demand special handling?
> Off the top of my head? Not much :-) I did realize that adding a new 
> format isn't as simple as I thought. There are other places that treat 
> numbers specially, and since currency is a type of number, it needed 
> special treatment also. (For example, to get currency ranges to work 
> correctly in the new range facets.)
Excel has the following formatting options:
- general
- number (number of decimal places, use thousand separators?, indicate 
negative numbers with red or with parentheses)
- currency (number of decimal places, symbol, negative number indication)
- accounting (number of decimal places, symbol)
- date
- time
- percentage (decimal places)
- fraction (up to X digits)
- scientific (decimal places)
- text
- special (zip code, zip code + 4, phone number, social security number)
- custom (roll your own format template)

Maybe we can start with that. Timeline has this notion of "labelers". I 
can try to adapt it for Exhibit.

David

_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general

Reply via email to