Matthew Gregory schrieb:
> OK,
> So if somebody wants to use the tileview they have to supply their own 
> theme?
> Since I cannot extend my appearance from the default qooxdoo one, if I 
> specify tileview.theme.TileView inf my config.json I get loads of 
> missing appearances.
>
> Is it reasonable to require people to create thier own theme just to use 
> the tileview widget?
>   
No but there is a second way to include a theme. Just like with mixins 
you can include a theme from a contrib into an existing theme.

qx.Theme.include(qx.theme.modern.Decoration, tileview.theme.Decoration);
qx.Theme.include(qx.theme.modern.Appearance, tileview.theme.Apperance);

This will include the tileview appearance into the modern appearance. 
This is the only code the user has to add to his application.


Best Fabian


> Alexander Back wrote:
>   
>> Hi Matt,
>>
>> Matthew Gregory wrote:
>>     
>>> OK, I've got it working but I'm a little unsure
>>>
>>> If I add "include : tileview.theme.TileView" to my theme as per your 
>>> instructions I get this error:
>>> It is not allowed to overwrite the key 'appearance' of theme 
>>> 'custom.theme.Custom' by mixin theme 'tileview.theme.TileView'.
>>>
>>> The only way I got it working was to add "include : 
>>> tileview.theme.Appearance" to my own Appearance.js and remove "extend : 
>>> qx.theme.modern.Appearance" from tileview.theme.Appearance
>>>
>>> This works, but I feel I've missed something
>>>       
>> No, that's the way to go. The "tileview.theme.Appearance" is a kind of 
>> mixin which is included in your custom appearance theme. The tileview 
>> appearance theme only has to define its own appearances and should not 
>> extend an existing appearance theme, because your custom theme (the 
>> "includer" theme does this already).
>> Technically the tileview appearance theme is merged into your custom 
>> appearance theme. So you only have to define keys below the 
>> "appearances" data structure, because the include mechnism simply grabs 
>> all the defined keys and merges them with the existing ones of your 
>> custom theme.
>>
>> cheers,
>>    Alex
>>
>>     
>>> Alexander Back wrote:
>>>       
>>>> Hi Derrell,
>>>>
>>>> Derrell Lipman wrote:
>>>>         
>>>>> On Fri, Nov 14, 2008 at 9:13 AM, Alexander Back <[EMAIL PROTECTED]>wrote:
>>>>>
>>>>>           
>>>>>>> The problem is how can I include this theme in my other project? If I
>>>>>>> change the QXTHEME entry in config.json to tileview.theme.TileView that
>>>>>>> works. But the problem is my other project already has it's own theme,
>>>>>>> how can I include both? Am I missing something from the contrib's
>>>>>>>               
>>>>>> Manifest?
>>>>>> Short answer: you can't.
>>>>>>
>>>>>> It is only possible to set one theme for your application in the
>>>>>> config.json. To use both themes you have to change a little bit in your
>>>>>> own appearance theme to get it to work.
>>>>>>
>>>>>>
>>>>>>
>>>>>>             
>>>>> The author of a contrib project doesn't know what theme an application
>>>>> writer will want to use.  If I understand you correctly, you're saying 
>>>>> that
>>>>> an application writer will need to make changes to the qooxdoo-contrib
>>>>> project to use their theme.  If that's correct, it eliminates the
>>>>> possibility of using the contrib: URI to load the contrib from its 
>>>>> read-only
>>>>> location online.
>>>>>           
>>>> I guess you misunderstood me :)
>>>>
>>>> The application writer has no to make any changes to the qooxdoo-contrib 
>>>> project he uses. If the contrib project offers an own appearance theme, 
>>>> the application writer has to make sure that he is including this 
>>>> appearance theme into his own appearance theme to make it work.
>>>>
>>>>         
>>>>> Or maybe I misunderstand.  Maybe in one's own appearance theme, one can
>>>>> include the themes from each of the (possibly many) qooxdoo-contrib 
>>>>> projects
>>>>> that the application is making use of, and thus solve the problem?
>>>>>           
>>>> Yes, that's exactly what I wanted to express ;-)
>>>>
>>>> cheers,
>>>>    Alex
>>>>         
>> -------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
>> Build the coolest Linux based applications with Moblin SDK & win great prizes
>> Grand prize is a trip for two to an Open Source event anywhere in the world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>>     
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> qooxdoo-devel mailing list
> qooxdoo-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
>   


-- 
Fabian Jakobs
JavaScript Framework Developer

1&1 Internet AG
Brauerstraße 48
76135 Karlsruhe

Amtsgericht Montabaur HRB 6484

Vorstand: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Thomas 
Gottschlich, Matthias Greve, Robert Hoffmann, Markus Huhn, Oliver Mauss, Achim 
Weiss
Aufsichtsratsvorsitzender: Michael Scheeren


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to