[lnkForumImage]
TotalShareware - Download Free Software

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


 

Mohammad ---

9/1/2006 12:44:00 AM

Okay so I set up a greeting AI for my sceince projet, (cool right?) but
I got a problem: when he ask for a new key word I can't 'un-pack' the
button so it's always there then if it happens again :), get ready for
this, it does it again! My fault in the code, but I don't know what else
to do, so here's the code that I think needs the editing:
submit = TkButton.new(text) {
image submitbutton
command {
aa = grem.how_are_you(text_awnser)
ga.configure("text"=>aa)
if aa.include?("I don't know what that means")
submit_helpg = TkButton.new(text){text "New positive keyword";
command {add_word(new_word,"yes")}}.pack("side"=>"bottom")
submit_helpb = TkButton.new(text){text "New negative keyword";
command {add_word(new_word,"no")}}.pack("side"=>"bottom")
helpme = TkEntry.new(text){ textvariable new_word
}.pack("side"=>"bottom")
end
}
}.pack

Thanks In Advance,
Screen Name.

--
Posted via http://www.ruby-....

7 Answers

Morton Goldberg

9/1/2006 2:13:00 AM

0

I don't know why you say you can't unpack your button -- it's
possible to both unpack and disable buttons, and then repack and re-
enable them. Consider the following code:

<code>
require 'tk'

DEBUG = []

begin
root = TkRoot.new {title 'Button Demo'}

unpack_button = TkButton.new(root) {
text 'Unpack Me'
command {unpack_button.unpack}
}
unpack_button.pack

disable_button = TkButton.new(root) {
text 'Disable Me'
command {disable_button.state = 'disable'}
}
disable_button.pack

reset_button = TkButton.new(root) {
text 'Reset'
command {
unpack_button.pack('before'=>disable_button)
disable_button.state = 'normal'
}
}
reset_button.pack

# Set initial window geometry; i.e., size and placement.
win_w, win_h = 200, 100
# root.minsize(win_w, win_h)
win_lf = (root.winfo_screenwidth - win_w) / 2
root.geometry("#{win_w}x#{win_h}+#{win_lf}+50")

# Make Cmnd+Q work as expected. This is for OS X.
root.bind('Command-q') {Tk.root.destroy}

Tk.mainloop
ensure
puts DEBUG unless DEBUG.empty?
end
</code>

Regards, Morton

On Aug 31, 2006, at 8:43 PM, Mohammad --- wrote:

> Okay so I set up a greeting AI for my sceince projet, (cool right?)
> but
> I got a problem: when he ask for a new key word I can't 'un-pack' the
> button so it's always there then if it happens again :), get ready for
> this, it does it again! My fault in the code, but I don't know what
> else
> to do, so here's the code that I think needs the editing:
> submit = TkButton.new(text) {
> image submitbutton
> command {
> aa = grem.how_are_you(text_awnser)
> ga.configure("text"=>aa)
> if aa.include?("I don't know what that means")
> submit_helpg = TkButton.new(text){text "New positive keyword";
> command {add_word(new_word,"yes")}}.pack("side"=>"bottom")
> submit_helpb = TkButton.new(text){text "New negative keyword";
> command {add_word(new_word,"no")}}.pack("side"=>"bottom")
> helpme = TkEntry.new(text){ textvariable new_word
> }.pack("side"=>"bottom")
> end
> }
> }.pack


Yoorghis

8/18/2012 7:21:00 PM

0

On Sat, 18 Aug 2012 08:58:03 -0700, George Plimpton <george@si.not>
wrote:

>> If cutting taxes on the wealthy and deregulating industry helped
>> improve the economy we would be in an economic boom right now
>
>We are.

Only because Obama has changed policy, you moron.

George Plimpton

8/18/2012 7:26:00 PM

0

On 8/18/2012 12:20 PM, Yoorghis@Jurgis.net wrote:
> On Sat, 18 Aug 2012 08:58:03 -0700, George Plimpton <george@si.not>
> wrote:
>
>>> If cutting taxes on the wealthy and deregulating industry helped
>>> improve the economy we would be in an economic boom right now
>>
>> We are.
>
> Only because

Only because the tax cuts are in place, and Obama extended them.

Harold Burton

8/18/2012 7:29:00 PM

0

In article <IZGdnVl01ZYWJrLNnZ2dnUVZ5judnZ2d@giganews.com>,
George Plimpton <george@si.not> wrote:

