librelist archives

« back to archive

program control after pop up window , a bug maybe and some more general questions...

program control after pop up window , a bug maybe and some more general questions...

From:
Catsquotl
Date:
2011-03-25 @ 14:55
Hi,

If i let my main app open up a new window. The main app stops its 
program control until I close the window.
Is there a way to keep the window open and return control to the main app?

My main app has a background color. When a scrollbar appears because the 
para rolls off screen, when i scroll down the background is white, 
instead of the color set in the app.

I have to do some reading up on modules i know, but i cannot seem to 
figure out how and what to extend or include in a module.
I have an organ class that describes the various functions and 
acupuncture points. I figured i would write a organ-gui module that 
could be included to the organ-class with a few methods describing 
layout and styling for green shoes..
however green_shoes methods give an error as unknown... any ideas?

eelco

Re: [shoes] program control after pop up window , a bug maybe and some more general questions...

From:
ashbb
Date:
2011-03-25 @ 16:45
Hi Eelco,

> If i let my main app open up a new window. The main app stops its
> program control until I close the window.
> Is there a way to keep the window open and return control to the main app?
Umm,... sorry, I didn't understand what you mention about...
Run this snippet. You can always click the button without closing child
windows.

require 'green_shoes'
Shoes.app do
  button 'spawn' do
    Shoes.app{para 'hello'}
  end
end

> My main app has a background color. When a scrollbar appears because the
> para rolls off screen, when i scroll down the background is white,
> instead of the color set in the app.
Yeah, this is one of the Green Shoes restrictions.
Please add one more flow like this. ;-)

require 'green_shoes'
Shoes.app do
  flow do
    background green
    30.times{para 'hello'}
  end
end

> I have to do some reading up on modules i know, but i cannot seem to
> figure out how and what to extend or include in a module.
> I have an organ class that describes the various functions and
> acupuncture points. I figured i would write a organ-gui module that
> could be included to the organ-class with a few methods describing
> layout and styling for green shoes..
> however green_shoes methods give an error as unknown... any ideas?
Umm,... I couldn't confirm your problem.
Try out the following. It works well at least on my Windows 7.

require 'green_shoes'
module Mod
  def hello
    para 'hello'
  end
end

Shoes.app do
  extend Mod
  hello
end

ashbb

Re: [shoes] program control after pop up window , a bug maybe and some more general questions...

From:
Catsquotl
Date:
2011-03-25 @ 21:07
Thanks for the response..

I updated my git with the version that has the problems..
https://github.com/Catsquotl/tcm-study

If you pick hart or milt from the listbox you can see that the key is 
not bold but the same as the value..
Also the text appearing goes beyond the bottom boundary of the main app 
window, but no scroll bar appears..

And if you remove the comments on lines 36 and 41 you'll see the strange 
window behaviour i was talking about.
The buttons don't show until i close the window...
In the window the keys are bold btw. And there's a scroll bar too .lol

Eelco

Re: [shoes] program control after pop up window , a bug maybe and some more general questions...

From:
ashbb
Date:
2011-03-26 @ 18:40
Hi Eelco,

> I updated my git with the version that has the problems..
> https://github.com/Catsquotl/tcm-study
Thanks!
I could confirm your findings. :)

> If you pick hart or milt from the listbox you can see that the key is
>not bold but the same as the value..
Yeah, that's strange. I'm not sure why...
But the nested clear()s are not good for green shoes. :-P

> Also the text appearing goes beyond the bottom boundary of the main app
> window, but no scroll bar appears..
Look at the line 50 in StartGUI.rb.

https://github.com/Catsquotl/tcm-study/blob/master/StartGUI.rb#L50

You are specifying `height: 0.7`, so scrollbar doesn't appear.

> And if you remove the comments on lines 36 and 41 you'll see the strange
> window behaviour i was talking about.
> The buttons don't show until i close the window...
Yes. Please add timer() method. ;-)

I have to debug Green Shoes more and more, but anyway this is a workaround.

https://gist.github.com/888521

Try it out. ;-)

ashbb