Re: newbie window questions

2011-04-13 Thread Artemiy Pavlov
Thanks Laurent, all worked perfectly! On 13 Apr 2011, at 10:23, Laurent Daudelin wrote: > On Apr 12, 2011, at 23:27, Artemiy Pavlov wrote: > >> Hi all! >> >> I have previously written plugins with custom views, but I am now working on >> a standalone app and have

newbie window questions

2011-04-12 Thread Artemiy Pavlov
Hi all! I have previously written plugins with custom views, but I am now working on a standalone app and have a couple very basic questions: - I would like to disable my app from maximizing on the screen. - When the app's window is closed, I would like the app to quit and not stay active in

Re: Mac App Store requirements

2011-04-11 Thread Artemiy Pavlov
Thanks for all the suggestions, guys! Artemiy. On 11 Apr 2011, at 03:55, Laurent Daudelin wrote: > On Apr 10, 2011, at 16:45, Todd Heberlein wrote: > >> On Apr 10, 2011, at 4:32 PM, davel...@mac.com wrote: >> >>> And you also have add code to verify a valid receipt. There's a few samples >>>

Re: Mac App Store requirements

2011-04-10 Thread Artemiy Pavlov
oft.com/ > Logiciels Nemesys Software > laur...@nemesys-soft.com > > On Apr 10, 2011, at 11:16, Artemiy Pavlov wrote: > >> Hey all, >> >> I am not yet a member of the Mac Developer program, but I am experimenting >> with my own Cocoa O

Mac App Store requirements

2011-04-10 Thread Artemiy Pavlov
Hey all, I am not yet a member of the Mac Developer program, but I am experimenting with my own Cocoa OS X app and I would like to know what are the requirements on getting it into the Mac App Store. I mean, I have a 32/64 bit Intel build of a vanilla Cocoa app in XCode. Where will I go from t

Re: Help: XCode 3.2 breaks XCode 3.1 projects

2011-03-18 Thread Artemiy Pavlov
Just to make clear what I did: - Downloaded XCode 3.2.6 and did a standard install - Downloaded the latest/fixed AU with Cocoa template - Started a new project - It has AU base file groups in red - Raises a ton of errors and doesn't build On 18 Mar 2011, at 16:46, tahome izwah wrote: > Works fo

Re: render view into PDF?

2011-02-17 Thread Artemiy Pavlov
Agh, that's not bad actually: I can simply replace the alpha gradient stop with an equivalent solid color, as I don't really need transparency there. Thanks again! All the best, Artemiy. On 17 Feb 2011, at 18:35, Graham Cox wrote: On 18/02/2011, at 1:37 AM, Artemiy Pavlov w

Re: render view into PDF?

2011-02-17 Thread Artemiy Pavlov
Yeah, it's working well! The only thing is that gradients are not supported so end up as solid color in the output PDF. Do you know if there is any workaround for this? A. On 17 Feb 2011, at 15:53, Artemiy Pavlov wrote: Thanks, Graham! So something like this should work? NSRect

Re: render view into PDF?

2011-02-17 Thread Artemiy Pavlov
Thanks, Graham! So something like this should work? NSRect rect = [self bounds]; NSData *data = [self dataWithPDFInsideRect: rect]; [data writeToFile:@"file.pdf" atomically:YES]; On 17 Feb 2011, at 13:26, Graham Cox wrote: On 17/02/2011, at 10:01 PM, Artemiy Pavlov wrote: is

render view into PDF?

2011-02-17 Thread Artemiy Pavlov
Hello all! I have a fairly simple custom view which is of type NSControl, it consists of a couple dozen bezier curves. I was wondering, is there any relatively easy way to render it into a PDF? Thanks and all the best, Artemiy. ___ Cocoa-dev ma

Re: Cocoa view gets sluggish over time

2010-12-20 Thread Artemiy Pavlov
Thank you very much for these tips, Andy! They are really helpful. I have only started to learn Cocoa three weeks ago and answers on this list really gave me a good kick. All the best, Artemiy. You seem to have solved your main problem, so I'll just comment on a couple of other things.

Re: access multiple NSTextFields as an array?

