lastdance: (Default)
lastdance ([personal profile] lastdance) wrote in [community profile] style_system2009-05-05 09:26 pm

Calling functions in other classes

I've been reading S2 documentation like crazy, and I'm pretty sure the answer is 'no' but I'm going to throw out the question anyway:

Is there any possible way to call functions from a different view than the one you're currently on? For example, the EntryPage class has a function print_comments. But what if I want to print the subjects of the 5 latest comments on the Recent view (maybe in the sidebar)? The RecentPage class doesn't include that function, so I'm assuming there's no way to call it unless the core was rewritten to add it into RecentPage and allow it to take parameters so it knows which comments to pull back. Am I correct in that assumption?

I'll gladly take the question elsewhere if this isn't the right place. Any direction would be so much appreciated.
zorkfox: An order ticket from a restaurant with one item written in blue ink: "Something better than this..." (Three)

Re: Flimsy Suggestion

[personal profile] zorkfox 2009-05-06 06:08 pm (UTC)(link)
Aw, heck. I'm sorry; you're totally right about that. It's because I started writing my reply with EntryPage in mind instead of ReplyPage, noticed half-way through, and made corrections. I can only blame the lateness of the hour. ^_^;
zorkfox: An order ticket from a restaurant with one item written in blue ink: "Something better than this..." (Three)

Re: Flimsy Suggestion

[personal profile] zorkfox 2009-05-06 06:46 pm (UTC)(link)
Sigh! I know why they limit the data in cases like this, but it sure is frustrating when you come up with a clever idea, but can't implement it because the computer time becomes a problem. :(