Friday, July 18, 2008

New job,,, less time

As July 7th, I began working as a development manager at an airline company (guess I'll be flying a lot more). As a result I'm focus on getting on track with the business and the new responsabilities. I'll be doing more of the same only on a different company with a bigger salary a key for the bathroom and a parking space.

Most of the development is done in J2EE, using the usual stuff. I'll be doing a lot less programming of course (that's why I keep this project alive, so my brain can be challenge and my neurons don't die of boredom).

Also, my computer at home has started to act up on me and sometimes I can't bring up the development environment or my wifi conection.

Also, I made myself the promise of finishing building my 1:6 scale radio controlled TA-152C airplane, before years end, and so that's keeping me from doing any work on the port on this past two weeks.

Thursday, July 3, 2008

Fixing things

The project is moving along. I began working on the branch Lee left. I fllowed his steps and I ended at the same spot. That is a linking problem. After thinking about it (not too much really), I decided to create a test branch only changing the C compiler. The result is that the project compiles and runs testcase swt001. The rest of the testcases freeze the system when the window comes up. Sounds like it enters a blocking loop. Actually the system doesn't stop, and sometimes I can recover and kill the process.

In another front, I prepared an Eclipse distribution with all that is needed to boot the port. So far the splash window comes on but the process stops with an error of a missing class.

I also encountered some errors that I need to fix in the main trunk. First, for some reason, the color dialog stoped working and second the list box widget has serious refresh problems, it doesn't repaint right.

And finally, I went over the stuff that needs to be done to be included in the Eclipse organization and I would need so much time that for now it is not worth it.

So you see, lots of things and so far nobody to help... pity

Wednesday, July 2, 2008

Photo feast

Here are some images of the different testcases created to test different parts of the port of SWT. You can imagine the things or programs that can be created using what is available.




















Friday, June 27, 2008

Finishing with menus

After much work and learning I finally finished a basic implementation of menus. All the basic functions work, and now popups send events and they are display on the correct position too. Left is to implement the icons + text, and finish the accelerator keys.

Now I'll move onto trying to boot Eclipse. Still we are short of some widgets, like tree, progressbar, sash, just to name the most important ones.

Wednesday, June 18, 2008

Popups working,, sort of

Finally I found the reason why the popups where gone right away. The problem, as usual, was a very dumb combination of flags on the WinPopupMenu call. As a result, the item was selected as soon as the popup came up, therefore I couldn't see it. I became suspicious of this when I kept seeing the WM_MENUSELECT and the WM_MENUEND messages, that meant someone was selecting an item.

Now, as usual too, I have new problems. The first is that the command message id not being fired when I select the item on the popup. The second problem is that I'm not closing (disposing) something right, I can tell because I see the WM_MENUEND message only once even though I bring the popup many times and because when I do this many times, after I close the program it takes some seconds to finish the processing.

Once I solve those problems I'll move into completing the API with calls to calculate the cursor position and so forth.

Still, I'm happy this sucker didn't win and I finally can bring up the popups.

Also, I was able to process the events from the menu bar, so now SWT is firing events when I select items on menu bars.

Wednesday, June 11, 2008

SVN sync

After much discussion at the news group, I found out that I had no idea how to work with popups. The problem persist when trying to display the popup, this comes up and then it goes away inmediatly.

I have no idea how to solve the problem. For some reason the control receives a WM_MENUEND.

The other problem is that the menu commands are not being sent. I haven't paid much attention to this problem, since it seems that it will be easier to solve.
I feel I need to join one of the SWT developers group since I have lots of questions on what is the expected behavior on SWT controls.

On better news, I was able to connect to netlabs directly from my OS/2 at home using SmartSVN. This opens the door to keep the sources in sync with the repository, making my life easier. I tried before but I couldn't connect. I have no idea how the problem was solved.

Still feeling pretty lonely here. I was wondering if I could upload to netlabs the developing image I made. Probably I could but the licences the image contains are not free, but then again, who cares about VAC++ 4.0, a product that was abandoned a LONG time ago... oh well

Friday, May 30, 2008

More menus

I started working on the accelerator tables. To my surprise, accelerators meant a lot of new code. Beginning with APIs to be implemented:

WinCreateAccelTable
WinDestroyAccelTable
WinSetAccelTable
WinTranslateAccel

Structs to be created:

ACCEL
ACCELTABLE

And then customize the existing code to work as OS/2 does.

I felt short of finishing the implementation. I still need to verify that the commands are being sent. This is because I don't even know if the normal menus are sending commands.

Then I decided to go and finish the popup menus. I discovered how ignorant I was about the subject and that the initial implementation I had made was useless. First my notion of creating and displaying the popup was totally wrong. I placed the creation of the window and the displaying under the same method.

I then learned that the displaying was done when the WM_CONTEXTMENU message was capture (this is basic for some PM knowledge, but I'm new). I implemented the method on the Control class and I was able to see the message being capture there, and then I used WinPopupMenu API to display the popup. So far no luck, I'm being helped bye some people and I hope today I will finally see the menu.

Thursday, May 22, 2008

A new approach

I changed jobs and of course changes bring new challenges. I lost the only way I had of commiting the work, hence there have been no new updates to the SVN server.

I decided to work on the acceleration tables for the Menu object and I found out that there is a lot of work to do to enable them. First I have to implement a new API call "WinCreateAccelTable" and with it a new object "ACCELTABLE". I'll probably encounter new problems with memory handling using JNI. After all is implemented I'll need to create a testcase to test all that.

So for the time being I'll be busy.

Also I have created a new environment to develop. In a Virtual PC I installed a ECS RC4 and all the tools necessary to develop. The idea is to pass that on to other developers that don't have access to the right tools. My work is going to be complete tomorrow, then I'll have to find the way to share such a large file

Thursday, April 24, 2008

A working menu and something else

Here are some images of the results of the macro change:




Here are some images of the results of the macro change:

Old errors coming back

Developing the testcase I came across an error like the one I had with the insert code for notebooks and tabs. Only this time I decided I wasn't going to give up. I went over the code many times to verify that this new error wasn't mine.

The call was MM_QUERYITEM, where you have to pass the ID of the item to be queried, whether or not you want to include the submenus on the search and a pointer to a MENUITEM structure.

I created a menuitem and gave it a 100d as it's ID value. I knew it worked because the call SETITEMTEXT, using that ID was working (I was seeing the text). Still the call to query the item would not return. Then I decided to debug the parameters on the C call. I just printed the values of the parameters. Everything looked fine, the first parameter was in fact a handle and the same one being created and used on the Java code. The message was the right one (0x182) and the third parameter looked just fine with the value of 640001 for MPFROM2SHORT(100, TRUE). Still the call didn't work.

After more debug messages I decided to make a parallel call this time using my own variables. At first I used only the MENUITEM parameter different from the rest. I passed a null pointer. Still no luck.

Finally I decided to ignore the third parameter and used MPFROM2SHORT(100, TRUE) directly on the call. Surprised,,, it worked. To find out why I then printed the result value of that macro and "bingo",, I got 10064!!! the right result only reversed from what I was getting from Java.

Scary to think that the macro being used extensively on the port is broken.

The good is that probably that is going to fix the problem I had with the insertion of tabs.

The bad is that probably I'm going to see some new stuff broken.

Tonight we will see

Thursday, April 10, 2008

Some success

Finally a break. After sitting in front of the code for a while and looking at some examples I found on the web, I found the problem with my menu code. I was using the desktop as the parent of the the menu instead of using the window frame (I'm talking about a menu bar). When I changed it I got my empty menu bar.

Now I'm working on the code to add menus to other menus. So far I'm working to understand the Windows code. I believe today I'm going to have a nice looking menu with text on it and if I do I'll post it tomorrow.

Wednesday, April 9, 2008

I'm back

I haven't posted here for a while and there are lots of reasons, but it can be summarized as life. Anyway, I kept on adding methods to the Menu and MenuItem classes and now I'm testing things against a testcase. The problem is that I see no menu so far. I'll keep on working until I see some result.

Thursday, January 3, 2008

Slow work

I'm sorry to report that I haven't been working too much on the port. Christmas, New Year and all the activities of the closing year have kept me really busy with life. Now I'm less than a month away from my wedding and there are still so many things to finish so there is no way I'll have much time to sit on the computer and program code. Still I have some code that needs to be commited to the CVS, and I'll see if I can find time to do that.

Just hoping that people can solve the problams they have with the trunk.