Re: argument checks

2008-06-11 Thread Graham Cox
NSNumber* myNum = nil; /* stuff */ NSAssert( myNum != nil, @"some error message"); [myClass calc:myNum]; Messages to nil are safe - it will treat your number as having a value of 0. Thus as long as you initialise it to nil, your code will run without crashing though of course may give i

Re: Issue with displaying URI prefixes on child elements using NSXML

2008-06-11 Thread Chris Suter
On 11/06/2008, at 3:19 PM, Lawrence Johnston wrote: Hey everybody, I've got an issue that I can't figure out. If I'm using this code: NSString *XMLForDisplay { NSXMLElement *root = [NSXMLNode elementWithName:@"root"]; [root addNamespace:[NSXMLNode namespaceWithName:@"a" stringValue:@"http://

Re: argument checks

2008-06-11 Thread Adam Leonard
Yeah, variables you declare in a method (not as instance variables) are not automatically initialized to 0/NULL/nil for you. If you try to use an uninitialized variable, it might point to some left over object in memory, or it might map to nothing at all. It is totally random. What is th

Re: argument checks

2008-06-11 Thread Jason Coco
#include /* ... */ NSNumber *myNum = nil; // Lots of code where you've forgotten to actually do anything with myNum assert( myNum != nil ); results = [myClass someCalculationUsing: myNum]; // lots more code to remove the assertion in the release build, compile with -DNDEBUG HTH, /jason

Re: Troubles with CollectionView and IKImageBrowserView

2008-06-11 Thread Manuel
Thank you for your response...Hmmm..I'm astonished about the IKImageBrowserView outlet wich seems to be set correctly. And I explicitly setted the datasource to self and reload the data. So the object reference should be setted correctly...I have no ideas anymore. I programm my own view wit

Re: Table View/Array Troubles

2008-06-11 Thread Bob Warwick
On 12-Jun-08, at 2:16 AM, Gabriel Shahbazian wrote: Hi, I've posted the source to an app I'm working on. If someone can take a look and tell my why my tableview is not working with my array, it would be of great help. Source: http://novisdesign.net/Labs/Alien%20Notes.zip -Gabe I found

Re: Table View/Array Troubles

2008-06-11 Thread Brent Fulgham
I've posted the source to an app I'm working on. If someone can take a look and tell my why my tableview is not working with my array, it would be of great help. Source: http://novisdesign.net/Labs/Alien%20Notes.zip -Gabe Your first problem is that launching the app and pressing "New Note"

argument checks

2008-06-11 Thread Ashley Perrien
Noob question: I'm putting together a small code library and I'm trying to include some error checking in the methods; what I want to protect against is the following: NSNumber *myNum; // Lots of code where I've forgotten to actually do anything with myNum results = [myClass someCalculation

Re: Memory not freed with CIImage

2008-06-11 Thread Stefano Falda
On 12/giu/08, at 00:34, Nick Zitzmann wrote: It's normal for physical memory sizes to go up, and not come down until either the program is quit or the physical memory is needed elsewhere. Activity Monitor is not a memory leak detector. If you want to know where the memory is going, then use

Table View/Array Troubles

2008-06-11 Thread Gabriel Shahbazian
Hi, I've posted the source to an app I'm working on. If someone can take a look and tell my why my tableview is not working with my array, it would be of great help. Source: http://novisdesign.net/Labs/Alien%20Notes.zip -Gabe ___ Cocoa-dev maili

Re: CALayer scale transform

2008-06-11 Thread John Harper
On Jun 11, 2008, at 12:39 PM, Jens Alfke wrote: Are all layers treated as bitmap textures, even solid ones? For instance, if I create a 1024x1024 layer as a background and just set its background color to blue, does that allocate a megapixel's worth of VRAM? What about if I add a border or

Re: Most efficient way to "merge" CA layers

2008-06-11 Thread Brian Christensen
On Jun 11, 2008, at 6:34 , Huibert Aalbers wrote: I am writing an app that uses multiple layers to display objects that move over a static background (which is drawn in its own layer). After the animation completes, I do no longer need all those layers and I guess that it would be more effic

[Moderator] List Guidelines (updated with Snow Leopard information)

2008-06-11 Thread Scott Anguish
Please stay on-topic There are currently more than 4000 subscribers to this list. In order to keep the list useful please stay on topic and stick to technical discussion. While Apple engineers often subscribe to the list and answer questions, they do so on a voluntee

Re: IB bug in latest beta SDK? Datasource not invoked from NSOutlineView