> On 8/18/2012 6:35 AM, deep wrote:
> > On Fri, 17 Aug 2012 22:17:19 -0700, George Plimpton <george@si.not>
> > wrote:
> >
> >> On 8/17/2012 8:11 PM, Yoorghis@Jurgis.net wrote:
> >>> On Fri, 17 Aug 2012 16:25:24 -0700, George Plimpton <george@si.not>
> >>> wrote:
> >>>
> >>>> On 8/17/2012 3:25 PM, Yoorghis@Jurgis.net wrote:
> >>>>> On Fri, 17 Aug 2012 10:21:42 -0700, George Plimpton <george@si.not>
> >>>>> wrote:
> >>>>>
> >>>>>> Conservatives also appear to be more generous than liberals in
> >>>>>> nonfinancial ways.
> >>>>>
> >>>>> What if what is needed isn't what a conservative wants to do?
> >>>>
> >>>> There's no such thing as "need".
> >>>
> >>> So---the wealth class does not need tax cuts
> >>
> >> No, they want tax cuts, and they deserve them, but they don't "need" them.
> >>
> >> The economy will be better if they get them.
> >
> > If cutting taxes on the wealthy and deregulating industry helped
> > improve the economy we would be in an economic boom right now
>
> We are.


Hahahahahahahahahaa.


Leftard rule #!: Lie, lie again, then lie about lying.

George Plimpton

8/18/2012 7:30:00 PM

0

On 8/18/2012 12:28 PM, Harold Burton wrote:
> In article <IZGdnVl01ZYWJrLNnZ2dnUVZ5judnZ2d@giganews.com>,
> George Plimpton <george@si.not> wrote:
>
>> On 8/18/2012 6:35 AM, deep wrote:
>>> On Fri, 17 Aug 2012 22:17:19 -0700, George Plimpton <george@si.not>
>>> wrote:
>>>
>>>> On 8/17/2012 8:11 PM, Yoorghis@Jurgis.net wrote:
>>>>> On Fri, 17 Aug 2012 16:25:24 -0700, George Plimpton <george@si.not>
>>>>> wrote:
>>>>>
>>>>>> On 8/17/2012 3:25 PM, Yoorghis@Jurgis.net wrote:
>>>>>>> On Fri, 17 Aug 2012 10:21:42 -0700, George Plimpton <george@si.not>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Conservatives also appear to be more generous than liberals in
>>>>>>>> nonfinancial ways.
>>>>>>>
>>>>>>> What if what is needed isn't what a conservative wants to do?
>>>>>>
>>>>>> There's no such thing as "need".
>>>>>
>>>>> So---the wealth class does not need tax cuts
>>>>
>>>> No, they want tax cuts, and they deserve them, but they don't "need" them.
>>>>
>>>> The economy will be better if they get them.
>>>
>>> If cutting taxes on the wealthy and deregulating industry helped
>>> improve the economy we would be in an economic boom right now
>>
>> We are.
>
>
> Hahahahahahahahahaa.
>
>
> Leftard rule #!: Lie, lie again, then lie about lying.

That's exactly what the unthinking blowhard leftist Yaeowerghoofus is doing.

Scout

8/18/2012 8:08:00 PM

0



<Yoorghis@Jurgis.net> wrote in message
news:tnqv281fg9im46s68om11i2mug6rekgp6p@4ax.com...
> On Sat, 18 Aug 2012 08:58:03 -0700, George Plimpton <george@si.not>
> wrote:
>
>>> If cutting taxes on the wealthy and deregulating industry helped
>>> improve the economy we would be in an economic boom right now
>>
>>We are.
>
> Only because Obama has changed policy, you moron.


Cite


Scout

8/21/2012 4:20:00 AM

0



<Yoorghis@Jurgis.net> wrote in message
news:g0n438l143l7haep28bfvak0h992nsnjsq@4ax.com...
> On Mon, 20 Aug 2012 06:45:28 -0700, George Plimpton <george@si.not>
> wrote:
>
>>On 8/20/2012 6:23 AM, Yoorghis@Jurgis.net wrote:
>>> On Sun, 19 Aug 2012 19:02:10 -0700, George Plimpton <george@si.not>
>>> wrote:
>>>
>>>> On 8/19/2012 12:18 PM, Yoorghis@Jurgis.net wrote:
>>>>> On Sat, 18 Aug 2012 12:26:17 -0700, George Plimpton <george@si.not>
>>>>> wrote:
>>>>>
>>>>>> Only because the tax cuts are in place, and Obama extended them.
>>>>>
>>>>> Forced by Wingers because
>>>>
>>>> No one forced Obama to extend the tax cuts. He did it because
>>>> his advisors told him it's the right thing to do - and it is.
>>>
>>>
>>> Yes, they did
>>
>>No, no one "forced" Obama to extend the tax cuts.
>
> Held hostage is 'forcing', you moron.

I think the Secret Service would have objected to Mr Obama being held
hostage.