Ask a Question related to Mac Programming, Design and Development.
-
Alain Birtz #1
Outlet between 2 controller object
In Interface Builder the IBOulet "from_A_to_B" was added to Controller_A
and a connection made from Controller_A to Controller_B
Controller_A.m hold the code
int v;
v = [from_A_to_B test_int];
Controller_A.h hold the declaration (in @interface Controller_A : NSObject)
IBOutlet id from_A_to_B;
Controller_B.m hold the code
- (int)test_int
{
return 12345;
}
Controller_B.h hold the declaration
- (int)test_int;
The compiler report this error
Error : unknown message selector
Controller_A.m line 13 v = [from_A_to_B test_int];
Do I have made an illegal IB connection ?
What code is missing/wrong ?
Thank you.
Alain Birtz Guest
-
Temperature controller
Hi all I need to make a temperature controller. How can i bring a live temperature inside flash I have a external text file that have the value.... -
Removing a controller
I upgraded a network to Windows 2003 Server from Windows 2000 Server. I did this by adding a Windows 2000 server, adding AD on it, and then... -
cue point controller?
Hi! I'm trying to make a generic script that will let me go to the previous marker, and play the previous cuepoint in a .wav file. Here is the code... -
ActiveX-controller
Hi, when trying to send my Flash web-page as an e-mail I'm displayed with the message: "You can not run ActiveX-controller with this settings". ... -
A1000 controller
I recently had to replace a failed controller in an A1000, however, rm6 or Solaris is unable to see the original RAID 5 LUN. I am unable to find a... -
matt neuburg #2
Re: Outlet between 2 controller object
In <abz-1609031544460001@192.168.1.3> Alain Birtz wrote:
You need to learn Objective-C. The form of an Objective-C method call is:> The compiler report this error
>
> Error : unknown message selector
> Controller_A.m line 13 v = [from_A_to_B test_int];
>
> Do I have made an illegal IB connection ?
> What code is missing/wrong ?
[classOrInstance methodName];
You have just [methodName] alone, which is meaningless. m.
--
matt neuburg, phd = [email]matt@tidbits.com[/email], [url]http://www.tidbits.com/matt[/url]
REALbasic: The Definitive Guide! 2nd edition!
[url]http://www.amazon.com/exec/obidos/ASIN/0596001770/somethingsbymatt[/url]
Subscribe to TidBITS. It's free and smart.
matt neuburg Guest
-
Alain Birtz #3
Re: Outlet between 2 controller object
But from_A_to_B is just a "classOrInstance"
By example to get a pointer to an NSWindow from an IBOutlet
named main_wind the [main_wind window] is uded.
from_A_to_B is an IBOutlet to the Controller_B object
In fact the problem is only a missing declaration.
Adding the 3 line below in Controller_A.h solve the problem
@interface Controller_B : NSObject
- (int)test_int;
@end
In Controller_A.m the v value is correctly set to 12345 by the instruction
v = [from_A_to_B test_int];
But there is one thing I am not sure: is it correct to connect two controller
object (with an IBOutlet) in this way...
Thank you.
In article <20030916155043535-0700@news.la.sbcglobal.net>, matt neuburg
<matt@tidbits.com> wrote:
> In <abz-1609031544460001@192.168.1.3> Alain Birtz wrote:>> > The compiler report this error
> >
> > Error : unknown message selector
> > Controller_A.m line 13 v = [from_A_to_B test_int];
> >
> > Do I have made an illegal IB connection ?
> > What code is missing/wrong ?
> You need to learn Objective-C. The form of an Objective-C method call is:
>
> [classOrInstance methodName];
>
> You have just [methodName] alone, which is meaningless. m.Alain Birtz Guest
-
matt neuburg #4
Re: Outlet between 2 controller object
Alain Birtz <abz@videotron.ca> wrote:
Right - sorry! m.> But from_A_to_B is just a "classOrInstance"
--
matt neuburg, phd = [email]matt@tidbits.com[/email], [url]http://www.tidbits.com/matt/[/url]
Read TidBITS! It's free and smart. [url]http://www.tidbits.com[/url]
matt neuburg Guest
-
Michael Milvich #5
Re: Outlet between 2 controller object
[email]abz@videotron.ca[/email] (Alain Birtz) wrote in message news:<abz-1609031544460001@192.168.1.3>...
Are you sure this was an error? or was it just a warning? Or is your> The compiler report this error
>
> Error : unknown message selector
> Controller_A.m line 13 v = [from_A_to_B test_int];
>
> Do I have made an illegal IB connection ?
> What code is missing/wrong ?
>
> Thank you.
compiler set to treat all warnings as errors?
I think you just need to import Controller_B.h from Controller_A.m.
Usually this makes a warning instead of an error...
Michael
Michael Milvich Guest
-
Eric Pepke #6
Re: Outlet between 2 controller object
[email]abz@videotron.ca[/email] (Alain Birtz) wrote in message news:<abz-1609031544460001@192.168.1.3>...
Simple problem.> Do I have made an illegal IB connection ?
> What code is missing/wrong ?
The "id" means "it's an object of unspecified type." The compiler> IBOutlet id from_A_to_B;
does not know to look in Controller_B.h.
You can fix it by changing it to
IBOutled (Controller_B *) from_A_to_B;
In the future, you can make this kind of thing not happen by,
when creating an outlet, giving it a type using the pull-down
menu. I'm guessing you probably didn't do that, not knowing
what it was for. Well, this is what it's for.
Eric Pepke Guest
-
Alain Birtz #7
Re: Outlet between 2 controller object
In CW 8.0 this is a (Compiler or Linker) error not a warning...
In article <21ff4ea2.0309171018.2ec08b10@posting.google.com >,
[email]michael@milvich.com[/email] (Michael Milvich) wrote:
news:<abz-1609031544460001@192.168.1.3>...> [email]abz@videotron.ca[/email] (Alain Birtz) wrote in message>> > The compiler report this error
> >
> > Error : unknown message selector
> > Controller_A.m line 13 v = [from_A_to_B test_int];
> >
> > Do I have made an illegal IB connection ?
> > What code is missing/wrong ?
> >
> > Thank you.
> Are you sure this was an error? or was it just a warning? Or is your
> compiler set to treat all warnings as errors?
>
> I think you just need to import Controller_B.h from Controller_A.m.
> Usually this makes a warning instead of an error...
>
> MichaelAlain Birtz Guest



Reply With Quote

