Hi everyone,
I'm currently playing with the focus method - attempting to change the
standard widget focus order. In the midst of doing so and switching
from one computer to another, I got into troubles.
Although I'd seen some results with Shoes on Linux, apparently I can't
get any sort of focus with Shoes (Raisins rev. 1134) on Mac OS X
(v10.6.3). Pressing tab key doesn't work, neither does pressing enter.
On non-Shoes apps, I can bring and change focus on widgets, though, so
I don't think it's related to my system configuration.
Here's the code I'm using for my tests
---------------------------------------------------------
Shoes.app do
button 'Whatever'
@b = button 'Ok'
@b.click { alert 'Ok, then.' }
@b.focus
end
---------------------------------------------------------
Is this something known? Documented? Is there any workaround? Or am I
missing something?
Thanks for your time,
-- Emmanuel.
Hi Emmanuel, as far as I can tell I don't think it's ever worked in OSX<http://thread.gmane.org/gmane.comp.lib.shoes/2238/focus=2437>. To get it working is going to take someone with Cocoa skills. I had a quick google and "makeFirstResponder" came up related with tabbing and giving UI elements focus. (Item 16 on this FAQ)<http://projects.autonomy.net.au/ai/chrome/site/resource/ebooks-programming/cocoa/cocoa-programming/0672322307_ch10lev1sec2.html#ch10lev3sec23>, looking through the source code, this makes an appearance<http://github.com/shoes/shoes/blob/master/shoes/native/cocoa.m#L1098>, but obviously isn't working from the point of view of tabbing. Looking at the Apple Cocoa Tutorial, they talk about using "nextKeyView" for tabbing between fields<http://developer.apple.com/mac/library/documentation/cocoa/conceptual/ObjCTutorial/05View/05View.html#//apple_ref/doc/uid/TP40000863-CH7-SW11>. It also says that tabbing should just happen and that this would just be used for setting a custom order. It also talks about "initialFirstResponder<http://developer.apple.com/mac/library/documentation/cocoa/conceptual/ObjCTutorial/05View/05View.html#//apple_ref/doc/uid/TP40000863-CH7-SW31>". This could be something else to play with. ----------------------- i5m.co.uk GPG Key: 0xA18A602B On Sun, May 2, 2010 at 12:33 AM, Emmanuel Gaillot < emmanuel.gaillot@gmail.com> wrote: > Hi everyone, > > I'm currently playing with the focus method - attempting to change the > standard widget focus order. In the midst of doing so and switching > from one computer to another, I got into troubles. > > Although I'd seen some results with Shoes on Linux, apparently I can't > get any sort of focus with Shoes (Raisins rev. 1134) on Mac OS X > (v10.6.3). Pressing tab key doesn't work, neither does pressing enter. > On non-Shoes apps, I can bring and change focus on widgets, though, so > I don't think it's related to my system configuration. > > Here's the code I'm using for my tests > --------------------------------------------------------- > Shoes.app do > button 'Whatever' > @b = button 'Ok' > @b.click { alert 'Ok, then.' } > @b.focus > end > --------------------------------------------------------- > > Is this something known? Documented? Is there any workaround? Or am I > missing something? > > Thanks for your time, > -- Emmanuel. >
Also, this post from why back in 2008<http://thread.gmane.org/gmane.comp.lib.shoes/2656/focus=2665> <http://thread.gmane.org/gmane.comp.lib.shoes/2656/focus=2665>At least I don't feel so stupid now about not understanding it. ----------------------- i5m.co.uk GPG Key: 0xA18A602B On Thu, May 20, 2010 at 4:14 PM, i5m <i5ivem@googlemail.com> wrote: > Hi Emmanuel, > > as far as I can tell I don't think it's ever worked in OSX<http://thread.gmane.org/gmane.comp.lib.shoes/2238/focus=2437> > ..... > > > > > > On Sun, May 2, 2010 at 12:33 AM, Emmanuel Gaillot < > emmanuel.gaillot@gmail.com> wrote: > >> Hi everyone, >> >> I'm currently playing with the focus method - attempting to change the >> standard widget focus order. In the midst of doing so and switching >> from one computer to another, I got into troubles. >> >> Although I'd seen some results with Shoes on Linux, apparently I can't >> get any sort of focus with Shoes (Raisins rev. 1134) on Mac OS X >> (v10.6.3). Pressing tab key doesn't work, neither does pressing enter. >> >> > >
Hi Emmanuel, On Windows, pressing tab key works for changing focus on widgets. Although Policeman has one issue of tab order, #24: Tab order reversed on Windows http://github.com/shoes/shoes/issues#issue/24 Sorry, this is no information for you. Sadly, I've no Linux and Mac... ashbb
Well, ashbb, just a tip, there's always VirtualBox... http://virtualbox.org/ You could run Ubuntu+Shoes in that, if you wish. On Sat, May 1, 2010 at 7:03 PM, Satoshi Asakawa <ashbbb@gmail.com> wrote: > Hi Emmanuel, > > On Windows, pressing tab key works for changing focus on widgets. > Although Policeman has one issue of tab order, #24: Tab order reversed on > Windows > > http://github.com/shoes/shoes/issues#issue/24 > > Sorry, this is no information for you. > Sadly, I've no Linux and Mac... > > ashbb > -- ~devyn
> You could run Ubuntu+Shoes in that, if you wish.
Cool!
Can I also build Shoes for Linux with VirtualBox?
ashbb
If your HW meets the VirtualBox specs, then it's a 99.8% complete Linux. You'll need some diskspace, 10 to 12GB for the Linux system if you want all the dev tools and languages and libraries and enough space to compile shoes and dependencies. Moving files between Linux and Windows can be frustrating. Learning the Ubuntu packaging system will take some time. Ubuntu packages Ruby differently so always use instructions specific to Ubuntu if you want to install Ubuntu versions. Building ruby from source would follow different instructions. On Tue, 2010-05-04 at 22:57 +0900, Satoshi Asakawa wrote: > > You could run Ubuntu+Shoes in that, if you wish. > Cool! > Can I also build Shoes for Linux with VirtualBox? > > ashbb
Other than that, though, yeah, it's great! xD On Tue, May 4, 2010 at 6:33 PM, Cecil Coupe <ccoupe@cableone.net> wrote: > If your HW meets the VirtualBox specs, then it's a 99.8% complete Linux. > You'll need some diskspace, 10 to 12GB for the Linux system if you want > all the dev tools and languages and libraries and enough space to > compile shoes and dependencies. Moving files between Linux and Windows > can be frustrating. Learning the Ubuntu packaging system will take some > time. Ubuntu packages Ruby differently so always use instructions > specific to Ubuntu if you want to install Ubuntu versions. Building > ruby from source would follow different instructions. > > > On Tue, 2010-05-04 at 22:57 +0900, Satoshi Asakawa wrote: > > > You could run Ubuntu+Shoes in that, if you wish. > > Cool! > > Can I also build Shoes for Linux with VirtualBox? > > > > ashbb > > > -- ~devyn
Also, don't bother with the audio/video playback issues or media applications. Or unusual usb devices Not that they can't be made to work but its a huge time going into that if all you want is a Linux command line to compile and test shoes. On Tue, 2010-05-04 at 18:38 -0700, Devyn Cairns wrote: > Other than that, though, yeah, it's great! xD > > On Tue, May 4, 2010 at 6:33 PM, Cecil Coupe <ccoupe@cableone.net> > wrote: > If your HW meets the VirtualBox specs, then it's a 99.8% > complete Linux. > You'll need some diskspace, 10 to 12GB for the Linux system if > you want > all the dev tools and languages and libraries and enough space > to > compile shoes and dependencies. Moving files between Linux and > Windows > can be frustrating. Learning the Ubuntu packaging system will > take some > time. Ubuntu packages Ruby differently so always use > instructions > specific to Ubuntu if you want to install Ubuntu versions. > Building > ruby from source would follow different instructions. > > > > On Tue, 2010-05-04 at 22:57 +0900, Satoshi Asakawa wrote: > > > You could run Ubuntu+Shoes in that, if you wish. > > Cool! > > Can I also build Shoes for Linux with VirtualBox? > > > > ashbb > > > > > > > -- > ~devyn
Hm, I never had issues with any of that, at least with the new VirtualBox (in the past I did, though.) And make sure to disable desktop effects, that causes problems in a lot of VMs. On Tue, May 4, 2010 at 6:55 PM, Cecil Coupe <ccoupe@cableone.net> wrote: > Also, don't bother with the audio/video playback issues or media > applications. Or unusual usb devices Not that they can't be made to > work but its a huge time going into that if all you want is a Linux > command line to compile and test shoes. > > > On Tue, 2010-05-04 at 18:38 -0700, Devyn Cairns wrote: > > Other than that, though, yeah, it's great! xD > > > > On Tue, May 4, 2010 at 6:33 PM, Cecil Coupe <ccoupe@cableone.net> > > wrote: > > If your HW meets the VirtualBox specs, then it's a 99.8% > > complete Linux. > > You'll need some diskspace, 10 to 12GB for the Linux system if > > you want > > all the dev tools and languages and libraries and enough space > > to > > compile shoes and dependencies. Moving files between Linux and > > Windows > > can be frustrating. Learning the Ubuntu packaging system will > > take some > > time. Ubuntu packages Ruby differently so always use > > instructions > > specific to Ubuntu if you want to install Ubuntu versions. > > Building > > ruby from source would follow different instructions. > > > > > > > > On Tue, 2010-05-04 at 22:57 +0900, Satoshi Asakawa wrote: > > > > You could run Ubuntu+Shoes in that, if you wish. > > > Cool! > > > Can I also build Shoes for Linux with VirtualBox? > > > > > > ashbb > > > > > > > > > > > > > > -- > > ~devyn > > > -- ~devyn
I'd recommend building from source and using RVM if you're on ubuntu. On 05/05/2010, at 11:38 AM, Devyn Cairns wrote: > Other than that, though, yeah, it's great! xD > > On Tue, May 4, 2010 at 6:33 PM, Cecil Coupe <ccoupe@cableone.net> wrote: > If your HW meets the VirtualBox specs, then it's a 99.8% complete Linux. > You'll need some diskspace, 10 to 12GB for the Linux system if you want > all the dev tools and languages and libraries and enough space to > compile shoes and dependencies. Moving files between Linux and Windows > can be frustrating. Learning the Ubuntu packaging system will take some > time. Ubuntu packages Ruby differently so always use instructions > specific to Ubuntu if you want to install Ubuntu versions. Building > ruby from source would follow different instructions. > > > On Tue, 2010-05-04 at 22:57 +0900, Satoshi Asakawa wrote: > > > You could run Ubuntu+Shoes in that, if you wish. > > Cool! > > Can I also build Shoes for Linux with VirtualBox? > > > > ashbb > > > > > > -- > ~devyn