[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Bwidgets on Ruby question

mpthompson at gmail.com

9/22/2006 5:11:00 AM

Hi everyone,

I'm looking for some help to get a start with the BWidget wrappers in
Ruby.

Some quick background. While looking into using different Tk
extensions with Ruby and I've come across both IWidgets and BWidgets.
They both seem to be installed for me on Windows XP when using the
One-Click Installer and ActiveTcl 8.4. There seems to be a fair amount
of sample Ruby code installed for the IWidget wrappers which give me a
pretty good idea of how they work and ook. Unfortunately, there seems
to be no sample code I can find anywhere for the BWidget wrappers. I'm
curious to try out BWidget on Ruby because the Tcl sample applications
for BWidget installed with ActiveTcl 8.4 looks very nice.

I did manage to come across the following Bwidget code on
comp.lang.ruby, but it doesn't work for me. By 'not work' I mean that
the d.draw method doesn't bring up a dialog box and I can't figure out
why.

-------------------------------------
require 'tk'
require 'tkextlib/bwidget'

d = Tk::BWidget::Dialog.new(:relative=>Tk.root, :modal=>:local,
:separator=>true, :title=>'Dialog Test',
:side=>:bottom, :anchor=>:c,
:default=>0, :cancel=>3)

d.add(:text=>'btn0', :command=>proc{d.enddialog('btn0 is pressed')})
d.add(:text=>'btn1', :command=>proc{d.enddialog('btn1 is pressed')})
d.add(:text=>'btn2') # use default cmd => return a string of the index
number
d.add(:text=>'btn3', :command=>proc{d.enddialog('btn3 is pressed')})

p d.current_itemconfiginfo(0)

# f = d.get_frame
d.get_frame{|f|
TkLabel.new(f, :text=>'Here is a frame of the dialog').pack
TkLabel.new(f, :text=>'Please lay-out your widgets here.').pack

}

TkButton.new(:text=>'show dialog', :command=>proc{p d.draw}).pack

Tk.mainloop
-------------------------------------

Can anyone give a tip on locating some Bwidget sample code or help me
figure out why the above BWidget code doesn't work.

Thanks,

Mike Thompson

10 Answers

Morton Goldberg

9/22/2006 7:15:00 AM

0

On Sep 22, 2006, at 1:15 AM, mpthompson at gmail.com wrote:

> Hi everyone,
>
> I'm looking for some help to get a start with the BWidget wrappers in
> Ruby.
>
> Some quick background. While looking into using different Tk
> extensions with Ruby and I've come across both IWidgets and BWidgets.
> They both seem to be installed for me on Windows XP when using the
> One-Click Installer and ActiveTcl 8.4. There seems to be a fair
> amount
> of sample Ruby code installed for the IWidget wrappers which give me a
> pretty good idea of how they work and ook. Unfortunately, there seems
> to be no sample code I can find anywhere for the BWidget wrappers.
> I'm
> curious to try out BWidget on Ruby because the Tcl sample applications
> for BWidget installed with ActiveTcl 8.4 looks very nice.

Suggest you visit

http://www.ruby-lang.org/cgi-bin/cvsweb.cgi/ruby/ext/...
tkextlib/bwidget/

Regards, Morton

mpthompson at gmail.com

9/22/2006 8:33:00 AM

0

Morton,

Thanks a lot. Exactly what I was looking for. I should have simply
searched my Ruby directory tree rather than try to use Google to find
these on the web.

Mike


Morton Goldberg wrote:
> Suggest you visit
>
> http://www.ruby-lang.org/cgi-bin/cvsweb.cgi/ruby/ext/...
> tkextlib/bwidget/
>
> Regards, Morton

Obwon

6/5/2012 11:08:00 AM

0

On Mon, 4 Jun 2012 07:26:59 -0700 (PDT), Yer Pal Al
<caddyshack.al@gmail.com> wrote:

>On Jun 4, 3:32?am, Obwon <Ob...@real.com> wrote:
>> On Sun, 3 Jun 2012 05:42:47 -0700 (PDT), Yer Pal Al
>>
>>
>>
>>
>>
>> <caddyshack...@gmail.com> wrote:
>> >On Jun 2, 11:39?pm, Obwon <Ob...@real.com> wrote:
>> >> n Sat, 2 Jun 2012 15:49:41 -0700 (PDT), Yer Pal Al
>>
>> >> <caddyshack...@gmail.com> wrote:
>> >> >On Jun 2, 2:39?am, Obwon <Ob...@real.com> wrote:
>> >> >> On Fri, 1 Jun 2012 07:23:28 -0700, "Baxter"
>>
>> >> >> <baxter.spambl...@baxcode.com> wrote:
>> >> >> >-
>> >> >> >--------------------------------------------------------------------------???----------
>> >> >> >Free Software - Baxter Codeworks ?www.baxcode.com
>> >> >> >--------------------------------------------------------------------------???----------
>>
>> >> >> >"Obwon" <Ob...@real.com> wrote in message
>> >> >> >news:1k4hs7tsobf3b205hid4v3fndj1dcd8kc6@4ax.com...
>> >> >> >> On Thu, 31 May 2012 14:48:56 -0700, "Baxter"
>> >> >> >> <baxter.spambl...@baxcode.com> wrote:
>>
>> >> >> >>>"Yer Pal Al" <caddyshack...@gmail.com> wrote in message
>> >> >> >>>news:98ff79cc-35a2-4c40-bd7d-8620368ec6c2@n33g2000vbi.googlegroups.com...
>> >> >> >>>> This is good news for liberals and bad news for conservatives:
>>
>> >> >> >>>> America Lost 129,000 Millionaires in 2011
>> >> >> >>>>http://www.cnbc.com/i...
>>
>> >> >> >>>Where did they go to? ?Or did those "millionaires" income dropped to
>> >> >> >>>$999,999.99?
>>
>> >> >> >> ?They were "paper millionaires", ?holding assets that
>> >> >> >> continued to be of overstated value,
>>
>> >> >> >IOW - they weren't "job creators".
>>
>> >> >> Exactly, ?they were "paper pushers".
>>
>> >> >Where do "job creators" get their money to create jobs?
>>
>> >> Unfortunately it comes from the same place that fraudsters
>> >> steal it... ?Investors!
>>
>> >In other words, "paper pushers".
>>
>> >You are clueless and fueled by envy.
>>
>> Hardly... ?The real "job creators" are the general
>> population,
>
>In that anyone can start a business.

Hardly, as in: When people have money to spend, other
people look for ways to satisfy the wants and needs for
goods and services. This, in turn creates jobs. People
don't rent space, buy machinery and hire workers, then sit
around looking for something to do with it all. They start
by making a few products, or providing services to a few
people. If they are profitable and more people demand those
goods and services, then they hire more people to meet the
demand.

Big corporations do market research, to see what kind of
goods/services people want and what they will pay for them.
They also study markets to see where best to locate. Then
they borrow the money to start up full blown operation.

But this idea that "anyone can start a business", is wrong,
since there are many people who neither can, nor want to
operate a business. The greatest number of people just want
good paying work, so they can get on with their lives and
do other things they enjoy, like raising a family.

>> when they have money in their pockets and are
>> comfortable about spending it.
>
>Then they put it someone elses pocket. That person takes the money and
>starts a new business, expands his existing business or he'll sit on
>it like right now, because he is unsure of what the Obama admin will
>do to him next.
>
>> Businesses spring up to
>> fulfil needs and/or satisfy wants,
>
>In a world without push advertising.
>
>> not because people need
>> salaries or paychecks. ? See? ?That's why your randian
>> thinking fails! ?You cannot name a business that was created
>> to give people jobs!
>
>Solyndra.

That's a horse of a different color, because profits
weren't the highest consideration on the table there.
Global warming was, they only failed profit wise, because
China "ate their lunch".

>> Because there are none!
>
>Yes, it was a failure because it was created for a poltical reason.
>However, I didn't realize I needed an iPad until Apple created that
>demand for me.

But that was layered on top of the already existing
e-market. There are many people who realize they need an
iPad, but who still cannot afford one.

anodial tow

6/5/2012 2:39:00 PM

0

Obwon wrote:
> On Mon, 04 Jun 2012 08:38:00 -0600, anodial tow
> <rice@in.valid> wrote:
>
>> Obwon wrote:
>>> no one creates jobs, just so that
>>> people can earn pay!
>>
>> CCC
>>
>> CWA
>>
>> WPA
>>
>> PWA
>
> Well, you've just made the case for gov't stimulus
> spending.

Well, you have just shown that ultimately such "stimulus" fails and
another world war is necessary to truly revive the economy.

> I know you didn't intend to do that, you just
> wanted to seem smart. You wanted to show that someone does,
> in fact, create jobs just so someone can earn a paycheck.

Which actually was the case.

> But wait! We were speaking about "The Job Creators" who
> needed tax cuts and breaks! Obviously these programs you've
> listed, argue against that! Or, do you really think that
> gov't programs are businesses?

Government is our _biggest_ business, always has been and always will be.

> Or, do you think that
> captains of industry created these programs?

They respond to actual market demand.

> Do you see now, that you've bashed your own arguments
> sensless?

I made no "arguments", only observations.

Your knee jerk was spasmodically premature, as ever.

anodial tow

6/5/2012 2:40:00 PM

0

Obwon wrote:
> On Mon, 4 Jun 2012 07:30:12 -0700 (PDT), Yer Pal Al
> <caddyshack.al@gmail.com> wrote:
>
>> On Jun 4, 3:44 am, Obwon<Ob...@real.com> wrote:
>>> On Sun, 3 Jun 2012 10:14:33 -0700 (PDT), Yer Pal Al
>>>
>>>
>>>
>>>
>>>
>>> <caddyshack...@gmail.com> wrote:
>>>> On Jun 3, 8:33 am, "Baxter"<baxter.spambl...@baxcode.com> wrote:
>>>>> -
>>>>> ---------------------------------------------------------------------------? ---------
>>>>> Free Software - Baxter Codeworkswww.baxcode.com
>>>>> ---------------------------------------------------------------------------? ---------
>>>
>>>>> "Yer Pal Al"<caddyshack...@gmail.com> wrote in messagenews:ca5bb60e-9b4a-4274-a39a-a5ec3e10544b@n8g2000pbv.googlegroups.com...
>>>>> On Jun 2, 2:39 am, Obwon<Ob...@real.com> wrote:
>>>
>>>>>>> Exactly, they were "paper pushers".
>>>
>>>>>> Where do "job creators" get their money to create jobs?
>>>
>>>>> Jobs come from spending by the middle class and poor.
>>>
>>>> And Baxter keeps his stupid streak alive.
>>>
>>> Your non answer and name calling are noted!
>>
>> I was diagreeing. Jobs come from risk takers.
>
> No one has said that they don't. What we're saying is that
> these "risk takers" aren't going to risk investing their
> money, to create jobs, based on businesses that few if any
> can afford. Businesses struggle to lower the cost of their
> product, because that makes it accessible to more people.
> That's the kind of thinking that creates jobs, mass
> production and mass marketing relies on the masses!
> If the masses can't afford the many products we enjoy, it
> won't be profitable to produce them.
>

Which accounts for why luxury goods manufacturers oft times do better in
an economic downturn?

anodial tow

6/5/2012 2:43:00 PM

0

Obwon wrote:
> On Mon, 4 Jun 2012 19:34:45 -0700 (PDT), Yer Pal Al
> <caddyshack.al@gmail.com> wrote:
>
>> On Jun 4, 9:14 am, "Baxter"<baxter.spambl...@baxcode.com> wrote:
>>> -
>>> ---------------------------------------------------------------------------?---------
>>> Free Software - Baxter Codeworks www.baxcode.com
>>> ---------------------------------------------------------------------------?---------
>>>
>>> "Yer Pal Al"<caddyshack...@gmail.com> wrote in messagenews:a9d47e43-2fa8-484d-92e1-5f21c5070014@to5g2000pbc.googlegroups.com...
>>>
>>>> On Jun 4, 3:44 am, Obwon<Ob...@real.com> wrote:
>>>
>>>>> Your non answer and name calling are noted!
>>>
>>>> I was diagreeing. Jobs come from risk takers.
>>>
>>> The question is whether "Yer Pal Al" is ignorant or Pants-on-fire. Job
>>> creators are completely risk-adverse - you'd think that "Yer Pal Al" could
>>> see that when he claims that 'businesses are not creating jobs because of
>>> uncertainty'.
>>
>> Say you want to drill for oil. Would you do it on Detroit street in
>> Portland where there is a big risk you'll fail or would you rather
>> lease property in Wyoming adjacent to an existing oil field?
>>
>> Say you want to open a restaurant. Would you do it with the
>> possibility of Obamacare passing and costing you thousands a week or
>> would you wait hoping that it gets shut down by the USSC?
>
> "Obamacare" doesn't seem to be holding up too many
> businesses from opening, could it be they don't care?
> Of course they don't, because for one thing, you have to
> reach a certain size before it matters at all.

A "certain size"?

Or "sizes"?

http://www.myheritage.org/news/the-impact-of-obamacare-small-businesses-t...

March 22, 2011

?If the health care reform law is not repealed or if the employer
mandate doesn?t go away, we?re going to have to take drastic action,?
explains Scott Womack, an Indiana small business owner.

On the first anniversary of the passage of Obamacare, Womack sat down
with The Heritage Foundation to outline what the bill means for the
future of his business.

Under the year-old law, Womack must provide health insurance to all
full-time employees. Right now, he employs nearly 1,000 full- and
part-time workers and he already provides insurance to his management
staff. He simply doesn?t have the money to do more.

Womack estimates the cost of the law to his company to be 50 percent
greater than his company?s earnings ? in other words, beyond his ability
to pay.

Without these profits, Womack will be unable to invest in new
restaurants, which will not only impact his restaurant employees but
local investors and developers as well.

http://www.heritage.org/research/reports/2010/04/obamacare-impact-on-...

Obamacare will dramatically impact the behavior of medium-size firms in
the U.S.?specifically, those companies with 50?199 workers.[1] Beginning
in 2014, Obamacare will begin imposing taxes?to help offset the cost of
individual employees receiving premium subsidies through the
to-be-established state health insurance exchanges?on companies with 50
?full-time equivalents? that do not offer an ?acceptable? level of
health insurance coverage.[2] These mandates will force
companies?including companies below the 50-employee threshold?to react
to eventual overall cost increases.

These changes will likely produce upward pressure on health insurance
premiums in the ?fully insured market??and this will disproportionately
affect these medium-size companies as well as smaller companies.[3]
Employees will likely bear most of the burden since these costs will
likely be passed on to them in the form of reduced wages, discontinued
hiring, or loss of employment. Instead of adding more regular full-time
employees, some businesses will simply increase hours for current
employees, hire low-skilled and low-income labor, or opt for more
temporary or seasonal workers.

Health Reform Penalizing Small Business

President Obama and congressional leadership repeatedly claim that
Obamacare is good health reform policy for small businesses (companies
with 50 or fewer workers), but this claim is not supported by the
facts.[4] Instead, Obamacare will likely exacerbate many of the concerns
of small businesses?particularly small business owners?in at least four
ways.

1. Higher Health Care Costs. Obamacare does nothing to ?bend down the
cost curve? that small businesses face relating to providing health
insurance coverage. In fact, it is likely that the endless regulations,
mandates, fees, and taxes will put upward pressure on premium
prices?particularly in the ?fully insured? market, where 88 percent of
workers and dependents at small businesses purchase health insurance.[5]
Heritage analysis estimates that roughly 54.5 percent of the total
?premium tax? on health insurers will be paid by workers and dependents
covered by these employer group policies.[6]

Additionally, the increased costs of health insurance will cause many
firms with 50 or fewer employees?perhaps most?to either not offer
coverage or drop coverage if they currently offer it. There is nothing
currently in Obamacare that will stop them from doing so.

2. Ineffective Small Business Tax Credit. Even accounting for the
?cost-reducing? tax credits?which the Congressional Budget Office
estimates will impact at most 12 percent of businesses with 25 or fewer
workers and expire after two years beginning in 2014?Obamacare will not
address the many uncertainties small businesses face in deciding whether
to offer health insurance coverage to its workers.

Essentially, after all exclusions the only eligible firms for the
heralded ?small business tax credit? are those with 10 or fewer workers
and those with low-income workers?and most of these workers will qualify
for premium subsidies in the state exchanges. These small firms are the
least likely to offer coverage even with a significant price reduction.


anodial tow

6/5/2012 2:47:00 PM

0

Obwon wrote:
> But this idea that "anyone can start a business", is wrong,

what's "wrong" is your starkly anti-capitalistic screeds here, you
define the essence of un-American non-exceptionalism.

Obwon

6/6/2012 10:31:00 AM

0

On Tue, 05 Jun 2012 08:39:31 -0600, anodial tow
<rice@in.valid> wrote:

>Obwon wrote:
>> On Mon, 4 Jun 2012 07:30:12 -0700 (PDT), Yer Pal Al
>> <caddyshack.al@gmail.com> wrote:
>>
>>> On Jun 4, 3:44 am, Obwon<Ob...@real.com> wrote:
>>>> On Sun, 3 Jun 2012 10:14:33 -0700 (PDT), Yer Pal Al
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> <caddyshack...@gmail.com> wrote:
>>>>> On Jun 3, 8:33 am, "Baxter"<baxter.spambl...@baxcode.com> wrote:
>>>>>> -
>>>>>> ---------------------------------------------------------------------------? ---------
>>>>>> Free Software - Baxter Codeworkswww.baxcode.com
>>>>>> ---------------------------------------------------------------------------? ---------
>>>>
>>>>>> "Yer Pal Al"<caddyshack...@gmail.com> wrote in messagenews:ca5bb60e-9b4a-4274-a39a-a5ec3e10544b@n8g2000pbv.googlegroups.com...
>>>>>> On Jun 2, 2:39 am, Obwon<Ob...@real.com> wrote:
>>>>
>>>>>>>> Exactly, they were "paper pushers".
>>>>
>>>>>>> Where do "job creators" get their money to create jobs?
>>>>
>>>>>> Jobs come from spending by the middle class and poor.
>>>>
>>>>> And Baxter keeps his stupid streak alive.
>>>>
>>>> Your non answer and name calling are noted!
>>>
>>> I was diagreeing. Jobs come from risk takers.
>>
>> No one has said that they don't. What we're saying is that
>> these "risk takers" aren't going to risk investing their
>> money, to create jobs, based on businesses that few if any
>> can afford. Businesses struggle to lower the cost of their
>> product, because that makes it accessible to more people.
>> That's the kind of thinking that creates jobs, mass
>> production and mass marketing relies on the masses!
>> If the masses can't afford the many products we enjoy, it
>> won't be profitable to produce them.
>>
>
>Which accounts for why luxury goods manufacturers oft times do better in
>an economic downturn?

Yes, they do better in downturns because their customers
have the wherewithal to patronize them. But... As the
downturn drags more people down, it becomes politically
incorrect or socially unacceptable to display the trappings
of wealth so openly, thus even these businesses suffer
eventually.

Then too, there's another component to this, many of the
luxury goods and services, are layered on top of mass
marketing enterprises, like luxury cars. In these cases we
see that the sales and profits, generated by the high end
sales, are not enough to keep the mass production lines
running. Rather, it's the mass production and sales that
make the mfg of the luxury lines possible.

Obwon

6/6/2012 10:49:00 AM

0

On Tue, 05 Jun 2012 08:47:24 -0600, anodial tow
<rice@in.valid> wrote:

>Obwon wrote:
>> But this idea that "anyone can start a business", is wrong,
>
>what's "wrong" is your starkly anti-capitalistic screeds here, you
>define the essence of un-American non-exceptionalism.

Wow, just stringing words together does not an argument
make. I have not posted any anti-capitalistic screeds
here, what I have posted was anti-fascistic information.
If American is going to try leading the world with word
games, then America is going to fail. Most people seem to
realize that!

anodial tow

6/6/2012 4:38:00 PM

0

Obwon wrote:
> On Tue, 05 Jun 2012 08:47:24 -0600, anodial tow
> <rice@in.valid> wrote:
>
>> Obwon wrote:
>>> But this idea that "anyone can start a business", is wrong,
>>
>> what's "wrong" is your starkly anti-capitalistic screeds here, you
>> define the essence of un-American non-exceptionalism.
>
> Wow, just stringing words together does not an argument
> make.

Precisely why you are so easily dispatched here.

> I have not posted any anti-capitalistic screeds
> here,

Liar.

> what I have posted was anti-fascistic information.

Your delusions are your own cross to bear.

> If American is going to try leading the world with word
> games, then America is going to fail. Most people seem to
> realize that!

Idiotic non sequitur.

You are one of the most easily played anti-American trolls here.