Re: [NSPipe pipe] returning nil (running out of filehandles?)

2008-04-02 Thread Jean-Daniel Dupas
You may have a look to the source as it is part to Darwin (package CommonCrypto), but the answer is "not at all". It look like a really standard implementation. It has just the advantage to avoid a dependency over a third party library if you need only simple digest functions (10.4) or if you

Re: NSView out of memory problem

2008-04-02 Thread Matthew Whillock
Hi Graham, Yes, you're right. Moments after I sent my email I found the right tree to bark up. Cheers, Matt On 2 Apr 2008, at 00:05, Graham Cox wrote: As I said, it says nothing about how it's implemented. Chances are, it will avoid creation of an unnecessary NSBezierPath object, but re

Modifying the clip view before scrolling.

2008-04-02 Thread Peter Zegelin
I have a custom view inside a scrollview and need to modify the clip view before a user begins to scroll as I have some custom rulers built into my view. Is there any way of being notified when a user is about to scroll? I tried overriding the mousedown of the scrollview but was only able t

Re: [NSPipe pipe] returning nil (running out of filehandles?)

2008-04-02 Thread Jean-Daniel Dupas
Le 2 avr. 08 à 09:43, Jean-Daniel Dupas a écrit : You may have a look to the source as it is part to Darwin (package CommonCrypto), but the answer is "not at all". It look like a really standard implementation. It has just the advantage to avoid a dependency over a third party library if yo

Untitled NSPersistentDocument has no persistent store

