I’ve been working on the Knit Project application because I need to have it done by xmas. I ran in to a problem once I started to run it as an Adobe AIR application. (It’s stupid to call it ‘Adobe AIR’ because AIR stands for Adobe Integrated Runtime. So I’m really saying Adobe Adobe Integrated Runtime. That’s just stupid, but google won’t return anything usefull if you just call it AIR. So you have to specify Adobe AIR. Thus, I am going to continue to call it Adobe Adobe Integrated Runtime.)
I also notice that the placement of the controls, which looked OK in firefox, looked like ass in Adobe AIR. My inital thought was to break the controls into their own windows like Photoshop/Illistrator/etc. I’ve never used windows or popups in my webdesign before. Opening the window was easy, trying to get the windows to comunicate proved difficault.
So I was thinking about how to solve this problem, and I asked myself. Do I need the controls in a seprate window? Does it add anything significate to the program? The answer was a restounding “No.” So I threw out the idea and asked, “What would be the fastest/easyest way to group these controls?” Tabs of course! Within a few minuetes I had the controls broken up into tabs at the top of the application. Not only did this look nicer, it make easer to work with the grid. Which is the entire point of the application.
Loading and saving to a file proved to be dead easy. I was able to copy some code from Adobe’s API refrence and adapt it to my program. It took less than 10 minenutes.
I did run into another bug with Webkit. I have a table of all the knitting symbols the user can click on. When you click on one of these symbols, it updates the Marker cell. This worked fine under firefox. But for whatever reason, Webkit will only show the image properly if I double click on the symbol. I set the ‘src’ to the image, which works fine, but when I resize the image. Webkit stops showing the image the first time. Once I’ve seen it in the marker once, it’ll always work properly on the first click. I spent a half and hour or so trying to fix this bug. I couldn’t get it working so I just remved the code that resized the image. I can always go back and fix it later if I need to.
I’m thinking I might have to rewrite the zoom function again. If you zoom all the way in, and then zoom out, the knit symbols are tiny. I want to fix it, but I’m not sure about the best way.
I thought about making all of the image one specific size. (right now they are all diffrent sizes). Another way would be to store the orginal size somewhere (probably in the symbol JSON) so I could refrence it. If I do that, I need to keep better track of the “zoom level” so I know how to adjust the image size.
Another bug: In the grid it’s self, if there is an image, the user can click on the image and not the table cell, which won’t cause the cell to change to the current marker.