From: Eloy D. <elo...@gm...> - 2007-10-26 12:06:33
|
Hi Norman, First of all, welcome to RC! :) Might seem a stupid question (I also don't know if you are knew to IB etc), but just to double check; did you actually hook up the outlets to the contr= ols? If so, could you do something like: def awakeFromNib puts 'awake!' end And see how many times that is printed to the console? Eloy On 10/26/07, Norman Rosner <nor...@go...> wrote: > Hi there, > > im new to rubycocoa so i have a little Problem: > > I created a nibFile through IB with outlets and actions and > instantiated my Controller Class. Almost everything works fine except > the case that the outlets that i declared in IB are not 'accessible'. > > a little example: > > > > class GUIControl < OSX::NSObject > > include OSX > > > > ib_outlets :CalChooseButton, :ChooseButton, :CreateButton > > attr_reader :files_to_parse > > > > > > def awakeFromNib > > @CalChooseButton.setTitle("new") > > end > > =85 > > the outlets have exactly the same names as declared in IB but when i > compile the app the following error occurs: > > > 2007-10-26 13:36:55.385 gui[9929] GUIControl#awakeFromNib: > > NoMethodError: undefined method `setTitle' for nil:NilClass > > What am I doing wrong? It seems to me that something went wrong on > the way from IB to my GUIControl.rb but im not quite shure what it was? > > > Thanks in advance > > regards, > > norman > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > |