• 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
mutating custom-class, becomes NSArray
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

mutating custom-class, becomes NSArray


  • Subject: mutating custom-class, becomes NSArray
  • From: adam krawiec <email@hidden>
  • Date: Wed, 15 Sep 2004 15:01:25 -0500


I have a custom class AKPoint which basically stores an x, y, z coordinate. In a custom view class, i am using this class to store the mouse location on the screen. it's value gets set in mouseDragged: and mouseUp: by:


muPoint = [AKPoint pointWithX:mouseUpPoint.x Y:mouseUpPoint.y]

with mouseUpPoint just simply being a NSPoint.

however, if i try and use muPoint in the drawRect: method, it morphs into an NSArray which results in a SIGSEV error of 5 or 11. here is some console output to demonstrate the behaviour:

[Session started at 2004-09-15 14:38:51 -0500.]
2004-09-15 14:38:54.046 AK3DPlot[438] drawRect (0, 0, 0)
2004-09-15 14:38:55.715 AK3DPlot[438] drawRect (0, 0, 0)
2004-09-15 14:39:04.985 AK3DPlot[438] drawRect (0, 0, 0)
2004-09-15 14:41:46.724 AK3DPlot[438] drawRect (0, 0, 0)
2004-09-15 14:41:48.357 AK3DPlot[438] drawRect (0, 0, 0)
2004-09-15 14:41:48.450 AK3DPlot[438] dragged (325, 353, 0)
2004-09-15 14:41:48.507 AK3DPlot[438] drawRect <CFArray 0x383a00 [0xa01900e0]>{type = fixed-mutable, count = 1, capacity = 1, values = (
0 : <CFRunLoopObserver 0x381200 [0xa01900e0]>{locked = No, valid = Yes, activities = 0x6, repeats = No, order = 600000, callout = 0x92dde8d0, context = <CFRunLoopObserver context 0x34e170>}
)}
2004-09-15 14:41:48.550 AK3DPlot[438] dragged (341, 336, 0)
2004-09-15 14:41:48.637 AK3DPlot[438] drawRect <CFArray 0x383a00 [0xa01900e0]>{type = fixed-mutable, count = 1, capacity = 1, values = (
0 : <CFRunLoopObserver 0x381dd0 [0xa01900e0]>{locked = No, valid = Yes, activities = 0x6, repeats = No, order = 600000, callout = 0x92dde8d0, context = <CFRunLoopObserver context 0x34e170>}
)}
...
Executable “AK3DPlot” has exited due to signal 11 (SIGSEGV).


each output is simply:

NSLog(@"text %@", muPoint);

the dragged shows muPoint after it is set in the mouseDragged: method. any ideas on how/why my class is morphing into an array in my view???

thanks, adam



_______________________________________________
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


  • Follow-Ups:
    • Re: mutating custom-class, becomes NSArray
      • From: Larry Fransson <email@hidden>
  • Prev by Date: Re: NSUndoManager Undo/Redo Buttons
  • Next by Date: Re: NSControlGlyphs generation
  • Previous by thread: Re: NSAppKitVersionNumber for 10.3.0?
  • Next by thread: Re: mutating custom-class, becomes NSArray
  • Index(es):
    • Date
    • Thread