2008-04-02 Thread Quincey Morris
It appears that a new (unsaved) NSPersistentDocument has no persistent store associated with it. AFAICT, this makes it impossible to fault out any objects until the document is saved (there's nowhere to fault them back in from later). This effectively means it's impossible to put a lot of d

Re: Untitled NSPersistentDocument has no persistent store

2008-04-02 Thread Ian Jackson
Have you done the tutorial? http://developer.apple.com/documentation/Cocoa/Conceptual/NSPersistentDocumentTutorial/NSPersistentDocumentTutorial.pdf You can add in the data as you like, and save when you've finished. Ian. On 2/04/2008, at 9:42 PM, Quincey Morris wrote: It appears that a new (u

Re: Untitled NSPersistentDocument has no persistent store

2008-04-02 Thread Quincey Morris
On Apr 2, 2008, at 01:52, Ian Jackson wrote: Have you done the tutorial? http://developer.apple.com/documentation/Cocoa/Conceptual/NSPersistentDocumentTutorial/NSPersistentDocumentTutorial.pdf You can add in the data as you like, and save when you've finished. Yes, but the amount of data in

to-Some Relationship (Core Data/IB questions)

2008-04-02 Thread Ian Jackson
Following on from a previous question (Core Data/IB questions), I am seeking advice again on how I should accomplish the following: I need to select an arbitrary number (i.e. not necessarily 1 or all) of objects from a set of all objects belonging to another entity. I assumed this was a job

Re: Modifying the clip view before scrolling.

2008-04-02 Thread Cathy Shive
Hi Peter, NSScroller has the following methods that might help: - (void)trackKnob:(NSEvent *)theEvent - (void)trackScrollButtons:(NSEvent *)theEvent I've never subclassed NSScroller, so can't comment on the havoc that may ensue if you go down this path. NSClipView also receives a not

Re: NSView out of memory problem

2008-04-02 Thread Andre Schnoor
Am 02.04.2008 um 01:05 schrieb Graham Cox: As I said, it says nothing about how it's implemented. Chances are, it will avoid creation of an unnecessary NSBezierPath object, but relying on that being the case is folly. On 2 Apr 2008, at 2:23 am, Matthew Whillock wrote: The class reference

Re: Modifying the clip view before scrolling.

2008-04-02 Thread Quincey Morris
On Apr 2, 2008, at 01:25, Peter Zegelin wrote: I have a custom view inside a scrollview and need to modify the clip view before a user begins to scroll as I have some custom rulers built into my view. Is there any way of being notified when a user is about to scroll? I tried overriding the

Re: Untitled NSPersistentDocument has no persistent store

2008-04-02 Thread Ian Jackson
Ah OK, I see. But I can't help. However the business of saving before you start happens with Garageband and iMovie. So on the plus side, it's not unheard of. On the downside, I agree it's a bit odd. Ian. On 2/04/2008, at 10:26 PM, Quincey Morris wrote: On Apr 2, 2008, at 01:52, Ian Jac

Re: activate my application while dragging on other application window

2008-04-02 Thread Apparao Mulpuri
Seems this is not implementable because both application workspaces are different. Is there any undocumented apis available to achieve this? Thanks & Regards, - Apparao. On Wed, Apr 2, 2008 at 9:58 AM, Apparao Mulpuri <[EMAIL PROTECTED]> wrote: > I want to activate my application while dragging

Re: Bindings for NSComboBox?

2008-04-02 Thread Ian Jackson
Does this mean that you want to create a new object and add it to the array, by typing a new string into the combo box (and pressing enter)? My feeling is you'd need to write a bit of code yourself for that. Ian. On 1/04/2008, at 9:44 AM, David Springer wrote: All, I'm having trouble sett

Problem with Grouping the rotated object.

2008-04-02 Thread Ghufran Ahamad
Hi All, We are developing a kind of drawing application in Objective C using Cocoa framework. We have several separate graphical objects, each having their own position and rotation angle, are then grouped. As soon as we group the objects the rotated object has got shift with their angle. This

Re: Need for a creator code?

2008-04-02 Thread Keith Duncan
Oh. Looks like I'm off the hook. The UTI, I expect, is the bundle identifier, no? I don't think anyone actually answered this question for you. Basically no, your bundle identifier is a URI. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

How to store NSRect as Core Data attribute?

2008-04-02 Thread Daniel Thorpe
Hello everyone, I'm trying to get to grips with non-standard persistent attributes in Core Data. I've read through the docs I can find (http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/Articles/cdNSAttributes.html ) but I'm still having some issues storing an NSRect in an en

Re: Need for a creator code?

2008-04-02 Thread Jean-Daniel Dupas
Le 2 avr. 08 à 12:52, Keith Duncan a écrit : Oh. Looks like I'm off the hook. The UTI, I expect, is the bundle identifier, no? I don't think anyone actually answered this question for you. Basically no, your bundle identifier is a URI. And to complete the answer, UTI are here to «repla

prefPane with background process

2008-04-02 Thread Yogesh Potdar
Hi, I want to create a service which can be launched from the system preferences, do some config setting and continue working even if the system preferences application is closed. To achieve this, I have created a myapp.prefPane which is of type BUNDLE and installed this in the ~/Library/Preferen

Re: How to store NSRect as Core Data attribute?

2008-04-02 Thread Felix Franz
On 02.04.2008, at 13:28, Daniel Thorpe wrote: Hello everyone, I'm trying to get to grips with non-standard persistent attributes in Core Data. I've read through the docs I can find (http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/Articles/cdNSAttributes.html ) but I'm sti

Subviews of a borderless window - autoresizing mask does not work for me

2008-04-02 Thread Hendrik Holtmann
Hi, I am creating a borderless window in source like this: containerWindow = [[[ContainerWindow alloc] initWithContentRect:NSMakeRect (rect.origin.x,rect.origin.y-22-34,387,34) styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO] retain]; Then I add a custom view (c

Re: Problem with Grouping the rotated object.

2008-04-02 Thread Jens Alfke
That's not enough code to go on — it's not showing all the drawing. Are you remembering to restore the saved graphics state after you finish drawing an object? Also, if you could paste in the code without the extra blank lines, it would make it more readable. —Jens smime.p7s Description:

Re: Accessing a windows share

2008-04-02 Thread Jens Alfke
On 1 Apr '08, at 10:59 PM, Valentin Dan wrote: How can I access (from Cocoa, Objective-C code) a path like : \ \192.1.1.1\c$\SomeDir\AnotherOne\SomePicture.jpg ? Well, you know the IP address of the server, and the path in its filesystem. That's a start. The key question is: what protocol?

Re: NSWindow z-depth

2008-04-02 Thread Jens Alfke
On 1 Apr '08, at 11:16 PM, Mike R. Manzano wrote: Is there a way to get a window's z-depth in relation to my app's other windows? NSWindowList Gets information about onscreen windows. void NSWindowList ( NSInteger size, NSInteger list[] ); Discussion Provides an ordered list of all on

Re: activate my application while dragging on other application window

2008-04-02 Thread Jens Alfke
On 2 Apr '08, at 3:02 AM, Apparao Mulpuri wrote: Is there any undocumented apis available to achieve this? If there were, we wouldn't be allowed to talk about them on this list. Maybe you can describe in more detail what you want to do, and we can offer some advice. But keep in mind that t

Re: prefPane with background process

2008-04-02 Thread Jens Alfke
On 2 Apr '08, at 5:20 AM, Yogesh Potdar wrote: How to make the service offered by myapp.prefPane continue even after quitting system preferences? Is there any way by which I can run service offered by myapp.prefPane in background? You'll need to create a separate executable that runs as an

Re: Need for a creator code?

2008-04-02 Thread Uli Kusterer
On 01.04.2008, at 21:59, Marc Respass wrote: I haven't registered for a creator code since System 7.5. Apple has information and registration page (http://developer.apple.com/datatype/index.html ) about it but no indication if it's actually still required. Can anyone tell me if it is still re

Re: Bindings for NSComboBox? [SOLVED]

2008-04-02 Thread David Springer
All, I figured it out: you need to have a separate controller (or provider object) that handles the binding to the NSComboBox's value. In my case, I bind NSComboBox's value to my object's currentTemplatePath key, then implement the code to add to my source array in -setCurrentTemplatePath:(NSStri

Re: Subviews of a borderless window - autoresizing mask does not work for me

2008-04-02 Thread Nate Weaver
You probably want to use NSViewMaxYMargin instead of NSViewMinYMargin (NSViewMinYMargin is the bottom margin of the content view and not the top). On Apr 2, 2008, at 9:35 AM, Hendrik Holtmann wrote: Hi, I am creating a borderless window in source like this: containerWindow = [[[ContainerWi

Re: prefPane with background process

2008-04-02 Thread Trygve Inda
> Hi, > > I want to create a service which can be launched from the system > preferences, do some config setting and continue working even if the system > preferences application is closed. > To achieve this, I have created a myapp.prefPane which is of type BUNDLE and > installed this in the ~/Lib

Re: Problem with Grouping the rotated object.

2008-04-02 Thread Quincey Morris
On Apr 2, 2008, at 04:00, Ghufran Ahamad wrote: NSAffineTransform* xform = [NSAffineTransform transform]; [currentContext saveGraphicsState]; [NSBezierPath clipRect:drawingBounds]; NSPoint center = NSMakePoint(NSMidX(stRect), NSMidY(stRect)); [xform translateXBy:center.x yBy:center.y]; [xf

Re: Subviews of a borderless window - autoresizing mask does not work for me

2008-04-02 Thread Cathy Shive
Hi Hendrik, It seems that you're using the correct mask. The documentation states that NSViewMinYMargin would make the bottom margin flexible, which is what you want. I notice that you originally set the frame for the subview at (0, 0). Is this because the subview is originally the same

Re: How to store NSRect as Core Data attribute?

2008-04-02 Thread Ben Lachman
I think the easiest way to encode/decode NSRects for storage is NSStringFromRect() and NSRectFromString(). Then you can just implement a custom accessor for the property that converts in the direction you need. ->Ben -- Ben Lachman Acacia Tree Software http://acaciatreesoftware.com [EMAI

Re: [NSPipe pipe] returning nil (running out of filehandles?)

2008-04-02 Thread John Stiles
Jens Alfke wrote: Also, you're aware that MD5 shouldn't be used for anything security-related anymore? Last I heard it's pretty close to being fully broken. SHA-1 is a lot more secure, and has a larger output which itself makes collisions less likely. "Fully broken"? I don't know about tha

Re: [NSPipe pipe] returning nil (running out of filehandles?)

2008-04-02 Thread John Stiles
John Stiles wrote: Jens Alfke wrote: Also, you're aware that MD5 shouldn't be used for anything security-related anymore? Last I heard it's pretty close to being fully broken. SHA-1 is a lot more secure, and has a larger output which itself makes collisions less likely. "Fully broken"? I

Re: [NSPipe pipe] returning nil (running out of filehandles?)

2008-04-02 Thread Michael Ash
On Wed, Apr 2, 2008 at 12:19 PM, John Stiles <[EMAIL PROTECTED]> wrote: > I take it all back; in 2007 there was an MD5 attack discovered which > actually allows for completely different binaries that sign the same. Check > Wikipedia for the details, but basically MD5 is totally broken now. Wow, >

IPhone Mac developer

2008-04-02 Thread Armand Daniels
Mac Application Developer Small startup is looking for an exceptional engineer to work on state-of-the art communication technology for Mac OS X for iPhone. Working on a suite of elegant, powerful applications, you will have the opportunity to have a major impact on the design and implementation

Re: Subviews of a borderless window - autoresizing mask does not work for me

2008-04-02 Thread Nate Weaver
Whoops, this jogged my memory. For some reason in my last response I thought -setAutoresizingMask specified the pinned margin and not the expanding margin. I'm not sure why... On Apr 2, 2008, at 11:13 AM, Cathy Shive wrote: Hi Hendrik, It seems that you're using the correct mask. The docum

Alert merely beeping, not displaying

2008-04-02 Thread Randall Meadows
- (BOOL)burnProgressPanel:(DRBurnProgressPanel *)theBurnPanel burnDidFinish:(DRBurn *)burn { [theBurnPanel orderOut:self]; NSAlert *reminder = [NSAlert alertWithMessageText:msg defaultButton:@"OK" alternateButton:nil otherButton:nil informativeTextWithForma

Re: Need for a creator code?

2008-04-02 Thread Ali Ozer
Totally agreed that seeing extensions on file names is unfortunate. But as long as applications are properly setting/using the hidden extension bit (and many do), most of the time users should not see extensions on any of their files, except the ones where they want to (for instance, deve

Re: Subviews of a borderless window - autoresizing mask does not work for me

2008-04-02 Thread Cathy Shive
The names of the margin-related masks are confusing for sure, I always have to look it up because when I think about the names of the masks and then think about the "springs and struts" UI in Interface Builder, I always reverse them, too. On Apr 2, 2008, at 6:38 PM, Nate Weaver wrote: Whoo

Re: [NSPipe pipe] returning nil (running out of filehandles?)

2008-04-02 Thread Alastair Houghton
On 2 Apr 2008, at 17:19, John Stiles wrote: I take it all back; in 2007 there was an MD5 attack discovered which actually allows for completely different binaries that sign the same. Check Wikipedia for the details, but basically MD5 is totally broken now. Wow, times change!! Actually I

Re: [NSPipe pipe] returning nil (running out of filehandles?)

2008-04-02 Thread John Stiles
Alastair Houghton wrote: On 2 Apr 2008, at 17:19, John Stiles wrote: I take it all back; in 2007 there was an MD5 attack discovered which actually allows for completely different binaries that sign the same. Check Wikipedia for the details, but basically MD5 is totally broken now. Wow, times

Re: How to store NSRect as Core Data attribute?

2008-04-02 Thread Thomas Engelmeier
On 02.04.2008, at 18:12, Ben Lachman wrote: I think the easiest way to encode/decode NSRects for storage is NSStringFromRect() and NSRectFromString(). Then you can just implement a custom accessor for the property that converts in the direction you need. That potentially means opening Pa

Re: Southern California Coders?

2008-04-02 Thread Boyd Collier
I 'm also interested in knowing if there's a San Diego area group. Boyd On Apr 1, 2008, at 4:46 PM, James Merkel wrote: On Tue, 1 Apr 2008 15:23:40, Casey Becking wrote: Sorry to take any ones time if this has been discussed before. I was curious if there was any group meeting for Souther

Question about NSOutlineView and NSTreeController

2008-04-02 Thread Jeff LaMarche
I posted a question yesterday, and some of the responses were very helpful (thanks, by the way), but also showed me I didn't fully understand what I needed to ask. After several more hours of exploration last night, I think I have a grasp on my real question. My problem comes down to this (

Ordering all day events via CalCalendarStore API

2008-04-02 Thread Brad Willoughby
Is it possible to define the ordering in iCal of all day events created via the CalCalendarStore API? I'm looping through a list of sorted items that I would like to appear in the same order in iCal. However, it looks like iCal does not honor the item creation order and I don't see any API

CoreData NSTextView changes: not noticed with KVO, not accessible from program, but stored anyway

2008-04-02 Thread Theo Vosse
Hi, I have an NSTextField that has a "data" binding to an NSObjectController, configured for an Entity, in a CoreData app (freshly created in XCode under Tiger). When I edit the text field and save the file, all changes are stored. But when I try to get the contents in my program, I only

Re: Bindings for NSComboBox?

2008-04-02 Thread Adam Gerson
You could set up a delegate for the combo box and implement controlTextDidEndEditing. Then programatically add the value to your array controller: NSManagedObjectContext * context = [[NSApp delegate] managedObjectContext]; NSManagedObject *yourObject = [NSEntityDescription insertNewObjectForEntity

Re: How to store NSRect as Core Data attribute?

2008-04-02 Thread Uli Kusterer
On 02.04.2008, at 18:58, Thomas Engelmeier wrote: That potentially means opening Pandoras can to localisation issues. Any time you go that route, be sure to check that code with switching decimal separators. Potentially? Maybe. But I just tried it, and for me NSStringFromRect() never use

Re: prefPane with background process

2008-04-02 Thread Jens Alfke
On 2 Apr '08, at 8:36 AM, Trygve Inda wrote: To make sure the worker app does not show up in the dock add this to its info.plist: NSUIElement 1 It's actually LSUIElement. Whether this key is appropriate depends on what the service does. If it has a user interface (uses AppKit) but just do

Re: Alternating Button

2008-04-02 Thread douglas a. welton
Gerriet, Check out the documentation on User Interface Validation: This should get you going in the right direction. Alternately, you can listen for the NSWindowDidUpdateNotification and ma

Can't add new file extension to app's document types

2008-04-02 Thread Rick Mann
Hi. I've already reported a bug for this reproducible problem, but I'm hoping someone can suggest a workaround. I created a Core Data document app from Xcode stationery. I then added a second file type to the target properties inspector so that it would open ".gpx" files. However, if I choo

Re: NSTableView selectionShouldChangeInTableView: bug?

2008-04-02 Thread Jaime Rios
Hi, This is an old message and I'm disappointed to see that no one has replied to it. I'm working on a bug that only appears in Mac OS 10.3.x whereby my NSTableView does not receive the tableViewSelectionDidChange message until I click the Window. The chain of events that cause this problem is as f

Re: Problem with Grouping the rotated object.

2008-04-02 Thread Gregory Weston
Quincey Morris wrote: On Apr 2, 2008, at 04:00, Ghufran Ahamad wrote: [xform translateXBy:center.x yBy:center.y]; [xform rotateByDegrees:[curGraphic GetAngle]]; [xform translateXBy:-center.x yBy:-center.y]; This looks kind of wrong. Mathematically, wouldn't you want: [xform translate

Re: Need for a creator code?

2008-04-02 Thread Ken Thomases
On Apr 2, 2008, at 6:46 AM, Jean-Daniel Dupas wrote: Le 2 avr. 08 à 12:52, Keith Duncan a écrit : Oh. Looks like I'm off the hook. The UTI, I expect, is the bundle identifier, no? I don't think anyone actually answered this question for you. Basically no, your bundle identifier is a URI.

Re: CAOpenGLLayer

2008-04-02 Thread Stefan Hafeneger
Hi John, I now setup the environment in copyCGLContextForPixelFormat. The folling code seemd to work fine. Do you see anything that would create a crash or is this okay? The code should work if the view moves from one screen to another, shouldn't it? [CODE] - (CGLPixelFormatObj)copyCGLPix

Re: Problem with Grouping the rotated object

2008-04-02 Thread Gordon Apple
Let me explain how we are handling grouped objects. We have only one basic type of draw object with a dictionary of characteristics. That gives a lot of flexibility. We do not let objects draw themselves. Instead, we use a separate rendering object. This results in a clean object data model.

Re: Need for a creator code?

2008-04-02 Thread Jean-Daniel Dupas
Le 2 avr. 08 à 20:56, Ken Thomases a écrit : On Apr 2, 2008, at 6:46 AM, Jean-Daniel Dupas wrote: Le 2 avr. 08 à 12:52, Keith Duncan a écrit : Oh. Looks like I'm off the hook. The UTI, I expect, is the bundle identifier, no? I don't think anyone actually answered this question for you.

Re: CAOpenGLLayer

2008-04-02 Thread John Harper
Hi, yes, that seems like a good solution, John On Apr 2, 2008, at 12:23 PM, Stefan Hafeneger wrote: Hi John, I now setup the environment in copyCGLContextForPixelFormat. The folling code seemd to work fine. Do you see anything that would create a crash or is this okay? The code s

Re: CAOpenGLLayer

2008-04-02 Thread Stefan Hafeneger
Okay thank you. With best wishes, Stefan Am 02.04.2008 um 22:19 schrieb John Harper: Hi, yes, that seems like a good solution, John On Apr 2, 2008, at 12:23 PM, Stefan Hafeneger wrote: Hi John, I now setup the environment in copyCGLContextForPixelFormat. The folling code seemd

NSArrayController and NSUserDefaultsController values not saving...

2008-04-02 Thread Samuel Williams
Hi, I have an app I am working on which will eventually be released open source available from http://svn.oriontransfer.org/Applications/GPSTool That program has a menu item under preferences which shows a window. That window has an NSTableView bound to an NSArrayController. This appears

Read jpeg comments from file?

2008-04-02 Thread Trygve Inda
I have a jpeg file which has a comment added as meta data. How can I read this from the file? Thanks, Trygve ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the mode

Re: MD5 [was: [NSPipe pipe] returning nil (running out of filehandles?)]

2008-04-02 Thread Jens Alfke
On 2 Apr '08, at 9:12 AM, John Stiles wrote: And AFAIK nobody is even remotely close to finding a technique which would let you write arbitrary data and then tack on a few bytes to get the signature you want, From the Wikipedia article: Because MD5 makes only one pass over the data, if two

Re: NSManagedObject data only shows up in view sometimes

2008-04-02 Thread Adam Gerson
and the answer is... I followed a nice article on how to conditionally repress disclosure triangles for non leaf nodes. T http://blog.petecallaway.net/?p=15 This part works. The parent node was not expanded so I couldn't see the children. What is strange is this only happens sometimes. I have a

Name of NSTableView

2008-04-02 Thread Mr. Gecko
How would I get the name of a table view? I am trying to make all of my tables use one class for the data source so I can make my code more smaller. I know I can use autosave name but I am not sure if I am suppose to use that or what it does. Here is what I have tried already [tableView nam

Re: Name of NSTableView

2008-04-02 Thread John Stiles
What do you mean by the "name"? You could make one class that has all of the common code, and then subclass it for each table instance. That's a pretty common technique. Mr. Gecko wrote: How would I get the name of a table view? I am trying to make all of my tables use one class for the data

GCDrawKit programmatically create object

2008-04-02 Thread James Maxwell
I'm just wondering whether anyone here uses the GCDrawKit framework? I've been getting used to how it does things over the past few days, but there's something I really can't figure out how to do. I want to make an object on a layer programmatically - say, a rect that loads automatically wi

Re: GCDrawKit programmatically create object

2008-04-02 Thread James Maxwell
Duh, woops... sorry... found it: + (GCDrawableShape*)drawableShapeWithPath:(NSBezierPath*) path; cheers, J. On 2-Apr-08, at 2:20 PM, James Maxwell wrote: I'm just wondering whether anyone here uses the GCDrawKit framework? I've been getting used to how it does things over the

unhandled property type encoding

2008-04-02 Thread Stefan Hafeneger
Hi, I've made a subclass of CALayer (actually CAOpenGLLayer) and defined a struct property. In the init method the [super init] call produces a runtime message unhandled property type encoding: `{_SHVector="x"f"y"f"z"f}' The app doesn't crash, but I don't find a solution to avoid this me

Re: Name of NSTableView

2008-04-02 Thread Mr. Gecko
What do you mean by the "name"? in the identity tab of Interface builder You could make one class that has all of the common code, and then subclass it for each table instance. That's a pretty common technique. I did that before but I can't do shouldSelectRow with that which I need for fillin

Re: Name of NSTableView

2008-04-02 Thread John Stiles
Your delegate and data source can be the same object if you want. Nothing prevents it. Mr. Gecko wrote: What do you mean by the "name"? in the identity tab of Interface builder You could make one class that has all of the common code, and then subclass it for each table instance. That's a pr

Re: Name of NSTableView

2008-04-02 Thread Jens Alfke
On 2 Apr '08, at 2:52 PM, Mr. Gecko wrote: How would I get the name of a table view? I am trying to make all of my tables use one class for the data source so I can make my code more smaller. Why does your code need to be smaller? How big is it? This sounds like something that would real

Re: Name of NSTableView

2008-04-02 Thread Andy Lee
Here's what it _sounds_ like you're trying to do. Let me know if I've misunderstood: * You have multiple table views. * The data source logic for all of them is essentially the same. * You are trying to have one _instance_ of your data source class be the data source for all of your table

NSAssert and Unused Variable

2008-04-02 Thread Richard Somers
I use a function which returns an error code. The error variable is used in a NSAssert. int error = foo(); NSAssert(error == 0, @"We have an assertion failure!"); The NSAssert complies out in the release configuration by using the preprocessor macro NS_BLOCK_ASSERTIONS. This results

Re: NSAssert and Unused Variable

2008-04-02 Thread John Newlin
It seems that even in release builds you should be checking the error code, otherwise foo() should just return void since you assume it can't fail in release builds, and instead foo() should have the assert internally. -john On Wednesday, April 02, 2008, at 05:04PM, "Richard Somers" <[EMAIL P

Re: NSAssert and Unused Variable

2008-04-02 Thread Jens Alfke
On 2 Apr '08, at 5:03 PM, Richard Somers wrote: The NSAssert complies out in the release configuration by using the preprocessor macro NS_BLOCK_ASSERTIONS. This results in a warning: unused variable "error". Do most programmers turn off the unused variable warnings or do something else to

Re: Subviews of a borderless window - autoresizing mask does not work for me

2008-04-02 Thread Rob Keniger
On 03/04/2008, at 2:47 AM, Cathy Shive wrote: The names of the margin-related masks are confusing for sure, I always have to look it up because when I think about the names of the masks and then think about the "springs and struts" UI in Interface Builder, I always reverse them, too. I h

Re: Name of NSTableView

2008-04-02 Thread Adam Gerson
All good ideas from Andy. I sometimes get arround this issue by using the "tag" in IB. It has to be an int so I define #define TABLE1 1 #define TABLE2 2 #define TABLE3 3 Then you can get a reference to your table with if ([tableView tag] == TABLE3) { //code } On Wed, Apr 2, 2008 at 6:07 PM, Je

About the Primary Button problems in Cocoa Mouse Event Handling

2008-04-02 Thread Celery01 Lin
HI , all! I have a question about how can we detect the primary button . Cocoa Mouse Event handling gives us NSEvent . Though type of the NSEvent ,we can know which mouse button is down, up or dragged ,and then We can do something according to Leftmouse down or rightmouse down . But if the user cha

Re: NSAssert and Unused Variable

2008-04-02 Thread Chris Suter
On 03/04/2008, at 11:30 AM, Jens Alfke wrote: I seem to recall a pragma or macro that can be used to tell the compiler "I know this variable is unused, don't complain about it", though I don't remember the details... Apple gcc only: #pragma unused (var) or _Pragma("unused(var)") The im

DataSource for NSTableView with ButtonCell

2008-04-02 Thread Thomas Bartelmess
Hello List, i've created a NSTableview with Interface Builder. In one of my Collums is a NSButton. I've no idea how to set up the DataSource for this. Can anyone help me? Thanks a lot Thomas Bartelmess [EMAIL PROTECTED] Lesen Sie Ihre E-Mails auf dem Handy. www.yahoo.de/go _

Auto-resizing column based on the data inside it?

2008-04-02 Thread Rob Petrovec
Hey, I have an NSScrollView with an NSTableView embedded inside it. The NSTableView is bound to a custom NSArrayController as its data source and delegate. The NSTableView only has one column that shows a string of text (NSTextFieldCell) in each row. The problem is that when the text ge

Re: Making a window fit its contents?

2008-04-02 Thread Jack Repenning
On Mar 31, 2008, at 1:33 AM, Nick Toumpelis wrote: the most effective way to do this is by using Jerry Krinock's NS(Attributed)String+Geometrics categories [1]. Using this, you can determine the height or width of your text and size your window (and NSTextField) appropriately. [1] http:/

RE: DataSource for NSTableView with ButtonCell

2008-04-02 Thread Gary L. Wade
Try having your NSTableView delegate's method return an NSNumber; that's what I did for the NSSliderCell column in my NSTableView. >Hello List, > >i've created a NSTableview with Interface Builder. In one of my Collums is a >NSButton. I've no idea how to set up the DataSource for this. > >Can an

Re: DataSource for NSTableView with ButtonCell

2008-04-02 Thread Randall Meadows
On Apr 2, 2008, at 12:35 AM, Thomas Bartelmess wrote: i've created a NSTableview with Interface Builder. In one of my Collums is a NSButton. I've no idea how to set up the DataSource for this. An NSButton as in a checkbox? I've just recently coded 2 tables with this, so I might be able to

Re: About the Primary Button problems in Cocoa Mouse Event Handling

2008-04-02 Thread Ron Fleckner
On 03/04/2008, at 11:45 AM, Celery01 Lin wrote: HI , all! I have a question about how can we detect the primary button . Cocoa Mouse Event handling gives us NSEvent . Though type of the NSEvent ,we can know which mouse button is down, up or dragged ,and then We can do something according to Left

duplicate symbol error

2008-04-02 Thread Daniel Child
I had an application that built fine on Tiger using Xcode 2.4.1. When I try building on Leopard, I get a duplicate symbol error as follows: ld: duplicate symbol _evLanguageAsString in /Users/.../build/.../Debug/LSC Data Preparation.build/Objects-normal/ ppc/DataDescription.o and /Users/.../bu

Re: Name of NSTableView

2008-04-02 Thread Jonathan Hess
Sometimes using 'tag' in this manner is appropriate, but in most cases, its more descriptive to have an IBOutlet. That way you can say: if (tableView == courseListTableView) { } else if (tableView == studentListTableView) { } Jon Hess On Apr 2, 2008, at 5:41 PM, Adam Gerson wrote: All good

Re: duplicate symbol error

2008-04-02 Thread stephen joseph butler
On Wed, Apr 2, 2008 at 11:32 PM, Daniel Child <[EMAIL PROTECTED]> wrote: > ld: duplicate symbol _evLanguageAsString in > /Users/.../build/.../Debug/LSC Data > Preparation.build/Objects-normal/ppc/DataDescription.o > and > /Users/.../build/.../Debug/LSC Data > Preparation.build/Objects-normal/ppc/S

Re: Southern California Coders?

2008-04-02 Thread Scott Ellsworth
On Wed, Apr 2, 2008 at 10:01 AM, Boyd Collier <[EMAIL PROTECTED]> wrote: > I 'm also interested in knowing if there's a San Diego area group. At one point, a fair number of San Diego folks drove up for the Lake Forest meetings. The drive got to them about a year ago, and I have not heard whether

Re: Auto-resizing column based on the data inside it?

2008-04-02 Thread Jens Alfke
On 2 Apr '08, at 7:05 PM, Rob Petrovec wrote: Anyone have an idea on how to set it up so that the column will auto- resize itself based on the text inside it? As far as I know you have to do it yourself. You need to get the columns' data cell, set its value to each row's object in turn (i.e

Re: Southern California Coders?

2008-04-02 Thread James Merkel
Yeah, gas at ~ $4 per gallon, makes the drive from San Diego to Lake Forest kind of a luxury. Jim Merkel On Apr 2, 2008, at 9:55 PM, Scott Ellsworth wrote: On Wed, Apr 2, 2008 at 10:01 AM, Boyd Collier <[EMAIL PROTECTED]> wrote: I 'm also interested in knowing if there's a San Diego area gr

Re: duplicate symbol error

2008-04-02 Thread Jens Alfke
On 2 Apr '08, at 9:32 PM, Daniel Child wrote: I have no idea why this is happening, especially since there is no evLanguageAsString in either DataDescription.h or .m. I agree with Stephen — make sure you didn't forget the "extern" in the variable's declaration in the header. There is one

Re: GCDrawKit programmatically create object

2008-04-02 Thread Graham Cox
Looks like you found it. I would suggest this isn't really a good list to ask drawkit questions on - DK has its own mailing list http://lists.apptree.net/listinfo.cgi/drawkit-apptree.net or you can mail me directly as you have been - very happy to help you out. General note - EVERYTHING i

Resorting normal field editor behaviour

2008-04-02 Thread K . Darcy Otto
I need to intercept changes in my NSTableView's field editor, and I am able to do this successfully implementing controlTextDidChange: in my controller. I do this by having my controller create a field editor (fieldEd, an NSTextView) and setting the delegate of that field editor to my cont

1 pixel bordered CALayer renders improperly

2008-04-02 Thread Martin
Hi, It seems that a CALayer with a borderWidth of 1.0 renders improperly: all the border's pixels are good except the very top right pixel which has a different colour. Example: http://img34.picoodle.com/img/img34/4/4/2/f_CALayerm_6e43e20.png Is this a know bug? Is there a workaround? Tha

Re: scrollRangeToVisible from within mouseDown causing crash?

2008-04-02 Thread Ben Lachman
To reply to my own post. The problem lay in two things: 1) I had a bug in my selection constraining code that in a few odd places subtract a larger number from a smaller number when creating a range, thus creating a range with a really really big length--close to UINT_MAX. When you then t