2010-12-20 Thread Artemiy Pavlov
1.If you want to use the array somewhere else calling -retain on it may be a good idea Oh yes!!! This did the trick! Thanks so much for the help, Siegfried. You saved me from a sleepless night :-) Artemiy. ___ Cocoa-dev mailing list (Cocoa-dev@

Re: access multiple NSTextFields as an array?

2010-12-20 Thread Artemiy Pavlov
[[Array objectAtIndex:0] setColor:...]; Maybe you want to use -setTextColor ? ___ Yes, sorry, I have setTextColor actually. Still, it doesn't work... ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.co

Re: access multiple NSTextFields as an array?

2010-12-20 Thread Artemiy Pavlov
My apologies, the full code is this: int x; NSMutableArray *Array = [NSMutableArray arrayWithCapacity:9]; for(x=1;x<=9;x++){ NSTextField *PatternRateLabel = etc. etc. [Array addObject:PatternRateLabel]; } [[Array objectAtIndex:0] setColor:...]; __

Re: access multiple NSTextFields as an array?

2010-12-20 Thread Artemiy Pavlov
Can I then access each element via array[0], array[1] etc.? I.e. will [array[0] setColor:...] work? No! This is not a C array, it's an object. Use -objectAtIndex instead I.e. [[array objectAtIndex:0] setColor:…] Check documentation for NSArray and NSMutableArray for more info, it's your

Re: access multiple NSTextFields as an array?

2010-12-20 Thread Artemiy Pavlov
Just create a NSMutableArray before the loop: NSMutableArray *array = [NSMutableArray arrayWithCapacity:16]; And then add each field to the array right in the loop for (…) { … [array addObject:textField]; } Great, thanks a lot! Can I then access each element via array[0], array[1] etc.

Re: NSTextField: text appears aliased

2010-12-20 Thread Artemiy Pavlov
You guys are right, all is actually well, it might have been that Helvetica isn't the prettiest font to use in this color scheme. I changed it to Lucida Grande and it's looking properly sleek now :-) <>___ Cocoa-dev mailing list (Cocoa-dev@lists.ap

access multiple NSTextFields as an array?

2010-12-20 Thread Artemiy Pavlov
Hi all! I have a row of number labels that I create like so: for(i=1;i<=16;i++){ NSTextField *NumberLabel = [[NSTextField alloc] initWithFrame:NSMakeRect(...)]; [NumberLabel setStringValue:[NSString stringWithFormat:@"%d", i]]; [self addSubview:PatternStepLabel];

Re: NSTextField: text appears aliased

2010-12-20 Thread Artemiy Pavlov
Hi all, thanks a lot for the replies! No I do not use anything special there. Just a black NSRect with NSTextFields on top of them. I think I could solve this by using a shadow under the text, however, I don't know how to do this. The normal shadow mechanism as I use for NSBezierCurve doe

Re: Cocoa view gets sluggish over time (solved!)

2010-12-20 Thread Artemiy Pavlov
I guess I need to put this code in -awakeFromNib. And then, if needed, change the text field strings or properties in -drawRect. Yes, that did the trick! I now set up these labels in -awakeFromNib and the view is working well now. Glad I was able to figure it out. Artemiy. __

Re: NSTextField: text appears aliased

2010-12-20 Thread Artemiy Pavlov
On 2010 Dec 20, at 06:30, Artemiy Pavlov wrote: I have a few text labels I created using NSTextField. However, all of them appear very aliased, as shown in the attached screenshot. Can anyone suggest me how I can fix this and turn on antialiasing for the text? I've seen this happen

Re: Cocoa view gets sluggish over time

2010-12-20 Thread Artemiy Pavlov
is code in -awakeFromNib. And then, if needed, change the text field strings or properties in -drawRect. All the best, Artemiy. On 20 Dec 2010, at 16:25, Artemiy Pavlov wrote: I have run Instruments and I see a ton of these calls: -[NSWindow fieldEditor:forObject:] So I indeed see that there&#

NSTextField: text appears aliased

2010-12-20 Thread Artemiy Pavlov
Hi all! I have a few text labels I created using NSTextField. However, all of them appear very aliased, as shown in the attached screenshot. Can anyone suggest me how I can fix this and turn on antialiasing for the text? Thanks and best wishes, Artemiy. <>

Re: Cocoa view gets sluggish over time

2010-12-20 Thread Artemiy Pavlov
once you'e got more information and still don't know the cause. On 20 Dec 2010, at 13:31, Artemiy Pavlov wrote: Hi all! I have a Cocoa view that reacts to -mouseDown and -mouseDragged events and then draws something via -drawRect method. It has about 50 objects that are either N

Re: Cocoa view gets sluggish over time

2010-12-20 Thread Artemiy Pavlov
uggestions. One, you can verify that you are not leaking using one of the tools provided, Instruments or MallocDebug. Two, I think you need to provide code examples for list members to provide constructive comments. --Richard Somers On Dec 20, 2010, at 6:31 AM, Artemiy Pavlov wrote:

Cocoa view gets sluggish over time

2010-12-20 Thread Artemiy Pavlov
Hi all! I have a Cocoa view that reacts to -mouseDown and -mouseDragged events and then draws something via -drawRect method. It has about 50 objects that are either NSBezierCurve or NSTextField. The problem is, after a few seconds of mouse dragging, the view becomes very sluggish. I rele

Re: OS X: how to create a text label?

2010-12-08 Thread Artemiy Pavlov
Thanks, Wim! On 8 Dec 2010, at 21:43, Wim Lewis wrote: On 8 Dec 2010, at 11:15 AM, Artemiy Pavlov wrote: I would like to add a simple text label to my Cocoa UI on OS X, programaticaly. It's just a static text label that'll be there unchanged, that has a certain font, size and c

Re: OS X: how to create a text label?

2010-12-08 Thread Artemiy Pavlov
Oh, wonderful, thank you, Laurent! I assume NSTextField will work the same way as in iOS, right? E.g. this tutorial will apply: http://icodeblog.com/2010/01/04/uitextfield-a-complete-api-overview/ Artemiy. On 8 Dec 2010, at 21:42, Laurent Daudelin wrote: On Dec 8, 2010, at 11:15, Artemiy

OS X: how to create a text label?

2010-12-08 Thread Artemiy Pavlov
Hi all! I would like to add a simple text label to my Cocoa UI on OS X, programaticaly. It's just a static text label that'll be there unchanged, that has a certain font, size and color. What is the best way to do this? I assumed this would be as easy as with NSBezierCurve, but it doesn't

Re: view doesn't respond to very first mouse event

2010-11-28 Thread Artemiy Pavlov
Fixed by adding this to @implementation: - (BOOL)acceptsFirstMouse:(NSEvent *)theEvent { return YES; } :-) On 28 Nov 2010, at 18:51, Artemiy Pavlov wrote: Hi all! I have an AudioUnit plugin with a Cocoa View. The view itself is a subclass of NSControl. It works well, however, it

view doesn't respond to very first mouse event

2010-11-28 Thread Artemiy Pavlov
Hi all! I have an AudioUnit plugin with a Cocoa View. The view itself is a subclass of NSControl. It works well, however, it doesn't respond to the very first mouse down or mouse dragged event. This very first click or drag only makes the view active, only starting from the second click o

Re: how to redraw a view

2010-11-26 Thread Artemiy Pavlov
Kusterer wrote: On Nov 24, 2010, at 6:50 PM, Artemiy Pavlov wrote: I have a view whose drawRect method draws a plot according to a few parameters which are global variables. When I change these variables according to the user input, I want to update that plot, so I need the drawRect method of

how to redraw a view

2010-11-25 Thread Artemiy Pavlov
Hi all! I have a view whose drawRect method draws a plot according to a few parameters which are global variables. When I change these variables according to the user input, I want to update that plot, so I need the drawRect method of my view to be called. I tried [self setNeedsDisplay] o

building for 64-bit Logic

2010-03-29 Thread Artemiy Pavlov
Hello all! I would like to ask, with the new 64-bit Logic, how do you build a 64- bit plug-in for it? My stuff is all pretty simple, so I thought that setting Architecture in the build options to 32/64 bit Universal should do it. It builds fine and works well, does that mean that the job i