Re: programmitically creating nstextfield
Re: programmitically creating nstextfield
- Subject: Re: programmitically creating nstextfield
- From: Jens Alfke <email@hidden>
- Date: Wed, 14 Apr 2010 22:05:50 -0700
--Jens {via iPad}
On Apr 14, 2010, at 9:48 PM, Ron Fleckner <email@hidden> wrote:
>
>> NSRect r={{NSMaxX(w)-96, NSMaxY(w)-ToolbarHeightForWindow(relativeToWindow) - titleBarHeight(relativeToWindow)-24},
>> {256, 64}};
>
> NSRect r = NSMakeRect(... );
The original syntax is correct too. Its using regular C syntax for initializing a struct literal.
>
>> f.origin.x=4;
>>
>> f.origin.y=4;
>> f.size.width=128;
>> f.size.height=32;
>
> How is 'f' created? Is 'f' valid?
f must be an NSRect, so it doesn't get created, and those statements fully initialize it.
>
>>
>> [[window contentView] addSubview:textInfo]
Try calling -setNeedsDisplayInRect: f on the superview to get the subview to be drawn.
--Jens_______________________________________________
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