I must be missing something very basic.
The following code displays a dialog with three text fields.
The fields are initalized with values from an FXTable object.
When I edit the data in the fields an click the Accept button I expected the
FXTextField.text property to contain the modyfied text. What I get is the
original unmodified text.
How do I reference the modifyed text?
Harold
----------------------------------------------------------------------------
------
def dlgNewTest(cell)
dlg
FXDialogBox.new(getApp(),"Destination",DECOR_TITLE|DECOR_BORDER,0,0,0,0)
outter = FXVerticalFrame.new(dlg,LAYOUT_FILL_X|LAYOUT_FILL_Y)
# Initalize Contents
fields = FXVerticalFrame.new(outter,LAYOUT_FILL_X|LAYOUT_FILL_Y)
txtName=FXTextField.new(fields ,20 , nil,TEXTFIELD_NORMAL)
txtName.text=@table.getItemText(cell.row,1)
txtPath=FXTextField.new(fields ,66 , nil,TEXTFIELD_NORMAL)
txtPath.text=@table.getItemText(cell.row,2)
txtSize=FXTextField.new(fields ,12 , nil,TEXTFIELD_NORMAL)
txtSize.text=@table.getItemText(cell.row,3)
# Separator
FXHorizontalSeparator.new(outter,LAYOUT_SIDE_BOTTOM|LAYOUT_FILL_X|SEPARA
TOR_GROOVE)
# Bottom buttons
buttons=FXHorizontalFrame.new(outter)
# Accept
FXButton.new(buttons, "&Accept", nil, dlg,
FXDialogBox::ID_ACCEPT,
FRAME_RAISED|FRAME_THICK|LAYOUT_RIGHT|LAYOUT_CENTER_Y){
print "Accept1 ",cell.row," ",txtName.text,"\n"
print "Accept2 ",cell.row," ",txtPath.text,"\n"
print "Accept3 ",cell.row," ",txtSize.text,"\n"
@table.setItemText(cell.row,1,txtName.text)
@table.setItemText(cell.row,2,txtPath.text)
@table.setItemText(cell.row,3,txtSize.text)
}
# Cancel
FXButton.new(buttons, "&Cancel", nil, dlg,
FXDialogBox::ID_CANCEL,
FRAME_RAISED|FRAME_THICK|LAYOUT_RIGHT|LAYOUT_CENTER_Y)
# Delete
FXButton.new(buttons, "&Delete", nil, dlg,
FXDialogBox::ID_CANCEL,
FRAME_RAISED|FRAME_THICK|LAYOUT_RIGHT|LAYOUT_CENTER_Y)
dlg.create
dlg.execute
end
Harold Worby wrote:> FXButton.new(buttons, "&Accept", nil, dlg, FXDialogBox::ID_ACCEPT, > FRAME_RAISED|FRAME_THICK|LAYOUT_RIGHT|LAYOUT_CENTER_Y){ > print "Accept1 ",cell.row," ",txtName.text,"\n" > print "Accept2 ",cell.row," ",txtPath.text,"\n" > print "Accept3 ",cell.row," ",txtSize.text,"\n" > @table.setItemText(cell.row,1,txtName.text) > @table.setItemText(cell.row,2,txtPath.text) > @table.setItemText(cell.row,3,txtSize.text) > }You are missing a ".connect(SEL_COMMAND)" before the { . I make that mistake often :)
OK Thanks,
Now I added the ''.connect(SEL_COMMAND){'' and the data is
correct, but the
Accept button does not dimiss the diallog ''dlg''.
As I read the docs, FXButton.new(parent, text, icon, target, selector,
opts,...),
should be creating a button that will send the message
''selecotor''(ID_ACCEPT
hear) to the object ''target''(dlg here).
Wich is what it seemed to do before I added the .connect(SEL_COMMAND)
{block}
I expect it catch the SEL_COMMAND message, execute the {block} and then send
the ID_ACCEPT message. Why doesn''t it?
FXButton.new(buttons, "&Accept", nil, dlg,
FXDialogBox::ID_ACCEPT,
FRAME_RAISED|FRAME_THICK|LAYOUT_RIGHT|LAYOUT_CENTER_Y).connect(SEL_COMMAND
){
@table.setItemText(cell.row,1,txtName.text)
@table.setItemText(cell.row,2,txtPath.text)
@table.setItemText(cell.row,3,txtSize.text)
}
-----Original Message-----
From: fxruby-users-bounces@rubyforge.org
[mailto:fxruby-users-bounces@rubyforge.org]On Behalf Of Joel VanderWerf
Sent: Monday, March 28, 2005 12:57 AM
To: H.Worby@kinsey.com; fxruby-users@rubyforge.org
Subject: Re: [fxruby-users] Retriving FXTextField Data
Harold Worby wrote:
> FXButton.new(buttons, "&Accept", nil, dlg,
FXDialogBox::ID_ACCEPT,
> FRAME_RAISED|FRAME_THICK|LAYOUT_RIGHT|LAYOUT_CENTER_Y){
> print "Accept1 ",cell.row,"
",txtName.text,"\n"
> print "Accept2 ",cell.row,"
",txtPath.text,"\n"
> print "Accept3 ",cell.row,"
",txtSize.text,"\n"
> @table.setItemText(cell.row,1,txtName.text)
> @table.setItemText(cell.row,2,txtPath.text)
> @table.setItemText(cell.row,3,txtSize.text)
> }
You are missing a ".connect(SEL_COMMAND)" before the { . I make that
mistake often :)
_______________________________________________
fxruby-users mailing list
fxruby-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/fxruby-users
On Mar 28, 2005, at 10:59 PM, Harold Worby wrote:> Now I added the ''.connect(SEL_COMMAND){'' and the data is correct, but > the > Accept button does not dimiss the diallog ''dlg''. > As I read the docs, FXButton.new(parent, text, icon, target, selector, > opts,...), > should be creating a button that will send the message > ''selecotor''(ID_ACCEPT > hear) to the object ''target''(dlg here).Yes...> Which is what it seemed to do before I added the .connect(SEL_COMMAND) > {block} > I expect it catch the SEL_COMMAND message, execute the {block} and > then send > the ID_ACCEPT message. Why doesn''t it?As soon as you call connect() on the button, it replaces the previously designated message target (the dialog box) with a new one -- an "anonymous" target, if you like, that responds to the SEL_COMMAND message from the button. And FOX only allows one message target object per widget, so in this case it''s the latter object (the anonymous one) that wins. To accomplish what you want, I''d just write it this way: FXButton.new(buttons, "&Accept", nil, nil, 0, ...).connect(SEL_COMMAND) { @table.setItemText(cell.row,1,txtName.text) @table.setItemText(cell.row,2,txtPath.text) @table.setItemText(cell.row,3,txtSize.text) getApp().stopModal(dlg, true) dlg.hide } or more directly: FXButton.new(buttons, "&Accept", nil, nil, 0, ...).connect(SEL_COMMAND) { @table.setItemText(cell.row,1,txtName.text) @table.setItemText(cell.row,2,txtPath.text) @table.setItemText(cell.row,3,txtSize.text) dlg.handle(self, FXSEL(SEL_COMMAND, FXDialogBox::ID_ACCEPT), nil) } Hope this helps, Lyle
Ok, here''s the complete function.
The paramater passed as (cell) is handle to a FXTableItem.
The calling line is
dlgNewTest(cell)
When then button.connect uses:
getApp().stopModal(dlg, true)
dlg.hide
I get:
table.rbw:224:in `stopModal'': No matching function for overloaded
''FXApp_stopModal'' (ArgumentError)
And when I use:
dlg.handle(self, FXSEL(SEL_COMMAND, FXDialogBox::ID_ACCEPT), nil)
I Get:
table.rbw:227:in `dlgNewTest'': undefined method `FXSEL'' for
#<TableWindow:0x32955f8>
NoMethodError)
I''m guessing the the issue has to to do with the scope of the dlg
object?
What overloaded ''FXApp_stopModal''?
#####################################################
def dlgNewTest(cell)
dlg = FXDialogBox.new(getApp(),"Edit
Destination",DECOR_TITLE|DECOR_BORDER,0,0,0,0)
outter = FXVerticalFrame.new(dlg,LAYOUT_FILL_X|LAYOUT_FILL_Y)
# Contents
inner = FXHorizontalFrame.new(outter,LAYOUT_FILL_X|LAYOUT_FILL_Y)
labels = FXVerticalFrame.new(inner,LAYOUT_FILL_X|LAYOUT_FILL_Y)
lblName=FXLabel.new(labels,"Name",nil,LABEL_NORMAL)
lblPath=FXLabel.new(labels,"Pathname",nil,LABEL_NORMAL)
lblSize=FXLabel.new(labels,"Size Limit",nil,LABEL_NORMAL)
fields = FXVerticalFrame.new(inner,LAYOUT_FILL_X|LAYOUT_FILL_Y)
txtName=FXTextField.new(fields ,20 , nil,TEXTFIELD_NORMAL)
txtName.text=@table.getItemText(cell.row,1)
txtPath=FXTextField.new(fields ,66 , nil,TEXTFIELD_NORMAL)
txtPath.text=@table.getItemText(cell.row,2)
txtSize=FXTextField.new(fields ,12 , nil,TEXTFIELD_NORMAL)
txtSize.text=@table.getItemText(cell.row,3)
# Separator
FXHorizontalSeparator.new(outter,LAYOUT_SIDE_BOTTOM|LAYOUT_FILL_X|SEPARA
TOR_GROOVE)
# Bottom buttons
buttons=FXHorizontalFrame.new(outter)
# Accept
btnAccept=FXButton.new(buttons, "&Accept", nil, nil, 0,
FRAME_RAISED|FRAME_THICK|LAYOUT_RIGHT|LAYOUT_CENTER_Y)
btnAccept.connect(SEL_COMMAND){|sender, selector, data|
@table.setItemText(cell.row,1,txtName.text)
@table.setItemText(cell.row,2,txtPath.text)
@table.setItemText(cell.row,3,txtSize.text)
#getApp().stopModal(dlg, true)
#dlg.hide
#gives table.rbw:224:in `stopModal'': No matching function for
overloaded
''FXApp_stopModal'' (ArgumentError)
dlg.handle(self, FXSEL(SEL_COMMAND, FXDialogBox::ID_ACCEPT), nil)
#gives table.rbw:227:in `dlgNewTest'': undefined method `FXSEL''
for
#<TableWindow:0x32955f8> (NoMethodError)
}
# Cancel
btnCancel=FXButton.new(buttons, "&Cancel", nil, dlg,
FXDialogBox::ID_CANCEL,
FRAME_RAISED|FRAME_THICK|LAYOUT_RIGHT|LAYOUT_CENTER_Y)
btnCancel.connect(SEL_COMMAND){|sender, selector, data|
}
# Delete
btnDelete=FXButton.new(buttons, "&Delete", nil, dlg,
FXDialogBox::ID_CANCEL,
FRAME_RAISED|FRAME_THICK|LAYOUT_RIGHT|LAYOUT_CENTER_Y)
btnDelete.connect(SEL_COMMAND){|sender, selector, data|
sql="DELETE FROM DESTINATIONS WHERE "
sql=sql + " name=''" + txtName.text +
"''"
sql=sql + " and pathname=''" + txtPath.text +
"''"
}
dlg.create
dlg.execute
end
#####################################################> -----Original Message-----
> From: fxruby-users-bounces@rubyforge.org
> [mailto:fxruby-users-bounces@rubyforge.org]On Behalf Of Lyle Johnson
> Sent: Tuesday, March 29, 2005 6:19 AM
> To: Harold Worby
> Cc: fxruby-users@rubyforge.org
> Subject: Re: [fxruby-users] Retriving FXTextField Data
>
>
>
> On Mar 28, 2005, at 10:59 PM, Harold Worby wrote:
>
> > Now I added the ''.connect(SEL_COMMAND){'' and the
data is correct, but
> > the
> > Accept button does not dimiss the diallog ''dlg''.
> > As I read the docs, FXButton.new(parent, text, icon, target, selector,
> > opts,...),
> > should be creating a button that will send the message
> > ''selecotor''(ID_ACCEPT
> > hear) to the object ''target''(dlg here).
>
> Yes...
>
> > Which is what it seemed to do before I added the .connect(SEL_COMMAND)
> > {block}
> > I expect it catch the SEL_COMMAND message, execute the {block} and
> > then send
> > the ID_ACCEPT message. Why doesn''t it?
>
> As soon as you call connect() on the button, it replaces the previously
> designated message target (the dialog box) with a new one -- an
> "anonymous" target, if you like, that responds to the SEL_COMMAND
> message from the button. And FOX only allows one message target object
> per widget, so in this case it''s the latter object (the anonymous
one)
> that wins.
>
> To accomplish what you want, I''d just write it this way:
>
> FXButton.new(buttons, "&Accept", nil, nil, 0,
> ...).connect(SEL_COMMAND) {
> @table.setItemText(cell.row,1,txtName.text)
> @table.setItemText(cell.row,2,txtPath.text)
> @table.setItemText(cell.row,3,txtSize.text)
> getApp().stopModal(dlg, true)
> dlg.hide
> }
>
> or more directly:
>
> FXButton.new(buttons, "&Accept", nil, nil, 0,
> ...).connect(SEL_COMMAND) {
> @table.setItemText(cell.row,1,txtName.text)
> @table.setItemText(cell.row,2,txtPath.text)
> @table.setItemText(cell.row,3,txtSize.text)
> dlg.handle(self, FXSEL(SEL_COMMAND,
> FXDialogBox::ID_ACCEPT), nil)
> }
>
> Hope this helps,
>
> Lyle
>
> _______________________________________________
> fxruby-users mailing list
> fxruby-users@rubyforge.org
> http://rubyforge.org/mailman/listinfo/fxruby-users
>
Ok, here''s the complete function.
The paramater passed as (cell) is handle to a FXTableItem.
The calling line is
dlgNewTest(cell)
When then button.connect uses:
getApp().stopModal(dlg, true)
dlg.hide
I get:
table.rbw:224:in `stopModal'': No matching function for overloaded
''FXApp_stopModal'' (ArgumentError)
And when I use:
dlg.handle(self, FXSEL(SEL_COMMAND, FXDialogBox::ID_ACCEPT), nil)
I Get:
table.rbw:227:in `dlgNewTest'': undefined method `FXSEL'' for
#<TableWindow:0x32955f8>
NoMethodError)
I''m guessing the the issue has to to do with the scope of the dlg
object?
What overloaded ''FXApp_stopModal''?
#####################################################
def dlgNewTest(cell)
dlg = FXDialogBox.new(getApp(),"Edit
Destination",DECOR_TITLE|DECOR_BORDER,0,0,0,0)
outter = FXVerticalFrame.new(dlg,LAYOUT_FILL_X|LAYOUT_FILL_Y)
# Contents
inner = FXHorizontalFrame.new(outter,LAYOUT_FILL_X|LAYOUT_FILL_Y)
labels = FXVerticalFrame.new(inner,LAYOUT_FILL_X|LAYOUT_FILL_Y)
lblName=FXLabel.new(labels,"Name",nil,LABEL_NORMAL)
lblPath=FXLabel.new(labels,"Pathname",nil,LABEL_NORMAL)
lblSize=FXLabel.new(labels,"Size Limit",nil,LABEL_NORMAL)
fields = FXVerticalFrame.new(inner,LAYOUT_FILL_X|LAYOUT_FILL_Y)
txtName=FXTextField.new(fields ,20 , nil,TEXTFIELD_NORMAL)
txtName.text=@table.getItemText(cell.row,1)
txtPath=FXTextField.new(fields ,66 , nil,TEXTFIELD_NORMAL)
txtPath.text=@table.getItemText(cell.row,2)
txtSize=FXTextField.new(fields ,12 , nil,TEXTFIELD_NORMAL)
txtSize.text=@table.getItemText(cell.row,3)
# Separator
FXHorizontalSeparator.new(outter,LAYOUT_SIDE_BOTTOM|LAYOUT_FILL_X|SEPARA
TOR_GROOVE)
# Bottom buttons
buttons=FXHorizontalFrame.new(outter)
# Accept
btnAccept=FXButton.new(buttons, "&Accept", nil, nil, 0,
FRAME_RAISED|FRAME_THICK|LAYOUT_RIGHT|LAYOUT_CENTER_Y)
btnAccept.connect(SEL_COMMAND){|sender, selector, data|
@table.setItemText(cell.row,1,txtName.text)
@table.setItemText(cell.row,2,txtPath.text)
@table.setItemText(cell.row,3,txtSize.text)
#getApp().stopModal(dlg, true)
#dlg.hide
#gives table.rbw:224:in `stopModal'': No matching function for
overloaded
''FXApp_stopModal'' (ArgumentError)
dlg.handle(self, FXSEL(SEL_COMMAND, FXDialogBox::ID_ACCEPT), nil)
#gives table.rbw:227:in `dlgNewTest'': undefined method `FXSEL''
for
#<TableWindow:0x32955f8> (NoMethodError)
}
# Cancel
btnCancel=FXButton.new(buttons, "&Cancel", nil, dlg,
FXDialogBox::ID_CANCEL,
FRAME_RAISED|FRAME_THICK|LAYOUT_RIGHT|LAYOUT_CENTER_Y)
btnCancel.connect(SEL_COMMAND){|sender, selector, data|
}
# Delete
btnDelete=FXButton.new(buttons, "&Delete", nil, dlg,
FXDialogBox::ID_CANCEL,
FRAME_RAISED|FRAME_THICK|LAYOUT_RIGHT|LAYOUT_CENTER_Y)
btnDelete.connect(SEL_COMMAND){|sender, selector, data|
sql="DELETE FROM DESTINATIONS WHERE "
sql=sql + " name=''" + txtName.text +
"''"
sql=sql + " and pathname=''" + txtPath.text +
"''"
}
dlg.create
dlg.execute
end
#####################################################> -----Original Message-----
> From: fxruby-users-bounces@rubyforge.org
> [mailto:fxruby-users-bounces@rubyforge.org]On Behalf Of Lyle Johnson
> Sent: Tuesday, March 29, 2005 6:19 AM
> To: Harold Worby
> Cc: fxruby-users@rubyforge.org
> Subject: Re: [fxruby-users] Retriving FXTextField Data
>
>
>
> On Mar 28, 2005, at 10:59 PM, Harold Worby wrote:
>
> > Now I added the ''.connect(SEL_COMMAND){'' and the
data is correct, but
> > the
> > Accept button does not dimiss the diallog ''dlg''.
> > As I read the docs, FXButton.new(parent, text, icon, target, selector,
> > opts,...),
> > should be creating a button that will send the message
> > ''selecotor''(ID_ACCEPT
> > hear) to the object ''target''(dlg here).
>
> Yes...
>
> > Which is what it seemed to do before I added the .connect(SEL_COMMAND)
> > {block}
> > I expect it catch the SEL_COMMAND message, execute the {block} and
> > then send
> > the ID_ACCEPT message. Why doesn''t it?
>
> As soon as you call connect() on the button, it replaces the previously
> designated message target (the dialog box) with a new one -- an
> "anonymous" target, if you like, that responds to the SEL_COMMAND
> message from the button. And FOX only allows one message target object
> per widget, so in this case it''s the latter object (the anonymous
one)
> that wins.
>
> To accomplish what you want, I''d just write it this way:
>
> FXButton.new(buttons, "&Accept", nil, nil, 0,
> ...).connect(SEL_COMMAND) {
> @table.setItemText(cell.row,1,txtName.text)
> @table.setItemText(cell.row,2,txtPath.text)
> @table.setItemText(cell.row,3,txtSize.text)
> getApp().stopModal(dlg, true)
> dlg.hide
> }
>
> or more directly:
>
> FXButton.new(buttons, "&Accept", nil, nil, 0,
> ...).connect(SEL_COMMAND) {
> @table.setItemText(cell.row,1,txtName.text)
> @table.setItemText(cell.row,2,txtPath.text)
> @table.setItemText(cell.row,3,txtSize.text)
> dlg.handle(self, FXSEL(SEL_COMMAND,
> FXDialogBox::ID_ACCEPT), nil)
> }
>
> Hope this helps,
>
> Lyle
>
> _______________________________________________
> fxruby-users mailing list
> fxruby-users@rubyforge.org
> http://rubyforge.org/mailman/listinfo/fxruby-users
>
On Apr 2, 2005, at 8:16 PM, Harold Worby wrote:> Ok, here''s the complete function. > The paramater passed as (cell) is handle to a FXTableItem. > The calling line is > dlgNewTest(cell) > When then button.connect uses: > getApp().stopModal(dlg, true) > dlg.hide > I get: > table.rbw:224:in `stopModal'': No matching function for overloaded > ''FXApp_stopModal'' (ArgumentError)Whoops, my mistake. The second argument to stopModal() should be an integer, not a boolean value. Try replacing the line: getApp().stopModal(dlg, true) with: getApp().stopModal(dlg, 1) and see what you get.> And when I use: > dlg.handle(self, FXSEL(SEL_COMMAND, FXDialogBox::ID_ACCEPT), nil) > I Get: > table.rbw:227:in `dlgNewTest'': undefined method `FXSEL'' for > #<TableWindow:0x32955f8> > NoMethodError)OK, I assumed you were using FXRuby 1.2, but you must be using FXRuby 1.0. For FXRuby 1.0, this line would need to read: dlg.handle(self, MKUINT(FXDialogBox::ID_ACCEPT, SEL_COMMAND), nil) Hope this helps, Lyle
hi, i''m trying out the different examples included in the doc,
however, i''m stuck on one example, the clip board tutorial.. on the
second page, u have one code snippet:
# User clicks Copy
copyButton.connect(SEL_COMMAND) do
customer = customerList.getItemData(customerList.currentItem)
types = [ FXWindow.stringType ]
if acquireClipboard(types)
@clippedCustomer = customer
end
end
where do u put that in the over all code? i tried everywhere and it
doesn''t work for some reason :| thanks alot :D
Jason
--
www.programer.name - my own personal blog : )
The mind is its own place, and in itself can make a heav''n of hell, a
hell of heav''n. What matter where, if I be still the same, and what I
should be, all but less than he whom thunder hath made greater? Here
at least we shall be free; th'' Almighty hath not built here for his
envy, will not drive us hence: Here we may reign secure, and in my
choice to reign is worth ambition though in hell: Better to reign in
hell, than serve in heav''n.
--- John Milton, in his epic poem Paradise Lost
On Apr 10, 2005 4:31 PM, Jason Wang <randomtalk@gmail.com> wrote:> hi, i''m trying out the different examples included in the doc, > however, i''m stuck on one example, the clip board tutorial.. on the > second page, u have one code snippet: > # User clicks Copy > copyButton.connect(SEL_COMMAND) do > customer = customerList.getItemData(customerList.currentItem) > types = [ FXWindow.stringType ] > if acquireClipboard(types) > @clippedCustomer = customer > end > end > > where do u put that in the over all code? i tried everywhere and it > doesn''t work for some reason :| thanks alot :D > > Jasonwell, i tried to put it right under the creation of copy button.. but when i run it, and click copy button, it returns the following error: clipboard.rb:19:in `initialize'': undefined local variable or method `customerList'' for #<ClipMainWindow:0xb73e44f0> (NameError) from clipboard.rb:18:in `call'' from /usr/local/lib/ruby/gems/1.8/gems/fxruby-1.2.5/lib/fox12/responder2.rb:57:in `onHandleMsg'' from clipboard.rb:48:in `run'' from clipboard.rb:48 from clipboard.rb:45:in `initialize'' from clipboard.rb:45:in `new'' from clipboard.rb:45 no idea wat''s wrong :| -- www.programer.name - my own personal blog : )
hi, just wondering.. the app is running fine as long as i don''t click on other application.. even when i try to close it, it just freezes, i can''t close it, the close button hte top right doesn''t work at all.. if i click that, i can''t go back to the application again.. can someone tell me why it freezes? Jason -- www.programer.name - my own personal blog : )
On Apr 10, 2005 4:53 PM, Jason Wang <randomtalk@gmail.com> wrote:> hi, just wondering.. the app is running fine as long as i don''t click > on other application.. even when i try to close it, it just freezes, i > can''t close it, the close button hte top right doesn''t work at all.. > if i click that, i can''t go back to the application again.. can > someone tell me why it freezes? > > Jason > -- > www.programer.name - my own personal blog : ) >apparently you have to go to file and quit.. why do we have to do that? is that overriding the close button or something? thanks alot :D -- www.programer.name - my own personal blog : )
On Apr 10, 2005, at 3:39 PM, Jason Wang wrote:> well, i tried to put it right under the creation of copy button.. but > when i run it, and click copy button, it returns the following error: > clipboard.rb:19:in `initialize'': undefined local variable or method > `customerList'' for #<ClipMainWindow:0xb73e44f0> (NameError) > from clipboard.rb:18:in `call'' > from > /usr/local/lib/ruby/gems/1.8/gems/fxruby-1.2.5/lib/fox12/ > responder2.rb:57:in > `onHandleMsg'' > from clipboard.rb:48:in `run'' > from clipboard.rb:48 > from clipboard.rb:45:in `initialize'' > from clipboard.rb:45:in `new'' > from clipboard.rb:45 > > no idea wat''s wrong :|Look at the code sample that appears directly under the heading "Acquiring the Clipboard" in the clipboard tutorial. You should see that toward the end of the ClipMainWindow#initialize method it creates a new FXList widget and assigns that to the customerList variable. So you''ll need to connect this SEL_COMMAND handler for the copy button at some point in the code below that assignment, e.g. customerList = FXList.new(...) $customers.each { |customer| ... } copyButton.connect(SEL_COMMAND) { ... } Hope this helps, Lyle
On Apr 10, 2005, at 4:01 PM, Jason Wang wrote:> apparently you have to go to file and quit.. why do we have to do > that? is that overriding the close button or something? thanks alot :DI can''t reproduce this problem on my PowerBook. Would like to hear if anyone else is seeing this problem...
On Apr 10, 2005 10:06 PM, Lyle Johnson <lyle@knology.net> wrote:> > On Apr 10, 2005, at 4:01 PM, Jason Wang wrote: > > > apparently you have to go to file and quit.. why do we have to do > > that? is that overriding the close button or something? thanks alot :D > > I can''t reproduce this problem on my PowerBook. Would like to hear if > anyone else is seeing this problem... >I''ve had this problem running FreeRIDE on Windows. -- ---------- Please do not send personal (non-list-related) mail to this address. Personal mail should be sent to polyergic@sterfish.com.