retaining NSDictionary value during each call
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