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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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: 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

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];

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

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

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

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

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

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,

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:

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: 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

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

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

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

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: keyNSUIElement/key string1/string It's actually LSUIElement. Whether this key is appropriate depends on what the service does. If it has a user interface

Re: Alternating Button

2008-04-02 Thread douglas a. welton
Gerriet, Check out the documentation on User Interface Validation: http://developer.apple.com/documentation/Cocoa/Conceptual/UIValidation/UIValidation.html This should get you going in the right direction. Alternately, you can listen for the NSWindowDidUpdateNotification and

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

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

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: 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 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

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

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

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

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

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=xfyfzf}' The app doesn't crash, but I don't find a solution to avoid this

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 filling

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

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

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

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: 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

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

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]

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 anyone

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

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

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

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

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

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

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