A simple DO situation - point me in the right direction!

2009-08-20 Thread Graham Cox
I need to implement a system where I can verify the number of running copies of my app on a local network against a site license. I thought DO might be a good way to implement this. So what I'm thinking is the following. I'd appreciate it if someone with experience of DO could help me fill

Re: devil of a time with an NSImageView

2009-08-20 Thread Jean-Daniel Dupas
Le 20 août 2009 à 01:13, I. Savant a écrit : On Aug 19, 2009, at 6:49 PM, Jean-Daniel Dupas wrote: You're probably calling setImage: before the nib is loaded (and so the outlet is connected). You can force it to load by calling [aWindowController window] before trying to set the image.

CFBundleVersion and CFBundleVersionShortString question

2009-08-20 Thread aaron smith
hey all, I'm reading through some debugging stuff, and looking at this page (http://developer.apple.com/technotes/tn2004/tn2123.html) about crash reports. This paragraph mentions them: "CrashReporter gets the "Version" field from the process's executable. If the process is a packaged application

Re: CFBundleVersion and CFBundleVersionShortString question

2009-08-20 Thread aaron smith
whoops, I meant the "CFBundleShortVersionString" key. On Thu, Aug 20, 2009 at 12:52 AM, aaron smith wrote: > hey all, > > I'm reading through some debugging stuff, and looking at this page > (http://developer.apple.com/technotes/tn2004/tn2123.html) about crash > reports. > > This paragraph menti

Re: Core Data dog-slow when using first time after boot

2009-08-20 Thread Ruotger Skupin
Am 20.08.2009 um 04:38 schrieb M Pulis: I got that, Bill, thank you. The OP did not specify what particular sql store (we still do NOT know) nor if he is compiled Universal, has any helper programs, etc, he did however, describe symptoms I have seen with Rosetta. So I simply proposed che

Re: Core Data dog-slow when using first time after boot

2009-08-20 Thread Ruotger Skupin
Am 20.08.2009 um 11:34 schrieb Ruotger Skupin: Am 19.08.2009 um 22:00 schrieb Ben Trumbull: I debugged it with some Snow Leopard magic and found out, that firing faults is very slow the first time after boot. When I use -[NSArray filteredArrayUsingPredicate:] the fault firing is killing me

Re: Detect Keyboard Layout for CGKeyCodes

2009-08-20 Thread Harry Jordan
Hi Joe, Sorry to misunderstand your intentions. I had an inkling I might be reading your question wrong. I'm intrigued now as to how you might do it. This low level c code makes my head spin, but if I read the docs correctly it should be possible to decode the keyCodes to Unicode characte

How to reference to objects laid in external xibs in Interface Builder?

2009-08-20 Thread DairyKnight
I'm wondering if there's a way to make an xib like the one auto-generated by XCode for iPhone apps. In the main window, there's a grayed area showing 'Loaded from .xib' and if you click on the link inside the area, IB will open the corresponding xib file for you. Anyone knows how? Thanks. R

[moderator] Re: NSTableView empty selection not working

2009-08-20 Thread Scott Anguish
On Aug 19, 2009, at 1:44 PM, PCWiz wrote: This seems to be a bug with Snow Leopard, or Snow leopards developer tools. I took the same project, and then compiled and ran it on Leopard, the issue does not exist. I'm not sure why this is happening. SnowLeopard is still under

debug control not reaching init method

2009-08-20 Thread Nick Rogers
Hi, This is my third app in Xcode3. Had to use Xcode3 becuase it has to be a 64-bit app. In earlier two apps, the control reaches to the breakpoint on the first line of the init method of AppController class, while debugging. But in this third one, it is not reaching the breakpoint, and th

Re: debug control not reaching init method

2009-08-20 Thread Graham Cox
On 20/08/2009, at 9:08 PM, Nick Rogers wrote: What I may be missing here? So maybe init isn't actually being called. Objects constructed from a nib are usually inited using -initWithCoder:. Is AppController coming from a nib? --Graham ___

Re: debug control not reaching init method

2009-08-20 Thread Navneet Kumar
Hi, AppController is not coming from an archive. Dragged an NSObject to MainMenu.xib, set its class to AppController, made AppController the delegate of File's Owner. Thanks, Nick On 20-Aug-09, at 4:47 PM, Graham Cox wrote: On 20/08/2009, at 9:08 PM, Nick Rogers wrote: What I may be mis

Re: debug control not reaching init method

2009-08-20 Thread Graham Cox
On 20/08/2009, at 9:20 PM, Navneet Kumar wrote: AppController is not coming from an archive. Dragged an NSObject to MainMenu.xib, set its class to AppController, made AppController the delegate of File's Owner. These two statements contradict one another. If you dragged an object into the

