Re: A Question about [[self superview] doSomething]
Re: A Question about [[self superview] doSomething]
- Subject: Re: A Question about [[self superview] doSomething]
- From: Daniel DeCovnick <email@hidden>
- Date: Tue, 26 Apr 2005 14:51:31 -0400
On Apr 26, 2005, at 1:00 PM, Brian O'Brien wrote:
I have manage to get this to work for me until doSomething needs
parameters, then the application crashes when the method is called.
Also I'm getting a warning `NSView' may not responde to
`-doSomething:'
can not find method `-doSomething:'; return type `id' assumed
In Objective-C you need to declare -doSomething and -doSomething: (and
-doSomething:withSomethingElse: or -doSomething:: (infix parameter
descriptors are not strictly necessary, just insanely useful))
separately in your class. The colon is very significant. What you can
also do is just have a doSomething method with as many args as you may
need and simply have default values for them in case the sender passes
nil.
my superview in this case is a subclass of NSView and has a method
called doSomething.
Which works fine if no parameters are passed..
In C and C++ you can define function prototypes for external methods.
Can you do
the same in ObjectiveC?
If you can do it in C (not necessarily C++), you can do it in
Objective-C.
By does anyone know of a group for PyObjC?
I don't, sorry. But others on this list might.
-Dan
Daniel DeCovnick
danhd123 at mac dot com
Softyards Software
http://www.softyards.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden