Brad Fitzpatrick (brad) wrote in fotobilder,
Brad Fitzpatrick
brad
fotobilder

more core S2 work

Weekend mostly over, I'm getting back to working on the core S2 file. I'm slowly merging the bits and pieces from Mart's version that I can make sense of.

Some things I just have no clue, though:

class PictureView { # A way of viewing a picture
var int width;
var int height;
var string url;
function toString() : string;
function toString(string alt) : string;
function print();
function print(string alt);
}

Is that an HTML page? It doesn't contain an Image or Picture, either, and it doesn't descend from either of those. Hence, not in my version.

Also, some things are just unnecessary:

class GalleryPicturePage extends PicturePage { # A page for showing a picture form a gallery
var ItemRange pictures; # Some Range information for other pictures in the gallery
var GalleryBasic gallery;
}

There is no GalleryPicturePage because when a gallery does override the default style, it has its own style... all the layers. So there's just PicturePage.

I changed the Picture class quite a bit, too.

Some things I extended. Mart had:

class ItemRange {
var bool alldisplayed;
var int current;
var int total;
var string url_next; # --.
var string url_prev; # |__ Any of these can be blank if there is nothing for them
var string url_first; # | to point to.
var string url_last; # --'
}

I changed that to:

class ItemRange {
var bool alldisplayed;
var int pages;
var int page;
var int items;
var int pageitemfrom;
var int pageitemto;
var string url_next; # --.
var string url_prev; # |__ Any of these can be blank if there is nothing for them
var string url_first; # | to point to.
var string url_last; # --
function builtin url_of_page(int n);
}

The builtin function's implementation will check for a subref pointer hanging off the hashref at '_url_of_page' and run it, else return an empty string.

Mart, I cut down your string class a ton. We can add some of that stuff as we need it (IF we need it ... some of that stuff I couldn't foresee ever needing.)

Also, I don't merge things too quickly when they're accompanied by, "Well, this breaks things so it doesn't run anymore...".

Let's just add bits and pieces as we go, discussing their rationale, and keeping the implementation working throughout.
Subscribe

  • 302: lj_dev

    In the interests of consolidating all FotoBilder development-related discussion, we're going to be closing down this community. The same…

  • Development stalled?

    Is the development of Fotobilder held? Stalled? I am asking because there is no activity on the community and there is no link to the Fotobilder…

  • (no subject)

    Does FotoBilder works with Apache2? I installed all the required modules on my debian sarge, and when I restart my apache server, it dies horribly…

  • Post a new comment

    Error

    Comments allowed for members only

    Anonymous comments are disabled in this journal

    default userpic
  • 3 comments