Nitty gritty details needed (or: "Why the heck doesn't it instantiate my callbacks class?!").

roeme

Joined: 2009-02-09
Posts: 2
Posted: Mon, 2009-02-09 21:57

Hi everybody,

first post here, after exhaustive searching in the forums, digging through the documentation, googleing through codex.menalto.com and loosing a bunch of hairs over non-documented stuff in the API. But if I hit the wrong part of the forum, please feel free to direct me to detailed API resources or the right threads. Or relocate this thread, whatever suits the guidelines here.

Short Problem description:
Module callbacks class cannot be loaded.

Medium Problem description:
Module callbacks class cannot be instantiated even though classname matches and is defined in Callbacks.inc.

What I need:
Some insight why this could fail.

What I wish for (ordered by importance):
1. Well documented API (*cough*)
2. Responsibilities of the various classes
3. UML showing the class hierarchy

Venting rant (skip this paragraph at your convenience):
Being not satisfied with the Album Select Module, I set out to write a fresh module - I wanted to extend gallery anyway. So I dug through the wiki, searched for beginner's threads and bookmarked the API (...and of course did read it where things I came across were documented). Nothing provided in-depth and exhaustive documentation, but at least it enabled me to create a basic, basic module. The rest so far was try-and-error. But there's no single point to start, information is scattered around the wiki, the forum and the API...don't let me start on the API. AAGH! (Some beer came in handy at this point.)
(EOF venting rant.)

I do quite a bit of OO programming and do know design patterns, so please don't hesitate to throw that stuff at me. I really want to create a module that fits into gallery. I'm also thinking about releasing the module into the GPL (and subsequently for gallery) and do some exhaustive commenting - so it may help other beginners where I had to start from scratch.
But I need your help for that. ...pretty please?

Thanks in advance!

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Mon, 2009-02-09 22:14
Quote:
1. Well documented API (*cough*)

You've seen the API documentation then?
http://gallery.menalto.com/apidoc/GalleryCore/Classes/GalleryCoreApi.html

Tell me more about your callback or post some code and I'll try to help.

 
roeme

Joined: 2009-02-09
Posts: 2
Posted: Wed, 2009-02-11 20:58
alecmyers wrote:
Quote:
1. Well documented API (*cough*)

You've seen the API documentation then?
http://gallery.menalto.com/apidoc/GalleryCore/Classes/GalleryCoreApi.html

Tell me more about your callback or post some code and I'll try to help.

Thanks!

Yup, I was in the apidoc. However, I'm kind of lost in there - it's such a vast amount of methods, objects etc. And I'm having a hard time putting it into context. So far, I was able to make out that the architecture defines Photos, Albums, Movies as specific Entities, i.e. derived classes of GalleryEntity.

Needs satisfied, primary problem solved: It' quite embarassing. All I did wrong was to forget <?php ... ?> in Callbacks.inc. I can't believe I didn't spot that mistake.

Sorry for wasting your time with that one...*shame*. However, do you know how or where I can fulfill my two other wishes?

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Wed, 2009-02-11 22:08
Quote:
However, do you know how or where I can fulfill my two other wishes?

We need some expectation-setting here - I can tell you fairly certainly that you won't get either of your other two wishes fulfilled. G2 is end-of-life, G3 is in development, and I detect no enthusiasm on the part of any one, least of all the core developers, to document or continue development on G2. There may be a security release or two in the future, but that's about it. The cynical (and not-so-cynical) among us might even think that G3 was the core development team's escape route from having to continue to work on a codebase that it is so convoluted and sophisticated that only two of them had any sort of complete understanding of how it fits together. It's an explicit aim of G3 to be simpler and easier to work on that G2; unfortunately it will be some while until G3 has anything like the range of features now available for G2 - if ever.