Fog Creek Software
Discussion Board

Knowledge Base
Terry's Tips
Darren's Tips

Bug in Conditions


Citydesk is located behind a firewall so the bug report couldn't go to you guys, so I'll tell you here.

I was having trouble writing conditions (the documentation is somewhat unclear on this) and experimented with a few different things.

I wrote a condition as follows:

(not (news)

(not (news))

etc. I realize now I wanted:

(not (keyword_contains "(news)"))

In any case this caused an error when I tried to render the page.

The documentation should give examples of nested conditions, and let you know you can nest and/or conditions as well, giving you a nearly unlimited number of and/or options. (this is true, right?)

Mark W
Friday, January 25, 2002

We should have better documentation with more examples on this.

Did you finally get it to work the way you expected?

Joel Spolsky
Friday, January 25, 2002

Oh, and yes -- you can nest as much as you want, although the syntax uses lisp's Polish notation with the "ands" and "ors" in front:

(and (folder "news") (not (or (keyword-contains "foo") (keyword-contains"bar"))))

Joel Spolsky
Friday, January 25, 2002

Remind me to whip out my HP12C next time I try some Citydesk scripting!

Yes, I eventually got what I wanted, though I was half expecting:

(and (keyword "news") (keyword "us") (keyword "financial")) to work too, and I kinda think it should.

I've seen some really amazing DHTML based WYSIWYG HTML editors (think Manila, but renders in real time). Any chance you'll make a server-based version of Citydesk with one of these babies on top to allow you to add articles & files through a browser?

Wow, the length and number of acronyms in that last paragraph is staggering.

Mark W
Sunday, January 27, 2002

I agree about 'and' and 'or' taking multiple clauses. It was waiting for a PushBackToken feature in the lexer, which I implemented yesterday, so you may see this soon ;)

Joel Spolsky
Friday, February 01, 2002

All I understood was "I agree" the rest is like "blah blah blah."

Is this along the lines of the 4 "lines" of memory in the HP12c that allows it to do all the complex computations and compount interest?

Will you be rolling CityDesk off the shelves as a financial modelling tool next? (just kidding)

Mark W
Saturday, February 02, 2002

*  Recent Topics

*  Fog Creek Home