Re: Core Data dog-slow when using first time after boot

2009-08-20 Thread I. Savant
On Aug 19, 2009, at 10:38 PM, M Pulis wrote: My whole deal was about any PPC tasks in the OP's product's chain of execution, as I.S. selectively missed then exaggerated the off topic point (#5 of 8) in his surgical excerpt of my detailed response to his questioning of my suggestion to the

Re: devil of a time with an NSImageView

2009-08-20 Thread I. Savant
On Aug 19, 2009, at 10:13 PM, Todd Heberlein wrote: or -viewDidLoad on the iPhone (?). Sure. The OP mentioned NSImage and NSImageView (Mac), so I focused on that. You're right, though. There, too. :-) -- I.S. ___ Cocoa-dev mailin

NSAlternateKeyMask is not working

2009-08-20 Thread Nikhil Khandelwal
HI All, In my application I am setting shortcut key for a menu item as [Menuitem setKeyEquivalentModifierMask:NSAlternateMask]; [Menuitem setKeyEquivalent:@"1"]; But it is not working with alt key though it is working fine if I press "Fn + option + 1" or "control + option + 1". Is option key i

Re: devil of a time with an NSImageView

2009-08-20 Thread I. Savant
On Aug 20, 2009, at 3:41 AM, Jean-Daniel Dupas wrote: The -[NSWindowController loadWindow] methods says you can call - [NSWindowController window] to load the window, so I don't think it should be an issue.. Just a point, I think that in NSWindowController it may be better to initialize de

Re: Core Data dog-slow when using first time after boot

2009-08-20 Thread M Pulis
ok best, gary ToothPics Company 1.800.218.0531 On Aug 20, 2009, at 2:16 AM, Ruotger Skupin wrote: Am 20.08.2009 um 04:38 schrieb M Pulis: I got that, Bill, thank you. The OP did not specify what particular sql store (we still do NOT know) nor if he is compiled Universal, has any he

RE: A simple DO situation - point me in the right direction!

2009-08-20 Thread Kirk Kerekes
I need to implement a system where I can verify the number of running copies of my app on a local network against a site license. I thought DO might be a good way to implement this. Consider using just Bonjour for this -- with careful implementation of the name and type service strings, you ca

Re: Overriding NSCollectionView's selection: a good idea?

2009-08-20 Thread Austin Grigg
Thank you for sharing that link with me -- that is what I've been looking for! Hopefully that will now allow me to customize my collection views. I believe binding the prototype view back to the NSCollectionViewItem will give you access to the controller. As I pointed out, you should be

NSMutableArray fill with unique values from NSArray

2009-08-20 Thread Devraj Mukherjee
Hi all, I have NSMutableArray (fixed length) that I wish to fill with unique values at each index from a source NSArray (fixed length, greater than the length of the target mutable array). Realise that I can do this by writing a loop and check to see if a value has bee pre-filled, the last indexe

Re: NSMutableArray fill with unique values from NSArray

2009-08-20 Thread Graham Cox
On 20/08/2009, at 10:43 PM, Devraj Mukherjee wrote: Is there are better way of doing this? Use a NSMutableSet, which only accepts unique objects. You can turn it into an array later. However you can probably do this just as easily with an array, avoiding the slowdown at the end, if you

Re: NSMutableArray fill with unique values from NSArray

2009-08-20 Thread Mike Abdullah
On 20 Aug 2009, at 13:43, Devraj Mukherjee wrote: Hi all, I have NSMutableArray (fixed length) that I wish to fill with unique values at each index from a source NSArray (fixed length, greater than the length of the target mutable array). This sounds worrying. There is no such thing as a fix

Re: A simple DO situation - point me in the right direction!

2009-08-20 Thread Graham Cox
That's a great idea - nice one ;-) I've made some headway since my earlier post, by starting with Bonjour using NSNetService and NSNetServiceBrowser. I'm starting to form some slightly more intelligent (I hope) questions. Port Number. Given my scenario wouldn't I need to use a fixed port

Re: devil of a time with an NSImageView

2009-08-20 Thread Jean-Daniel Dupas
Le 20 août 2009 à 13:55, I. Savant a écrit : On Aug 20, 2009, at 3:41 AM, Jean-Daniel Dupas wrote: The -[NSWindowController loadWindow] methods says you can call - [NSWindowController window] to load the window, so I don't think it should be an issue.. Just a point, I think that in NSWind

Re: devil of a time with an NSImageView

2009-08-20 Thread I. Savant
On Aug 20, 2009, at 9:37 AM, Jean-Daniel Dupas wrote: I managed to find a issue when you don't bind the window outlet and try to call [self window] in awakeFromNib. Instead of returning nil, it try to load the nib again, falls in a infinite recursive loop and crash when the stack is full. Tha

Re: Heartbeat thread is blocked? -- With Code and Movie

2009-08-20 Thread Sean McBride
On 8/19/09 5:05 PM, Seth Willits said: >> I've been noticing this for a little while now. For some wacky >> reason, the thread that tickles default buttons and progress >> indicators to update is somehow no long working in my app. Default >> buttons don't pulsate and the progress indicators don't

Re: devil of a time with an NSImageView

2009-08-20 Thread Jean-Daniel Dupas
Le 20 août 2009 à 16:21, I. Savant a écrit : On Aug 20, 2009, at 9:37 AM, Jean-Daniel Dupas wrote: I managed to find a issue when you don't bind the window outlet and try to call [self window] in awakeFromNib. Instead of returning nil, it try to load the nib again, falls in a infinite recu

Re: devil of a time with an NSImageView

2009-08-20 Thread I. Savant
On Aug 20, 2009, at 10:40 AM, Jean-Daniel Dupas wrote: It's fine too. From the NSWindowController subclass note (at bottom of the reference): "windowDidLoad : Override to perform tasks after the window nib file is loaded." And the -[NSWindowController window] and -[NSWindowController

Re: alias link to libcrypto not working across different OS X versions

2009-08-20 Thread Adam R. Maxwell
On Aug 19, 2009, at 5:52 PM, Steve Mykytyn wrote: The older machine does not have /usr/lib/libcrypto.0.9.x.dylib, it has /usr/lib/libcrypto.0.9.y.dylib, which is where the alias resolves, but somehow the app does not get it right. Note that it's a symlink, not an alias... I have everythin

Re: FYI - new debug & profile libraries are out: Installer Refuses

2009-08-20 Thread Sean McBride
On 8/19/09 7:48 PM, Nick Zitzmann said: >> Has anyone gotten this installer to work? > >I did, though I had to hack the package to work. The package requires >9L30, but the currently shipping 10.5.8 update takes users to 9L31a. I >have no idea what changed in this build (does anyone?), but once I

How do I make a header row have a gradient background in my NSOutlineView?

2009-08-20 Thread Joshua Garnham
I am using an NSOutlineView in my App so i downloaded Apples Photo Search Sample App which uses an NSOutlineView. While using it I noticed that it gives the root/header object of the outline view a Gradient Background, so I looked through the code but I couldn't see what did it. Would someone mind

Re: -awakeFromNib vs. -windowDidLoad [Was: devil of a time with an NSImageView]

2009-08-20 Thread I. Savant
On Aug 20, 2009, at 10:59 AM, Kyle Sluder wrote: Use -awakeFromNib to do view setup (turning on layer backing, creating caches colors, etc.). Use -windowDidLoad (or - windowControllerDidLoadNib or whatever that NSDocument method is) for setting up inter-view relationships. Hmm ... so wou

Re: Model objects to NSUndoManager--am I doing it right?

2009-08-20 Thread Graham Cox
On 20/08/2009, at 5:17 AM, Paul Bruneau wrote: In summary, it seemed like a Long Way to Go just to let my new Entrance objects know who their document is. In my future is the fact that Entrances will have FrameModules, which may contain a Door, which will contain an array of Cutouts and so

Re: contextual menu plugin example in cocoa

2009-08-20 Thread I. Savant
On Aug 19, 2009, at 7:26 PM, augusto callejas wrote: since the finder under snow leopard is going to be pure cocoa, i assume any contextual menu plugin written in carbon will not work? if so, where would i find sample code like above, except using just cocoa? Can't discuss that here. Try the

Re: contextual menu plugin example in cocoa

2009-08-20 Thread Nick Zitzmann
On Aug 19, 2009, at 5:26 PM, augusto callejas wrote: if so, where would i find sample code like above, except using just cocoa? There aren't any. You have to use Carbon for at least the entry point of a CM plugin. After that, you can call any Foundation method you want, or even AppKit me

Re: Model objects to NSUndoManager--am I doing it right?

2009-08-20 Thread Graham Cox
On 21/08/2009, at 1:18 AM, Graham Cox wrote: On 20/08/2009, at 5:17 AM, Paul Bruneau wrote: In summary, it seemed like a Long Way to Go just to let my new Entrance objects know who their document is. In my future is the fact that Entrances will have FrameModules, which may contain a Doo

Re: devil of a time with an NSImageView

2009-08-20 Thread Kyle Sluder
On Aug 20, 2009, at 7:43 AM, "I. Savant" wrote: The remaining questions are "is one better than the other?" and "if so, which?" Use -awakeFromNib to do view setup (turning on layer backing, creating caches colors, etc.). Use -windowDidLoad (or - windowControllerDidLoadNib or whatever th

Model objects to NSUndoManager--am I doing it right?

2009-08-20 Thread Paul Bruneau
Hi all- I'm just starting my first real document-based Cocoa app. My other app was non-document based and the undo system was quite different (plus I know I did some things wrong MVC-wise in that app). The documentation I have read tells me that I should implement undo in the Setter metho

contextual menu plugin example in cocoa

2009-08-20 Thread augusto callejas
hi- i'm trying to find a cocoa example of a contextual menu plugin, but searching the apple developer site only comes up with an example based on carbon: http://developer.apple.com/Samplecode/SampleCMPlugIn/index.html since the finder under snow leopard is going to be pure cocoa, i assume any c

NSWindow and Spaces

2009-08-20 Thread MT
Hi, I've got a problem with my app, some of the windows do not behave correctly with 'Spaces', I've narrowed it down to this... If the window is backed by an NSDocument, it behaves correctly, i.e. if this window is active within the application, when the user clicks on the dock icon, the Space wi

Re: -awakeFromNib vs. -windowDidLoad [Was: devil of a time with an NSImageView]

2009-08-20 Thread Kyle Sluder
On Aug 20, 2009, at 8:05 AM, "I. Savant" wrote: Hmm ... so would you say to do otherwise is "doing it wrong" or "doing it sub-optimally"? No, but if it winds up mattering, that's how it usually shakes out. So I tend to follow that pattern even before it begins to matter. --Kyle Sluder

Execution of Replaced Method Jumps back to top -- How??

2009-08-20 Thread Jerry Krinock
[Re-sending this message with new details, and also because my thread was hijacked yesterday.] In debugging my undo grouping issue, I've replaced NSUndoManager's - beginUndoGrouping and -endUndoGrouping with methods that log whenever they're invoked. - (void)replacement_beginUndoGrouping {

Re: How do I make a header row have a gradient background in my NSOutlineView?

2009-08-20 Thread Corbin Dunn
On Aug 20, 2009, at 7:55 AM, Joshua Garnham wrote: I am using an NSOutlineView in my App so i downloaded Apples Photo Search Sample App which uses an NSOutlineView. While using it I noticed that it gives the root/ header object of the outline view a Gradient Background, so I looked through the

template metaprogramming optimization in COCOA app

2009-08-20 Thread Luca Ciciriello
Hi list. I've included in an Objective-C++ project some part of a my old application written in pure ANSI ISO/IEC 14882:2006 C++. For the portability sake was very important to me the compliance with this standard. In this ANSI C++ application I've used the template metaprogramming methodo

Re: bound popup cell not letting me set it's value

2009-08-20 Thread Christopher Campbell Jensen
Bind the pop up cell's "selectedValue" binding to a string representing the current name, or bind its "selectedIndex" binding to a number that represents the index of the current name. This was the step I had missed, I hadn't bound any of the "selected" bindings. I tried looking in the class d

Re: bound popup cell not letting me set it's value

2009-08-20 Thread Quincey Morris
On Aug 20, 2009, at 09:04, Christopher Campbell Jensen wrote: I tried looking in the class documentation, but that doesn't mention anything about what properties need to be bound. I also looked in the cocoa bindings programming guide, but couldn't really see any reference to this either. Wh

Force crash a cocoa app for Crash Reporter testing

2009-08-20 Thread aaron smith
Hey All, I'm trying to do some testing with Smart Crash Reporter, which integrates with Crash Reporter. So I'm trying to write some code to force crash my app. But it won't crash. hahaha. Anyone have any code I can use to do this? I've been trying to just do some extra releases on an object, but

Re: iPhone: MPVolumeView not displaying

2009-08-20 Thread William Squires
What if you push the (physical) volume up/down button on the side of the device? Does it show up then? On Aug 14, 2009, at 11:09 AM, Eric E. Dolecki wrote: I just tried with just headphones... I can't get a volume slider at all. Thanks, E. On Aug 14, 2009, at 11:37 AM, Luke the Hiesterman

Re: Force crash a cocoa app for Crash Reporter testing

2009-08-20 Thread Nick Zitzmann
On Aug 20, 2009, at 11:04 AM, aaron smith wrote: Hey All, I'm trying to do some testing with Smart Crash Reporter, which integrates with Crash Reporter. So I'm trying to write some code to force crash my app. But it won't crash. hahaha. Anyone have any code I can use to do this? NSInteger t

Re: Force crash a cocoa app for Crash Reporter testing

2009-08-20 Thread Gideon King
Try this: *(long*)0 = 0xDEADBEEF; Hey All, I'm trying to do some testing with Smart Crash Reporter, which integrates with Crash Reporter. So I'm trying to write some code to force crash my app. But it won't crash. hahaha. Anyone have any code I can use to do this? I've been trying to

Re: devil of a time with an NSImageView

2009-08-20 Thread Quincey Morris
On Aug 20, 2009, at 07:21, I. Savant wrote: I'm not convinced yet that relying on -loadWindow is as good as keeping nib-loading-related startup code in -awakeFromNib. a. I'm not sure how 'loadWindow' got into this discussion -- the documentation says not to call 'loadWindow' directly but t

Re: Force crash a cocoa app for Crash Reporter testing

2009-08-20 Thread Bryan Henry
[[NSArray array] objectAtIndex:0]; if you want an exception. - Bryan Sent from my iPhone On Aug 20, 2009, at 1:04 PM, aaron smith > wrote: Hey All, I'm trying to do some testing with Smart Crash Reporter, which integrates with Crash Reporter. So I'm trying to write some code to force crash m

Re: Force crash a cocoa app for Crash Reporter testing

2009-08-20 Thread jonat...@mugginsoft.com
A Cocoa approach to crashing a Cocoa app: NSDecimalNumber *boom = (NSDecimalNumber *)[NSDecimalNumber numberWithInt:0]; [boom decimalNumberByAdding:nil]; On 20 Aug 2009, at 18:04, aaron smith wrote: Hey All, I'm trying to do some testing with Smart Crash Reporter, which integrates

NSSortDescriptor in core-data document app

2009-08-20 Thread Martin Hewitson
Dear all, I have a core-data document based app which uses an NSCollectionView to display entries of a single entity (Entry) in the data model. In MyDocument.m In this document class I have an ivar which holds a reference to the NSArrayController that is in the MyDocument nib. That array

IB connections with view swapping?

2009-08-20 Thread Oftenwrong Soong
Hi all, My document-based app will use view swapping, allowing the user to navigate through multiple "screens" like a wizard of sorts. I am putting each view in a separate nib and using NSViewController. View swapping is working. Now I need to make connections between these views and my model.

Re: devil of a time with an NSImageView

2009-08-20 Thread I. Savant
On Aug 20, 2009, at 1:12 PM, Quincey Morris wrote: a. I'm not sure how 'loadWindow' got into this discussion -- the documentation says not to call 'loadWindow' directly but to call 'window' instead and let *it* call 'loadWindow'. You're right, my mistake. I was responding to Jean-Daniel's

Re: Force crash a cocoa app for Crash Reporter testing

2009-08-20 Thread Kyle Sluder
On Thu, Aug 20, 2009 at 10:04 AM, aaron smith wrote: > Anyone have any code I can use to do this? abort() --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact

Re: IB connections with view swapping?

2009-08-20 Thread Kyle Sluder
On Thu, Aug 20, 2009 at 10:39 AM, Oftenwrong Soong wrote: > The nib file's owner is the view controller, not MyDocument. Is it best to > bind to my model via the view controller's representedObject? That's what it's for. > Also I'll need a few Target/Actions. Should I subclass NSViewController,

Re: Force crash a cocoa app for Crash Reporter testing

2009-08-20 Thread aaron smith
thanks, that worked perfect On Thu, Aug 20, 2009 at 11:03 AM, Kyle Sluder wrote: > On Thu, Aug 20, 2009 at 10:04 AM, aaron > smith wrote: >> Anyone have any code I can use to do this? > > abort() > > --Kyle Sluder > ___ Cocoa-dev mailing list (Cocoa-dev

Re: iPhone: MPVolumeView not displaying

2009-08-20 Thread Eric E. Dolecki
I was able to get it to display, thanks. On Thu, Aug 20, 2009 at 1:06 PM, William Squires wrote: > What if you push the (physical) volume up/down button on the side of the > device? Does it show up then? > > > On Aug 14, 2009, at 11:09 AM, Eric E. Dolecki wrote: > > I just tried with just headph

Re: devil of a time with an NSImageView

2009-08-20 Thread Quincey Morris
On Aug 20, 2009, at 11:02, I. Savant wrote: I missed that thread. Do you happen to know some keywords from the subject? No, I've looked for it but I can't find it. It was one of a number of similar questions around that time, possibly about iPhone views, and the comment was an afterthoug

Re: devil of a time with an NSImageView

2009-08-20 Thread I. Savant
On Aug 20, 2009, at 2:31 PM, Quincey Morris wrote: All I can remember is that it sent me scurrying to change some window controller awakeFromNib's to windowDidLoad's. :-) It has me rethinking some things too, but I won't scurry just yet. -- I.S. ___

How to disable the table view when search bar is active

2009-08-20 Thread Ronnie B
Hi list. I have a table view with the search bar in it. Search bar is working fine. I would like to have the view disabled while entering text in the search field. I have tried this w/o any success: //delegate - (void)searchBarTextDidBeginEditing:(UISearchBar *)bar { self.tableView.scrol

Re: -awakeFromNib vs. -windowDidLoad [Was: devil of a time with an NSImageView]

2009-08-20 Thread Andy Lee
On Aug 20, 2009, at 11:05 AM, I. Savant wrote: On Aug 20, 2009, at 10:59 AM, Kyle Sluder wrote: Use -awakeFromNib to do view setup (turning on layer backing, creating caches colors, etc.). Use -windowDidLoad (or - windowControllerDidLoadNib or whatever that NSDocument method is) for setting

Re: devil of a time with an NSImageView

2009-08-20 Thread Jean-Daniel Dupas
Le 20 août 2009 à 20:02, I. Savant a écrit : On Aug 20, 2009, at 1:12 PM, Quincey Morris wrote: a. I'm not sure how 'loadWindow' got into this discussion -- the documentation says not to call 'loadWindow' directly but to call 'window' instead and let *it* call 'loadWindow'. You're right

Re: When do I need to override hash?

2009-08-20 Thread Seth Willits
From the docs: If a mutable object is added to a collection that uses hash values to determine the object’s position in the collection, the value returned by thehash method of the object must not change while the object is in the collection. Therefore, either the hash method must not rely

Re: NSSortDescriptor in core-data document app

2009-08-20 Thread Martin Hewitson
Hi bryscomat, Thanks for the swift reply. I would implement a method in the File Owner of MyDocument.nib, call it "titleSortDescriptors" or something of the like. Then, in the nib file, I would bind the array controllers sort descriptor to "File Owner.titleSortDescriptors". On your sugge

Accessing method from another class

2009-08-20 Thread PCWiz
This is going to seem like a complete newbie question, but I can't get this to work. I have a class with a method called "resetTextAndBar:" which just basically resets some text and a progress bar to match up with new data inserted into the table view: - (void)resetTextAndBar:(id)sender {

Re: devil of a time with an NSImageView

2009-08-20 Thread Jonathan Hess
c. A couple of weeks ago on this list, one of our Apple experts (Luke, maybe, but I can't remember for sure) said to use the more specialized method (such as 'windowDidLoad') *instead of* the generic 'awakeFromNib', if the class has it. I missed that thread. Do you happen to know some keywo

Re: NSSortDescriptor in core-data document app

2009-08-20 Thread Martin Hewitson
Got it working. The problem was that I had "Auto Rearrange Content" selected on the Entries array controller. I don't really understand why this caused the problems I saw, but unchecking it makes the problem go away. Thanks for pointing me in this direction! Martin On Aug 20, 2009, at 9:1

Re: When do I need to override hash?

2009-08-20 Thread David Duncan
On Aug 20, 2009, at 12:00 PM, Seth Willits wrote: Returning 0 is certainly simpler :p It is, but you can generally do better than just returning 0, usually by just extracting some bits from 'self', ala -(NSUInteger)hash { uintptr_t hash = (uintptr_t)self; return (hash >> 4

Re: Heartbeat thread is blocked? -- With Code and Movie

2009-08-20 Thread Seth Willits
On Aug 20, 2009, at 7:34 AM, Sean McBride wrote: When you turn layering on for a view, it turns it on for all subviews also. They recommend you try to minimise the number of views using layering. I've found that lots of view don't draw properly with layering on, like NSPathControl and others.

Re: Force crash a cocoa app for Crash Reporter testing

2009-08-20 Thread jonat...@mugginsoft.com
On 20 Aug 2009, at 19:03, Kyle Sluder wrote: On Thu, Aug 20, 2009 at 10:04 AM, aaron smith wrote: Anyone have any code I can use to do this? abort() which calls raise(SIGABRT); // SIGFPE and SIGSEGV also may be tried abort() is defined to optionally flush streams and delete temporary fi

Re: Accessing method from another class

2009-08-20 Thread Steve Christensen
If your logging code is displaying a message on entry to resetTextAndBar:, but nothing after that, it sounds like you're taking an exception. In your code snippet below, you're calling [self updateText], but in the last sentence of your problem description, you mention a method called updat

Re: When do I need to override hash?

2009-08-20 Thread Clark Cox
On Thu, Aug 20, 2009 at 12:33 PM, David Duncan wrote: > On Aug 20, 2009, at 12:00 PM, Seth Willits wrote: > >> Returning 0 is certainly simpler :p > > > It is, but you can generally do better than just returning 0, usually by > just extracting some bits from 'self', ala > > -(NSUInteger)hash > { >

Re: Core Data dog-slow when using first time after boot

2009-08-20 Thread Ben Trumbull
On Aug 20, 2009, at 2:34 AM, Ruotger Skupin wrote: Am 19.08.2009 um 22:00 schrieb Ben Trumbull: I debugged it with some Snow Leopard magic and found out, that firing faults is very slow the first time after boot. When I use -[NSArray filteredArrayUsingPredicate:] the fault firing is killin

Re: When do I need to override hash?

2009-08-20 Thread Bryan Henry
Why do you say that? I haven't noticed any documented requirement that ties the implementation details of -hash and -isEqual together. - Bryan Sent from my iPhone On Aug 20, 2009, at 4:27 PM, Clark Cox wrote: On Thu, Aug 20, 2009 at 12:33 PM, David Duncan wrote: On Aug 20, 2009, at 12:00

Re: When do I need to override hash?

2009-08-20 Thread Clark Cox
-isEqual: is how Cocoa collections define equality. Saying that two objects are "equal" means, by definition, that -[obj1 isEqual: obj2] returns true. On Thu, Aug 20, 2009 at 1:30 PM, Bryan Henry wrote: > Why do you say that? I haven't noticed any documented requirement that ties > the implementat

Re: When do I need to override hash?

2009-08-20 Thread Clark Cox
>From > "If two objects are equal (as determined by the isEqual: method), they must have the same hash value. This last point is particularl

Re: When do I need to override hash?

2009-08-20 Thread Shawn Erickson
On Thu, Aug 20, 2009 at 1:30 PM, Bryan Henry wrote: > > Why do you say that? I haven't noticed any documented requirement that ties > the implementation details of -hash and -isEqual together. It is fundamental requirement for the collection classes, etc. "If two objects are equal, they must ha

Re: When do I need to override hash?

2009-08-20 Thread Kyle Sluder
On Thu, Aug 20, 2009 at 1:33 PM, Clark Cox wrote: > -isEqual: is how Cocoa collections define equality. Saying that two > objects are "equal" means, by definition, that -[obj1 isEqual: obj2] > returns true. This has nothing to do with -hash. P: Two objects are equal. Q: They have the same hash.

Re: Core Data dog-slow when using first time after boot

2009-08-20 Thread Melissa J. Turner
On Aug 20, 2009, at 02:35, Ruotger Skupin wrote: Complex locale aware Unicode text queries can be slow. If you find yourself spending time with such a query, you should consider some of the techniques shown in the DerivedProperty example available on ADC. Isn't all text Unicode? No.

Re: When do I need to override hash?

2009-08-20 Thread Bryan Henry
Yes, but the problem with a hash based on the pointer is that it limits your isEqual implemenation from being based on anything more than the pointer, or you violate the "If objects are equal, they must have the same hash" rule. (Earlier email was a brain fart on my part.) - Bryan Sent fr

Re: template metaprogramming optimization in COCOA app

2009-08-20 Thread Alastair Houghton
On 20 Aug 2009, at 17:18, Luca Ciciriello wrote: I've included in an Objective-C++ project some part of a my old application written in pure ANSI ISO/IEC 14882:2006 C++. For the portability sake was very important to me the compliance with this standard. In this ANSI C++ application I've us

Re: Accessing method from another class

2009-08-20 Thread PCWiz
Sorry, it has no colon, just updateText. And I get no build warnings or errors at all. Thanks On 2009-08-20, at 2:11 PM, Steve Christensen wrote: If your logging code is displaying a message on entry to resetTextAndBar:, but nothing after that, it sounds like you're taking an exception. In

Re: When do I need to override hash?

2009-08-20 Thread Shawn Erickson
On Thu, Aug 20, 2009 at 1:37 PM, Kyle Sluder wrote: > P: Two objects are equal. > Q: They have the same hash. > > P -> Q. > > Note that Q does not imply P. Or said another way... If the hash of ObjectA is equal to the hash of ObjectB then ObjectA _could_ be equal to ObjectB. If their hash differ

Re: Accessing method from another class

2009-08-20 Thread Eric E. Dolecki
I'd like to know how I can get a property from a ViewController class (that I don't instantiate myself with a pointer) - I've tried importing the view's .h and I set a getter for the variable (say a BOOL), and when I try to read it from another viewController's class it tells me it's not part of th

Re: Accessing method from another class

2009-08-20 Thread bryscomat
I found your solution. In Application.m, at the end of the setSlim: method, add this line: [[NSApp delegate] resetTextAndBar:self]; And at the top of the file, import the BeastCloneAppDelegate.h file to suppress the warning. This will work since you are accessing a function set as NSApplicat

RE: Accessing method from another class

2009-08-20 Thread bryscomat
I found your solution. In Application.m, at the end of the setSlim: method, add this line: [[NSApp delegate] resetTextAndBar:self]; And at the top of the file, import the BeastCloneAppDelegate.h file to suppress the warning. This will work since you are accessing a "CLASS" set as NSApplicat

Re: When do I need to override hash?

2009-08-20 Thread Clark Cox
On Thu, Aug 20, 2009 at 1:37 PM, Kyle Sluder wrote: > On Thu, Aug 20, 2009 at 1:33 PM, Clark Cox wrote: >> -isEqual: is how Cocoa collections define equality. Saying that two >> objects are "equal" means, by definition, that -[obj1 isEqual: obj2] >> returns true. > > This has nothing to do with -ha

Re: When do I need to override hash?

2009-08-20 Thread Clark Cox
On Thu, Aug 20, 2009 at 1:47 PM, Shawn Erickson wrote: > On Thu, Aug 20, 2009 at 1:37 PM, Kyle Sluder wrote: > >> P: Two objects are equal. >> Q: They have the same hash. >> >> P -> Q. >> >> Note that Q does not imply P. > > Or said another way... > > If the hash of ObjectA is equal to the hash of

Re: When do I need to override hash?

2009-08-20 Thread Kyle Sluder
On Thu, Aug 20, 2009 at 2:01 PM, Clark Cox wrote: > Yes, and two different objects will have different pointer values. If > the hash is based on the pointer values, then two different objects > cannot have the same hash, regardless of whether or not they are > equal. Hence, that implementation of h

Re: When do I need to override hash?

2009-08-20 Thread Clark Cox
On Thu, Aug 20, 2009 at 2:14 PM, Kyle Sluder wrote: > On Thu, Aug 20, 2009 at 2:01 PM, Clark Cox wrote: >> Yes, and two different objects will have different pointer values. If >> the hash is based on the pointer values, then two different objects >> cannot have the same hash, regardless of whether

Re: When do I need to override hash?

2009-08-20 Thread Greg Parker
On Aug 20, 2009, at 12:00 PM, Seth Willits wrote: From the docs: If a mutable object is added to a collection that uses hash values to determine the object’s position in the collection, the value returned by thehash method of the object must not change while the object is in the collection.

Field editor for custom tableview cells contains wrong string

2009-08-20 Thread Ben Lachman
I'm working on a heavily customized cell for a table view and when editing the cell I keep getting values in the field editor from other rows. The incorrect value is generally from the previous edited cell. Has anyone seen this or found a workaround? Thanks, ->Ben -- Ben Lachman Acacia Tr

Re: When do I need to override hash?

2009-08-20 Thread Alastair Houghton
On 20 Aug 2009, at 22:16, Clark Cox wrote: On Thu, Aug 20, 2009 at 2:14 PM, Kyle Sluder wrote: On Thu, Aug 20, 2009 at 2:01 PM, Clark Cox wrote: Yes, and two different objects will have different pointer values. If the hash is based on the pointer values, then two different objects cannot

Re: How to disable the table view when search bar is active

2009-08-20 Thread Jerry Krinock
The -setScrollEnabled method does not show up in my documentation browser, so I'm not sure what it will do. However, whenever a view does not change as expected, invoke - display. In your case, [[self tableView] display] ; If it works, this may or may not be a correct fix for production

Re: - [NSBitmapImageRep cacheDisplayInRect:toBitmapImageRep:] produces empty image

2009-08-20 Thread Ben Lachman
On Aug 19, 2009, at 11:49 PM, Adam R. Maxwell wrote: On Aug 19, 2009, at 8:39 PM, Ben Lachman wrote: On Aug 19, 2009, at 8:45 PM, Adam R. Maxwell wrote: On Aug 19, 2009, at 2:50 PM, Ben Lachman wrote: I have an offscreen window containing a WebView that I'm using to generate web previews

Re: How to reference to objects laid in external xibs in Interface Builder?

2009-08-20 Thread Sean Kline
Just select File->New File...->(IPhone OS)User Interface - S On Thu, Aug 20, 2009 at 6:06 AM, DairyKnight wrote: > I'm wondering if there's a way to make an xib like the one auto-generated > by > XCode for iPhone apps. In the main window, there's a > grayed area showing 'Loaded from .xib' an

  1   2   >