Hi,

  Scott Collins has published a free in-progess
Getting Started Guide titeld "Konfabulator: The
Beginning Widget Writer's Guide".

   Scott writes: 

   Till now, the place to start has been to open up a
working Widget and look inside it. You could choose
one that's close to solving your problem, or you could
choose one that's very simple. We'll do that in a bit.
For now, though, we'll start by describing the parts
all Widgets have in common, and use that knowledge to
build a Widget so trivial and simple that you would
never happen upon it in the wild. Then, we'll explore
and dissect specific Widgets for specific techniques.
Before we can do that, we need to take a quick look at
three important technologies that go into building a
Widget: XML, JavaScript, and .png (Portable Network
Graphics) files.
       

   To wrap up the story allow me to post a real-world
Konfabulator widgets snippet from the section titled
"Lessons from the Digital Clock: image re-use and
run-time substitution":


<?xml version="1.0" encoding="UTF-8"?>
<!-- SubstitutionTest.kon -->
<widget>
  <window />
  <image name="digit" src="0.png" />

  <action trigger="onLoad">
    var index = 0;
    var filename = new Array('0.png',
                             '1.png',
                             '2.png',
                             '3.png',
                             '4.png',
                             '5.png',
                             '6.png',
                             '7.png',
                             '8.png',
                             '9.png');
  </action>

  <action trigger="onTimer" interval="0.5">
    index = (index+1) % 10;
    digit.src = filename[index];
  </action>
</widget>   


 Full story @ http://scottcollins.net/konfabulator and
http://scottcollins.net/konfabulator/konfabulator_flat.shtml

   - Gerald


-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
xul-announce mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xul-announce

Reply via email to