August 2nd, 2002

amused, happy
  • mart

Galleries that aren't Galleries

I think it'd be useful to be able to create fake galleries which exist in the gallery namespace but cannot contain any photos. These would then be able to act as "categories" so that users could have a list like this:

To berate the obvious: I want to be able to have things in the list which aren't links. Not all categories would usefully have galleries associated with them, and if they did I'd probably want that list automatically generated from a mix of the subcategories in most cases anyway. (Galleries generated by queries is already planned, of course)

An easy (yet not very clean) way to do this would be to just make empty galleries automatically not be links. That way it'd just be a matter of creating a gallery and never putting anything in it. If, later, something manages to fit into the parent category somehow, it's just a matter of uploading a picture to that gallery and it instantly becomes a linked gallery. Sound good?

  • brad


whitaker's new group editor is in CVS.

mart and I are adding null object support to S2. He sent me a patch which did a lot of it, but I found some cases where it could be better.

Collapse )

In that example, it'll print:

Maple grows.
Tree Grows.

And then it'll crash with a weird error the user won't be able to debug.

My proposal to mart would make an intelligent error message be returned, like:

"Method called on null Tree object at Orange Happy Layer (layerid #3532), line 17."

(which is really what one would expect.) If he doesn't find any issue with my implementation plan, that'll happen Sunday.

Still haven't worked out unusual gallery thumbnails yet... greyscale & other variations. But I'm starting to get an idea. I'll post my plan for that Sunday.

Still need banana's color chooser to work in Mozilla & all major IEs.... somebody should help him out with that.
  • brad


I got impatient waiting for my friend to get off work, Mart to mail me back, and Sunday to arrive, so I did the null S2 stuff already.

There are regression tests in src/s2/tests/

Mart, if you ever add new features to the compiler, be sure to add new tests, for both passes and failures.
  • banana

Colour chooser

I had a go at the colour chooser that Brad asked for. I'm not sure what format to submit the result in, so I've added them here. Collapse )
Sadly, there are some problems.
  1. It only works properly in IE: I can't persuade NS6 to send anything back from a pop-up back to the parent browser window, despite trying umpteen variations.
  2. It doesn't work in Opera at all - Opera's javascript support sucks.
  3. Javascript sucks
  4. I don't have any handy graphics to link - it needs a Hue/Saturation picture and a Value (Brightness) gradient - I'm sure they can be snagged from somewhere or generated easily enough.
  5. The HSV to RGB calcs are a little out (I was comparing with GIMP's translations), but I don't think that's a huge problem because (a) the differences aren't so big, and (b) you can see the colour you're going to get, not the "correct" HSV colour - if this really is a problem, someone could look at the rounding in the HSV translation.
  6. Javascript sucks
  7. The file names and some of the variable names are of dubious quality, and I'm English so I spell colour with a U.

I would have resolved some of these issues before submitting this, but I'm away from a computer for a while now.

S2 Help

TRying to mess around with S2 i've come accross a slight hitch

i'm trying to make a layout from the simplelayout layout

After its compiled and running, when i try to view /halkeye/ i get an error todo with not having an Image::print function.

I've tracked it down to the following lines with the simple layout... but i can't figure out why it works with that layer, and not mine.

  var Image p;
  $p = palimg_create($*first_image); $p->print();
  $p = palimg_create($*prev_image); $p->print();
  $p = palimg_create($*up_image); $p->print();
  $p = palimg_create($*next_image); $p->print();
  $p = palimg_create($*last_image); $p->print();

Any ideas here? i've pretty much copied the simplelayout exactly with only removing the odd lines at the top.
See what i mean?

Update: Not sure if its mozilla or not, but it seems somtimes when i refresh, it goes to an older compiled version... is there any reason for this?