« Return to Thread: trouble with program code separation
lot's snipptedThanks Meinrad for your reply,
I had tried doing something like this but it didn't work in the last couple of days - Grrrr.
Now before when i had the code inside the foxGUIb generated file when i entered something into the textfield which is named @acc_code I had it so that the value was put into a label (which just happened to hold the word Address on the screen - this was more for me to see that the enter key worked or not.
Now the code below this fails! - so it's two steps forward 1 back.I readily admit that i'm not the brightest programmer so what seems logical sometimes for me when it's not shown is a mistery hense i go a bit overboard sometimes to explain my problem.
So I've commented out all references to my program sqlite3_calls.rb to try and get the keypress to work
that is when the ENTER key is press i want the value to be shown on a label just to prove it works.
Once that's done then it's one step to uncomment the references to SQLite3_calls and pass the value through to get a customer record returned and to have some values displayed on screen.
My current code for MainWindow - foxGUIb generated code & my hand coded event handler code.
yours or that of others on this list would be greatly appreciated
Sent: Thursday, 2 July, 2009 9:35:17 AM
Subject: Re: [fxruby-users] trouble with program code separation
dave,
I don't see the whole code, so I can not exactly tell you how to fix your problem. maybe
a small example will help you:class MainWindow # generated by foxguibdef initialize( parent)construct_widget_tree( parent)init if respond_to? 'init'enddef construct_widget_tree( parent)# here the gui is created by foxguib codeendend# you don't want to change the above autogenerated class in case you want to change it later and regenerate it.# everything that MainWindow should do that is not provided by foxguib goes in a subclass:class DBWindow < MainWindow # your codedef initialize(parent)super# do your stuff here for example:@mydb = Dbase.newendend
hth,
-- Henon
Email slow, clunky, unreliable? Switch to Yahoo!Xtra Mail, New Zealand's new email address.
_______________________________________________
fxruby-users mailing list
fxruby-users@...
http://rubyforge.org/mailman/listinfo/fxruby-users
« Return to Thread: trouble with program code separation
| Free embeddable forum powered by Nabble | Forum Help |