Friday, July 31, 2009

Notebooks and more notebooks

I took a short vacation and I didn't work on the code at all. At that time I had the problem of double click on tabs would cause a redraw of the window. That problem was solved by not using the autosize flag on the creation of the tab.

Then came the problem of the size and position of the application window inside the tab. I did a lot of testing and finally I understood how to calculate the Y coordinate.

After that the problem was that the initial drawing of the top page didn't happen and that was solved by implementing the drawing on the WM_SIZE message. This also solved the resizing problem I was seeing in the Control examples from Eclipse.

Now on to implement the mouse operations. The Control example doesn't work at all because the notebook is not processing mouse events.

Also on the list should be the drawing of the text happens using os/2 coordinates and it should be using the SWT coordinates

That's all for now....

Tuesday, July 14, 2009

Notebook fixing

After the suggestion of Martin I began to work on making an example work. I modified the SWT control example to leave out all the unimplemented classes and it did work,,,, well sort of.

I discover that my imlementation of the tabfolder class was incomplete to say the least. Actually the onky thing that did was to paint a very basic Tab. I set up to solve the problem and I did some good progress.

First I fixed the adding of new tabs issue, then I was able to color the tabs to make them look more like the rest of the platforms. I changed the testcase to include more functionality and the I found problems with the display of the controls inside the tab page.

After some tests I discover that I wasn't connecting the tab id with the window id. I realized that I'm so ignorant on some of the most basics things of PM programming. Well I guess that's the point of all this... to learn.
Probably today or tomorrow I'll finish the display issues and then I'll go into more little details.

Probably the implementations of scroll bars and menu's aren't that complete either so I'll go back and fix them as I go along.

Monday, July 6, 2009

Some work done

This weekend I had some work done on the code. First I added more needed stuff to create a progress bar example, this includes all the constants from the progress.h to OS.java, 4 APIs definition (only 2 are going to be tested), the JNI implementation of the main API in the swt.c

I was able to compile the C code and the Java code without many problems now I need to implement the second API to set the attributes of the bar. After that I only need to create a testcase and play with the progressbar class.

I also realized that there is a lot of work to do on the Program.java. First I need to understand it's use.

Finally, I tried to run the control example directly from the distribution and I came across a NoDef class exception as it was expected and I learned that there are a bunch of emulated controls, now I just need to compile them and work from there... in other words aa lot of work still.

Friday, July 3, 2009

New ideas

Since I finished the Scale class I have been looking for my next move. I decided to use the eco software runtime and libraries to add support to the missing controls. The downside is that you would actually need the runtime installed before you can use the SWT port.
The other line of work has been to include in the trunk additional classes we need compile in order to make Eclipse port work. I added the boot.jar and the startup.jar to the tree. They both compile now using ant.cmd boot.jar or ant.cmd startup.jar. A lot of investigation needs to be done before moving forward in these tasks.
Finally the last line of work has been the creation of a working test that I can upload to the net and somehow demonstrate where I am with the SWT port. I'm going to use the control example from the eclipse distribution. Hopefully I'll have ready next week