• 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
retaining NSDictionary value during each call
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

retaining NSDictionary value during each call


  • Subject: retaining NSDictionary value during each call
  • From: Annie Felix <email@hidden>
  • Date: Fri, 29 Jun 2001 16:56:25 +0530

Hi
My program draws a circle on mouse click.
On Mouse drag it draws a line.
On mouse release it draws another circle.
I am able to store it in dictionary and retrive it.


Now I have a problem

theValue1 = [NSValue valueWithPoint:eventLocation1 ];
//eventLocation1 is an NSPoint of mouseclicked
theValue2 = [NSValue valueWithPoint:eventLocation2 ];
//eventLocation2 is an NSPoint of mouse released

This is the statement I use for storing in dictionary

[myDic setObject:theValue1 forKey:theValue2]; // where theValue1 ,
theValue2 belong to NSValue

Each time the mouse released method is invoked the value is set in
dictionary,
What should I do to retain the previous value, during each call

How should I do it.

Annie Felix


  • Follow-Ups:
    • Re: retaining NSDictionary value during each call
      • From: Brendan Younger <email@hidden>
  • Prev by Date: [ann] Assistant code available
  • Next by Date: RE: NSFileManager
  • Previous by thread: [ann] Assistant code available
  • Next by thread: Re: retaining NSDictionary value during each call
  • Index(es):
    • Date
    • Thread