Tuesday, December 18, 2007

back on track again

After a pause I'm back at the code again. So far I have only manage to get a handle to the menu, I had to implement the WinPopupMenu API, and I'm thinking that maybe I should go ahead and do the same with WinCreateMenu. Right now I'm using WinCreateWindow with WC_MENU as the window class.

Next, implement the rest of the methods.

Monday, December 10, 2007

Pretty lost

After going all the steps I described before I began to come across some problems caused by my ignorance.
The first thing I noticed was that Menu class derives from Widget class, that means you skipped the whole Control class tree. Looking at the Win32 code I see the use of OS.CreateMenu() to create a menu with a bar and OS.CreatePopupMenu () to create a popup menu.
You could argue that we could use WinCreateMenu or WinCreateWindow with WC_MENU class to create a menu with a bar and WinPopUpMenu to create a popup. Looking at the docs clearly it takes a lot more than just calling those APIs to come up with a menu in OS/2. First question: is this so?.
The menu API is rich and I'm pretty confident that once I have a handle of a living menu we could quickly replicate the behavior we need.
Any ideas?. In any case I'm going to start calling these APIs and finding out what they do, but in case anyone has experience a helping hand would be reslly good.

Tuesday, December 4, 2007

Trying to set the Env.

I'm trying to set 7up the environment needed to compile the project using the branch for Watcom.

I installed OW and downloaded ANT. I already have Java141. I modified the env.cmd to point to my directories... now what. I realize there where no ant.cmd under the branch.... mmm wonder if I'm missing a big chunck of something.

I also finished adding the C stuctures and created the swt009_08 testcase that will be the base to test the Menu class.

Here goes a picture of the Group testscase

Wednesday, November 28, 2007

On to Menu class

I decided to begin the work on the Menu class. After going over the code I considered it not to be as hard as I thought to be.

I created the MENUITEM and OWNERITEM classes and added the constants needed by the API. Next I will go into the C code to add the stuctures for the new classes and then I'll prepare a testcase. Finally I'll begin the work on the class, method by method, like always.

After the menu class,,, I don't know, maybe someone will join me.. it feels pretty lonely here.

Tuesday, November 20, 2007

Little time

I'm picking up on the work on my RC model airplane. I have been working on it for years and from time to time I get the itch and I work on it. Besides that, I don't really do any computer work on weekends.

That said, I would say that there has been little progress on the launcher. It now shows the splash window and that's cool but as expected it fails. To test it I dowloaded the Eclipse 2.0.1 runtime for windows. After looking at the directories, I created the necessary ones following the naming convention and copying the necesary DLLs and JAR files from the port. I realized that the ant that I use doesn't create the swt.jar and in my opinion it should everytime we build the classes.

Since I'm stuck on the launcher and to be honest, I got bored, I decided that I'm going back to the Java code. Since I have no idea where to start with the Menu class, I'll just do some preparatory work, adding the constants, creating a testcase and adding the classes stubs to the project. I'll have more fun that way. At least I'm going to be feeling like I'm adding something new to the code.

I donwloaded a progress bar control that I found in a russian site, with examples. It looks cool and complete. Maybe that code can be added to the port since we don't have any progress bar code so far.

Tuesday, November 13, 2007

Launcher success

Yesterday I fixed the sources of the launcher2 program. First I dicovered that the library was a utility library done by the developer to simplify the development. Since adding that library was more trouble for me, I decided to replace the library with the code.

You get more lines but what the hell. After a successfukll compilation I included the ico file into the executable.

Finally I decided to go ahead and try the program. I searched the hard drive for a startup.jar file. The one that came up was one included with the sources I recieved. I moved the file into the exe directory and tested. The result... a java screen (awt I think) displaying the parameters passed onto the program and a nice message saying that everything was going OK.

I copied the original startup.jar file from the Eclipse distribution into the same directory, overwriting the one I used first to see if the results were the same.
Well the results were not the same. This time I got a message saying that the instalation directory wasn't found. A .workspace directory was created and a log file was written saying that the Eclipse structure wasn't found.

I'll experiment creating a Eclipse structure and trying then to see what happens.

The only problem that really bugs me it's the fact that I can't debug the C code under VAC++ 4.0. I'll be asking around about this.

Thursday, November 8, 2007

Launcher

I recieved the sources back from Lee Riemenschneider and I began looking at the way to integrate them on the project. This is going to be an on going task, since I keep changing my mind. I created the directory structure needed and I created a VAC 4.0 project just to test the compilation.
After a couple of changes to the code it finally compiled. Trying the exe gives me controlled errors indicating the lack of startup.jar on the same directory. So those were really good news since it meant that I was on the right track. Today I realized that I was using the sources of the launcher for the Eclipse 1 project. I changed it but I came across a problem with an included library. The program calls a MMLoadBitmap function and I haven't found where it is yet.

My idea is to get the source compile, then add the icon resource then make the program load the splash window, after that I'll try getting everything in place to do a test with a startup.jar

Wednesday, November 7, 2007

Going forward

I decided to go over the code and finish uncomplete code. I have worked on the Display and Control classes, implementing code that was left commented by the former developer. I also added comments to some other methods pointing out the API calls that should be implement on those particular cases.

I also got the sources of the launcher and I created the basic stucture of dirs to begin the porting work. I have no idea how hard it will be but the sources are supposed to compile under VAC++ 3.08 so I hope it won't be too complex.

Monday, November 5, 2007

Group done,,... next ...????

Ok, I finished implementing the Group class. I completed the getClientArea method. That solved the problem of displaying a group without any text on it.

