IB plugins

2008-10-03 Thread Ken Tozier
Hi I'm working my way through the IB plugin documentation and have hit a point where step 2 in under "Configuring a Library Object Template" bears no resemblance whatsoever to anything in the Xcode project or the IB files. What the heck are they referring to? And how do I adapt that to th

Re: Newbie: Strange problem with NSTableView, check boxes and Core Data

2008-10-03 Thread Ken Ferry
Is your application by chance garbage collected? Some of the underlying machinery that kicks in when scaling standard interface elements has issues with garbage collection in Leopard. This suggests that your checkbox is scaling down, which you probably don't want it to do. Try selecting the check

Re: NSWindowController retain count confusion

2008-10-03 Thread Uli Kusterer
On 30.09.2008, at 21:01, James Walker wrote: However, I did solve my problem. I neglected to mention that I'm working in a mostly Carbon app. When I surrounded the alloc, init, and showWindow calls with a local autorelease pool, the problem went away and the NSWindowController gets dealloc

Re: Remove Duplicates in a NSArray

2008-10-03 Thread Uli Kusterer
On 01.10.2008, at 13:29, Rashmi Vyshnavi wrote: Is there a way to remove dictionary item containing same values for a key from a array of dictionaries? If you used an NSSet instead of an NSArray, you might get this automatically. Not sure whether the objects really have to be the same,

Re: IB plugins

