Home
dj2
06 July 2006 @ 09:54 am
As you may have noticed, I'm trying to get in the habit of updating this on a semi-regular basis (as opposed to my once every 1-3 month habit). We'll see how it goes.

Still working on everburning. I've got the quotes and the news sections done and could, and may, put them online. I'm currently working on the photo gallery which could be difficult depending on what I do. I still have to check that textdrive supports rmagick, and if they don't, if they'll install it. But, assuming I get some time, I should have something up relatively soon. Once it's up I'll move this blog over there. I just like controlling my own stuff I guess.

I've been trying to get back into EWL programming and to that end have done a couple of little cleanups/fixes in the code. Nothing major, my brain isn't ready to accept working on anything like ewl_tree2 or ewl_paned at the moment. I think it's coming back, just taking a while.

Nathan has some interesting plans in the works to abstract out the EWL graphics a step further. I've currently pulled out the window and canvas code into engines (it was already wrapped in #ifdef's just had to extract it out) but he's thinking of taking it a step further and abstracting out all the evas/edje related calls in the code. This would give us the flexibility of completely changing out backend. So, you could have a gtk/pango backend along side the Evas/Edje backend.

I've actually been spending a bunch of my time lately looking up information on D20 Future. I've owned this for a while and Anderson is currently running a campaign in it for a couple people but I'm toying with the idea of making my own campaign. So, I've been looking up other peoples ideas and other tools that might be useful for this kind of thing. If you've got any suggestions send me an email and let me know. Not sure if it'll pan out or not, I have a tendency to get bogged down in details (and with a whole galaxy to work with, that's a lot of details.

On a final note, the wedding plans seem to be coming together pretty well. We sent out the invitations the other day and they've started to arrive (I still have to get two addresses, I'm a bad man, heh). Other plans seem to be coalescing into something coherent as well. It should all be good. I hope.
 
 
Current Music: Red Right Hand - Nick Cave & The Bad Seeds
 
 
dj2
26 June 2006 @ 03:33 pm
Or, maybe that's just my drive to work on enlightenment stuff. I've been hit by a bit of a coding funk in relation to enlightenment lately. Just don't have any drive to work on code or deal with people. Doesn't seem worth it at the moment. Always seems like the negative response out-weights the positive.

I've been doing a bit of fiddling with Rails again, although I've run into a strange bug where using sqlite3 is giving my row an id of 1 while rails is giving it an id of 0 so when I save an image using that id it's numbered wrong. Hopefully it's just a sqlite3 thing and if I switch to MySQL it'll work itself out.

I bought Stacy a new MacBook and inherited her powerbook. She likes the smaller size and the keyboard on the macbook a lot better. I'm loving the 15" powerbook. It's quickly becoming my machine of choice. Using Textmate and quick silver make programming a breeze. I'm just learning Textmate so I know I'm still doing a lot of stuff the dumb way, but event still, it's swanky.

In a related operating system based note, Solaris 10 6/06 was released to day so I can't wait to get my sweaty hands on that one and stick it on the work laptop. Tho, I have to wait until at least Thursday as I have to do some presentations off of it in the interm, but, mmmmmm, zfs, yum

Other then that, I've been doing some traveling for work, playing World of Warcraft and reading. My readings been going in cycles lately. I'll pick up a book and either get sucked in or get stuck. If I get stuck I sit with that book for a month or so without reading a page until I drop it for another one. (Or, if I'm lucky I'll drop it right away and switch to a new one.) Maybe I'll use some of my e-free time to catch up on reading. (Heh, probably I'll just play Warcraft). But then, I'm getting to about the point where I get tired of Warcraft as well. I have yet to get a character over 30, my current high being this run to 28. I'm starting to get tried of the 'kill 2million monsters to get 8 pieces of horn' type quests where you just kill the same shit again, and again, and again, and again. We'll see how long it lasts.

Stacy's put up the next piece of 'Night in the Sun' over at perplexity.org which has served as a good diversion. Good reading, I can't wait for the next chapter. Shaping up to be a good story.

Anyway, that's enough for now, I may post some stuff on the books I've read recently (or am currently reading) we'll see how it all goes. (Or, I may end up moving this blog if I ever get the new everburning finished.)
 
 
dj2
28 March 2006 @ 11:08 am
Another chunk of info sent to the e mailing list that I'm copying here. If you're on the ml you can probably skip this.

I just wanted to give a quick update, and solicitation for help, on the EWL test application. We have just finished re-writing and porting the old tests over to the new framework. Hopefully this will make adding tests a lot easier.

Along with UI tests it is also possible to add unit tests and execute them through the UI. This should allow us to test a lot more of the code base without having to have complicated graphical tests.

The new framework also gives the benefit that if you have a widget that is outside the EWL tree (epdf for example) you can write tests and have them integrate into the ewl_test application. (All of the tests are dynamically loaded, you just have to implement one specific function.)

