• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Newbie (EXE_BAD_ACCESS?)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie (EXE_BAD_ACCESS?)


  • Subject: Re: Newbie (EXE_BAD_ACCESS?)
  • From: Thomas Lachand-Robert <email@hidden>
  • Date: Mon, 24 Mar 2003 08:02:25 +0100

Dear Bernard,

Your code below seems correct to me, except I'm not sure that it's possible to suppress the part before ':' (did you try drawLineFrom:(float)X to:(float)Y for instance?). Maybe you should send the offending part, too, so the people on the list can check.

Notice that you don't need a new class for that anyway: you can add a method to NSBezierPath (using a category) to do that.

Le lundi, 24 mars 2003, ` 00:27 Europe/Paris, Bernard Banks a icrit :

On 3/23/03 6:00 AM, "Thomas Lachand-Robert" <email@hidden> wrote:


Your error message says: "invalid RECEIVER"; this means that the object
receiving the message is not as expected. Try [[Line class]
drawLine:100.0:100.0], but I suspect there is something wrong in your
Line.h file: are you sure you define a class here?


Dear Thomas,
Thanks for your suggestion. I am afraid that neither your suggestion or
Nick's worked. I am missing something fundamental. I imported the class from
IB, so IB structured Line.h and Line.m. Here are both files:

/* Line */

#import <Cocoa/Cocoa.h>

@interface Line : NSObject
{
}

+(void)drawLine:(float)X:(float)Y;
@end

And

#import <Cocoa/Cocoa.h>
#import "Line.h"

@implementation Line

+(void)drawLine:(float)X:(float)Y
{
NSPoint p1 = NSMakePoint(0,0);
NSPoint p2 = NSMakePoint(X,Y);
[NSBezierPath strokeLineFromPoint:p1 toPoint:p2];


}

@end

Why the warning '(void)(short int, short int)' should appear when the call
is +(void)drawLine:(float)X:(float)Y is beyond me.

If you have a moment to meditate on this it would be greatly appreciated.


Thomas Lachand-Robert
********************** email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Relative file path
  • Next by Date: Re: Sheet over a sheet ?
  • Previous by thread: Re: Newbie (EXE_BAD_ACCESS?)
  • Next by thread: Custom NSLayoutManager for NSTextView
  • Index(es):
    • Date
    • Thread