Re: Connecting a button to MyView zeros integers

2015-02-15 Thread N!K
It was left checked. Please see my reply to Dave Duncan. Nick On Feb 13, 2015, at 9:16 AM, Kyle Sluder wrote: > On Fri, Feb 13, 2015, at 10:42 AM, David Duncan wrote: >> Since you elided your header file, this begs a question – is this iOS or >> OS X? >> >> If I’m not mistaken, subclasses of N

Re: Connecting a button to MyView zeros integers

2015-02-15 Thread N!K
On Feb 13, 2015, at 6:49 AM, Uli Kusterer wrote: > On 12 Feb 2015, at 06:36, N!K wrote: >> Control-clicking the button in .xib does show the outlet panel but it does >> not list an IBAction, so it cannot connect to the IBAction entered into the >> MyView.h and .m

Re: Connecting a button to MyView zeros integers

2015-02-15 Thread N!K
untime Behavior, Instantiation, Prefer Coder is checked in xib’s inspector. There was quite a discussion about why it works this way 12/23/14 - 12/30/14, in response to my request for help, “initWithFrame fails” Roland King nailed it in his email 12/26/2014. Nick > >> On Feb 6, 2015

Re: Connecting a button to MyView zeros integers

2015-02-15 Thread N!K
On Feb 11, 2015, at 9:56 PM, Roland King wrote: > >> On 12 Feb 2015, at 13:36, N!K wrote: >> >> Control-clicking the button in .xib does show the outlet panel but it does >> not list an IBAction, so it cannot connect to the IBAction entered into the >> MyV

Re: Connecting a button to MyView zeros integers

2015-02-11 Thread N!K
>> your buttons. There's some ctrl alt shift cmd combo which does this too but >> I never remember it. You can still connect view outlets as before, just that >> ctrl-drag was repurposed a couple of xcodes ago for auto layout so you have >> to work a little harder to ge

Connecting a button to MyView zeros integers

2015-02-06 Thread N!K
I would like to connect a button to MyView class, but Xcode 6.1.1 only allows control-dragging a button to AppDelegate to create an IBAction. I have not encountered this previously. Looking for a workaround, I found this recommendation in a couple of Stack Overflow and other web pages as well a

Re: drawRect runs twice, bounds are changed in between