2008-06-11 Thread Scott Anguish
On Jun 11, 2008, at 7:35 PM, David wrote: I don't know if this is a new bug or even a bug at all. I have an outline view which was bound to a NSTreeController subclass. I've since removed the binding and have written a controller which implements the datasource methods. I have set the new c

IB bug in latest beta SDK? Datasource not invoked from NSOutlineView

2008-06-11 Thread David
I don't know if this is a new bug or even a bug at all. I have an outline view which was bound to a NSTreeController subclass. I've since removed the binding and have written a controller which implements the datasource methods. I have set the new controller as the datasource for the outline view.

Re: Making use of a static library? [SOLVED]

2008-06-11 Thread Graham Cox
Thanks, got it working now. BTW, double-clicking on the value column doesn't work - that causes the drop-down dialog to be displayed. Instead you have to select the line, wait a couple of seconds, then click it again to make it editable directly. It's that few seconds wait that I hadn't gro

Re: Confused about AuthorizationExecuteWithPrivileges and suid

2008-06-11 Thread Stephen J. Butler
On Wed, Jun 11, 2008 at 8:49 PM, Jason Coco <[EMAIL PROTECTED]> wrote: > The documentation is talking about using AuthorizationExecuteWithPrivleges() > to repair a setuid tool that you may have already created. It is also > suggesting that you use the setuid tool method rather than using > Authoriz

Re: Confused about AuthorizationExecuteWithPrivileges and suid

2008-06-11 Thread Jason Coco
The documentation is talking about using AuthorizationExecuteWithPrivleges() to repair a setuid tool that you may have already created. It is also suggesting that you use the setuid tool method rather than using AuthorizationExecuteWithPrivleges(). In this way, the setuid tool can limit i

Confused about AuthorizationExecuteWithPrivileges and suid

2008-06-11 Thread Eyal Redler
Hi All, I need to access some files in the Applications folder and in order to do so I did the following: 1. I've created a tool that copies the files into the Applications folder (using NSFileManager) 2. I'm invoking the tool using AuthorizationExecuteWithPrivileges() 3. In the tool I'm c

Re: Making use of a static library?

2008-06-11 Thread Randall Meadows
On Jun 11, 2008, at 6:01 PM, Graham Cox wrote: On 12 Jun 2008, at 10:48 am, Nick Zitzmann wrote: if possible, recompile the library with support for the unsupported architectures. OK, that sounds what I'd like to do. The app that uses the library is universal, so I think you're right in

Re: NSTreeController's arrangedObjects returning _NSControllerTreeProxy for KVC path?

2008-06-11 Thread Charles Srstka
On Jun 11, 2008, at 6:57 PM, Ken Thomases wrote: From the -[NSTreeController arrangedObjects] documentation: Returns a proxy root tree node containing the receiver’s sorted content objects. - (id)arrangedObjects Discussion This property is observable using key-value observing. Special Cons

Re: Making use of a static library?

2008-06-11 Thread Nick Zitzmann
On Jun 11, 2008, at 7:01 PM, Graham Cox wrote: Problem I'm having is that in the build settings, the architectures settings states 'i386', but when I try and change it, I get a drop- down that offers 32-bit or 64-bit, it does not offer a way to select i386 and/or PPC. You'll need to manu

Re: NSTreeController's arrangedObjects returning _NSControllerTreeProxy for KVC path?

2008-06-11 Thread Ron Lue-Sang
On Jun 11, 2008, at 4:44 PM, Daniel Price wrote: As a test, I have an NSTreeController and an NSOutlineView within the same nib of a CoreData application (Leopard). If I bind the columns of the outline view to the controller directly within IB, it works as expected. eg: ShapeTC->arrangedO

Re: Making use of a static library?

2008-06-11 Thread Kiel Gillard
Hi Graham, In my experience, this warning generally does mean that there is something wrong in the build target settings for either the static library or the application including the library. Until I know more, this is the only thing I can suggest. Assuming you are using Xcode for the project of

Re: Making use of a static library?

2008-06-11 Thread Graham Cox
On 12 Jun 2008, at 10:48 am, Nick Zitzmann wrote: if possible, recompile the library with support for the unsupported architectures. OK, that sounds what I'd like to do. The app that uses the library is universal, so I think you're right in that there is a mismatch between the lib and th

Re: Accessible disks? Opinions requested.

