From: Jamey Cribbs Date: 2004-05-12T02:36:33+09:00 Subject: Re: Some pointers needed on FXRuby-based app Phil Roberts wrote: >I've posted the source code for my dialogue form at >http://www.flatnet.net/ruby/EditUserDialog.rb.html. If anyone could >give me some hints on how to proceed then I would be grateful. > > > Here's one shot at it... First, connect the "Save" button to a method by doing something like: save_button.connect(SEL_COMMAND, :onCmdSave) Next, change all of the variables like firstNameField to instance variables (i.e. @firstNameField). Then, within the class definition, create a method similar to this: def onCmdSave(sender, sel, event) sql = "insert into customer values('%s','%s',...)" db.query(sql % [@firstNameField.getText, @lastNameField.getText, ...]) # Close the edit dialog. super end This is off the top of my head, but I use something very similar in my database apps and it works fine. Hope this helps. Jamey Cribbs Confidentiality Notice: This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and/or privileged information. If you are not the intended recipient(s), you are hereby notified that any dissemination, unauthorized review, use, disclosure or distribution of this email and any materials contained in any attachments is prohibited. If you receive this message in error, or are not the intended recipient(s), please immediately notify the sender by email and destroy all copies of the original message, including attachments.