Advertise Books Events Forum News Social Networking Support Us

sdkIQ for iPhone
($4.99)

Shape Up
($0.99)

Your First iPhone App
($1.99)

iVidCam Free
(free)

Kid Art
($0.99)

iPUBQUIZ
(£1.19)

ArtStudio
($3.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 06-10-2009, 05:41 PM   #1 (permalink)
New Member
 
Join Date: May 2009
Posts: 6
Default Toolbar-Button / cannot connect to IBAction-method in controller

Hello all,

I am sure this it is a simple case, but still I got a serious problem with that.

I intend to use the buttons of a toolbar for navigating within my App. Every screen has different toolbar-buttons (representing different navigation-targets), therefore I created a "Window-Based Application" with several NIB's. Each of them containing its own toolbar and toolbar-buttons.

The problem is: I cannot connect the selector of the toolbar-button with the IBAction-method of my controller (which is the File's Owner). Interface Builder simply doesnt accept dragging from the toolbar-button to the File's Owner.

The funny thing about it:
  1. I could drag from the toolbar-button to the First Responder, and connect the selector of the toolbar-button to the defined IBAction-method. But the method will not be executed withing the controller-class.
  2. I am sure it should works, since I have another sample-application (called QuartzFun), in which I can drag from toolbar-buttons to the IBAction-methods within the File's Owner controller-class. This project was created from a "View-Based Application", having another controller in the MainWindow.xib (but I dont know why ).

Therefore I am pretty sure, it is something about the "First Responder"-concept, I havent fully understood.

Any help, will be much appreciated.

Thanks,
Paul
paul84 is offline   Reply With Quote
Old 06-11-2009, 06:25 AM   #2 (permalink)
New Member
 
Join Date: May 2009
Posts: 6
Default

I dont get it. Now that I have several NIB's, I cannot connect any IBOutlet or IBAction respectively to my File's Owner (controller) anymore.

I workarounded it by correcting the ref-ID's in the underlying XML-file with a text editor manually. I cannot drag and drop to/from the File's Owner, but it works if I correct the ref-ID's in the XML, which will become a hard workaround, if program-complexity increases.

I have a serious problem with that ... has anyone experienced something similiar before???
paul84 is offline   Reply With Quote
Reply

Bookmarks

Tags
toolbar button

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Enter the iPhone App Challenge!  Win $500!
» Advertisements
» Stats
Members: 24,345
Threads: 39,137
Posts: 171,594
Top Poster: smasher (2,577)
Welcome to our newest member, lewissmile
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 04:18 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0