2015-01-29 Thread N!K
Thank you. On Jan 28, 2015, at 8:30 PM, Graham Cox wrote: > >> On 29 Jan 2015, at 3:05 pm, N!K wrote: >> >> NSBezierPath* temp; is in the list of declarations. >> This snippet is in drawRect: >> >> NSAffineTransform* tfm = [[NSAffi

Re: drawRect runs twice, bounds are changed in between

2015-01-28 Thread N!K
Uti, Looking further into your uncertainty about where temp comes from (see previous email, below) reveals a possible memory leak. NSBezierPath* temp; is in the list of declarations. This snippet is in drawRect: NSAffineTransform* tfm = [[NSAffineTransform alloc] init]; [

Re: drawRect runs twice, bounds are changed in between

2015-01-17 Thread N!K
On Jan 16, 2015, at 5:30 AM, Uli Kusterer wrote: > On 15 Jan 2015, at 07:58, Quincey Morris > wrote: >> Putting those two ideas together leads to a better approach. Create the >> bezier path once, relative to an arbitrary bounding rect — say 1000 x 1000. >> (But any rect would do.) When you

Re: drawRect runs twice, bounds are changed in between

2015-01-14 Thread N!K
On Jan 13, 2015, at 10:55 PM, Quincey Morris wrote: > On Jan 13, 2015, at 21:25 , N!K wrote: >> >> I have not been able to find a reason for this behavior. . I don’t know how >> to reveal the point between passes where bounds is actually changed. It does >> not

Re: drawRect runs twice, bounds are changed in between

2015-01-14 Thread N!K
On Jan 13, 2015, at 10:50 PM, Jens Alfke wrote: > >> On Jan 13, 2015, at 9:25 PM, N!K wrote: >> >> A breakpoint at the end of drawRect shows that it runs twice. After the >> second pass, the view appears, as it should. >> Between passes, bounds is changed s

drawRect runs twice, bounds are changed in between

2015-01-13 Thread N!K
In my simple test project, an NSBezierPath is created and stroked. -(id)initWithCoder:(NSCoder*)coder{ _path = [[NSBezierPath alloc] init]; create points } - (void)drawRect:(NSRect)dirtyRect { bounds = [self bounds]; NSLog(@"\n\n bounds: %@\n\n", NSStringFromR

Re: view content not tracking window size

2014-09-29 Thread N!K
On Sep 27, 2014, at 12:27 AM, Ken Thomases wrote: > On Sep 27, 2014, at 2:11 AM, N!K wrote: > >> On Sep 25, 2014, at 10:49 PM, Ken Thomases wrote: >> >>> On Sep 25, 2014, at 9:38 PM, N!K wrote: >>> >>>> In Xcode 5 OSX, not ios,

Re: view content not tracking window size

2014-09-29 Thread N!K
;{ > NSBezierPath* temp = [tfm transformBezierPath:path]; > > [self drawMyPath:temp]; >} >else >{ >[tfm concat]; >[self drawMyPath:path]; >} > } > > --Graham > > > > > > On 26 Sep 2014, at 12:3

Re: view content not tracking window size

2014-09-29 Thread N!K
context with a > little built in convenience methods. > > You should really read more about Quartz to understand how this is really not > different. Just convenient resizing. > > I can share some example code if it helps. > > Sent from my iPhone > > On 2014/09/

view content not tracking window size

2014-09-25 Thread N!K
In Xcode 5 OSX, not ios, I have created a custom view and set auto layout constraints so that the custom view's sides stay a fixed distance from the content view's frame. The custom view resizes correctly while dragging the window's corner while running, but the content of the custom view remain

start with OSX 5.1.1

2014-07-29 Thread N!K
After using Xcode 3.2.6 occasionally, I downloaded 5.1.1 and typed in a very simple program in .h and .m to try it out. Run immediately generated the error "The run destination My Mac 64–bit is not valid for Running the scheme ‘var,prop,synth'. The scheme 'var,prop,synth' contains no buildable

Re: Custom control with 4 vertical sliders

2013-02-23 Thread N!K
I've been following this thread because I have a similar application in mind, displaying 6 sets (groupings, not NSSets) consisting of a label with slider and textview, both bound to an ivar. It seems so simple: create a custom view with one set, duplicate it to make 6 such custom views, and p

IB>Button>Attributes>Position almost works

2012-11-16 Thread N!K
This is probably trivial, but I haven't been able to find a reference in a couple of textbooks, Apple, Google or a place in IB Preferences. IB>Button>Attributes>Position allows you to position the button's text in various positions relative to the button. It shows When I click any one of the

Re: Windows and views and controls, oh my!

2011-09-07 Thread N!K
Thank you. This helps me with higher level issues On Sep 5, 2011, at 9:42 PM, Quincey Morris wrote: > On Sep 5, 2011, at 20:43 , N!K wrote: > >> The examples I've seen all show a window with a view in it and how to draw >> in that view. But I want to put up a window wi

Re: Windows and views and controls, oh my!

2011-09-05 Thread N!K
Thanks for the description below. It's good. I, too, am floundering when it comes to specifics that are not shown in examples from Apple or BNR books or websites. I understand the examples, but I don't see how to extend them. So, understanding how the windows and views should be structured to

Re: Decimation - NSBezierPath or something else?

2011-08-08 Thread N!K
Thank you all for your prompt and appropriate answers. NSBezier doesn't decimate although it does interpolate. Lots and lots of points go slowly. I could not believe that this is a new problem; it had to be recognizable and previously dealt with. When a number of points occupy one pixel, somethi

Decimation - NSBezierPath or something else?

2011-08-08 Thread N!K
Does NSBezierPath do decimation as well as interpolation? I didn't find it in the Class Reference. Or is there another class that does it? Or must I do the decimation before plotting the data with NSBezierPath? Decimation reduces the original sampling rate for a sequence to a lower rate, the op

Re: instance fails in its own class

2010-11-07 Thread N!K
Success! Your last sentence pointed the way. On Nov 6, 2010, at 11:25 PM, Greg Guerin wrote: > N!K wrote: > >> However, exactly the same statement fails when pasted into -init of Class.m. >> >> Build yields "warnings Class may not respond to -new." > >

instance fails in its own class

2010-11-06 Thread N!K
This should be an elementary step, just like in all the examples I've seen, but it doesn't work for me. I'm trying to create an instance of a class, which I can use to access -methods. Class *obj = [Class new]; works OK in ProjectAppDelegate.m. However, exactly the same statement fails when

create multiple Custom Views

2010-10-08 Thread N!K
I know this should be really easy, but I've been unsuccessful finding an explanation or tutorial in Apple's documentation or in Google. A couple terse examples did show up, but I did not understand them or they didn't seem to apply. In simplest form, I need to put two Custom Views onto the one w