I think I found a solution:
NSArray *testFetchResults = [managedObjectContext
fetchObjectsForEntityName:@"Owner" withPredicate:[NSString
stringWithFormat:@"ANY books.name beginswith 'myPrefix'"]];
NSSet *filteredSet = [(NSSet *)[(Owner *)[testFetchResults
objectAtIndex:0] buckets] filtere
Hi,
As I understand it, @property (retain) synthesizes something like this:
- (void)setMyProp:(NSString*)value
{
[value retain];
[_myProp release];
_myProp = value;
}
It is not however clear, and I haven't found it in the guide, whether
it's still my responsibility to call [_myProp release
On Sep 9, 2009, at 12:29 AM, Oleg Krupnov
wrote:
It is not however clear, and I haven't found it in the guide, whether
it's still my responsibility to call [_myProp release] in
-(void)dealloc?
Yes. If you are synthesizing your instance variables, and are on
Leopard, you will instead n
> It is not however clear, and I haven't found it in the guide, whether
> it's still my responsibility to call [_myProp release] in
> -(void)dealloc ?
There are varying opinions on how you go about it, but yes, you still
need to make sure _myProp is released in dealloc. I prefer
'self.myProp =
CocoaHeads Lake Forest will be meeting on the second Wednesday of the
month. We will be meeting at the Orange County Public Library (El
Toro) community room, 24672 Raymond Way, Lake Forest, CA 92630
Please join us from 7pm to 9pm on Wednesday, 9/8.
Neil Rhodes will be discussing the Google Toolk
When I log the test fetch results:
NSArray *testFetchResults = [managedObjectContext
fetchObjectsForEntityName:@"Owner" withPredicate:[NSString
stringWithFormat:@"ANY books.name like 'myPrefix*'"]];
NSLog([[(Owner *)[testFetchResults objectAtIndex:0] books]
valueForKey:@"name"]);
I get the follo
Hi All,
How can we customize the NSTabView looks to look like a NSSegmentedControl?
Any idea or sample code?
Thanks
Arun KA
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Con
Hi,
anybody know how to use Tx3gDescriptionHandle?
Tx3gDescriptionHandle tHandle = (Tx3gDescriptionHandle)NewHandle(sizeof
(Tx3gDescription));
(*tHandle)->dataFormat = kTx3gSampleType;
(*tHandle)->resvd1 = 1;
(*tHandle)->resvd2 = 1;
(*tHandle)->displayFlags = 1;
(*tHandle)->horizontalJustification
On 09/09/2009, at 5:46 PM, Arun wrote:
How can we customize the NSTabView looks to look like a
NSSegmentedControl?
Any idea or sample code?
You can't customise the tab view that way (unless you subclass it and
do it yourself), but there's a much easier way.
Just set the tab view to tab
Not a Cocoa question - don't cross-post.
--Graham
On 09/09/2009, at 5:53 PM, Sandeep Nair wrote:
Hi,
anybody know how to use Tx3gDescriptionHandle?
Tx3gDescriptionHandle tHandle = (Tx3gDescriptionHandle)NewHandle
(sizeof
(Tx3gDescription));
___
On 08/09/2009, at 12:36 AM, John Chang wrote:
Hi all,
Question: is it unsafe for some reason to be adding yourself as a KVO
observer during -init?
We have a singleton with an -init that looks something like this:
- (id)init
{
if ((self = [super init]))
{
_foo = [[NSMutableDictionary alloc] in
Hi all,
Following up my previous question:
I have a MyDocument/File's Owner, NSOutlineView and bound
NSTreeController in a nib file. The outline/table shows a list of
Entities (nothing to do with Cocoa or CoreData) in the current
document/file. I have successfully set up accessor methods f
On 9 sep 2009, at 04.51, Graham Cox wrote:
Because you're trying to use a nil key with a dictionary. Why not
set a breakpoint on objc_exception_throw and see where that is being
attempted?
Because it's happening for some users and not in-house :)
On 9 sep 2009, at 05.02, Ken Ferry wrote:
On 9 sep 2009, at 11.21, Mike Abdullah wrote:
Well I would question why you're calling +[XYZManager sharedManager]
from within -[XYZManager init] like that. What if you change your
init routine to:
Oops, sorry. It's actually two different classes which I renamed
incorrectly for the purpo
I checked the raw SQLite databases Core Data created under 10.5 and
10.6 with a SQLite tool. The result is pretty interesting.
As said, all databases are created with the same app and therefore the
same data model.
The detail is about a many2many, inverse, optional relationship
between "Per
On 9 Sep 2009, at 10:31, John Chang wrote:
On 9 sep 2009, at 11.21, Mike Abdullah wrote:
Well I would question why you're calling +[XYZManager
sharedManager] from within -[XYZManager init] like that. What if
you change your init routine to:
Oops, sorry. It's actually two different class
On 09-Sep-2009, at 5:02 PM, John Chang wrote:
On 9 sep 2009, at 05.03, Roland King wrote:
One thing to note, you're using a context of NULL, which I used to
do all the time until I got badly bitten.
What would you recommend using as the context? I'm used to checking
object/keyPath, thou
> What do I use. Normally a class static, provided that's granular enough,
> always has been for me thus far. Either just make some static thing like a
> character array and take the address of it or, as I've been doing
recently,
> use the address of the class object which I grab in a +initialize()
On 9 Sep 2009, at 11:21, Dave Keck wrote:
static void *const MyClass_KVOContext = (void *)&MyClass_KVOContext;
That certainly is unusual, I use the following macro:
#define NSSTRING_CONTEXT(var) static NSString *var = @#var
then use the address of the identifier passed as var. This has the
Hi,
release is necessary, as others already told you. One clarification
that I got on a similar post is:
-dealloc should always access instance variables directly; it should
not call accessor methods. Currently this is impossible to do with
synthesized instance variables, but that is consid
I have an NSMenu popping out of an NSStatusItem using
popUpStatusItemMenu. These NSMenuItems show a bunch of different links,
and each one is connected with setAction: to the openLink: method of a
target. This arrangement has been working fine for a long time. The user
chooses a link from the m
I know how to make a new slide in an active presentation in
Powerpoint. It works like this:
tell application "Microsoft PowerPoint"
set newSlideC to make new slide at before slide 2 of active
presentation ¬
with properties {layout:slide layout media clip and text}
end tell
Cocoa has problems with CMYK jpegs. Going from Tiger to Leopard it
became ambivalent about whether a CMYK pixel value of 0, 0, 0, 0 meant
black or white. (I remember reading somewhere that there is an
ambiguity in the jpeg standard.)
You can see this with Preview. Get yourself a CMYK tiff
We have a singleton with an -init that looks something like this:
- (id)init
{
if ((self = [super init]))
{
_foo = [[NSMutableDictionary alloc] init];
_bar = [[NSMutableDictionary alloc] init];
[[XYZManager sharedManager] addObserver:self forKeyPath:@"allObjects"
options:NSKeyValueObservingOpti
Ok so I have tried both ways, using the main thread for the download
messages and using NSOperationQueue to create separate threads & run loops.
I'm still getting 30% CPU though. When I run it, my app seems to send the
kernel_task a bit crazy (that's where most of the CPU is going). I created a
bar
On Sep 9, 2009, at 4:22 AM, Volker in Lists
wrote:
Currently this is impossible to do with
synthesized instance variables, but that is considered a bug.
As I mentioned in my reply to Oleg, this bug is fixed in the Snow
Leopard compilers. This fact was under NDA at the time I replied to
On Sep 9, 2009, at 5:45 AM, Gabriel Zachmann
wrote:
According to Script Editor's dictionary of Powerpoint, the "make"
command is in the 'Standard Suite'.
But I have no idea how to find it's defintion, let alone how to use
it from my Cocoa application.
This is covered in the "Creating and
What about writing a method, -finishSetup, and invoke it with a
delay like below? I use this pattern a lot with loading views. It
seems like it would work so that you add observation when your
object is ready.
Marc
[self performSelectorOnMainThread:@selector(finishSetup)
withObject:n
On Sep 7, 2009, at 2:32 AM, John Engelhart wrote:
To my recollection, I have never discussed this problem on the
list. I have
discussed the following:
The list of things you've discussed already sounds effectively
identical to the point you brought up.
Your question "Does the Mac OS X
On Sep 9, 2009, at 8:35 AM, Colin Deasy wrote:
Ok so I have tried both ways, using the main thread for the download
messages and using NSOperationQueue to create separate threads & run
loops.
I'm still getting 30% CPU though. When I run it, my app seems to
send the
kernel_task a bit crazy
Hey, I am not a peon!
... instead of wasting your efforts on a little mailing list
populated by peons who're merely trying to write applications.
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or modera
I've googled for a solution, found nothing. I tried making it by
observing the NSViewFrameChangedNotification of the NSTextView from
it's parent, and resizing, but this is more tricky then I imagined.
I think you are on the right track. You might want to look at these
threads:
http://www.c
No, it does actually behave as documented. In 10.6 I know it syncs
after 15
seconds.
In 10.6, I've noticed that my app and other apps are leaving some
empty files in ~/Library/Preferences such as
"com.apple.iTunes.eq.plist.Z9l0HBm".
Is it possible for these relics to occur if the automa
I just tried Apple's sample code QuickLookdownloader which behaves in exactly
the same manner :-/
Shark didn't give me back anything useful either!
> CC: d...@rudedog.org; cocoa-dev@lists.apple.com
> From: j...@mooseyard.com
> To: colde...@hotmail.com
> Subject: Re: NSURLDownload delegate metho
On Sep 8, 2009, at 8:07 PM, DairyKnight wrote:
I'm trying to convert my program with PDFKit to CGPDF to get better
performance. I'm trying to crop a page, with PDFPage I can simply do:
[PDFPage setBounds: forBox:kPDFDisplayMediaBox];
But for CGPDFPageRef, there seems to be only a CGPDFPageGetBo
I suppose this is a FAQ and this mailing list is not quite the right
place to ask, but XCode's debugger is driving me crazy.
It happens to me quite often, that it just won't stop at any
breakpoint I set!
Neither on a function breakpoint nor on a line breakpoint.
When I click in the gutter n
On Wed, Sep 9, 2009 at 2:13 PM, Gabriel Zachmann wrote:
> I suppose this is a FAQ and this mailing list is not quite the right place
> to ask, but XCode's debugger is driving me crazy.
You're correct. This question belongs on the xcode-users list.
--Kyle Sluder
__
what is the opposite of the "representedOject" method so that
indexRow comes out correctly here below?
BaseNode* node4 = [[myOutlineView itemAtRow:i] representedObject];
indexRow = [myOutlineView rowForItem: [node4 ]];
___
Co
Greetings LA CocoaHeads.
This Thursday, Ron will be demoing his iPhone app “The DVD Bit Budget
Assistant”, and showing some of the facets that went into creating it.
More info on the app itself at http://www.editgroove.com/
We meet at the offices of E! Entertainment at 7:30pm.
Our meeting loc
I am trying to use Scripting Bridge to do some minor control of Adobe
Photoshop CS3 from my Cocoa app. I have followed the instructions in
the "Scripting Bridge Programming Guide for Cocoa", specifically:
1. Generate header files for all scriptable applications that your
code is sending me
I'm trying to stroke a rect around a UIImage. I have subclassed
UIImageView with the following code but I get Nothing the drawRect:
method is never called:
-(id)initWithImage:(UIImage *)image
{
if(self= [super initWithImage:image])
{
}
On Sep 9, 2009, at 8:52 PM, Randall Meadows wrote:
AdobePhotoshopCS3JPEGSaveOptions *options =
[AdobePhotoshopCS3JPEGSaveOptions new];
[...]
It compiles fine, but I get this link error:
Undefined symbols:
".objc_class_name_AdobePhotoshopCS3JPEGSaveOptions", referenced from:
literal
UIImageView uses its underlying layer property to draw the image, so -
drawRect: is not being invoked.
If you are simply wanting to display a border around the image, see
CALayer's borderColor & borderWidth properties.
i.e.
imageView.layer.borderWidth = 1.0;
imageView.layer.borderColor = [[
Ahha. Ok thank you very much that answers the question
On Sep 9, 2009, at 7:13 PM, Joshua Pennington wrote:
UIImageView uses its underlying layer property to draw the image, so
-drawRect: is not being invoked.
If you are simply wanting to display a border around the image, see
CALayer's bo
On Sep 9, 2009, at 5:15 PM, jon wrote:
what is the opposite of the "representedOject" method so that
indexRow comes out correctly here below?
BaseNode* node4 = [[myOutlineView itemAtRow:i] representedObject];
indexRow = [myOutlineView rowForItem: [node4 ]];
AFAICT, t
Hi Ross,
Thanks for your reply,
On Sep 09, 2009, at 13:15, Ross Carter wrote:
I've googled for a solution, found nothing. I tried making it by
observing the NSViewFrameChangedNotification of the NSTextView from
it's parent, and resizing, but this is more tricky then I imagined.
I think yo
Paul Kim will be our speaker tonight. Paul will talk about porting an
existing 32-bit, retain/release app to 64-bit with Garbage Collection
(or more specifically, supporting both GC and retain/release).
We'll go somewhere for food afterwards -- probably, but not
necessarily, Goodburger in
Hi all,
I have a table view with columns bound to an NSArrayController. The
user can edit the values that appear and it's all working fine.
I have a class called "DataRow" for each row in the table/controller.
Each DataRow is essentially an NSMutableDictionary with a key for each
column n
How are you determining which call fails? Is there a back trace?
Your code compiles and runs fine here (10.6).
It will help if you provide some additional details, e.g. version,
backtrace, some additional context around the failure.
On Sep 8, 2009, at 11:13 PM, Devraj Mukherjee wrote:
Hi
Graham,
Yes, that works.
Oh, I can run. I'm just learning my way around a new set of tripping
hazards.
Thanks,
David
On Sep 8, 2009, at 11:43 PM, Graham Cox wrote:
Look up NSUserDefaults in the documentation. That's where you need
to add this setting.
I find it surprising that you a
Hello.
We are in need of a talented developer for a very exciting project
application development project in NYC.
A slightly more detailed description follows.
Please contact joshdist...@mac.com if interested.
Best.
/Josh
---
We are looking for a talented programmer to work closely with
Hello,
I seem to be running into an issue on Snow Leopard with NSImage.
Basically , I have a thumbnail kind of view , shown as a sheet , to
which I render the images read from the disk. The problem is that on
Snow Leopard the image shows up as blank whereas it renders fine on
Leopard and Tiger.
I have been struggling over this one for a while now, and what frustrates me
the most is the feeling that it should be relatively simple to do.
Let's say I have File1.m and File2.m, and I would like to access a variable
in File2.m from File1.
My previous programming experience is in Java, so my f
Prior to installing Snow Leopard the following code worked with no problem,
It runs a savePanel for exporting an rtf doc with the contents of a
textVIew. Under 10.6 it still works. However the option to show/hide the
output file extension stopped working. The savePanel checkbox toggles the
visibil
If you enable the -Wformat warning, the compiler will warn you if you
omit the trailing nil. Never understood why it's not enabled by
default...
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator commen
Hi, all...
I've got a table view for which users must tap an Edit button before
they can make changes. This button puts the table view in editing mode.
How can I make the cell show blue (it's selected) only while editing
is true?
The scenario I want:
When editing = NO
1. User taps a cel
56 matches
Mail list logo