2009/1/12 Kevin Ball <[email protected]>: > Hi Shoes hackers, > > After getting frustrated with the modify/save/reopen cycle to see how > minor tweaks would look different in Shoes, I wrote a little shoes app to > allow you to modify code & relaunch it all within a window of Shoes. Anyone > who wants to try it, its at > http://github.com/kball/shoes-preview/tree/master.
I've tried it an I actually like it, it's a great idea! I'm working on a similar thing, in fact it will be a complete IDE for beginners and it will allow the same feature of running the code from the app. I haven't coded that feature yet, but I'm watching your app, and maybe I could reuse the code for mine? :) (you can check out the code at http://github.com/madx/solylace/ but it's rather crappy right now :P) > I've got a few questions now that I haven't been able to figure out from > the manual or tinkering, so I was wondering if anyone on the list could help > me out: > > 1) Is there a way to specify where a new Shoes app is going to open on the > desktop? I tried modifying :left and :top to no avail, though :height and > :width appear to work as I would expect. As of now, this isn't possible and I don't know if this is planned, _why could give you an answer but I think he's mixing potions at the time (http://github.com/why/potion/). > 2) Is there an event that can be caught for a Shoes app closing? I found > that trying to close an app object that has already been closed causes a > crash. I guess you ask this for removing the DemoApp from the list when it's closed, but maybe you could just not use that class and eval the code straight from the main app? And if the code contains Shoes.app, then run it, else eval it in a new window ( window { eval @e.text } ) > 3) Is there a way to catch ctrl/alt/etc keypress events inside of an > edit_box? For example, if I hit ctrl-s in an edit_box, it doesn't add any > text, and doesn't trigger the change event; is there an event it is > triggering that I can catch somewhere? Maybe you could define your keypress events inside the top level window, with the keypress method. This should work fine: def submit @apps.push DemoApp.new(@e.text) end @submit.click { submit } keypress do |k| case k when :control_s then submit end end > 4) Is the focus method for edit_box broken for anyone else? I see no error > message, but also no effect when I do something like > > @e = edit_box :height => 200, :width => '100%' > @e.focus Yeah it's broken here too and I think this is a bug! -- François
