![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
![[community profile]](https://www.dreamwidth.org/img/silk/identity/community.png)
I just tried to edit my style and got this error:
S2 Compiler Output at Sun Sep 13 02:31:23 2009
Error compiling layer:
Compile error: line 170, column 5: Can't override property 'font_base_size' of type string with new type int.
S2::NodeProperty, S2/NodeProperty.pm, 120
S2::NodePropGroup, S2/NodePropGroup.pm, 77
S2::Checker, S2/Checker.pm, 374
S2::Compiler, S2/Compiler.pm, 34
Context
166: property string font_base {
167: des = "Default Font for the page";
168: note = "This font will apply to the entire page as the base font. If you set any of the other font properties below, they will override this setting for that specific part of the page.";
169: }
170: property int font_base_size {
171: des = "Default Font Size for the page.";
172: }
173: property string font_header_title {
174: des = "Font for the Header Title";
What I can't figure out is why it expects it to be a string.
To confuse things further, this code has been in my style for ages and has always compiled fine before. It's completely unrelated to what I was changing. In fact, when I refresh the page and then hit "Save & compile" without making any changes at all to my existing and entirely functional style, I get that error.
Any idea how to fix it?
EDIT: I gave up and made all the ints into strings, and it mostly seems to be working okay except that now my menu bar is a million pixels high because it's supposed to be the header font size plus 8 and of course you can't add 8 to a string. I may just have to hardcode that. GRRR.
S2 Compiler Output at Sun Sep 13 02:31:23 2009
Error compiling layer:
Compile error: line 170, column 5: Can't override property 'font_base_size' of type string with new type int.
S2::NodeProperty, S2/NodeProperty.pm, 120
S2::NodePropGroup, S2/NodePropGroup.pm, 77
S2::Checker, S2/Checker.pm, 374
S2::Compiler, S2/Compiler.pm, 34
Context
166: property string font_base {
167: des = "Default Font for the page";
168: note = "This font will apply to the entire page as the base font. If you set any of the other font properties below, they will override this setting for that specific part of the page.";
169: }
170: property int font_base_size {
171: des = "Default Font Size for the page.";
172: }
173: property string font_header_title {
174: des = "Font for the Header Title";
What I can't figure out is why it expects it to be a string.
To confuse things further, this code has been in my style for ages and has always compiled fine before. It's completely unrelated to what I was changing. In fact, when I refresh the page and then hit "Save & compile" without making any changes at all to my existing and entirely functional style, I get that error.
Any idea how to fix it?
EDIT: I gave up and made all the ints into strings, and it mostly seems to be working okay except that now my menu bar is a million pixels high because it's supposed to be the header font size plus 8 and of course you can't add 8 to a string. I may just have to hardcode that. GRRR.
no subject
Date: 2009-09-13 04:12 am (UTC)It does seem like the size properties should be integers, though; that might be worth submitting as a general S2 bug.
no subject
Date: 2009-09-13 04:37 am (UTC)no subject
Date: 2009-09-13 06:19 am (UTC)no subject
Date: 2009-09-13 06:26 am (UTC)no subject
Date: 2009-09-13 09:25 am (UTC)And Dreamwidth base font size is set to 0.75em.
no subject
Date: 2009-09-13 12:20 pm (UTC)no subject
Date: 2009-09-13 04:21 pm (UTC)no subject
Date: 2009-09-13 06:16 pm (UTC)I wonder if we could at least hack in a function that lets you try to add strings and ints? that is, if it's possible to make it a number, then calculate it as a number... I imagine that would be possible.
no subject
Date: 2009-09-13 06:20 pm (UTC)no subject
Date: 2009-09-13 01:47 pm (UTC)no subject
Date: 2009-09-13 04:27 pm (UTC)Well, perhaps you know, then. As I was just mentioning to Afuna, it really does seem useful to set those properties as math-able things. Does S2 allow for setting something as a float? And do you think that would work? I could forsee a bit of screwing around with "if no decimal add .0 to end" or "if increment equals % strip the .0 off again" to deal with non-decimals, but if it let people work with these things as numbers, it might be worth it.
no subject
Date: 2009-09-14 12:20 am (UTC)I would have to experiment to see if the language even allows converting between variable types.