[Typo3-dev] TS inconsistencies...

"Kasper Skårhøj" kasper at typo3.com
Mon Jul 28 09:46:40 CEST 2003


>GIFBUILDER's text property/object won't accept fontSize or fontFace from 
>GPVar (at least not in the way other TEXTs do).

This is not inconsistent, Dan. If you look in TSref it is clear that those properties DOES NOT have any properties themselves which can be used to fetch a value from anywhere outside. Typically you would look for a data type like "string / ->stdWrap" which means that you can supply a value to the property AND IN ADDITION that value will be passed to the stdWrap function (in fact a PHP function!) through which you can load another content value or just process it in different ways!

What you see as an inconsistency must be because you expect ALL properties in TypoScript Templates to have "stdWrap properties" and frankly I cannot see why they should have or why it should be inconsistent if they don't; you open TSref and from that you will know WHICH properties are available for each other object/property.

HOWEVER I will admit that TSref needs to be cleaned up so that is a strictly formal way to read information out of it. Right now it lacks on that part. In fact I'm currently standing in front of that task (although I might have to push it a little) and my goal will be to have a strict way to define relations between objects and properties; so strict that the information can be transformed into a *semantics checker* that can tell you IF you use non-existing properties or WHAT properties are available to you anyways.

Example (From GIFBUILDER / TEXT object):


text	|	stdWrap
....
fontSize 	|	posint
fontColor	|	GraphicColor


Here you can clearly see that "fontSize" and "fontColor" is data types "posint" and "GraphicColor". From the data type definitions in the beginning of the document you can further see that GraphicColor means that you have three ways to define a color like "red":

red	(HTML-color)
#ffeecc 	(HTML-color)
255,0,255	(RGB-integers)

For "posint" it simply means "An integer >=0"

HOWEVER the data type "stdWrap" for the "text" property is in my eyes inconsistent. It does NOT tell you that you can set the value to a string. In fact "stdWrap" is not a data type! Its a hint that the properties of "text" comes from the "stdWrap" function. Instead the property "text" should be changed to "string / ->stdWrap" which I intend to make the formal way to express "[value] / [properties]" for any property/object.


BTW, I think this is a fitting comment from JoH:

> Well - it's just the contrary: If you are a PHP Programmer you don't need
> TypoScript.
> Typoscript is done to offer people who don't know anything of PHP (like me)
> the possibility to master a PHP based CMS System.


- kasper
-------------------- o ---------------------
>>>    In God I trust - others pay cash!     <<<
Check www.typo3.com







More information about the TYPO3-dev mailing list