Let the journey begin with a single step. That step would be learning how to run the lldb debugger on OSX. Single Step? Get it?
I choose to verify/fix this report about OSX edit_box not being disabled. The author provided a test example and clue to the solution. Nice!
The example did fail on OSX and did work on Linux/Gtk2. I thought the example also needed another test,
once it’s disabled at creation, can be enabled later? That’s bug230.rb at my Github.
Reading Objective-C and Cocoa isn’t that hard to read. You already know what it’s supposed to do. Sure enough, it doesn’t process the attr parameter in cocoa.m:shoes_native_edit_box – it must do that somewhere else to set up sizes, fonts the other style options (initFrame seems likely). I could test for :state here though. Is that the smell of a hack approaching? I do believe it is. Perhaps the enabled/disabled state should be a new instance variable in the class. That feels less hacky and it might be useful for some future. I’m going slow with this because I do not know enough Objective-C or Cocoa to go cowbody. Learning experiences ahead!
I also learned the generated Info.Plist and much of App file structrure is pretty dated. It still works, for now.
Once of the advantages of a Loose Shoes (default build to dist/) is that’s easier to debug. For now (because of the Plist and/or the shell launch script), you have to point lldb to Shoes.app/Content/MacOS/shoes-bin. Then you can set breakpoints and start the app. I wouldn’t expect that to work with a OSX/Tight Shoes because of the pango-module stuff. Maybe I can setup a .lldb init script in dist/ from the rake file? That would be fun and potentially useful since it’s likely I’ll be spending some time with my new best friend, lldb.
I should install a decent project aware text editor like Geany). I think I’ll buy another mac keyboard too and an Apple mouse and keyboard tray for that desk. Maybe I can find a better, used monitor. Damn! I knew that would happen – let Mac in the network and it takes over!