-the redhead- (theredhead) wrote,
-the redhead-

Trying to get the hang of coding Component (S2)

Obligatory disclaimer - yes, I have spent the last several hours reading the tutorials. In that time I've managed to create user and theme layers, activate a style using them, and start coding those layers by pulling down the code created using the wizard.

My test journal is at http://test.livejournal.org/users/theredhead1/

The style and layers is question are style ID #5642, user layer ID #6632, and theme layer ID #6633 (which have been made visible for your convenience).

But quite obviously I'm missing a connection regarding modifying stylesheets (specifically in regards to print_custom_head and the spiffy date format).

So I tried to stick the stylesheet stuff in. I've included the lovely code from one of the tutorials here, as since it won't compile it's not saving to the layer. I just tried putting it on the end to of what I currently have in the user layer ( appropriate "{" & "<"changed to "[" for viewability here):

#*******Stylesheet code*******

#keep first lines

function print_stylesheet() [

#stylesheet additions & changes here

#spiffy date & time

function Page::print_custom_head() [

*"""[style type="text/css"]

*line-height: 36px;
font-family: serif;
font-size: 80pt;
color: #f9a861;
letter-spacing: 10px;
text-align: center;

line-height: 10px;
margin-top: -19px;
margin-left: 170px;
font-family: serif;
font-size: 10pt;
color: #ffe3c6;
letter-spacing: 5px;
text-align: left;

line-height: 10px;
margin-top: 8px;
margin-left: 285px;
font-family: serif;
font-size: 10pt;
font-weight: 700;
color: #ffe3c6;
letter-spacing: 2px;
text-align: left;


#keep last lines


Here are the less than lovely results:

S2 Compiler Output at Sun Aug 7 13:56:33 2005
Error compiling layer:

Compile error: line 93, column 44: Unexpected token found. Expecting: [TokenPunct] = (
Got: [TokenIdent] = type
S2::Node, S2/Node.pm, 139
S2::NodeArguments, S2/NodeArguments.pm, 25
S2::NodeTerm, S2/NodeTerm.pm, 450
S2::NodeIncExpr, S2/NodeIncExpr.pm, 41
S2::NodeUnaryExpr, S2/NodeUnaryExpr.pm, 40
S2::NodeProduct, S2/NodeProduct.pm, 28
S2::NodeSum, S2/NodeSum.pm, 31
S2::NodeRelExpr, S2/NodeRelExpr.pm, 41
S2::NodeEqExpr, S2/NodeEqExpr.pm, 29
S2::NodeLogAndExpr, S2/NodeLogAndExpr.pm, 29
S2::NodeLogOrExpr, S2/NodeLogOrExpr.pm, 29
S2::NodeRange, S2/NodeRange.pm, 29
S2::NodeCondExpr, S2/NodeCondExpr.pm, 29
S2::NodeAssignExpr, S2/NodeAssignExpr.pm, 29
S2::NodeExpr, S2/NodeExpr.pm, 29
S2::NodePrintStmt, S2/NodePrintStmt.pm, 48
S2::NodeStmt, S2/NodeStmt.pm, 35
S2::NodeStmtBlock, S2/NodeStmtBlock.pm, 42
S2::NodeFunction, S2/NodeFunction.pm, 104
S2::Layer, S2/Layer.pm, 58
S2::Compiler, S2/Compiler.pm, 27


89: #spiffy date & time
91: function Page::print_custom_head() [
93: """[style type="text/css"]
95: .date4{
96: line-height: 36px;
97: font-family: serif;

So what am I missing here? I know the code works (obviously). It's clear to me that I'm somehow not putting this code in my user layer correctly, or am missing some other vital ingredient. Also, is there any way for me to access/download my current stylesheet so that I can see what's going on? Help?


-the redhead-
  • Post a new comment


    default userpic

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.