I also discovered that the problem with the setText method wasn't there . The problem seems to be associated with the PSZ class. When I create a PSZ using an empty string,, it crashes and burns (on any setText method). I tried a couple of short solutions but they didn't work. I guess I'll try a stronger medicine.

Now about the future. I have no idea where to go now. I know I don't have the skills to solve the problems with the tabfolder class and to implement the Menu class. I'm thinking on working on the launcher app. As soon as I get the sources back I'll include them in the repository.In the mean time I could just look around the code and finish unimplemented functions (there are all over the place)

Wednesday, October 31, 2007

Group almost done

I finished the basic stuff on this class and now I have a testcase working swt009_07. I found some problems setting empty strings (group0.setText("")) but I'll solve that soon. I only need to implement the getClientArea method.

I'll commit the changes soon. The problem is that I don't have an open Internet connection.

Tuesday, October 30, 2007

Group class

I just finish the basic implementation of the Group class. Using the WC_STATIC + SS_GROUPBOX style. So far the basic stuff works and I hope I can commit the changes today or tomorrow.

I found a problem common to all Composite classes. The background of the controls are not repainted after gaining focus. You can see this on the List, Group and TabFolder classes. There is a new ticket I need to add.

Friday, October 26, 2007

Lot of work and I'm stuck with TabFolder

Well, I'm stuck. After believing for a second that the C program was almost complete I realized that there was a lot of things that I was leaving out.
I came to understand (not completly) the way the messages are handle, and with it I came across a lot of code that I need to write in order to complete the C program. Specially the WM_PAINT message in the Composite class.

Each child of Control has it's own msg proc method and it implements the necessary messages through methods MRESULT WM_*whatever*(msg, mp1,mp2).

Since, until I get a better understanding of all these things I won't be able to solve the problem I have with the Notebook control (TabFolder class,,, see testcase swt009_06). I decided to go ahead and finish easier classes, like Group.

I could really get some help at this stage. I don't have enough time to investigate and to program. I can do just one thing.

Tuesday, October 23, 2007

C

I have been working on creating a C program that follows the API calls that are made in the SWT code. So far so good.
Today I was able to complete the swt002 testscase using C. Of course that there are missing calls but the idea is to concentrate on the basic stuff. I'm still having problems with the refresh of the created window. It doesn't repaint.

I'll post the code on a newsgroup so I can get some help on this.

My idea is to work on to the swt009_06 testcase to find out why I can't add notetab pages. Also this effort will serve as a testing and debugging tool in the future.

Wednesday, October 10, 2007

Some progress

I commited the sources and began to work on the TabFolder class again. I finished bringing the code to the same state of before the lost of my HD.

Still I have the same problem when I try to add a notebook page and when the window losses focus and it is brought back to the front (the clipping doesn't work). One problem is solved though. The testcase doesn't crash when I click on the window, like it used to.

After I tried everything, I decided to go back to basics and start from scratch. I went over the documentation to try to really understand what was done and how PM is being used. I created a C program which will follow the flow of the API calls in the hope that I'll be able to reproduce the behaviour of the SWT classes. I believe this will be a good tool to understand what is going on under the hood.

Tuesday, September 25, 2007

SVN stories

I was finally able to get an account in the SVN system of Netlabs and now I'll be able to commit my work to it.
Now I have new problems. I decided to download SmartSVN a Java SVN client that seemed complete and was reported to work with OS/2.
As soon as I installed I noticed that the program wouldn't read the partition were the project is at. Later I downloaded the port of svn to OS/2 and when I was ready to begin testing, my Internet connection went dead and now I have the account but no way to commit.

What can I say...?? patience, only patience.

Thursday, September 13, 2007

Eureka!

Finally I was able to compile the whole thing and now I can start working on the project again. I just lost the work on the TabFolder class.

Friday, September 7, 2007

Tales from Java

I decided to go on and create the environment for the port of SWT. I installed Java13 and Java131. Unfortunally for a strange reason the toolkit refuses to install on both distributions.

I thought I just needed the header files to make the compilation work but when I tried the ant command the system kept telling me that javac was missing. After going over the response file of the installer for the Java I realized that the toolkit included the header files AND the javac (of course... very dumb of me).

Since my attempts to make the CSD file work were futile, I decided to copy file by file from the instalation directory to their destination place. Let me say that "that sucks". I'm not finished yet but the road is clear I just have to go and do it.

I should be able to compile the project again very soon

Friday, August 31, 2007

eCS success

After a couple of tries, finally I was able to install eCS RC1 with support of my wifi card. The problem was trying to install the GenMac Drivers after the instalation. That process doesn't work very well at all.

Well this opens lots of doors to work integrated on the Internet. I did connect to the web with the XLAN program. I'm really glad. It looks like finally I'll be able to work with OS/2 for some years to come on newer hardware.

PS. The system is FAST!!!!! really FAST!!!!

Monday, August 27, 2007

My disk is gone!!!

Well, as I feared it for a long time my hard disk came to an end on Friday the 24th. With it my OS/2 system, my most delicate configurations my most precious collection of software and six years of great fun.
My SWT port project was there and now is also gone, but I was lucky I made a backup in June, so probably I just lost the slider and the tabfolder classes.

Oh well now I have to start building a new OS/2 system on my newer computer, using eCS since my old WSeB won't install on the new hardware. Let the fun begin... again

Tuesday, August 21, 2007

First post

This is my first post on this blog and to me it is a new tool to communicate but I believe it could help to get in contact with people with interest on further supporting and improving OS/2.

Any one is welcome to post keeping in mind that I will not allow any religous war on the OS subject. Only productive and polite posts will be kept.

Last thing, english should be use but spanish posts will be answer too.

Thanks and welcome