Each test can also have a tutorial attached to it. These tutorials will be displayed under the 'Tutorial' tab of the test app and will also be pulled into the generated doxygen documentation. It uses a limited subset of doxygen for rendering. (More doxy can be supported we just haven't needed it yet. There are a couple of tutorials in the test directory, if you feel like adding more please help out.

Ok, so you want to help, we need unit tests and tutorials. We have a few, and you can look at tests/ewl_text.c, tests/ewl_image.c or tests/ewl_widget.c to see how unit tests and tutorials are integrated into the files. (Or read below as I'll explain it.) We really need tests to cover all of the get/set methods and anything else that can be tested without a display. (Things like setting RGB and getting HSV back from the colour spectrum for example.) Corner cases, etc.

If you've got a widget you have out of the EWL tree and you want to write tests for it, here's the basic idea.

You'll need to include Ewl_Test.h which should be installed with your EWL headers.

You will need to implement the test_info function which takes an Ewl_Test struct. You then just fill in that struct with your module information. For example, from the Text test:

void test_info(Ewl_Test *test)
{
       test->name = "Text";
       test->tip = "Defines a class for multi-line text layout\n"
                   "and formatting.";
       test->filename = "ewl_text.c";
       test->func = create_test;
       test->type = EWL_TEST_TYPE_SIMPLE;
       test->unit_tests = text_unit_tests;
}


The test->type can be one of EWL_TEST_TYPE_SIMPLE, EWL_TEST_TYPE_ADVANCED, EWL_TEST_TYPE_CONTAINER, EWL_TEST_TYPE_MISC or EWL_TEST_TYPE_UNIT. If you use TYPE_UNIT you can leave test->func as NULL as it won't be used.

The test->func is a function pointer with a signature like:
static int create_test(Ewl_Container *box);

This function has to return 1 on completion for the test to run. (You can return 0 if your test fails to init for some reason.)

If you'd like to put some unit tests into your testing the you'll need to add a section similar to:

static Ewl_Unit_Test text_unit_tests[] = {
        {"text set/get", text_test_set_get},
        {NULL, NULL}
};


To the top of your file (above the test_info function). This array _must_ be {NULL, NULL} terminated. Each entry is the name of the unit test and the function to call to invoke the test.

The unit test functions have a signature like:
static int text_test_set_get(char *buf, int len);

This function will return 1 if the test passes or 0 otherwise. If the test fails you can write the reason into buf to have it displayed in the UI. buf is len bytes long.

Once you've setup your unit tests you just need to add:
test->unit_tests = text_unit_tests;

into your test_info function. (Chaning text_unit_tests to whatever you called the array in your file.)

If you have no GUI test you can leave the func NULL. If you have no unit_tests then leave the unit_tests pointer as NULL.

Compile this as a shared library and install it into PACKAGE_LIB_DIR/ewl/tests (which by default is /usr/local/lib/ewl/tests) and restart the test app. Your test should show up under the category that you assigned.

You can either run your test in the ewl_test application 'Execute' tab or if you call ewl_test and pass the name of your test as a parameter it will run your test in a separate window. (You can also use the -unit flag to ewl_test to run the unit tests for your widget on the command line.)

Tutorials are pretty simple to add. Just add a doxygen block at the top of your test file. You will put in an @addtogroup with the same group name as in the src/lib file. You can then use @section, @code, @endcode and @note to markup your documentation.

If you'd like to help please send either myself or Nathan an email if you've got any questions. As always, patches accepted.
 
 
dj2
28 March 2006 @ 10:52 am
I sent this to the e mailing list a little while ago, but thought I'd stick it here so I'd be able to find it easier (and maybe someone who isn't on the e mailing list might want to read it).

Some information on how we are implementing the ewl_combo, ewl_tree2 and (hopefully) soon to be ewl_list.

These widgets all work off of a Model/View/Controller setup. You create a model, a view and your data and set it into the widget. The widget will then query the model and view to get the display widgets, passing your data into the calls as needed.

The models, views and data can be reused between multiple widgets. For example, the combo test currently has two combo boxes with one model, one set of data and two views. (This will be enhanced with a third combo and another model/view.)

Using this setup it is a lot easier for the application to modify the data behind the combo or the tree and just tell the combo that its data is dirty. The combo then queries the model/view and updates its display as needed. No need to remove/append widgets to the combo/tree. You can just realloc an array and set ewl_combo_dirty_set(combo, TRUE) and it will do all the work of setting up the widgets for display.

This also means the combo/tree can have any kind of data as their widgets. You can write custom view functions to make compound widgets which should hopefully keep the system flexable.

The ewl_combo is the first widget to get this system up and running. We are working on the ewl_tree2 widget which will also be using the models and views. This will end up having a model/view per column of the tree so you can put different logic behind each column, or just pass the same model/view in to each column as needed.

The plan is to write an ewl_list which is a simple wrapper around ewl_tree that provides a default single column layout. Making it easier to get lists of things up on screen.

If you'd like to see a bit more of this take a look at the src/bin/tests/ewl_combo.c test case.

Thats about it for now, let me know if you've got any questions/ideas on this setup.
 
 
dj2
14 December 2005 @ 10:41 pm
I've installed Solaris Express build 27 on my normal desktop machine with the eventual goal of getting OpenSolaris installed on there. But before that I'm trying to get a bit of the EFL installed so I can do some dev work on EWL again.

So, what have I needed to do so far. Install automake, autoconf, libtool, m4 and make. With that I was able to configure EET. When doing the build I got:

false cru .libs/libeet.a eet_lib.o eet_data.o eet_image.o eet_memfile.o
gmake: *** [libeet.la] Error 1

And with a bit of digging it seems that configure didn't find 'ar' so it used 'false' instead. Adding /usr/ccs/bin to my path and re-running configure seemed to fix that up nicely. After a quick install of 'sudo' EET installed nicely.

Oh, and in case your wondering, I'm doing this the hardway and grabbing the packages from ftp://sunfreeware.mirrored.ca/i386/5.10/ as I need them. I know about pkg-get and blastwave, but I don't like blastwaves tendency to want to install it's own copy of everything. I don't want duplicate copies of all that shit on my system.

Hopefully benrs notes (http://cuddletech.com/porting/e17.html) will get me through the rest of the libraries and apps. If I run into anymore gotcha's I'll stick em here.

Update: When I wanted to build Epsilon I required pkgconfig to be installed. (Make sure you run autogen again if you've run it before installing pkgconfig)