On 20/12/2010, at 6:20 PM, colo wrote:
> Right now I am getting an error of
> error: void value not ignored as it ought to be
> - (IBAction)resetControlPoints:(id)sender
> {
> return path;
I've deleted all the stuff that's OK.
The reason for the error should now be obvious.
--Graham
___
Hi Uli.
On 17.12.2010 09:59, Uli Kusterer wrote:
Another guess is that the folder he's having an issue with maybe was created
by such a wrong way and hence didn't get its name properly normalized ... might
be worth trying to re-type the file name in Finder to make sure it's correct?
The ap
BTW, the main thread sent notification (when main thread moc is saved) does not
contain the NSRefreshedObjects key.
This would probably be a solution to my problem, but
mergeChangesFromContextDidSaveNotification: either does not refresh objects
(strange) or their is something wrong since objects
Hi,
On 10.6.5 I'm seeing a runaway memory leak in my app when I show a modal
dialog. I'm not seeing the leak in the same situation on 10.5. The modal loop
is run using [NSApplication runModalSession:].
Using Instruments to look at allocations I'm seeing that many instances of
CFArray, NSConcre
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
Two suggestions.
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:
Use Instruments to find out where the slowness lies. Come back 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 -dr
Richard, here is the code I am using, here x, y, i are variables that
define the label position and text.
If I comment this snippet, my view is working well. So I am sure that
there is something in these lines that needs to be done properly,
which I don't know ;-)
NSTextField *PatternSt
I have run Instruments and I see a ton of these calls:
-[NSWindow fieldEditor:forObject:]
So I indeed see that there's something I am not doing right with the
NSTextField.
On 20 Dec 2010, at 16:09, Mike Abdullah wrote:
Use Instruments to find out where the slowness lies. Come back once
yo
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.
<>
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 when
I think I know what's the problem, it's this line.
[self addSubview:PatternRateLabel];
With each -drawRect call, NSTextField objects are not being redrawn
from scratch, they are added on top of the existing ones. So I end up
with thousands of them.
I guess I need to put this code in -awake
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 when
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.
__
On 20/12/2010, at 12:30, Artemiy Pavlov wrote:
> 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?
>
Sincerely, t
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
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];
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
Use .tag and set it to i.
Google Voice: (508) 656-0622
Twitter: eric_dolecki XBoxLive: edolecki PSN: eric_dolecki
http://blog.ericd.net
On Mon, Dec 20, 2010 at 10:38 AM, Artemiy Pavlov
wrote:
> Hi all!
>
> I have a row of number labels that I create like so:
>
> for(i=1;i<=16;
if those are the only views you can use
[ self subviews ]
to get an array of them in the order they are currently stacked.
On 20-Dec-2010, at 11:38 PM, Artemiy Pavlov wrote:
> Hi all!
>
> I have a row of number labels that I create like so:
>
> for(i=1;i<=16;i++){
>NSTextField *NumberLab
On 20/12/2010, at 13:38, Artemiy Pavlov wrote:
> Now, I'd like to be able to access each one of these NSTextField objects to
> change their color. My question is, right in this loop, can I create some
> sort of an array of pointers to these objects?
Just create a NSMutableArray before the loop
On 20 Dec 2010, at 1:20 AM, colo wrote:
> I'm in the processing of trying to create an array of Path points to
> draw a UIBezierPath CGRectMake onto each control point.
>
> Right now I am getting an error of
> error: void value not ignored as it ought to be
…
> - (IBAction)resetControlPoints:(id)
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.
On 20 Dec 2010, at 4:04 AM, Jo Meder wrote:
> It looks like it's something to do with updating windows. It just keeps
> allocating these objects until after a fairly short time it crashes when it
> runs out of address space. It's growing in 20 MB steps as you watch it.
>
> I have a smaller test
On 20/12/2010, at 14:01, Artemiy Pavlov wrote:
>> 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];
>> }
>
> Gr
On Dec 20, 2010, at 11:11 AM, Siegfried
wrote:
Check documentation for NSArray and NSMutableArray for more info, it's your
friend! :-)
And an easy way to do this is by Option-Command-double-clicking on "NSArray" and
"NSMutableArray" in your code.
Note that NSMutableArray inherits from NSArra
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
> Look at the documentation for -[UIBezierPath moveToPoint:]. The method
> returns void, but you're trying to assign the (nonexistent) result to members
> of the points[] array. You ought to be ignoring the void value, and aren't,
> just as the error message says.
>
> You're returning path immed
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:...];
__
On 20 Dec 2010, at 10:16 AM, Artemiy Pavlov wrote:
> int x;
> NSMutableArray *Array;
>
> for(x=1;x<=9;x++){
>NSTextField *PatternRateLabel = etc. etc.
>[Array addObject:PatternRateLabel];
> }
>
> [[Array objectAtIndex:0] setColor:...]
>
> However, if I have this last line, my view freez
On Dec 20, 2010, at 9:16 AM, Artemiy Pavlov wrote:
> Yes, I did this after sending this e-mail :-) Weird though, that it doesn't
> work straight away... Here is my code:
You're not creating the array.
Anyway, there's no need for an NSMutableArray. You can just have a plain C
array as an attrib
On Dec 20, 2010, at 09:13 AM, Artemiy Pavlov wrote:
NSTextField *PatternStepLabel = [[NSTextField alloc]
initWithFrame:NSMakeRect(x, y, 20, 20)];
NSString *PatternStepLabelString = [NSString stringWithFormat:@"%d",
i];
[PatternStepLabel setEditable:NO];
[PatternStepLabel setDrawsBackground:N
On 20/12/2010, at 14:23, Artemiy Pavlov wrote:
> 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];
> }
>
This line:
> [[A
[[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
On 20/12/2010, at 14:39, Artemiy Pavlov wrote:
> Thanks for the help, Siegfried!
>
> My actualy code is here:
>
> NSMutableArray *Array;
>
> -(void)awakeFromNib{
>
>int x;
>Array = [NSMutableArray array];
>
>for(x=1;x<=9;x++){
>NSTextField *PatternRateLabel = etc. etc.
>
On Dec 20, 2010, at 11:42 AM, Artemiy Pavlov wrote:
Yes, sorry, I have setTextColor actually. Still, it doesn't work..
I suggest pasting your exact code into email. Don't abbreviate and don't type
it by hand.
--Andy
___
Cocoa-dev mailing list (C
Hi Artemiy-
Couldn't tell from the screenshot, but it appears that the text might be
small... if so, there is a preference to turn off text smoothing for fonts of a
certain size or smaller (System Preferences > Appearance - down at the bottom
of the pane).
Another possibility: are you using la
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@
On Dec 20, 2010, at 11:30 AM, Scott Ribe wrote:
Anyway, there's no need for an NSMutableArray. You can just have a plain C
array as an attribute of your class, and set up its entries in awakeFromNib:
patterRateLabels[0] = numberLabel1;
patterRateLabels[1] = numberLabel2;
I don't recommend t
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.
On Dec 20, 2010, at 8:23 AM, colo wrote:
Because i'm really stupid. :P I'm truly hacking away trying to
translate the following method of code into iOS specific code to run
on the ipad. I'm still totally in a learning stage, cram a widget into
a socket and see if it works. No real good arguments
On Dec 20, 2010, at 8:16 AM, Artemiy Pavlov wrote:
>>> 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:…]
>>
>> Chec
On 21/12/2010, at 1:42 AM, Artemiy Pavlov wrote:
> With each -drawRect call, NSTextField objects are not being redrawn from
> scratch, they are added on top of the existing ones. So I end up with
> thousands of them.
>
> I guess I need to put this code in -awakeFromNib. And then, if needed, ch
On Dec 19, 2010, at 9:49 PM, Aurélien Hugelé wrote:
> Hi!
>
> I think mergeChangesFromContextDidSaveNotification: does not work as most
> people expect:
> I have a mainthread and a subthread. My subthread updates a managed object
> (change one of the property value) and save.
> In the mainthre
Hi Fritz,
On 21/12/2010, at 5:07 AM, Fritz Anderson wrote:
> We don't have your code (and there may be a lot of it before we can find the
> bug), so I'm just going on brute instinct…
>
> Are you doing anything other than strict, narrow,
> swear-on-your-mother's-life-it's-only, drawing in drawR
Thanks Ben, after thought, this is indeed very logical and can be expected when
you know Core Data. I came to the same conclusion but you phrased it much
better than me :)
Aurélien,
Objective Decision Team
Le 21 déc. 2010 à 01:45, Ben Trumbull a écrit :
>
> On Dec 19, 2010, at 9:49 PM, Au
Are these two compatible? Can something archived one platform be unarchived
on the other? I can't find anything in docs that addresses this, but I'm
havig trouble doing precisely this (archived on iPhone, unarchived on
MacOSX). I get the NSInvalidUnarchiveOperationException.
On Dec 20, 2010, at 8:22 PM, lorenzo7...@gmail.com wrote:
> Are these two compatible? Can something archived one platform be unarchived
> on the other? I can't find anything in docs that addresses this, but I'm
> havig trouble doing precisely this (archived on iPhone, unarchived on
> MacOSX).
On Dec 20, 2010 9:43pm, Ricky Sharp wrote:
On Dec 20, 2010, at 8:22 PM, lorenzo7...@gmail.com wrote:
> Are these two compatible? Can something archived one platform be
unarchived on the other? I can't find anything in docs that addresses
this, but I'm havig trouble doing precisely this
My application needs to draw hundreds of short
text strings into an NSView. After reviewing the
Cocoa documentation on drawing text, I am left
unsure as to how to do this with the highest
level of efficiency.
The text I am drawing will all be the same font
and font size and style; the color
On 20 dec 2010, at 01.22, Mark Coniglio wrote:
> My application needs to draw hundreds of short text strings into an NSView.
> After reviewing the Cocoa documentation on drawing text, I am left unsure as
> to how to do this with the highest level of efficiency.
Don't optimize in the dark! Imp
On Mon, Dec 20, 2010 at 11:53 PM, Joar Wingfors wrote:
>
> On 20 dec 2010, at 01.22, Mark Coniglio wrote:
>
>> My application needs to draw hundreds of short text strings into an NSView.
>> After reviewing the Cocoa documentation on drawing text, I am left unsure as
>> to how to do this with the
52 matches
Mail list logo