Brown Eyed Girl (browneyedgirl65) wrote in component_help,
Brown Eyed Girl
browneyedgirl65
component_help

  • Mood:

i don't like the looks of this -- i can't define new functions?

<whine>
What do you mean I can't define new functions?
This stuff just screams to be broken down into smaller more manageable bites...
no can do???
</whine>

Edit

OK, it seems that I would define a MyVar class and dump the extra procedures in there,
class MyVars
{
var string cleargif;
var string[] userpic;
var int randuserpic;
function setup();
function print_rounded_component(string header_text, string body_text);
function print_quote_component();
function print_category_component();
}

Question: how would I call (say) print_rounded_component from within print_quote_component?
It doesn't seem to like $.print_rounded_component nor $mv.print_rounded_component...



I mean, I figured this would be a handy dandy utility to switch all the components to fully rounded corners without having to duplicate that horrible table markup everywhere...?

S2 Compiler Output at Mon Aug 8 14:26:58 2005
Error compiling layer:

Compile error: line 43, column 1: Only core and layout layers can define new functions.
S2::NodeFunction, S2/NodeFunction.pm, 191
S2::Checker, S2/Checker.pm, 339
S2::Compiler, S2/Compiler.pm, 34


Context

39: $.userpic[4]="http://www.livejournal.com/userpic/31798558/5935759";
40: $.randuserpic = rand(0, ((size $.userpic) - 1));
41: }
42:
43: function print_rounded_component(string header_text, string body_text)
44: {
45: """
46: <tr>
47: <td valign="top" rowspan="3" colspan="3" width="5">

Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

  • 7 comments