2008-10-03 Thread Ken Tozier
On Oct 3, 2008, at 4:10 AM, Joey Hagedorn wrote: Ken, Step 2 of this section says: "In the library window, select the Library > IB SDK group. This group contains a single entry, which is a library object template." It is referring to the "Interface Builder Kit" category of items (as oppo

OK To ask iPhone Questions?

2008-10-03 Thread Andrew Lindesay
Hello; Is it now legal to ask iPhone development questions here? cheers. ___ Andrew Lindesay www.lindesay.co.nz ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the

Re: Complicated set of dynamic nested views

2008-10-03 Thread Graham Cox
On 3 Oct 2008, at 2:52 pm, Ken Tozier wrote: Hi I need to create an interface with collapsible views (much like those in InterfaceBuilder's "inspector" palette) and am having a hard time figuring out what exactly to use as the base in IB 3.0. In older versions of IB, there was a "panel"

Re: Core Data undo grouping

2008-10-03 Thread Mike Abdullah
I agree with Ben that this seems somewhat odd to do, but that said: NSManagedObjectContext coalesces changes for registering with the undo manager, but NSUndoManager also performs its own grouping. - processPendingChanges just provides a means for forcing the MOC to register its changes when

Re: OK To ask iPhone Questions?

2008-10-03 Thread Christian Giordano
Not yet, but hopefully very soon ;) Best, chr On Fri, Oct 3, 2008 at 11:41 AM, Andrew Lindesay <[EMAIL PROTECTED]> wrote: > Hello; > > Is it now legal to ask iPhone development questions here? > > cheers. > > ___ > Andrew Lindesay > www.lindesay.co.nz > > ___

Re: OK To ask iPhone Questions?

2008-10-03 Thread Roland King
not yet - the moderator's still waiting for guidance. Apart from that we've not actually seen the new NDA (well I haven't) and it's impossible to say whether there will be changes to the list structure. Until now you have to hang with the documentation (which is actually really good when yo

External C function and duplicate symbol

2008-10-03 Thread Christian Giordano
Hi guys, I've few functions that I'm keeping on an external .h file. If the header is included in more than a class I get duplicate symbol error. I tried using #ifndef which I use on my C++ classes but didn't bring any luck. I had a look to the various headers in the framework and I saw they use th

Re: OK To ask iPhone Questions?

2008-10-03 Thread Gregory Weston
Andrew Lindesay wrote: Hello; Is it now legal to ask iPhone development questions here? Apple wrote: "Developers will receive a new agreement without an NDA covering released software within a week or so." Future tense. Aside from the fact that (as far as I know) we are still waiting t

Re: External C function and duplicate symbol

2008-10-03 Thread Scott Andrew
What about using #pragma once at the top of the header file? The other solution is to move the functions to a C file and move just the function definitions to header files. I prefer the second for readability. I usually have a utils.c and a utils.h. I'm not a big fan of function implementat

Re: External C function and duplicate symbol

2008-10-03 Thread Brian Stern
It seems that what you want is an inline C function. I don't think this is part of the C language standard but gcc seems to have its own method of doing this. Just do a find on 'inline' in the Frameworks to see how it's done. Look at CGBase.h for instance. On Oct 3, 2008, at 8:32 AM, S

Re: External C function and duplicate symbol

2008-10-03 Thread Patrick Mau
Hi Christian If you really want a function to appear in multiple object files you could declare them static, like in: static void vec_zero2(int *vect) { vec[0] = vec[1] = 0; } This is sometimes useful if you want to inline small functions and not use preprocessor macros like this: stat

Re: Security - Write to protected directory

2008-10-03 Thread Michael Ash
On Fri, Oct 3, 2008 at 12:46 AM, Kelly Graus <[EMAIL PROTECTED]> wrote: > > On Oct 2, 2008, at 6:23 PM, Nick Zitzmann wrote: > >> >> On Oct 2, 2008, at 1:30 PM, Kelly Graus wrote: >> >>> Is the only way to allow a user to write to a protected location use the >>> AuthorizationExecuteWithPrivileges

Re: Newbie: Strange problem with NSTableView, check boxes and Core Data

2008-10-03 Thread Jonathan Oddie
Message: 8 Date: Fri, 3 Oct 2008 01:09:48 -0700 From: "Ken Ferry" <[EMAIL PROTECTED]> Subject: Re: Newbie: Strange problem with NSTableView, check boxes and Core Data To: "Jonathan Oddie" <[EMAIL PROTECTED]> Cc: cocoa-dev@lists.apple.com Message-ID: <[EMAIL PROTECTED]> Content-Ty

Re: Play Playlist in iTunes

2008-10-03 Thread has
Michael Ash wrote: On Thu, Oct 2, 2008 at 9:52 PM, Mr. Gecko wrote: I know but I can't find out the AppleEvent for Play Playlist. Is there some sort of a program that will parse the AppleScript and make an cocoa AppleEvent code. If you just want the raw four-char-codes from an application

Re: Newbie: Strange problem with NSTableView, check boxes and Core Data

2008-10-03 Thread Corbin Dunn
On Oct 2, 2008, at 11:30 AM, Jonathan Oddie wrote: On Oct 2, 2008, at 11:55 AM, Corbin Dunn wrote: Thanks for the advice Corbin. Below is a long backtrace, but I am not sure it sheds much light on the problem. I will keep working at it but since I am moving house this week I may not g

NSURLConnection and HTTPS

2008-10-03 Thread dexter morgan
Hello I'm using NSURLConnection in order to download some pages. All works fine until I try to load an HTTPS page. This is an example: https://www.wireless.att.com/olam/loginAction.olamexecute It return a differ page (not the same viewed into Safari). I think there is a problem accepting certificat

Re: Newbie: Simple display with NSView - problem

2008-10-03 Thread Genu Mathew
Graham, Thank you for the reply. Is there any placeholder for the custom view that I can use in the NIB file such that I can instantiate the view in the code and then load it onto the window? I can not hard code the filename into the custom view class and use it in the NIB as the image to be

Re: IB plugins

2008-10-03 Thread Randall Meadows
On Oct 3, 2008, at 2:54 AM, Ken Tozier wrote: On Oct 3, 2008, at 4:10 AM, Joey Hagedorn wrote: Step 2 of this section says: "In the library window, select the Library > IB SDK group. This group contains a single entry, which is a library object template." It is referring to the "Interface

Re: Newbie: Simple display with NSView - problem

2008-10-03 Thread Genu Mathew
Thanks, I will check it out and also change the name. Genu --- On Wed, 10/1/08, Jonathan del Strother <[EMAIL PROTECTED]> wrote: > From: Jonathan del Strother <[EMAIL PROTECTED]> > Subject: Re: Newbie: Simple display with NSView - problem > To: [EMAIL PROTECTED] > Cc: "Graham Cox" <[EMAIL PROTE

Re: NSURLConnection and HTTPS

2008-10-03 Thread Timothy Wood
On Oct 3, 2008, at 8:17 AM, dexter morgan wrote: Searching inside the list I've found this code: [_request setAllowsAnyHTTPSCertificate:YES forHost: [_url host]]; It's a private API. Unfortunatly the message is too old (2005) and at this time this method seems to be removed. Anyone can

Re: Play Playlist in iTunes

2008-10-03 Thread Mr. Gecko
On Oct 3, 2008, at 10:10 AM, has wrote: Michael Ash wrote: On Thu, Oct 2, 2008 at 9:52 PM, Mr. Gecko wrote: I know but I can't find out the AppleEvent for Play Playlist. Is there some sort of a program that will parse the AppleScript and make an cocoa AppleEvent code. If you just want

[OT] Core Animation is it up to the challenge

2008-10-03 Thread development2
This is off topic, just want to get some peoples opinion on this. I have been asked to port a game from Flash to the Mac (actually the iPhone, but that does not matter in this case). I am wondering if Core Animation is up to the task, of display and moving 30-50 units on the screen at one t

Re: Core Data undo grouping

2008-10-03 Thread Peter Sagerson
[object setValue:@"1" forKey:@"attr"]; [self forceUndoBoundaryInContext:context]; [object setValue:@"2" forKey:@"attr"]; This is a little odd. If this is in the UI thread, it will be confusing to the user in the typical scenarios. Are you sure you don't want to create a nested undo group ?

Re: IB plugins

2008-10-03 Thread Joey Hagedorn
Ken, Step 2 of this section says: "In the library window, select the Library > IB SDK group. This group contains a single entry, which is a library object template." It is referring to the "Interface Builder Kit" category of items (as opposed to, for example, the Cocoa or WebKit groups) i

Getting reference to a window

2008-10-03 Thread Cocoader
Hi there, My NSDocument 'HF_Browser' works with a window in a XIB file. From within this HF_Browser.m file I can get a reference to the window, set it's title, etc. In MainMenu.xib I have a menu command, 'Jump To' (invoked with Cmd-J). I dragged an Object object into MainMenu.xid and set

Write app without nib file.

2008-10-03 Thread Daniele Basile
Hi, I want to write an application without using a nib file. I found same code that do this and it works, but I am not able to manage event. For exactly I want to trap some event (tablet event) and manage this. So, I write this code: - main.m - import #impo

Re: [OT] Core Animation is it up to the challenge

2008-10-03 Thread Matt Long
Someone correct me if I'm wrong, but this is completely *on*-topic. Core Animation, it's capabilities and limitations are very pertinent. I don't know the answer to your question, but I certainly think it's on-topic. I would like to know the answers you get, myself. Then again, maybe you wa

Re: Getting reference to a window

2008-10-03 Thread I. Savant
On Fri, Oct 3, 2008 at 9:57 AM, Cocoader <[EMAIL PROTECTED]> wrote: > My NSDocument 'HF_Browser' works with a window in a XIB file. From within > this HF_Browser.m file I can get a reference to the window, set it's title, > etc. Yes, because the "File's Owner" of that xib instance is your HF_Br

Re: Getting reference to a window

2008-10-03 Thread Shawn Erickson
On Fri, Oct 3, 2008 at 6:57 AM, Cocoader <[EMAIL PROTECTED]> wrote: > Hi there, > > My NSDocument 'HF_Browser' works with a window in a XIB file. From within > this HF_Browser.m file I can get a reference to the window, set it's title, > etc. At runtime the framework (or code of your own) creates

Re: [OT] Core Animation is it up to the challenge

2008-10-03 Thread development2
Hi Matt, Thanks for your reply. I completely that example on "theocacao". It is a very good example of what I want to do (in a sense.). But anyway part of my reluctance to discuss on list was the fact that I mentioned "that which must not be named", but also did not want to clog up the lit

Re: -[NSScanner scanUpToString:stopString:NULL] - 10.3.9 Crash, due Xcode 3.1?

2008-10-03 Thread Jerry Krinock
As far as I can see, this is another symptom of a bug which I found back in March 2008 in Mac OS 10.3. The bug is that when an application is run in Mac OS 10.3.9, it crashes when a method in an NSScanner category that is defined in a framework does a simple scan. It runs fine in Mac OS 10

Re: Write app without nib file.

2008-10-03 Thread Jeff Johnson
Daniele, My suspicion is that the issue has nothing to do with whether or not you have a nib. The code below won't work, because as far as I can tell, you never add the view to a window. A view needs to be in a window to receive events. By the way, it's standard Cocoa naming convention

Cocoa Programming for Mac OsX Third Edition eBook search

2008-10-03 Thread Jamie Daniel
Greetings, Does anyone know where I can find / get the "Cocoa Programming for Mac OsX Third Edition" in eBook. I have a trip I am going on and I would like to take a few books with me - in eBook for space of course. it seems every place I find wants me to read it online - or download their stup

Re: Write app without nib file.

2008-10-03 Thread Shawn Erickson
On Fri, Oct 3, 2008 at 7:06 AM, Daniele Basile <[EMAIL PROTECTED]> wrote: > Hi, > I want to write an application without using a nib file. Don't. At least use a very basic nib/xib just to make your life easy. -Shawn ___ Cocoa-dev mailing list (Cocoa-de

Re: IB plugins

2008-10-03 Thread JongAm Park
> Ken, > > Step 2 of this section says: "In the library window, select the > Library > IB SDK group. This group contains a single entry, which is > a library object template." It is referring to the "Interface > Builder Kit" category of items (as opposed to, for example, the > Cocoa or W

Re: NSWindowController retain count confusion

2008-10-03 Thread James Walker
Uli Kusterer wrote: On 30.09.2008, at 21:01, James Walker wrote: However, I did solve my problem. I neglected to mention that I'm working in a mostly Carbon app. When I surrounded the alloc, init, and showWindow calls with a local autorelease pool, the problem went away and the NSWindowContr

Re: Getting reference to a window

2008-10-03 Thread Cocoader
You, sir, are a Super Hero! I have spent a lot (and I mean a LOT) of time over this, reading books, looking at other projects, scouring the mailing list archives. I knew from my experiments that it was something wrong with the way my project was set up, not a problem with the code itself.

Re: Getting reference to a window

2008-10-03 Thread Cocoader
Thank you Shawn! Your explanation was very clear. I have always had doubts around what the First Responder did in a NIB/XIB. I understood that NSResponder worked its way up the chain looking for something to handle the event, I guess my knowledge is weakest when it comes to Interface Builde

NSTableView confusion

2008-10-03 Thread James Maxwell
To be more precise, my confusion is with bindings and NSTableView. What I want to do is this: 1) Have a table with n columns (let's say 2, for kicks) and a variable number of rows 2) Column 1 holds a user-defined string/name for each entry (row) 3) Column 2 holds a popup with a set of choices

UITabBarController setViewControllers results in empty array of view controllers?

2008-10-03 Thread Liza Witz
Greetings- I've recently refactored my iPhone app to stop using an XIB to load my view controllers. So, rather than specifying a TabBarController in IB I'm doing so in code. The view controllers I'm adding to it were mostly specified in code previously. What happens is, I create the TabBarCon

Re: [OT] Core Animation is it up to the challenge

2008-10-03 Thread Michael Ash
On Fri, Oct 3, 2008 at 1:32 PM, development2 <[EMAIL PROTECTED]> wrote: > This is off topic, just want to get some peoples opinion on this. > > I have been asked to port a game from Flash to the Mac (actually the iPhone, > but that does not matter in this case). I am wondering if Core Animation is

Re: -[NSScanner scanUpToString:stopString:NULL] - 10.3.9 Crash, due Xcode 3.1?

2008-10-03 Thread Michael Ash
On Fri, Oct 3, 2008 at 2:34 PM, Jerry Krinock <[EMAIL PROTECTED]> wrote: > As far as I can see, this is another symptom of a bug which I found back in > March 2008 in Mac OS 10.3. > > The bug is that when an application is run in Mac OS 10.3.9, it crashes when > a method in an NSScanner category th

NSApplication releases top-level nib objects?

2008-10-03 Thread Mike Manzano
The docs say that NSApplicationMain: "Creates the application, loads the main nib file from the application’s main bundle, and runs the application." Who is responsible for releasing the objects in the main bundle when the app quits? Is it safe to not release them since the application is

Re: NSApplication releases top-level nib objects?

2008-10-03 Thread Bill Bumgarner
On Oct 3, 2008, at 2:21 PM, Mike Manzano wrote: Who is responsible for releasing the objects in the main bundle when the app quits? Is it safe to not release them since the application is quitting anyway? You are, but yes... just let 'em be as the memory will be reaped by the system when t

More IB plugin confusion

2008-10-03 Thread Ken Tozier
Hi I encountered another puzzler in the IB plugin documentation. Under the "Plug-in quick start > Creating and Configuring Your Xcode Project" heading (http://developer.apple.com/documentation/DeveloperTools/Conceptual/IBPlugInGuide/Plug-inQuickStart/chapter_3_section_2.html#/ /apple_ref/doc

[MEET] NYC CocoaHeads, Thu Oct 9 -- raffle!

2008-10-03 Thread Andy Lee
The October meeting of CocoaHeads-NYC is Thursday 10/9 from 6:00 to 8:00 at Tekserve, at 119 West 23rd between 6th and 7th . * Paul Kim will talk about tools and techniques for tracking down memory leaks. * We will raffle off one copy of TextMate and one copy of O

Re: [MEET] NYC CocoaHeads, Thu Oct 9 -- raffle!

2008-10-03 Thread Andy Lee
Sorry, I keep forgetting to include a link to our Yahoo Group: --Andy On Oct 3, 2008, at 5:42 PM, Andy Lee wrote: The October meeting of CocoaHeads-NYC is Thursday 10/9 from 6:00 to 8:00 at Tekserve, at 119 West 23rd between 6th and 7th

Re: More IB plugin confusion

2008-10-03 Thread Joey Hagedorn
On Oct 3, 2008, at 2:34 PM, Ken Tozier wrote: Hi I encountered another puzzler in the IB plugin documentation. Under the "Plug-in quick start > Creating and Configuring Your Xcode Project" heading (http://developer.apple.com/documentation/DeveloperTools/Conceptual/IBPlugInGuide/Plug-inQuickS

cookies and UIWebView

2008-10-03 Thread Paul Gribble
Now that the NDA has been lifted, can anyone contribute suggestions for this thread? I'm interested in the answer as well.Thanks - *Subject*: *Re: [moderator] Re: reusing cookies set in UIWebView* - From: Scott Anguish <[EMAIL PROTECTED]> - Date: Fri, 22 Aug 2008 12:54:36 -0400 - Deli

NSCoding protocol

2008-10-03 Thread hatzicware
I want MyClass to conform to the NSCoding protocol. But I'm puzzled about how to implement the initWithCoder: method. Suppose I have this in MyClass.h: NSString *S1, *S2, *S3; and this in its init function: S1 = @"a string"; S2 = [[NSString alloc] init]; S3 =

Multiples calls to acceptsFirstResponder

2008-10-03 Thread Andre Masse
Hi All, I'm re-learning Cocoa (been on Windows/Java for the last 5-6 years) using "Cocoa Programming For Mac OS X" third edition. I'm at chapter 19 (keyboard events) and I've noticed that my custom view (BigLetterView for those who know the book) overridden - (BOOL)acceptsFirstResponder i

Help for a beginner..

2008-10-03 Thread Jent Kyle
My Greetings! Okay so everyone has to start somewhere, right? Please don't tell me that all of you were born with this special ability ("built in") to program. I'm a complete beginner, I have never done any programming but I really want to learn cocoa. So my question is, where, how, etc. to learn c

Load/Save buttons

2008-10-03 Thread cocoa
I am trying to create an application that will load an XML file into an array when you press the load button, and save when you press a save button. However, I don't see any examples online or in my books that suggest how to handle dataOfType or readFromData on a button click. Any help would be a

[Moderators] Re: OK To ask iPhone Questions?

2008-10-03 Thread Scott Anguish
On 3-Oct-08, at 6:41 AM, Andrew Lindesay wrote: Hello; Is it now legal to ask iPhone development questions here? As others have said, the new NDA should be available shortly. List guidelines are also still pending. Don't worry, when things change I'll post the information. Scott [moderat

Re: Help for a beginner..

2008-10-03 Thread Alex Wait
you should start with a c based language. like vanilla c or c++. it will teach you the basics. :) I'm sure others on here can recommend a good book. On Fri, Oct 3, 2008 at 12:20 PM, Jent Kyle <[EMAIL PROTECTED]> wrote: > My Greetings! > Okay so everyone has to start somewhere, right? Please don't

Re: NSCoding protocol

2008-10-03 Thread Stephen J. Butler
Assuming this is not under GC... On Fri, Oct 3, 2008 at 2:00 PM, <[EMAIL PROTECTED]> wrote: > I want MyClass to conform to the NSCoding protocol. But I'm puzzled about > how to implement the initWithCoder: method. > > Suppose I have this in MyClass.h: > >NSString *S1, *S2, *S3; > > > and

Python, Mac OS X 10.5.5 and CoreGraphics

2008-10-03 Thread Ronny Reichmann
Hello there, to make it short: Does anyone "accidentally" know why CoreGraphics doesn't work any more on conjunction with Python? The directory that contains the CoreGraphics bindings is still there, but not in the PYTHONPATH anymore. Setting it by hand and trying to import CoreGraphics leads to a

Re: Newbie: Simple display with NSView - problem

2008-10-03 Thread Graham Cox
On 4 Oct 2008, at 1:19 am, Genu Mathew wrote: Thank you for the reply. Is there any placeholder for the custom view that I can use in the NIB file such that I can instantiate the view in the code and then load it onto the window? I can not hard code the filename into the custom view class

Re: NSCoding protocol

2008-10-03 Thread Nick Zitzmann
On Oct 3, 2008, at 1:00 PM, [EMAIL PROTECTED] wrote: So finally, my question: am I right to retain S2 and S3, and not S1? No. -decodeObject: and -decodeObjectForKey: always return autoreleased objects, so if you use them later, then you must retain them unless the code requires GC. Nic

Re: Help for a beginner..

2008-10-03 Thread Nick Zitzmann
On Oct 3, 2008, at 1:20 PM, Jent Kyle wrote: I'm a complete beginner, I have never done any programming but I really want to learn cocoa. So my question is, where, how, etc. to learn cocoa? Don't, or at least, not yet. Learn C first, up to and including data structures and pointers; the

Re: Help for a beginner..

2008-10-03 Thread Dave DeLong
Our local CocoaHeads group has been working on getting a lot of fundamentals material up online. We have videos, slides, a wiki, and as many online and in-print resources as we can find. http://cocoaheads.byu.edu Good to see you around here, Bobber! ;) Dave DeLong On 3 Oct, 2008, at 4:51

Re: NSWindowController retain count confusion

2008-10-03 Thread Uli Kusterer
On 03.10.2008, at 21:14, James Walker wrote: Uli Kusterer wrote: On 30.09.2008, at 21:01, James Walker wrote: However, I did solve my problem. I neglected to mention that I'm working in a mostly Carbon app. When I surrounded the alloc, init, and showWindow calls with a local autorelease po

Re: Multiples calls to acceptsFirstResponder

2008-10-03 Thread Bill Bumgarner
On Oct 3, 2008, at 12:02 PM, Andre Masse wrote: - 2 times at launch (before becoming firstResponder), - 2 times after pressing tab for the first time (before resigning), - 4 times when tabbing in The author has a remark about it saying: "Yes, acceptsFirstResponder gets called more times than yo

Re: NSCoding protocol

2008-10-03 Thread hatzicware
Thanks for your replies. But now I'm confused about how to de-allocate MyClass. Given this in its initialisation: S1 = @"a string"; S2 = [[NSString alloc] init]; S3 = [NSString string]; I would only release S2 in the dealloc method. But if the class has been unarchi

Re: Python, Mac OS X 10.5.5 and CoreGraphics

2008-10-03 Thread Bill Bumgarner
On Oct 3, 2008, at 3:55 PM, Ronny Reichmann wrote: to make it short: Does anyone "accidentally" know why CoreGraphics doesn't work any more on conjunction with Python? The directory that contains the CoreGraphics bindings is still there, but not in the PYTHONPATH anymore. Setting it by hand

Re: Help for a beginner..

2008-10-03 Thread mmalc crawford
On Oct 3, 2008, at 12:20 PM, Jent Kyle wrote: I have never done any programming but I really want to learn cocoa. So my question is, where, how, etc. to learn cocoa? Start with Programming in Objective-C by Stephen Kochan (depending on how quickly you want to get underway, you may consider w

Re: NSCoding protocol

2008-10-03 Thread Shawn Erickson
On Fri, Oct 3, 2008 at 4:29 PM, <[EMAIL PROTECTED]> wrote: > But now I'm confused about how to de-allocate MyClass. Given this in its > initialisation: > >S1 = @"a string"; >S2 = [[NSString alloc] init]; >S3 = [NSString string]; The line for S3 is wrong since you presumab

Re: Python, Mac OS X 10.5.5 and CoreGraphics

2008-10-03 Thread Ronny Reichmann
Hello there, unfortunately none of the examples in /Developer/Examples/Quartz/ Python/ work anymore. I don't know if recently, I just encountered it today. According to your answer, there should be wrappers as part of PyObjC. Unfortunately the graphics examples from the PyObjC-website don'

What does it mean for an NSManagedObject to be "invalidated"?

2008-10-03 Thread Dave Fernandes
I'm getting the following error logged to the console when I open a new document. 2008-10-03 19:34:48.269 MyApp[1182] The NSManagedObject with ID: 0x1604f260 Statistics/p187> has been invalidated. What does "invalidated" mean in this message? Breaking on [NSException raise] gives the follo

Re: Play Playlist in iTunes

2008-10-03 Thread Mr. Gecko
I made it work for EyeTunes, added the functions -playPlaylist: (NSString *)playlist; and -playTrack:(long)track ofPlaylist:(NSString *)playlist; AEDebugSends=1 /Applications/AppleScript/Script\ Editor.app/Contents/ MacOS/Script\ Editor is extremely useful for finding this stuff out. I will try

Re: NSWindowController retain count confusion

2008-10-03 Thread James Walker
Uli Kusterer wrote: On 03.10.2008, at 21:14, James Walker wrote: Uli Kusterer wrote: On 30.09.2008, at 21:01, James Walker wrote: However, I did solve my problem. I neglected to mention that I'm working in a mostly Carbon app. When I surrounded the alloc, init, and showWindow calls with a l

NSOutlineView assertion failures

2008-10-03 Thread Jeff Wilcox
I am suddenly having a load of issues with NSOutline view failing with the following assertion: Assertion failure in -[NSOutlineView _expandItemEntry:expandChildren:startLevel:](), /SourceCache/AppKit/ AppKit-949.35/TableView.subproj/NSOutlineView.m:1003 I seemed to be able to make this go

Re: [OT] Core Animation is it up to the challenge

2008-10-03 Thread Rob Keniger
On 04/10/2008, at 4:14 AM, development2 wrote: Yeah I know about Core Animation layers and such, and that is exactly how I would do it, but i was not sure how it handled that many layers at once. As Scott Stevenson shows it handles 80+ layers at once with no problem. Of course on my Dual Q

Re: NSOutlineView assertion failures

2008-10-03 Thread Uli Kusterer
On 04.10.2008, at 03:00, Jeff Wilcox wrote: I seemed to be able to make this go away by subclassing the outline view and locking it down before starting a reload or evaluating the number of rows (found mostly by lots or trial and error) with the following: Wait, you're not calling number

Re: Help for a beginner..

2008-10-03 Thread Rob Keniger
On 04/10/2008, at 9:46 AM, mmalc crawford wrote: Start with Programming in Objective-C by Stephen Kochan (depending on how quickly you want to get underway, you may consider waiting for the second edition):

Re: Play Playlist in iTunes

2008-10-03 Thread has
On 3 Oct 2008, at 17:09, Mr. Gecko wrote: On Thu, Oct 2, 2008 at 9:52 PM, Mr. Gecko wrote: I know but I can't find out the AppleEvent for Play Playlist. Is there some sort of a program that will parse the AppleScript and make an cocoa AppleEvent code. If you just want the raw four-char-co

Re: Python, Mac OS X 10.5.5 and CoreGraphics

2008-10-03 Thread has
Ronny Reichmann wrote: to make it short: Does anyone "accidentally" know why CoreGraphics doesn't work any more on conjunction with Python? The directory that contains the CoreGraphics bindings is still there, but not in the PYTHONPATH anymore. Setting it by hand and trying to import CoreGr

Re: Python, Mac OS X 10.5.5 and CoreGraphics

2008-10-03 Thread Bill Bumgarner
On Oct 3, 2008, at 5:02 PM, Ronny Reichmann wrote: Hello there, unfortunately none of the examples in /Developer/Examples/Quartz/ Python/ work anymore. I don't know if recently, I just encountered it today. According to your answer, there should be wrappers as part of PyObjC. Unfortunately

[Moderator] Re: UITabBarController setViewControllers results in empty array of view controllers?

2008-10-03 Thread Scott Anguish
Sorry Liza, Please re-read http://developer.apple.com/iphone/program/. The new list rules will be posted when the new program terms are. For the moment this is still not for public discussion on this list. Thanks scott [moderator] On 3-Oct-08, at 4:35 PM, Liza Witz wrote: Greetings- I'

Re: Play Playlist in iTunes

2008-10-03 Thread Mr. Gecko
I am not using AppleScript to do this, I am using AppleEvents, as you can see in code below. This is way faster than using AppleScript. - (void)playPlaylist:(NSString *)playlist { OSErr err; AppleEvent cmdEvent; err = AEBuildAppleEvent(iTunesSignature,

A way to use multiple colours with one NSBezierPath?

2008-10-03 Thread Michael Robinson
Hello again I would like to draw one path, which is used as a border. I naively assumed I could change the colour of the path as it is constructed, but it seems this is not the case. If I change the colour (using [[NSColor blackColor] set]; for example), this changes the colour for the ent

Accessing Menu in Another Nib

2008-10-03 Thread Kevin Ferguson
Greetings! So, let's say I have a menu in a secondary NIB file that I plan to use as a status bar menu. Since the user may not want that menu to even exist, I don't want to load it if it doesn't need to be, so it's in a secondary nib file. Is there any way to access that menu from that se

Re: [Math] sin(), cos() not working? What special magic must I use to summon their powers?

2008-10-03 Thread Michael Robinson
On 2/10/2008, at 5:29 AM, David Duncan wrote: On Oct 1, 2008, at 5:46 AM, Michael Robinson wrote: Unsurprisingly, I need my hand held again. 1. how do I initialize a CGShading object, with my two colours (left right/top bottom) See the Quartz 2D Shadings sample at

Re: NSOutlineView assertion failures

2008-10-03 Thread Jeff Wilcox
Not explicitly, but maybe. This seems to be taking place when the content for the NSTreeController is changing (explicitly) in one thread, causing a reload in the outline view, and in another thread the NSOutlineView's drawrect is getting called. I can't say for sure that this accounts f

Re: [Math] sin(), cos() not working? What special magic must I use to summon their powers?

2008-10-03 Thread Graham Cox
On 4 Oct 2008, at 2:17 pm, Michael Robinson wrote: Now I'd like to replace this: NSGradient* aGradient = [[[NSGradient alloc] initWithColorsAndLocations:[gradientColour1 color], (CGFloat)0.0, [gradientColour2 color], (CGFloat)1.0,nil] autorelease]; [aGradient drawInBezierPath:

Re: [Math] sin(), cos() not working? What special magic must I use to summon their powers?

2008-10-03 Thread Michael Robinson
I'll do that, thanks for the push in the right direction. “You know the world is going crazy when the best rapper is a white guy, the best golfer is a black guy, the tallest guy in the NBA is Chinese, the Swiss hold the America’s Cup, France is accusing the U.S. of arrogance, Germany doesn