2008-06-11 Thread Kevin Grant
Another thing you can do (for debugging, if nothing else) is to just run the "mount" Unix command. This gives you a quick list of everything you should expect to find through the APIs. For instance: % mount /dev/disk1s9 on / (hfs, local, journaled) devfs on /dev (devfs, local) fdesc on /dev (fd

Re: Making use of a static library?

2008-06-11 Thread Nick Zitzmann
On Jun 11, 2008, at 6:29 PM, Graham Cox wrote: I have a project which builds a static library from some pure C code. I want to use this library in another Cocoa project. I've set up the cross-project dependency and included the .a file in the Cocoa project. When the Cocoa project builds it

Re: Unvending a distributed object

2008-06-11 Thread Mike Manzano
No, I haven't tried it (yeah, I know I should have). I just don't have any code at the moment to hit up against my vended object to see if it's still around after setRootObject:nil. I will try this and see if it works when I get to the client part. Thanks, Mike On Jun 11, 2008, at 4:09 P

Making use of a static library?

2008-06-11 Thread Graham Cox
Hi all, This is not directly a Cocoa question, but I hope someone will know the answer to saving me jumping through all the hoops needed to join another list. I have a project which builds a static library from some pure C code. I want to use this library in another Cocoa project. I've se

When is a document moved or renamed?

2008-06-11 Thread LAURENS Jérôme
Hi all, I have a document based application with 2 kinds of documents:masters and slaves When saving the master document, all its slaves are also saved. So I override one of the writeToURL method of the master class document to send the appropriate writeToURL to its slaves. My app also does

Re: NSTreeController's arrangedObjects returning _NSControllerTreeProxy for KVC path?

2008-06-11 Thread Ken Thomases
On Jun 11, 2008, at 6:44 PM, Daniel Price wrote: As a test, I have an NSTreeController and an NSOutlineView within the same nib of a CoreData application (Leopard). If I bind the columns of the outline view to the controller directly within IB, it works as expected. eg: ShapeTC->arrangedO

Re: How do I Allow empty attributes when parsing with XMLParseDataRef

2008-06-11 Thread Keary Suska
6/11/08 3:07 AM, also sprach [EMAIL PROTECTED]: > XMLParseDataRef > > to parse xml, but the parse does not accept empty attributes: > > My code look like this: > > sXMLStartElementUPP = > (StartElementHandlerUPP)NewStartElementHandlerUPP(StartElementHandler); > sXMLEndElementUPP = > (En

NSTreeController's arrangedObjects returning _NSControllerTreeProxy for KVC path?

2008-06-11 Thread Daniel Price
This is driving me absolutely nuts. As a test, I have an NSTreeController and an NSOutlineView within the same nib of a CoreData application (Leopard). If I bind the columns of the outline view to the controller directly within IB, it works as expected. eg: ShapeTC->arrangedObjects.name (

Re: Unvending a distributed object

2008-06-11 Thread Jason Bobier
Yes, that is how you do it. Jason On Jun 11, 2008, at 7:09 PM, Ken Thomases wrote: On Jun 11, 2008, at 6:05 PM, Mike Manzano wrote: Does anyone know how to unvend an object? I found this thread on the list: http://lists.apple.com/archives/Cocoa-dev/2002/Mar/msg00710.html but it didn't se

Re: Unvending a distributed object

2008-06-11 Thread Ken Thomases
On Jun 11, 2008, at 6:05 PM, Mike Manzano wrote: Does anyone know how to unvend an object? I found this thread on the list: http://lists.apple.com/archives/Cocoa-dev/2002/Mar/msg00710.html but it didn't seem to have any definitive answer. Am I missing something obvious? Contrary to that l

Unvending a distributed object

2008-06-11 Thread Mike Manzano
Hello, Does anyone know how to unvend an object? I found this thread on the list: http://lists.apple.com/archives/Cocoa-dev/2002/Mar/msg00710.html but it didn't seem to have any definitive answer. Am I missing something obvious? Thanks, Mike ___

Most efficient way to "merge" CA layers

2008-06-11 Thread Huibert Aalbers
Hi everyone, I am writing an app that uses multiple layers to display objects that move over a static background (which is drawn in its own layer). After the animation completes, I do no longer need all those layers and I guess that it would be more efficient to "merge" all these layers into a sin

Re: Memory not freed with CIImage

2008-06-11 Thread Nick Zitzmann
On Jun 11, 2008, at 3:53 PM, Stefano Falda wrote: I'm working with X-Code3 under Leopard with Garbage Collection ON, but something seems to go wrong, because at the end of all the operations the memory is not released (in Activity Monitor there are >400 MB still active that disappear if I

Re: From c array to NSImage

2008-06-11 Thread Jens Alfke
On 11 Jun '08, at 2:00 PM, Hamish Allan wrote: You could perhaps Google "NSImage", click on the second result, "Cocoa Drawing Guide: Creating NSImage Objects", and look at the section "Creating a Bitmap"... Or similarly, open the Xcode documentation viewer, type "NSImage", click the class N

Re: Troubles with CollectionView and IKImageBrowserView

2008-06-11 Thread Jens Alfke
On 11 Jun '08, at 1:14 PM, Manuel wrote: But the IKImageBrowserView doesn't call these methods. I setup a testmethod in the MYNSCollectionViewItem like the following code, to verify that the imagebrowser outlet is set and to set again the datasource: Hm, I don't have any exact ideas, but

Re: -insertNewline: and -insertLineBreak:, using the shift key modifier

2008-06-11 Thread Ken Thomases
On Jun 11, 2008, at 4:39 PM, Keith Blount wrote: Thanks. Yes, I know I can access such methods via the delegate method, but my text view is already heavily subclassed to add a lot of new features anyway. Whilst I could achieve the same in a delegate method, wherever it is, I was really wond

Memory not freed with CIImage

2008-06-11 Thread Stefano Falda
Hello, I've got some code similar to the following, in which I loop in a list of image files and draw their content to another image. I'm working with X-Code3 under Leopard with Garbage Collection ON, but something seems to go wrong, because at the end of all the operations the memory is

Re: -insertNewline: and -insertLineBreak:, using the shift key modifier

2008-06-11 Thread Keith Blount
Hi Ken, Many thanks for your reply. > In most text-based apps, you insert a newline by hitting return and > a line break by hitting shift-return. Most text-based apps on the Mac? Because the default Cocoa text bindings use Control-Return or Control-Enter for insertLineBreak:. A-hem. How em

Re: Accessible disks? Opinions requested.

2008-06-11 Thread Neil Brewitt
On 11 Jun 2008, at 22:14, Ken Thomases wrote: Take a look at NSWorkspace, especially its -mountedLocalVolumePaths and -mountedRemovableMedia methods, as well as its NSWorkspaceDidMountNotification and NSWorkspaceDidUnmountNotification notifications. For more in-depth information without d

Re: NSTask(syslog)->NSPipe->NSFileHandle->readInBackgroundAndNotify buffers

2008-06-11 Thread Jason Bobier
Hey Ken, I was originally going to use the ASL api, but it seems to require polling. Looking through the asl code, I noticed that the syslog command didn't poll on Leopard and between that and the different ASL_KEY_TIME formats on Tiger and Leopard, I decided to use the syslog -w 5000 -F

RE: Loading a nib

2008-06-11 Thread john darnell
Thank you, Jens. That did the trick, though it took me a couple of bonehead (no offense meant to any Minbari reading this list) false runs to figure it out. R, John > -Original Message- > From: Jens Alfke [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 11, 2008 2:54 PM > To: john darne

Re: Accessible disks? Opinions requested.

2008-06-11 Thread Stephen J. Butler
On Wed, Jun 11, 2008 at 3:55 PM, Neil Brewitt <[EMAIL PROTECTED]> wrote: > I'm new to Cocoa, and I want to write an app which as a starting point > enumerates all available mass storage devices, possibly including CD/DVDs, > and presents the user with a list of mounted devices. Similar to what > In

Re: Accessible disks? Opinions requested.

2008-06-11 Thread Ken Thomases
On Jun 11, 2008, at 3:55 PM, Neil Brewitt wrote: I'm new to Cocoa, and I want to write an app which as a starting point enumerates all available mass storage devices, possibly including CD/DVDs, and presents the user with a list of mounted devices. Similar to what Installer does to choose t

Re: NSTask(syslog)->NSPipe->NSFileHandle->readInBackgroundAndNotify buffers

2008-06-11 Thread Ken Thomases
On Jun 11, 2008, at 3:10 PM, Jason Bobier wrote: The issue that I'm having is that I'm using NSTask to create a syslog process with the -w option to continually parse specific syslog entries. The problem is that if there are too few entries, I never receive the notification. I understand

Re: From c array to NSImage

2008-06-11 Thread Hamish Allan
On Wed, Jun 11, 2008 at 9:50 PM, Bill Prinzmetal <[EMAIL PROTECTED]> wrote: > I would like to create an NSImage starting from a c array. I have a c > array, e.g., > > float myArray[256][256]; > > Where the values go from 0.0 (will be black) to 1.0 (will be white) > I would like to may a gray leve

Re: -insertNewline: and -insertLineBreak:, using the shift key modifier

2008-06-11 Thread Ken Thomases
On Jun 11, 2008, at 3:10 PM, Keith Blount wrote: In most text-based apps, you insert a newline by hitting return and a line break by hitting shift-return. Most text-based apps on the Mac? Because the default Cocoa text bindings use Control-Return or Control-Enter for insertLineBreak:. Yo

Accessible disks? Opinions requested.

2008-06-11 Thread Neil Brewitt
Hi folks, I'm new to Cocoa, and I want to write an app which as a starting point enumerates all available mass storage devices, possibly including CD/DVDs, and presents the user with a list of mounted devices. Similar to what Installer does to choose the installation disk, but including n

From c array to NSImage

2008-06-11 Thread Bill Prinzmetal
I would like to create an NSImage starting from a c array. I have a c array, e.g., float myArray[256][256]; Where the values go from 0.0 (will be black) to 1.0 (will be white) I would like to may a gray level image [NSImage] from this array. I have no idea of how to begin. Thanks. -- _

Re: Bound NSTreeNode - Inserting Children

2008-06-11 Thread Hamish Allan
On Wed, Jun 11, 2008 at 8:50 PM, Robert Sesek <[EMAIL PROTECTED]> wrote: > I have no other ideas for how to get this to work. Basically, the tree > displayed is incomplete, and as the user expands the tree, data is fetched > from a server and then inserted beneath a node. Do you really want to ad

Troubles with CollectionView and IKImageBrowserView

2008-06-11 Thread Manuel
Hello Macprogrammers I've a problem with my IKImageBrowser in combination with a CollectionViewItem. I have a NSWindow with a NSCollectionView and a NSArrayController. I extended the NSCollectionViewItem to reference the IKImageBrowserView in an outlet and use the NSCollectionViewItem as

Re: NSData from NSArchiver and plist Utility

2008-06-11 Thread Trygve Inda
> > On 11 Jun '08, at 9:35 AM, Trygve Inda wrote: > >> I have a plist that I will store on a server and my app will >> retrieve it. >> I'd like to archive one of the keys (an array) into an NSData and >> possibly >> compress it Makes for less storage and thus lower bandwidth for my >> server.

NSTask(syslog)->NSPipe->NSFileHandle->readInBackgroundAndNotify buffers

2008-06-11 Thread Jason Bobier
Hey folks, I know that this has been discussed here before, but after spending hours reading cocoa-dev posts, I have yet to find the solution. The issue that I'm having is that I'm using NSTask to create a syslog process with the -w option to continually parse specific syslog entries. The p

-insertNewline: and -insertLineBreak:, using the shift key modifier

2008-06-11 Thread Keith Blount
Hi, In most text-based apps, you insert a newline by hitting return and a line break by hitting shift-return. This isn't the default behaviour of NSTextView, but both -insertNewline: and -insertLineBreak: are available as actions. However, using interface builder it is impossible to add shift-r

Re: Loading a nib

2008-06-11 Thread Jens Alfke
On 11 Jun '08, at 12:43 PM, john darnell wrote: I stepped through showNewDialog and initWithWindowNibName so I know that that code is being executed, but the second window never makes an appearance. My first guess would be that, in NewDialogController.nib, the "window" outlet of the file's

Bound NSTreeNode - Inserting Children

2008-06-11 Thread Robert Sesek
Hi all, I have bound a NSTreeController to a NSOutlineView. I am trying to insert child nodes into this structure, but I cannot seem to make it work. This is the code I originally used: - (void)addChildren:(NSArray *)children toNode:(NSTreeNode *)node { NSXMLElement *parent = [node

Re: Documenting projects

2008-06-11 Thread Jens Alfke
On 11 Jun '08, at 11:45 AM, Adam Bridge wrote: How does one properly document all the relationship/connection information that is created/maintained by Interface Builder and stored in NIBS/XIBS? If you find out, let me know :( I find it's possible (for me likely) to get lost in a maze of tw

Re: NSData from NSArchiver and plist Utility

2008-06-11 Thread Jens Alfke
On 11 Jun '08, at 9:35 AM, Trygve Inda wrote: I have a plist that I will store on a server and my app will retrieve it. I'd like to archive one of the keys (an array) into an NSData and possibly compress it Makes for less storage and thus lower bandwidth for my server. Why not just co

Loading a nib

2008-06-11 Thread john darnell
Guys, this may be my third time posting this to the list. It's not showing up in my Sent box using the previous two methods, so if this is a duplicate message, once again I apologize. Using Chapter 9 of Aaron Hillegass' book, COCOA PROGRAMMING FOR MAC OS as a model, I attempted to create a very s

Re: CALayer scale transform

2008-06-11 Thread Jens Alfke
On 11 Jun '08, at 9:37 AM, David Duncan wrote: Effectively a CALayer represents a texture with the layer's contents on the video card. As the docs say, transforms only affect geometry. The texture does not include geometry, thus the current content is scaled rather than being re-rendered.

NSToolbarItems - can I define the sorting in the customization palette

2008-06-11 Thread Ulf Dunkel
Is there any method to sort NSToolbarItem objects for the representation in the customization sheet which is shown on runToolbarCustomizationPalette: ? Any help is appreciated. Ulf Dunkel ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please

Documenting projects

2008-06-11 Thread Adam Bridge
How does one properly document all the relationship/connection information that is created/maintained by Interface Builder and stored in NIBS/XIBS? I find it's possible (for me likely) to get lost in a maze of twisty little relationships, all alike, that I don't hold together so well in my head. W

Re: Link to zlib

2008-06-11 Thread Charles Srstka
On Jun 11, 2008, at 1:06 PM, Sherm Pendley wrote: 1. The more users can run your app, the more potential customers you have. 2. The more users can run your app, the fewer e-mails you get asking "why can't I run this app?" I fail to see the relevance of these points. Obviously, my goal is

Re: Interface Builder crashing

2008-06-11 Thread I. Savant
> Could you please help me with my Interface Builder? It keep crashing and I > can't understand what is wrong. Several things: 1 - You'd want to discuss problems with the developer tools themselves on the xcode-users list. This has nothing to do with Cocoa. 2 - If it is crashing, there is a bug

Re: Link to zlib

2008-06-11 Thread Sherm Pendley
On Wed, Jun 11, 2008 at 1:03 PM, Charles Srstka <[EMAIL PROTECTED]> wrote: > On Jun 11, 2008, at 11:40 AM, Sherm Pendley wrote: > >> Yes, in fact it does matter. If Xcode resolves the symlink and stores >> a direct reference to libz1.dylib, then it will continue to use that >> even if you later mov

Re: NSData from NSArchiver and plist Utility

2008-06-11 Thread Trygve Inda
>> myData = [NSArchiver archivedDataWithRootObject:(NSArray*)myArray]; >> >> Will something archived with this under 10.5 be readable in 10.4? >> >> This seems like something an existing utility should be able to >> do... Is >> there something that does this? Or do I need to write a simple >> cu

Re: Link to zlib

2008-06-11 Thread Charles Srstka
On Jun 11, 2008, at 11:40 AM, Sherm Pendley wrote: Yes, in fact it does matter. If Xcode resolves the symlink and stores a direct reference to libz1.dylib, then it will continue to use that even if you later move to a newer SDK with a newer version of libz. When ld resolves the symlink, it does

Re: NSData from NSArchiver and plist Utility

2008-06-11 Thread Ken Thomases
On Jun 11, 2008, at 11:35 AM, Trygve Inda wrote: I have a plist that I will store on a server and my app will retrieve it. I'd like to archive one of the keys (an array) into an NSData and possibly compress it Makes for less storage and thus lower bandwidth for my server. myData = [NSAr

Re: CALayer scale transform

2008-06-11 Thread Brian Christensen
On Jun 11, 2008, at 12:37 , David Duncan wrote: Effectively a CALayer represents a texture with the layer's contents on the video card. As the docs say, transforms only affect geometry. The texture does not include geometry, thus the current content is scaled rather than being re-rendered.

Interface Builder crashing

2008-06-11 Thread Guilherme Chapiewski
Hi folks, Could you please help me with my Interface Builder? It keep crashing and I can't understand what is wrong. The process to crash is: 1) Open IB 2) Select the Cocoa Touch window template 3) In the library window, objects tab, click on the "Library" option in the first window at the top a

Re: Link to zlib

2008-06-11 Thread Sherm Pendley
On Wed, Jun 11, 2008 at 12:12 PM, Charles Srstka <[EMAIL PROTECTED]> wrote: > On Jun 11, 2008, at 10:49 AM, Sherm Pendley wrote: > >> Check the libraries with otool. Runtime dependencies come from the >> install_name of the linked library, not from the filename that was >> passed to the linker. > >

Re: CALayer scale transform

2008-06-11 Thread David Duncan
On Jun 11, 2008, at 8:56 AM, Brian Christensen wrote: Is it expected behavior that when applying a CATransform3DMakeScale() transform to a CALayer the layer's current bitmap information is what gets scaled (using some type of filter) rather than asking the layer to actually redraw itself in

NSData from NSArchiver and plist Utility

2008-06-11 Thread Trygve Inda
I have a plist that I will store on a server and my app will retrieve it. I'd like to archive one of the keys (an array) into an NSData and possibly compress it Makes for less storage and thus lower bandwidth for my server. myData = [NSArchiver archivedDataWithRootObject:(NSArray*)myArray]; W

Re: Mail Rule Actions Control

2008-06-11 Thread Ken Thomases
On Jun 11, 2008, at 6:17 AM, Steven Huey wrote: There's plenty of resources available for how to use a NSPredicateEditor... I'm interested in creating a control to represent a set of actions, not a predicate, which is why I'm more interested in the NSRuleEditor. The NSPredicateEditor is a s

Re: NSTextView and changing the selected text's color

2008-06-11 Thread Mattias Arrelid
Hi Douglas, On Wed, Jun 11, 2008 at 5:30 PM, Douglas Davidson <[EMAIL PROTECTED]> wrote: > > On Jun 11, 2008, at 3:24 AM, Mattias Arrelid wrote: > >> Haven't anyone stumbled upon something similar, or a solution to this? > > I believe it was answered. You don't want to use setMarkedTextAttributes

Re: Link to zlib

2008-06-11 Thread Sherm Pendley
On Wed, Jun 11, 2008 at 11:49 AM, Sherm Pendley <[EMAIL PROTECTED]> wrote: > On Wed, Jun 11, 2008 at 11:35 AM, Charles Srstka > >> when building against the 10.4u SDK (if I were building against the 10.5 >> SDK, I'm sure it would link against libcurl.4.dylib and not work with Tiger >> anymore). > >

Re: Link to zlib

2008-06-11 Thread Charles Srstka
On Jun 11, 2008, at 10:49 AM, Sherm Pendley wrote: Check the libraries with otool. Runtime dependencies come from the install_name of the linked library, not from the filename that was passed to the linker. In which case it shouldn't matter at all whether Xcode is resolving the symlink or no

Looking for Cocoa Developer in Southern California.....

2008-06-11 Thread Kristan Kennedy
Calling ALL COCOA MAC - OS PROGRAMMERSCAREER LAUNCHING STARTUP WANTS YOU.. PLEASE SEND YOUR RESUMES to [EMAIL PROTECTED] Generously paying for referrals as well. 2-5 years experience on COCOA ideal...with a passion for brilliant startup team in SANTA MONICA. FULLTIME ONLY. RELOCATION

CALayer scale transform

2008-06-11 Thread Brian Christensen
Is it expected behavior that when applying a CATransform3DMakeScale() transform to a CALayer the layer's current bitmap information is what gets scaled (using some type of filter) rather than asking the layer to actually redraw itself into the, presumably, freshly transformed context? Curre

[moderator] Re: Garbage collector vs variable lifetime

2008-06-11 Thread Scott Anguish
Folks, this is getting nowhere. Chris Hanson (an apple engineer BTW) and Clark (and many others) have stated the correct answer (simply summarized below) time to put this one to rest. there is nothing to argue about here. scott On Jun 11, 2008, at 8:45 AM, Clark Cox wrote: If you're goi

Re: Garbage collector vs variable lifetime

2008-06-11 Thread j o a r
On Jun 11, 2008, at 12:29 AM, Jim Puls wrote: For that matter, it may be worth pointing out John's confusion between "sloppy" and "incorrect". He makes a decent point that returning a mutable object when the method definition specifies an immutable one is sloppy and, indeed, fraught with p

Re: Link to zlib

2008-06-11 Thread Sherm Pendley
On Wed, Jun 11, 2008 at 11:35 AM, Charles Srstka <[EMAIL PROTECTED]> wrote: > On Jun 11, 2008, at 9:48 AM, Jens Alfke wrote: > >> (Xcode used to have a bug where if you did this it would "helpfully" >> resolve the symlink and actually add the specific version file; but that's >> been fixed for year

Re: Garbage collector vs variable lifetime

2008-06-11 Thread Clark Cox
On Wed, Jun 11, 2008 at 12:01 AM, John Engelhart <[EMAIL PROTECTED]> wrote: > > On Jun 10, 2008, at 11:28 AM, Charles Srstka wrote: >> >> I think the problem is that if NSArray has +[NSArray array] returning an >> NSArray, then NSMutableArray has to return an NSArray also, since it can't >> have a

Re: Link to zlib

2008-06-11 Thread Charles Srstka
On Jun 11, 2008, at 9:48 AM, Jens Alfke wrote: (Xcode used to have a bug where if you did this it would "helpfully" resolve the symlink and actually add the specific version file; but that's been fixed for years.) Has it? I have a project that links against libcurl.dylib and libz.dylib, a

Re: NSTextView and changing the selected text's color

2008-06-11 Thread Douglas Davidson
On Jun 11, 2008, at 3:24 AM, Mattias Arrelid wrote: Haven't anyone stumbled upon something similar, or a solution to this? I believe it was answered. You don't want to use setMarkedTextAttributes:, because marked text is the uncommitted text you see while using an input method. You can

Re: launchd daemon Throttling respawn log messages

2008-06-11 Thread Jens Alfke
On 11 Jun '08, at 12:05 AM, Alexander Reichstadt wrote: launchd gives me a hard time with a daemon I need to keep running. It prints "Throttling respawn" to my console forever. Because of that I wrote a script that does nothing but print "test" and sleep before exiting to somehow understan

Re: Garbage collector vs variable lifetime

2008-06-11 Thread Charles Srstka
On Jun 11, 2008, at 2:01 AM, John Engelhart wrote: If you declare a method prototype as '-(NSArray *)resultsArray', then you have explicitly communicated that a NSArray is going to be returned. Not a NSMutableArray. Not 'Jimmies groovy array with red pin stripes'. A NSArray. Period. A NS

Re: Link to zlib

2008-06-11 Thread matt . gough
On 11 Jun 2008, at 16:48, Jens Alfke wrote: You can avoid that by adding the library file that doesn't have a version number in it, i.e. "libz.dylib" not "libz.1.2.3.dylib". This is a symlink that always points to the current version, and it's the same file the linker would use if you adde

Re: Link to zlib

2008-06-11 Thread Jens Alfke
On 11 Jun '08, at 6:20 AM, [EMAIL PROTECTED] wrote: For such 'standard' libraries, the usual recommendation is to not add them to the project at all, but to add them to the 'Other Linker flags' in the target. For libzlib, you would use -lz Really? I've never heard that. I find it more conv

Re: How to manage/embed Covert Art from Mp3 Files with Cocoa App?

2008-06-11 Thread Jens Alfke
On 11 Jun '08, at 6:59 AM, Nicolas Goles wrote: Hi, I want to develop a Cocoa Application to manage an embed Cover Art files to Mp3's. The thing is that I don't know how to achieve this, or where to read about how to do it. I asked in several places / googled a lot and ended up here. iT

disabling Print in modal panel

2008-06-11 Thread Jim Matthews
How would I go about disabling the Print command for a modal panel? The nil-targetted menu item is currently enabled because the first responder is an NSTextField, which implements the print: selector. But I don't really want users printing out individual NSTextFields. I could subclass NSTextFi

How to manage/embed Covert Art from Mp3 Files with Cocoa App?

2008-06-11 Thread Nicolas Goles
Hi, I want to develop a Cocoa Application to manage an embed Cover Art files to Mp3's. The thing is that I don't know how to achieve this, or where to read about how to do it. I asked in several places / googled a lot and ended up here. Could anyone help me out a bit ? Link me to some reading would

Re: knowing when WebView is done

2008-06-11 Thread Timothy Ritchey
Adam, Thank you very much for that link. It was extremely helpful, and setting WebCacheModelDocumentViewer made the memory usage much cleaner. At the end of the day, I was still unhappy with the amount of memory WebKit was using in the application, so I decided to go a different route. I c

Re: Link to zlib

2008-06-11 Thread matt . gough
On 11 Jun 2008, at 13:27, Trygve Inda wrote: I am not quite sure how to do this (and maybe this belongs on the Xcode list), but I need to link to zlib. For such 'standard' libraries, the usual recommendation is to not add them to the project at all, but to add them to the 'Other Linker

Re: Link to zlib

2008-06-11 Thread Kevin Grant
Start with the "Add > Existing Frameworks" contextual menu. If you type a "/" in an Open panel, a path box appears. You can then type "/usr/lib" to display that directory. Kevin G. I am not quite sure how to do this (and maybe this belongs on the Xcode list), but I need to link to zlib. I

Re: Garbage collector vs variable lifetime

2008-06-11 Thread Andy Lee
On Jun 11, 2008, at 3:01 AM, John Engelhart wrote: -(MyObject *)copyAndCombineWith:(MyObject *)object { MyObject *copy = malloc(sizeof(MyObject)); memcpy(copy, object, sizeof(MyObject)); copy->answer += answer; copy->integerRING += integerRing; return(copy); } Do not use malloc() to instan

  1   2   >