Tuesday, May 25, 2010

Lesson 19: Resources and Pictures

Ten years ago when I first started to learn to write code using BeOS, I had a lot of questions that I couldn't any documentation to give me the answers. Luckily, there was the Be Code Talk mailing list and kindhearted members of the community, like David Sowsy (Animaxo, Vesa Accepted). Resources are one of those things that eluded me. Eventually I figured them out, but Lesson 19 lays some of it out in plain conversation.

Sources: 19Emo.zip

Monday, May 24, 2010

PalEdit's All in Pieces

All over my floor.... or something like that. I spent most of the weekend ripping apart and putting back together pieces of PalEdit in a separate folder -- code that hasn't made it into the tree yet. Yesterday afternoon I had successfully refactored the code for the text editing view. It's possible to type and delete text, but that's about it -- even little things like the arrow keys don't work yet. Syntax highlighting is disabled for the moment, too. That's OK, though. Those features will get their turn, too. The big accomplishment is that I'm pretty sure that the hardest part is over: reducing dependencies until all I have left is a BView which I can type code into. This will enable all sorts of nice things like the possibility of a tabbed interface, properly-implemented split views, and more. I'm getting a better handle on how most of the code works, too, so I *might* be able to implement my #1 most wanted feature: code completion. We'll see. :)

Wednesday, May 19, 2010

Lesson 18: Working With Lists... and Other News

We're starting to get closer to the end of this Learning to Program series. After toying with menus and interface colors in the last lesson, we apply some of the concepts used with menus to get the hang of using list boxes and discover along the way a few bizarre sports that really exist. Games people play. Sheesh.

In other news, I've been running a little slower with the lessons as the school year winds down -- 12 school days and counting as of today! It's a little tougher to get the time and motivation to write when time's tight and Valve released Portal for free. Sometimes it's a tough choice. ;-) I've also been spending time -- mostly on the weekends -- doing some serious hacking on PalEdit. The more I work with it, the more I discover that it's like going to the Olive Garden: high-quality spaghetti. I managed to rip out all of the rez resources (yay!) and strip it down to pretty much bare metal.

Right now I'm in the process of refactoring the sources so that source code editing is encapsulated into a single BView. This has helped immensely with my understanding of how to write a text editor. It will also enable tighter integration of the editor with Paladin's project management and hopefully enable me to figure out how to implement code completion, the one sorely-missing feature on my personal hit list. I guess we'll see.

Monday, May 10, 2010

Lesson 17: What's on the Menu?

After an unintended wait, Lesson 17 is finally out. We are back to learning about hacking on the Haiku GUI after taking a short C++ language break. Today's topic? Menus. Also in this lesson is some expansion of what we know about messaging and BViews.

Sunday, May 2, 2010

Happy Reunions

It's been official for about a week or so now, but I haven't had any time to do anything with it. I've rejoined Haiku. My life is a lot different from when I left, and people were glad to have me back. It's kind of strange how there's often a disconnect between people who don't live far apart, but never get to see each other for whatever reason. This is very much like that. No matter.

My first act was to patch a crash when clicking on the leaf menu when the Deskbar was stretched across the width of the screen -- "Start Menu" mode. Axel made a bigger patch based on it, so I'm happy. Now I'm going to see if I can get the system colors that are tweakable via Appearance to actually make color changes across the system. It's actually the fault of the controls in the Interface Kit, not Appearance, so we'll see what happens on that one. Should be interesting. :)

It's good to be back.