Jason Tackaberry wrote:
>> That being said... this is your project, I'm just wasting your time with
>> my $0.02 =)  I just wanted to offer the "other view" before you
>> committed to something I personally find distasteful.
>
> Not at all.  This is the kind of discussion we want to have.  Please
> don't think you're wasting our time.  The more information dischi has
> the better decision he can make.

I hope I'm not the only one to make that decision, I still hope that
you implement it. Maybe the idea of using a current template engine is
not the way to go. For example, let's say we use Kid (the same is true
for every template engine). We use some 'if' statements in the
template to decide what to show. This depends on the item
selected. Now we change the selection. This would mean to reload the
template (xml->python), evaluate it, transform it back into xml
(python->xml) and give it to kaa.canvas. kaa.canvas will read the xml
file again (xml->python) and needs to check which parts are still the
same and what changes. This is a huge overkill.

Maybe do not use a given template engine and write a small one inside
kaa.canvas. There is xml code already. A simple proposal would be to
support statements like I wrote in an earlier mail to define what to
draw based on the items attributes. So for a menu, Freevo gives a xml
template to kaa.canvas and sets the attributes. On selection change,
Freevo only calls update_attributes(...) and kaa.canvas will draw the
new stuff. This should be faster and if I'm not wrong, we only need
some 'if' statements. To have the full power Freevo needs to give some
extra elements to kaa.canvas, e.g. <listing> and to separate positions
and colors, I guess a xml file should have some sort of css file with
attributes. 

Example:

<canvas type="menu">
  <listing id="foo" x="10" y"10" width="200"/>
  <text condition="item.foo == 1">Item has Foo</text>
  <block condition="item.type == 'video'">
    <text>This is a video item</text>
  </block>
</canvas>

listing.foo = {
   height = 50,
   color = green
}

color.green = 0x004400


Dischi

-- 
Anything labeled "NEW" and/or "IMPROVED" isn't.  The label means the
price went up.  The label "ALL NEW", "COMPLETELY NEW", or "GREAT NEW"
means the price went way up.

Attachment: pgptZH7ywbe5y.pgp
Description: PGP signature

Reply via email to