Hi,
I am trying to use the debug method,
debug("hello")
but it seems nothing come out when I watch window by pressing Alt + /.
any hints?
ubuntu 10.04
$ shoes --version
shoes policeman (0.r1550) [i486-linux Ruby1.8]
Also, bring up the console (Alt + /) before loading your Shoes script. The console may not show errors that happened before the console window is created. On Sun, 2011-01-23 at 15:38 +0800, yeer kunth wrote: > Hi, > I am trying to use the debug method, > debug("hello") > but it seems nothing come out when I watch window by pressing Alt + /. > any hints? > > > ubuntu 10.04 > $ shoes --version > shoes policeman (0.r1550) [i486-linux Ruby1.8] > >
Hi, Cecil it seems that the Debug Console will auto detect the error, at least the syntax error without pressing (Alt + /) first. my operation is using the command line like: $shoes xx.rb Is the way u mentioned that run the shoes GUI, and then (Alt + /) and then "Open An App"? On Sun, Jan 23, 2011 at 4:17 PM, Cecil Coupe <ccoupe@cableone.net> wrote: > Also, > > bring up the console (Alt + /) before loading your Shoes script. The > console may not show errors that happened before the console window is > created. > > On Sun, 2011-01-23 at 15:38 +0800, yeer kunth wrote: > > Hi, > > I am trying to use the debug method, > > debug("hello") > > but it seems nothing come out when I watch window by pressing Alt + /. > > any hints? > > > > > > ubuntu 10.04 > > $ shoes --version > > shoes policeman (0.r1550) [i486-linux Ruby1.8] > > > > > > >
Hi, yeers
Sorry for my late reply. When starting Shoes from a terminal prompt in
Linux some Ruby errors are reported on the terminal - syntax, missing
libraries, that kind of error.
Once Shoes is fully initialized and your xx.rb script passes the Ruby
parse, most errors will go to the Shoes Console Window. I tend not to
use debug() and use $stderr.puts() or $stdout.put().
It's worth exploring with a simple script (untested)
Shoes.app do
button "Go" do
debug "Debug"
$stdout.puts "From stdout"
$stderr.puts "From stderr"
eval "not a chance in the world this is correct"
end
end
and see where the error messages end up, and when.
regards,
Cecil
On Sun, 2011-01-23 at 18:45 +0800, yeer kunth wrote:
> Hi, Cecil
> it seems that the Debug Console will auto detect the error, at least
> the syntax error without pressing (Alt + /) first.
> my operation is using the command line like:
> $shoes xx.rb
> Is the way u mentioned that run the shoes GUI, and then (Alt + /) and
> then "Open An App"?
>
> On Sun, Jan 23, 2011 at 4:17 PM, Cecil Coupe <ccoupe@cableone.net>
> wrote:
> Also,
>
> bring up the console (Alt + /) before loading your Shoes
> script. The
> console may not show errors that happened before the console
> window is
> created.
>
> On Sun, 2011-01-23 at 15:38 +0800, yeer kunth wrote:
>
>
> > Hi,
> > I am trying to use the debug method,
> > debug("hello")
> > but it seems nothing come out when I watch window by
> pressing Alt + /.
> > any hints?
> >
> >
> > ubuntu 10.04
> > $ shoes --version
> > shoes policeman (0.r1550) [i486-linux Ruby1.8]
> >
> >
>
>
>
>
>
Never had that happen before; the console is supposed to store messages. I could have sworn they just went into an Array somewhere and that the console displayed the contents of that Array. Haven't really looked into the implementation of it, though, so can't say for sure. -- ~devyn On 2011-01-23, at 12:17 AM, Cecil Coupe <ccoupe@cableone.net> wrote: > Also, > > bring up the console (Alt + /) before loading your Shoes script. The > console may not show errors that happened before the console window is > created. > > On Sun, 2011-01-23 at 15:38 +0800, yeer kunth wrote: >> Hi, >> I am trying to use the debug method, >> debug("hello") >> but it seems nothing come out when I watch window by pressing Alt + /. >> any hints? >> >> >> ubuntu 10.04 >> $ shoes --version >> shoes policeman (0.r1550) [i486-linux Ruby1.8] >> >> > >
Devyn, I wish that were true (user generated console msgs cached in an Array just waiting for a console to appear) It's potential memory leak. Last time I looked at the Shoes console code (due to a 1.9.1 thread dump) I recognized that dragons live there and I was unarmed. On Sun, 2011-01-23 at 00:27 -0800, Devyn Cairns wrote: > Never had that happen before; the console is supposed to store messages. I could have sworn they just went into an Array somewhere and that the console displayed the contents of that Array. Haven't really looked into the implementation of it, though, so can't say for sure. > > -- > ~devyn > > On 2011-01-23, at 12:17 AM, Cecil Coupe <ccoupe@cableone.net> wrote: > > > Also, > > > > bring up the console (Alt + /) before loading your Shoes script. The > > console may not show errors that happened before the console window is > > created. > >
-- ~devyn On 2011-01-23, at 12:54 AM, Cecil Coupe <ccoupe@cableone.net> wrote: > Devyn, > > I wish that were true (user generated console msgs cached in an Array > just waiting for a console to appear) It's potential memory leak. Last > time I looked at the Shoes console code (due to a 1.9.1 thread dump) I > recognized that dragons live there and I was unarmed. Jeez, _why sure likes his dragons... > > On Sun, 2011-01-23 at 00:27 -0800, Devyn Cairns wrote: >> Never had that happen before; the console is supposed to store messages. I could have sworn they just went into an Array somewhere and that the console displayed the contents of that Array. Haven't really looked into the implementation of it, though, so can't say for sure. >> >> -- >> ~devyn >> >> On 2011-01-23, at 12:17 AM, Cecil Coupe <ccoupe@cableone.net> wrote: >> >>> Also, >>> >>> bring up the console (Alt + /) before loading your Shoes script. The >>> console may not show errors that happened before the console window is >>> created. >>> > >
yeer, I'm guessing you compiled Shoes with the default ubuntu Ruby (1.8.7) instead of the Shoes(Policeman) desired Ruby 1.9.1. Remove the Ruby 1.8.7 install with Synaptic or apt-get remove and install Ruby-1.9.1-dev (not 1.9, it must be 1.9.1). If you don't want to remove 1.8.7 and install 1.9.1 system wide then you need ro look into using 'rvm' or 'update-alternatives' - rvm is better. On Sun, 2011-01-23 at 15:38 +0800, yeer kunth wrote: > Hi, > I am trying to use the debug method, > debug("hello") > but it seems nothing come out when I watch window by pressing Alt + /. > any hints? > > > ubuntu 10.04 > $ shoes --version > shoes policeman (0.r1550) [i486-linux Ruby1.8] > >
Hi,ccoupe u r right, i install 1.9.1 without remove 1.8.7 and just using the rake1.9.1 and it works! thank you. cheers yeer On Sun, Jan 23, 2011 at 4:10 PM, Cecil Coupe <ccoupe@cableone.net> wrote: > yeer, > > I'm guessing you compiled Shoes with the default ubuntu Ruby (1.8.7) > instead of the Shoes(Policeman) desired Ruby 1.9.1. > > Remove the Ruby 1.8.7 install with Synaptic or apt-get remove and > install Ruby-1.9.1-dev (not 1.9, it must be 1.9.1). If you don't want to > remove 1.8.7 and install 1.9.1 system wide then you need ro look into > using 'rvm' or 'update-alternatives' - rvm is better. > > On Sun, 2011-01-23 at 15:38 +0800, yeer kunth wrote: > > Hi, > > I am trying to use the debug method, > > debug("hello") > > but it seems nothing come out when I watch window by pressing Alt + /. > > any hints? > > > > > > ubuntu 10.04 > > $ shoes --version > > shoes policeman (0.r1550) [i486-linux Ruby1.8] > > > > > > >