struct problem
struct problem
- Subject: struct problem
- From: Dean Ritchie <email@hidden>
- Date: Fri, 11 Apr 2008 18:58:45 -0700
I'm trying to develop an app to take in dimensions (rowCount and
colCount) from an NSForm and set up an NSView subclass to display a
matrix of squares accordingly. Here's the action that responds to the
NSForm:
- (IBAction)setSize:(id)sender
{
NSRect aRect;
//Start with column and row counts from LASize.
LASize = sender;
columnCount = [[LASize cellAtIndex:0] intValue];
rowCount = [[LASize cellAtIndex:1] intValue];
if (columnCount < 5 | rowCount < 5) return; //wait for something better
aRect.origin.x = 310;
aRect.origin.y = 15;
aRect.size.width = columnCount * 5;
aRect.size.height= rowCount * 5;
theGrid = [[LogicArtMatrix alloc] initWithCol: columnCount row:
rowCount];
thePicture=[[LogicArtDisplay alloc] initWithMatrix: theGrid cols:
columnCount rows: rowCount andRect: aRect];
return;
}
When I stop right after initializing the NSRect local variable, the
debugger reports miniscule values for the portions of the rectangle,
like it got overlaid with integers instead of float values.
TIA
Dean Ritchie
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden