Re: Desktop window eating clicks

2009-05-13 Thread slasktrattena...@gmail.com
Oops, sorry. Didn't see your reply to self. 2009/5/13 Trygve Inda : >> imageView = [[NSImageView alloc] initWithFrame:NSMakeRect(0, 0, >> dispBounds.size.width, dispBounds.size.height)]; >> >> [imageView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable]; >> >> window = [[NSWindow alloc

How to limit the file type when dragging?

2009-05-13 Thread Bright
Hi all Now, I want to drag and drop sound files(such as mp3) into a tableview to implement the sound-files' playing. But how limit the file type to sound file only available when drag and drop files into tableview? my code is : - (BOOL)tableView:(NSTableView*)tv acceptDrop:(id )info r

Win->MacOS porting question.

2009-05-13 Thread Тимофей Даньшин
Hello. I am about to get involved in a project on porting a windows program into MacOS. The original program is written in C++ with limited use of windows-specific libraries, and its owner wants the code that will result from that project to be compilable both under Windows and MacOS (and,

Re: Win->MacOS porting question.

2009-05-13 Thread Filip van der Meeren
I would go for a portable model, and something like a builder pattern for the view... Just create a new concrete class for each new platform... Mvg, Filip van der Meeren fi...@code2develop.com http://sourceforge.net/projects/xlinterpreter *** Send from my IPhone *** On 13-mei-09, at 09:01,

Questions about the xib file downgrade from Leopard to Tiger

2009-05-13 Thread Celery01 Lin
Hi , List, I‘m doing some work of downgrading the existing Leopard GUI to Tiger GUI. We are using a lot of Bindings and NSCollectionView ,NSCollectionViewItem in the current xib.I want to reuse the current the xib in the Tiger version , cause we use binding to control a lot of UI elements depende

Re: Resolution Independent View?

2009-05-13 Thread Gerriet M. Denkmann
On 12 May 2009, at 16:33, Alastair Houghton > wrote: If, however, you really want the display to physically show a 5cm x 5cm block, you can obtain the screen's actual dimensions in millimeters from CGDisplayScreenSize() and then use those numbers in conjunction with the pixel dimensions to calc

Centering a window ... not in the usual way!

2009-05-13 Thread Mic Pringle
Hi, I'm working on an application that when first started you are presented with a small window showing a number of options. When any of these options are chosen, the window fades out the contentView whilst at the same time replacing it with and fading in the new view. The window also resizes to

Re: Centering a window ... not in the usual way!

2009-05-13 Thread Trygve Inda
> Hi, > > I'm working on an application that when first started you are > presented with a small window showing a number of options. When any of > these options are chosen, the window fades out the contentView whilst > at the same time replacing it with and fading in the new view. The > window al

Re: Resolution Independent View?

2009-05-13 Thread Chunk 1978
i suppose i could still try to do what i'm attempting by being slightly larger, but were your results on different screens drastically different in most cases? On Wed, May 13, 2009 at 4:12 AM, Gerriet M. Denkmann wrote: > > On 12 May 2009, at 16:33, Alastair Houghton > wrote: >> >> If, however,

Re: Centering a window ... not in the usual way!

2009-05-13 Thread Mic Pringle
Hi Trygve, I had not thought of that. Does setting the alpha to 0 hide apply it to the entire window then and not just the contentView ? Thanks -Mic 2009/5/13 Trygve Inda : >> Hi, >> >> I'm working on an application that when first started you are >> presented with a small window showing a numb

Re: Win->MacOS porting question.

2009-05-13 Thread Kari Valkama
Hi Filip, I am also interested in porting a Win app to Mac. It is a C# .Net app. Could you please be more specific. What do you mean with portable model and builder pattern for view and new concrete class for each platform. That sounds like developing a new program, not porting an old one.

Re: Win->MacOS porting question.

2009-05-13 Thread Filip van der Meeren
The Builder Pattern (http://en.wikipedia.org/wiki/Builder_pattern) is a simple design pattern that enables you to write programs without knowing in advance what classes you will be using. All you will do is program against an interface. But porting C# to mac actually means rewriting all C#

Re: Centering a window ... not in the usual way!

2009-05-13 Thread Michael Ash
On Wed, May 13, 2009 at 4:20 AM, Mic Pringle wrote: > Hi, > > I'm working on an application that when first started you are > presented with a small window showing a number of options. When any of > these options are chosen, the window fades out the contentView whilst > at the same time replacing

Re: Questions about the xib file downgrade from Leopard to Tiger

2009-05-13 Thread Michael Ash
2009/5/13 Celery01 Lin : > Hi , List, > > I‘m doing some work of downgrading the existing Leopard GUI to Tiger GUI. > > We are using a lot of Bindings and NSCollectionView ,NSCollectionViewItem in > the current xib.I want to reuse the current the xib in the Tiger version , > cause we use binding to

Re: How to know CD Driver type

2009-05-13 Thread Citizen
On 12 May 2009, at 23:03, Citizen wrote: On 12 May 2009, at 06:48, Chris Gardner wrote: I do not know how to know CD Driver type, which can read CD or can read DVD. I want to know the CD Driver whether can read CD disc or DVD disc. Though I have used DRDevice, I can not get information abo

Wrong selection Index

2009-05-13 Thread Kiran Kumar S
I had a table with 3 columns(col1, col2, col3(buttonCell)) in which col1 and col2 columns are binded to an Array Controller .Col3 is button cell which is targeted to an action method. When changed selection by clicking the button , in the button cell target method if i ask for selection

Re: Resolution Independent View?

2009-05-13 Thread Alastair Houghton
On 12 May 2009, at 19:18, Michael Ash wrote: Even if they were complaint (which I doubt) you'll still fail in situations like using a projector, running over VNC, etc. It would be nice if there were some easy way to do this, but it's not likely Well in the case of projectors, there's no pa

Updating NSTableView

2009-05-13 Thread Sourabh Sahu
Hi Everyone, I want to reflect changes in cell of NSTableView without calling reloadData function, any help would be appreciated. Thanks & Regards, Sourabh DISCLAIMER == This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is

Re: Re: Special requirements for the window param of NSAlert beginSheetModalForWindow?

2009-05-13 Thread Dennis Christopher
On this subject, I am having difficulty putting up a second modal sheet (alert) for the same window. I call beginSheetModalForWindow in the didEnd selector of the first alert, if you follow my meaning. It seems I get some kind of unexpected behaviour doing this, including the floating alert

Re: Updating NSTableView

2009-05-13 Thread I. Savant
On Wed, May 13, 2009 at 8:15 AM, Sourabh Sahu wrote: > Hi Everyone, > I want to reflect changes in cell of NSTableView without calling reloadData > function, any help would be appreciated. That would be difficult, hacky, and wrong. Why do you feel you need to do this? What are you trying to ac

RE: Updating NSTableView

2009-05-13 Thread Sourabh Sahu
Actually I have big DB, so for a single change it will take lot of time to get reflected that's why I want it to get updated only at selected cell. Sourabh -Original Message- From: I. Savant [mailto:idiotsavant2...@gmail.com] Sent: Wednesday, May 13, 2009 6:49 PM To: Sourabh Sahu Cc: coco

Re: [iPhone] Caching images fetched from a URL?

2009-05-13 Thread Eric E. Dolecki
Thank you everyone I have this working (locally in memory anyway)... I had to tweak the method a little bit... - (UIImage*)imageNamed:(NSString*)imageNamed cache:(BOOL)cache { UIImage* retImage = [staticImageDictionary objectForKey:imageNamed]; if (retImage == nil) { // Since my

Re: Updating NSTableView

2009-05-13 Thread Michael Ash
On Wed, May 13, 2009 at 9:19 AM, I. Savant wrote: > On Wed, May 13, 2009 at 8:15 AM, Sourabh Sahu > wrote: >> Hi Everyone, >> I want to reflect changes in cell of NSTableView without calling reloadData >> function, any help would be appreciated. > >  That would be difficult, hacky, and wrong. Wh

Re: Updating NSTableView

2009-05-13 Thread I. Savant
On Wed, May 13, 2009 at 9:43 AM, Michael Ash wrote: >>  That would be difficult, hacky, and wrong. Why do you feel you need >> to do this? What are you trying to accomplish? > > Actually it's trivial, correct, and documented. From the docs for > frameOfCellAtColumn:row: > > You can use this metho

C++ constructors.

2009-05-13 Thread Тимофей Даньшин
Hi there. Here is a C++ constructor that is said to work on Windows (i.e., the guy who wrote it says it works on Win), but doesn't work on Mac. Is there a way to fix it, except by replacing it with a "copy" method? Cbyte1::Cbyte1 (Cbyte1 &val) { m_size = val.m_size; if (m_s

Re: Updating NSTableView

2009-05-13 Thread Michael Ash
On Wed, May 13, 2009 at 9:51 AM, I. Savant wrote: > On Wed, May 13, 2009 at 9:43 AM, Michael Ash wrote: > >>>  That would be difficult, hacky, and wrong. Why do you feel you need >>> to do this? What are you trying to accomplish? >> >> Actually it's trivial, correct, and documented. From the docs

Re: C++ constructors.

2009-05-13 Thread Luca Ciciriello
in addition to this copy-constructor, had you provided a default constructor? in addition try to using the copy constructor with const parameter has show below. Cbyte1::Cbyte1 (const Cbyte1 &val) { // SOMETHING } Luca. ___

Re: C++ constructors.

2009-05-13 Thread Jesper Storm Bache
Your copy constructor is atypical because the argument is not const (or a non reference). You could change it to be: Cbyte1::Cbyte1 (const Cbyte1 &val) Secondly, it looks like your class is a template. In that case you may either want: template class Cbyte1 { Cbyte1 (const

Re: Centering a window ... not in the usual way!

2009-05-13 Thread Mic Pringle
Because the window grows and is animated as per my original post. If I called [window center] on it after the animation has run there would be a final jerk/snap as it moves position. I need the rect of the centered window so that I can use it as part of the animation. -Mic 2009/5/13 Michael Ash

Displaying Application name

2009-05-13 Thread Arun
Hi How can i get application name like we see in finder from a .app directory? Thanks Arun KA ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-d

RE: Adding records to a child entity

2009-05-13 Thread Jon C. Munson II
Namaste! Well, since no-one has answered this (don't know if more info is needed), let me phrase this a different way. There are two entities, A, and B. A has a to-many relationship with B. For the sake of discussion, I'll call the inverse relationship relA (which is an attribute of entity B).

Re: Displaying Application name

2009-05-13 Thread Adam R. Maxwell
On May 13, 2009, at 7:42 AM, Arun wrote: How can i get application name like we see in finder from a .app directory? Try LSCopyDisplayNameForURL or -[NSFileManager displayNameAtPath:] smime.p7s Description: S/MIME cryptographic signature ___ C

Subclassing breaks bindings?

2009-05-13 Thread Dalzhim Dalzhim
Hi, I have stumbled over this problem and I can't figure it out. When I subclass NSPopUpButton in order to make a custom appearance for the control, I cannot seem to get the bindings working. I have stripped my problem from any additionnal complexity until I was left with this: @interface MySubc

singletons and autoreleased objects

2009-05-13 Thread Karan, Cem (Civ, ARL/CISD)
I have an object that I've turned into a singleton via the techniques described at: http://developer.apple.com/DOCUMENTATION/Cocoa/Conceptual/CocoaFundamentals/CocoaObjects/CocoaObjects.html#//apple_ref/doc/uid/TP40002974-CH4-SW32 This works great, but I've started debugging, and discovered that

Re: Special requirements for the window param of NSAlert

2009-05-13 Thread Greg Guerin
Dennis Christopher wrote: On this subject, I am having difficulty putting up a second modal sheet (alert) for the same window. I call beginSheetModalForWindow in the didEnd selector of the first alert, if you follow my meaning. It seems I get some kind of unexpected behaviour doing this,

Re: Centering a window ... not in the usual way!

2009-05-13 Thread Jean-Daniel Dupas
So, do not animate the view frame, but the window frame and set the target frame origin to your window final position. Le 13 mai 09 à 16:29, Mic Pringle a écrit : Because the window grows and is animated as per my original post. If I called [window center] on it after the animation has run t

Re: NSToolbarItem with custom view in Interface Builder 3 (Leopard)

2009-05-13 Thread Gunnar Proppe
I actually went with the alternative suggestion. One caveat with that is that the pasted plain NSView is invisible in Interface Builder, although it does occupy space in the toolbar editor. The custom subclass of NSView does need to implement the NSCoding protocol, as one would expect for -[NST

Re: Subclassing breaks bindings?

2009-05-13 Thread Alexander Spohr
Don’t use a CustomView, use an NSPopUpButton. atze Am 13.05.2009 um 17:12 schrieb Dalzhim Dalzhim: Hi, I have stumbled over this problem and I can't figure it out. When I subclass NSPopUpButton in order to make a custom appearance for the control, I cannot seem to get the bindin

Re: How to limit the file type when dragging?

2009-05-13 Thread Nick Zitzmann
On May 13, 2009, at 12:59 AM, Bright wrote: But how limit the file type to sound file only available when drag and drop files into tableview? You need to check for that in your validateDrop method, and return YES if the desired file type is detected and NO otherwise. Nick Zitzmann

Re: Subclassing breaks bindings?

2009-05-13 Thread Alexander Spohr
Oh sorry, I missed your cellClass problem in my first post :( Am 13.05.2009 um 17:56 schrieb Alexander Spohr: If I try to add a NSPopUpButton to my nib instead of a custom view, and set it's class to MySubclass, then the bindings work fine, but my override on + (Class) cellClass doesn't see

What header has enum for NSPOSIXErrorDomain?

2009-05-13 Thread Jerry Krinock
When I receive an Apple-generated NSError I can usually find the symbol for its code by clicking in Xcode's menu File > Open Quickly, and opening one of these headers: FoundationErrors.h AppKitErrors.h CoreDataErrors.h and parsing the enum declarations. Where is the enum declaratio

Re: Centering a window ... not in the usual way!

2009-05-13 Thread Trygve Inda
> On Wed, May 13, 2009 at 4:20 AM, Mic Pringle wrote: >> Hi, >> >> I'm working on an application that when first started you are >> presented with a small window showing a number of options. When any of >> these options are chosen, the window fades out the contentView whilst >> at the same time r

Re: Subclassing breaks bindings?

2009-05-13 Thread Dalzhim Dalzhim
Thanks Alexander, you made me realize my NSCell subclass was already instantiated as a NSPopUpButtonCell when I dragged the NSPopUpButton into my nib in Interface Builder. I have changed the NSCell subclass for my own and now I can get both the binding and the custom appearance to work in my simpli

Re: How to limit the file type when dragging?

2009-05-13 Thread Sean McBride
On 5/13/09 9:58 AM, Nick Zitzmann said: >> But how limit the file type to sound file only available when drag >> and drop files into tableview? > > >You need to check for that in your validateDrop method, and return YES >if the desired file type is detected and NO otherwise. And you can check th

Re: What header has enum for NSPOSIXErrorDomain?

2009-05-13 Thread Nick Zitzmann
On May 13, 2009, at 10:20 AM, Jerry Krinock wrote: Where is the enum declaration for NSPOSIXErrorDomain? NSError.h, and it's not an enum. Command-double-clicking on a declaration will take you to its header in Xcode. Nick Zitzmann ___

Re: [iPhone] Caching images fetched from a URL?

2009-05-13 Thread Alex Kac
To fix the stutter, use a blank image for when the image doesn't exist - do the NSData dataWithContentsOfURL in another thread so that when it finishes it posts a notification which then the cell will listen to and refresh with the data cached. Its a bit more involved and you have to do of

Cocoaheads Lake Forest (92630) meeting 5/13/2009 (tonight!) at 7 pm on "SymbicLogKit - a UI-centric logging/tracing framework"

2009-05-13 Thread Scott Ellsworth
Meeting tonight! CocoaHeads Lake Forest will be meeting on the second Wednesday of the month. We will be meeting at our usual location, Orange County Public Library (El Toro) community room, 24672 Raymond Way, Lake Forest, CA 92630 Please join us from 7pm to 9pm on Wednesday, 5/13 Paul Agron wi

Re: [iPhone] Caching images fetched from a URL?

2009-05-13 Thread Luke the Hiesterman
Be aware that you may run into memory issues if you cache too many images in memory. You should be able to respond to this situation by using UIViewController's didReceiveMemoryWarning method and releasing some of those images. Luke On May 13, 2009, at 6:23 AM, Eric E. Dolecki wrote: Than

Re: C++ constructors.

2009-05-13 Thread Alastair Houghton
On 13 May 2009, at 15:16, Тимофей Даньшин wrote: Hi there. Here is a C++ constructor that is said to work on Windows (i.e., the guy who wrote it says it works on Win), but doesn't work on Mac. Is there a way to fix it, except by replacing it with a "copy" method? Cbyte1::Cbyte1 (Cbyte1 &v

Re: Win->MacOS porting question.

2009-05-13 Thread Frederik Slijkerman
Hi Kari, MVC is an reasonable abstraction to use, but bear in mind that you will probably want to make part of the controller and view code portable / cross-platform as well, otherwise you'll still end up coding the same things twice. In other words, you need to look carefully at the program

Re: What header has enum for NSPOSIXErrorDomain?

2009-05-13 Thread Sean McBride
On 5/13/09 9:20 AM, Jerry Krinock said: >When I receive an Apple-generated NSError I can usually find the >symbol for its code by clicking in Xcode's menu File > Open Quickly, >and opening one of these headers: > >FoundationErrors.h >AppKitErrors.h >CoreDataErrors.h > >and parsing the

Re: What header has enum for NSPOSIXErrorDomain?

2009-05-13 Thread Herb Petschauer
2009/5/13 Jerry Krinock : > and parsing the enum declarations.  Where is the enum declaration for > NSPOSIXErrorDomain? > mdfind NSPOSIXErrorDomain | grep framework ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin request

Re: [iPhone] Caching images fetched from a URL?

2009-05-13 Thread Eric E. Dolecki
I have zero experience with threads, and while that does sound good, I don't know how to do that yet. Eric On Wed, May 13, 2009 at 1:06 PM, Alex Kac wrote: > To fix the stutter, use a blank image for when the image doesn't exist - > do the NSData dataWithContentsOfURL in another thread so that

Re: What header has enum for NSPOSIXErrorDomain?

2009-05-13 Thread Jerry Krinock
On 2009 May 13, at 10:29, Sean McBride wrote: Are you looking for 'errno.h'? Not exactly, but I was looking for the following fact which I just deduced with the help of your clue: "The codes in NSPOSIXErrorDomain are mapped from the errno global constant." In other words, when you rec

Re: Changing name of newly created NSDocument (instead of 'Untitled i')

2009-05-13 Thread Sean McBride
On 5/12/09 6:30 PM, Jerry Krinock said: >> My doc-based application is able to import foreign file formats. I do >> this by creating a new instance of my NSPersistentDocument subclass >> and >> populate it as needed. >> >> Works fine, but results in a document named "Untitled i". Is there a >> w

Re: [iPhone] Caching images fetched from a URL?

2009-05-13 Thread Bradley S. O'Hearne
Take heart, Eric. Threads aren't all that bad -- coding is simple, hardest part is debugging (should your code executing in the new thread is doing something unadvisable), but if you keep it simple, it should be fairly straightforward. Good luck, Brad On May 13, 2009, at 10:36 AM, Eric E.

Re: Breaking underlining on descenders

2009-05-13 Thread Benjamin Stiglitz
> When standard text lays out with underlining, the underline is > interrupted around descenders, which is nice. Unfortunately my > underlining code doesn't do this, and I can't see a simple way or layout > manager delegate method I could use to figure out where the breaks should > go. Is the

Re: Centering a window ... not in the usual way!

2009-05-13 Thread Benjamin Stiglitz
> I am not sure of Mic's intent, but [window center] is only useful for the > main screen. If you need per-screen windows, I am not sure how to have the > OS do it. Given a few different resolutions though, it should not be hard to > deduce the OS positioning algorithm. For what it's worth: the ce

Re: [iPhone] Caching images fetched from a URL?

2009-05-13 Thread Eric E. Dolecki
I've just printed out the API docs on NSThread and need to start reading up on it. I assume that's the API I'd want to use. Now, does each image fetch need to be it's own thread (I'm thinking yes). Is there a limit to how many can be going at once? Is the iPhone multi-threaded? I have to figure out

Re: Creating an NSInvocation from an NSMethodSignature

2009-05-13 Thread Mike Mangino
On May 12, 2009, at 6:19 PM, Greg Parker wrote: On May 12, 2009, at 6:43 AM, Michael Ash wrote: Use -methodForSelector: to get the IMP for a nonexistent method. This IMP will be a function pointer straight to the runtime's forwarding machinery. Then install that IMP as the implementation for y

Re: [iPhone] Caching images fetched from a URL?

2009-05-13 Thread Luke the Hiesterman
It would be possible to implement one thread that would handle all image download requests, or you could just spin a new thread for each image download. The latter is simpler to code, so I'd lean toward that. There's a limit somewhere on the number of threads in one process, but it's unlike

Re: Special requirements for the window param of NSAlert beginSheetModalForWindow?

2009-05-13 Thread Mike Abdullah
Read up on -[NSAlert window] On 13 May 2009, at 14:10, Dennis Christopher wrote: On this subject, I am having difficulty putting up a second modal sheet (alert) for the same window. I call beginSheetModalForWindow in the didEnd selector of the first alert, if you follow my meaning. It seem

Re: Changing name of newly created NSDocument (instead of 'Untitled i')

2009-05-13 Thread Kyle Sluder
On Tue, May 12, 2009 at 4:37 PM, Sean McBride wrote: > My doc-based application is able to import foreign file formats.  I do > this by creating a new instance of my NSPersistentDocument subclass and > populate it as needed. Add another entry to your Info.plist declaring your NSPersistentDocument

Re: [iPhone] Caching images fetched from a URL?

2009-05-13 Thread Eric E. Dolecki
So is it safe to approach threads like they were timers? You start a thread, and it calls back to it's selector method when it's complete (detachNewThreadSelector:toTarget:withObject)? Now - what if a thread completes and the cell is currently out of view (it was scrolled) - do the internals take c

Re: [iPhone] Caching images fetched from a URL?

2009-05-13 Thread Luke the Hiesterman
On May 13, 2009, at 11:45 AM, Eric E. Dolecki wrote: So is it safe to approach threads like they were timers? You start a thread, and it calls back to it's selector method when it's complete (detachNewThreadSelector:toTarget:withObject)? I would conclude my thread with a line like: [myCel

Re: [iPhone] Caching images fetched from a URL?

2009-05-13 Thread Alex Kac
It could cause an error. The way I handle it is this. 1) You have a UIImageView in the cell. 2) Assign it a "tag" that's unique. imageView.tag = 3) Since cells are re-used, you need reset the tag in prepareForReuse and make sure to set it in the cellForIndexPath. 4) In the image cache, first

Re: [iPhone] Caching images fetched from a URL?

2009-05-13 Thread Eric E. Dolecki
I haven't seen performSelectorOnMainThread before. Should that call go into the selector method that's called? ie... // This kicks off a thread [NSThread detachNewThreadSelector:@selector(threadLoad:) toTarget:self withObject:myArrayWithDictionary]; Now... -(void)threadLoad:(id)param { // pa

Re: [iPhone] Caching images fetched from a URL?

2009-05-13 Thread Luke the Hiesterman
Yes, something like that. I should mention that it's probably best to send in the NSIndexPath to the cell you're interested in rather than a pointer to the cell itself. Then you can call [tableView cellForRowAtIndexPath:indexPath] to get the cell just before your performeSelectorOnMain thre

Re: Questions about the xib file downgrade from Leopard to Tiger

2009-05-13 Thread Jonathan Hess
Hey Daniel - What you're trying will probably work. IB is issuing a warning because it sees that MYCollectionView is a subclass of NSCollectionView, and it knows that NSCollectionView doesn't exist on Tiger. You can either ignore the warning, create the MYCollectionView in code, or tell IB

Re: Creating an NSInvocation from an NSMethodSignature

2009-05-13 Thread Marcel Weiher
On May 13, 2009, at 11:27 , Mike Mangino wrote: I'm noticing something related that is causing my problems. I have mocking working for custom types. When I try to change the class of a string, however, I get a crash. -(void) testImplementationOnString { NSString *s = [NSString st

Getting "Unknown class 'someClassName' in nib file" message

2009-05-13 Thread Stuart Malin
I have tried both Google and searching the archives regarding the problem with the subject message, but can only find cases where someone has a class and didn't include it. My case is different: in my project, I renamed a class. I have made appropriate changes in both Xcode and IB for this

RE: Adding records to a child entity

2009-05-13 Thread Jon C. Munson II
Namaste! OK, I solved this one. The issue is that I have to use a different MOC from the NSApp Delegate's MOC. Because of that, the object was in a different MOC than expected and thus the error. Fetching the object out of the needed MOC solves the issue. Peace, Love, and Light, /s/ Jon C. Mu

Menu item and state

2009-05-13 Thread Chris Paveglio
I am trying to get the state of a menu item, whether it is checked or not. In my class, I wrote the very simple code to get the state of the menu item, and switch it to the other state when selected. All is OK with that. In another function (in the same class) that is called from my main class,

Re: Getting "Unknown class 'someClassName' in nib file" message

2009-05-13 Thread Jonathan Hess
Hey Stuart - Try putting a breakpoint on NSLog, and then run your app. When you hit the breakpoint, look at the backtrace. It will give you an idea of which NIB is being loaded. After you figure that out, open the NIB/XIB file in IB and in the object outline view make sure the class name

Re: Menu item and state

2009-05-13 Thread Kyle Sluder
On Wed, May 13, 2009 at 4:20 PM, Chris Paveglio wrote: > I am trying to get the state of a menu item, whether it is checked or not. In > my class, I wrote the very simple code to get the state of the menu item, and > switch it to the other state when selected. All is OK with that. Stop here. Y

Re: Getting "Unknown class 'someClassName' in nib file" message

2009-05-13 Thread Stuart Malin
Thanks Jon for the quick reply. I had already found the culprits -- my fault: I had two other Nibs that contained objects that were declared to be of the old class. I found by manually looking in each .xib file. Thanks for the info about the object outline view in IB -- that might have bee

struggling with binding, NSOutlineView, and NSTableView

2009-05-13 Thread David Owens
I've been struggling to get this working properly for a few days now; I can't seem to figure out what the problem is. The basic setup of my app is this: - I have an NSTableView that contains items bound from an NSArrayController - I have an NSOutlineView that I'd like to display items base

Re: beginner's question: having problems with saving/loading

2009-05-13 Thread Gabriel Roth
Many thanks to Graham, Gunnar, and mmalc for your time. I will study and learn from your comments. Since Gunnar mentioned it: I'm currently working through the first half of Hillegass's book. I assigned myself this exercise to clarify encoding and archiving; it seems to have revealed other (large)

Core Data Problem: Creating a child object creates unwanted parent

2009-05-13 Thread Kent Hauser
Hi, I can't figure out how to programmatically create a child object. Using the example from the guides, when I create a new employee with Employee *newEmployee = [NSEntityDescription insertNewObjectForEntityForName:*@"employee"* inManagedObjectContext:* context];* I not only get a new employe

Re: Getting "Unknown class 'someClassName' in nib file" message

2009-05-13 Thread Kyle Sluder
Don't forget about the --classes switch to ibtool. Useful if one of your XIBs gets silently corrupted. --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact th

example "miniBrowser" setting Garbage collection to "supported"

2009-05-13 Thread jon
in the "miniBrowser" project that comes with the Developer SDK on your disk under WebKit, and with the only change of setting Garbage collection to "supported" in the build settings... (plus i think i set things to 10.5, and other updated settings) and then using the running app to go to

Re: struggling with binding, NSOutlineView, and NSTableView

2009-05-13 Thread Kyle Sluder
On Wed, May 13, 2009 at 4:49 PM, David Owens wrote: > The NSOutlineView attempts to display the information, but for the life of > me I cannot call into the selected item to retrieve the data for the > columns. This doesn't make sense to me... "call into?" What does that mean? > Object (datasou

Re: struggling with binding, NSOutlineView, and NSTableView

2009-05-13 Thread David Owens
The 'call into' was if I made any message call into my class, the app spins into an infinite loop of some sort. The sample app can be found here: http://files.me.com/owensd/t07nu0 On May 13, 2009, at 2:02 PM, Kyle Sluder wrote: On Wed, May 13, 2009 at 4:49 PM, David Owens wrote: The NSOutli

Re: Core Data Problem: Creating a child object creates unwanted parent

2009-05-13 Thread Jerry Krinock
Well, I don't know what you're doing wrong. Actually I'm not sure what is the undesired behavior your are seeing. But let me explain something... That department creation you are referring to in the DepartmentAndEmployees sample occurs within the document's - initWithType:error: implem

Re: example "miniBrowser" setting Garbage collection to "supported"

2009-05-13 Thread jon
i've tested this with no changes except the "supported" garbage collection now with same results. I don't have snow. I'll send bug report # i'd really like to isolate this to the particular code that is causing this, but have been unsuccessful... not much left i can turn off. Jon.

Re: struggling with binding, NSOutlineView, and NSTableView

2009-05-13 Thread Kyle Sluder
On Wed, May 13, 2009 at 5:31 PM, David Owens wrote: > I attached a sample project that repros the issue that I'm seeing. It is > nearly the same as to what I have in my real app. You don't have a breakpoint on objc_exception_throw. That would make it more obvious that something was going on, sin

Re: Core Data Problem: Creating a child object creates unwanted parent

2009-05-13 Thread Kent Hauser
Jerry, Sorry I wasn't clearer. My example of employee & department was in reference to the inverse-relationship example in the Core Data Programming guide. My actual application involves adding taskRecords to a student object, and I was just using the department-employee as an example of a to-many

10.5.7 fixes the NSOperationQueue exception bug?

2009-05-13 Thread Nick Zitzmann
I heard rumors that 10.5.7 fixed the bug that caused NSOperationQueue to seemingly randomly raise an exception & then quit working when adding operations to a queue. Sure enough, I've run some of the code that caused the exception in the past, and I can't get it to raise under 10.5.7. Actua

Re: 10.5.7 fixes the NSOperationQueue exception bug?

2009-05-13 Thread Bill Bumgarner
On May 13, 2009, at 3:38 PM, Nick Zitzmann wrote: I heard rumors that 10.5.7 fixed the bug that caused NSOperationQueue to seemingly randomly raise an exception & then quit working when adding operations to a queue. Sure enough, I've run some of the code that caused the exception in the past

Re: singletons and autoreleased objects (Karan, Cem (Civ, ARL/CISD))

2009-05-13 Thread Cem Karan
Answering my own question: it had nothing to do with my singleton, and everything to do with over-releasing of objects that only showed up when I had multiple threads running at the same time. Please ignore the original question. Thanks, Cem Karan __

Inverting a black and white NSImage

2009-05-13 Thread Eric Gorr
I have a black and white NSImage with some pixels in the image totally transparent. I need to change the white pixels to black, the black pixels to white, and leave the transparent area in the image alone. The only solution that comes immediately to mind is to get a bitmap representation

Re: Inverting a black and white NSImage

2009-05-13 Thread Randall Meadows
On May 13, 2009, at 4:59 PM, Eric Gorr wrote: I have a black and white NSImage with some pixels in the image totally transparent. I need to change the white pixels to black, the black pixels to white, and leave the transparent area in the image alone. The only solution that comes immediat

Re: WTF? Is a file corrupted?

2009-05-13 Thread Scott Ribe
>> In fact, 2 machines with the same software, 3 feet apart, 2 users >> sharing a >> counter, and doing the same job, using the same subset of app >> features. > > MMm heisenbug. The most vicious kind. Indeed, it stopped shortly after our last exchange, and has not happened since... -- Sco

Re: Breaking underlining on descenders

2009-05-13 Thread Graham Cox
On 14/05/2009, at 4:19 AM, Benjamin Stiglitz wrote: You can draw the underline first, then a large point-width stroke in NSClearColor in copy compositing mode (or alternatively, the wide stroke & fill used as a negative mask), then the actual fill on top. OK, sounds feasible, I'll give it

Re: Menu item and state

2009-05-13 Thread Graham Cox
On 14/05/2009, at 6:20 AM, Chris Paveglio wrote: I am trying to get the state of a menu item, whether it is checked or not Uh-oh. Major whiff... Have a look at the documentation for -validateMenuItem: and follow it where it takes you. --Graham

Re: Breaking underlining on descenders

2009-05-13 Thread Douglas Davidson
On May 13, 2009, at 4:36 PM, Graham Cox wrote: I do note that the standard underlining can't be doing this though, because the ends of the underline are always square, whereas this technique will curve the underline according to the shape of the glyph. I'm also not sure if it's going to sh

initWIthFrame or awakeFromNib

2009-05-13 Thread Ramakrishna Vavilala
I have a custome view class which I use to host some CALayers. As I specify the view in the Nib file, I use awakeFromNib to create the CALayers. Part of me however thinks that initWithFrame might be more suitable for this initialization as it can be used for views created outside of interface build

Re: initWIthFrame or awakeFromNib

2009-05-13 Thread Luke the Hiesterman
If you have some initialization that needs to be done from multiple init points, it's common to create a method for this, say commonSetup. Then in all init paths, you would do [self commonSetup]. Luke On May 13, 2009, at 4:56 PM, Ramakrishna Vavilala wrote: I have a custome view class which

Re: struggling with binding, NSOutlineView, and NSTableView

2009-05-13 Thread David Owens
Thanks so much! I knew it was something stupid that I was doing on my end and conceptually it seemed like the right structure. On May 13, 2009, at 3:15 PM, Kyle Sluder wrote: On Wed, May 13, 2009 at 5:31 PM, David Owens wrote: I attached a sample project that repros the issue that I'm seeing

Interpreting -underlinePosition and -underlineThickness

2009-05-13 Thread Graham Cox
How should NSFont's -underlinePosition and -underlineThickness values be interpreted? Are they fixed values, indicating an absolute offset, or are they some proportion of the pointSize or something else? I ask because the results I'm getting by treating it as an absolute value differ from A

  1   2   >