Re: Authorization Question (Possibly a simple POSIX question?)

2009-08-20 Thread Dave Keck
File descriptors can be passed between processes using the sendmsg() API. If you have further questions about that, I'd suggest taking this question to darwin-dev. Here's some links: http://devworld.apple.com/qa/qa2007/qa1541.html http://topiks.org/mac-os-x/0321278542/ch09lev1sec11.html

Re: When do I need to override hash?

2009-08-20 Thread Quincey Morris
On Aug 20, 2009, at 23:24, Adam R. Maxwell wrote: It was not my intent to beat up on you, so I apologize if I came across that way! Nah, I was just kidding -- and trying to distract your attention away from the fact that I didn't have a better answer.

Authorization Question (Possibly a simple POSIX question?)

2009-08-20 Thread Seth Willits
I'm looking at some code* in an app which uses a helper tool, in order to open and read the contents of a protected file. Normally the user does not have privileges to read this file, hence the authorization. Here's the process it goes through: App: AuthorizationCreate Au

Re: When do I need to override hash?

2009-08-20 Thread Quincey Morris
On Aug 20, 2009, at 22:19, Adam R. Maxwell wrote: On Aug 20, 2009, at 9:44 PM, Quincey Morris wrote: The keys in a dictionary (or other keyed collection, like a map table) need to be immutable objects, but that's unrelated to the hash. Mutability in the keys would be bad, hash or no hash.

Re: When do I need to override hash?

2009-08-20 Thread Ben Trumbull
On Aug 20, 2009, at 9:09 PM, Jeff Laing wrote: If you need to know whether or not another object has put your object into an NSDictionary, you're probably doing something wrong. Do you have a specific concern about Core Data using your objects ? No, I guess the point I was trying to make was

Re: When do I need to override hash?

2009-08-20 Thread Quincey Morris
On Aug 20, 2009, at 22:05, Jeff Laing wrote: Without wanting to keep the thread going forever, can I just ask why we would presume this? In fact, if I were implementing NSDictionary I'd assume the reverse, that I was not allowed to assume that an objects hash would not change. Is there

Re: When do I need to override hash?

2009-08-20 Thread Adam R. Maxwell
On Aug 20, 2009, at 9:44 PM, Quincey Morris wrote: The keys in a dictionary (or other keyed collection, like a map table) need to be immutable objects, but that's unrelated to the hash. Mutability in the keys would be bad, hash or no hash. What do you mean by immutable? You can put a "mut

RE: When do I need to override hash?

2009-08-20 Thread Jeff Laing
> Separately, collections may (and presumably sometimes do) use *object* > hash values to distribute objects in memory. (Obviously, NSSet does, > and for all we know NSDictionary does too, to distribute object values > that stored under the same key hash value -- though it would be an > implementat

Re: When do I need to override hash?

2009-08-20 Thread Quincey Morris
On Aug 20, 2009, at 20:51, Seth Willits wrote: On Aug 20, 2009, at 2:31 PM, Alastair Houghton wrote: The -hash method is important for objects that are used as keys in associative collections. So the worry about the hash value changing when an object's properties are altered is a bit of a

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

2009-08-20 Thread Adam R. Maxwell
On Aug 20, 2009, at 2:31 PM, Ben Lachman wrote: This works pretty well, although I do seem to get a white area where there would have been a scroller on the right hand side. Interesting; I hadn't noticed that because of the white border I use. Drawing the WebView itself seems to fix that

Re: When do I need to override hash?

2009-08-20 Thread Clark Cox
On Thu, Aug 20, 2009 at 9:09 PM, Jeff Laing wrote: >> Core Data doesn't use random objects as keys in dictionaries or sets >> for this reason.  It's not that we don't trust you, but ...  to >> prevent misunderstandings, all NSManagedObject subclasses are >> forbidden from overriding -hash and -isEq

RE: When do I need to override hash?

2009-08-20 Thread Jeff Laing
> Core Data doesn't use random objects as keys in dictionaries or sets > for this reason. It's not that we don't trust you, but ... to > prevent misunderstandings, all NSManagedObject subclasses are > forbidden from overriding -hash and -isEqual. I have to admit, I didn't know this bit but I see

Editable NSTextFieldCell with clickable button?

2009-08-20 Thread Seth Willits
Anyone have an editable text field cell with a clickable button? I'm thinking along the lines of a "go to" button next to the (editable) text, like the buttons in iTunes which take you to the album in the iTunes Store. Trying to avoid reinventing the wheel :-) Thanks, -- Seth Willits

RE: When do I need to override hash?

2009-08-20 Thread Ben Trumbull
The -hash method is important for objects that are used as keys in associative collections. [snip] So, in practice, it's perfectly safe in 99.9% of cases to base your hash off your object's properties. In the specific case when you're mutating objects that are keys in associative collections (NSD

Re: When do I need to override hash?

2009-08-20 Thread Seth Willits
On Aug 20, 2009, at 2:31 PM, Alastair Houghton wrote: The -hash method is important for objects that are used as keys in associative collections. So the worry about the hash value changing when an object's properties are altered is a bit of a red herring, because you *aren't supposed to ch

Re: Force crash a cocoa app for Crash Reporter testing

2009-08-20 Thread Scott Ribe
> Anyone have any code I can use to do this? *(char*)0 = 0; -- Scott Ribe scott_r...@killerbytes.com http://www.killerbytes.com/ (303) 722-0567 voice ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or modera

RE: When do I need to override hash?

2009-08-20 Thread Jeff Laing
> OK, so this discussion is getting a little crazy :-) Agreed. > The -hash method is important for objects that are used as keys in > associative collections. > [snip] > So, in practice, it's perfectly safe in 99.9% of cases to base your > hash off your object's properties. In the specific case

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

2009-08-20 Thread DairyKnight
I think you didn't understand my question. I want to create a window, lay a view in it, and the view objectis put in another xib file. On Fri, Aug 21, 2009 at 5:38 AM, Sean Kline wrote: > Just select File->New File...->(IPhone OS)User Interface > - S > > On Thu, Aug 20, 2009 at 6:06 AM, DairyK

Re: How to create an interface without interface builder

2009-08-20 Thread vinai
Check: http://lapcatsoftware.com/blog/?s=%22working+without+a+nib for tips on getting around using NIBs and XIBs. --- On Thu, 8/20/09, Jonathan Chacón wrote: > From: Jonathan Chacón > Subject: How to create an interface without interface builder > To: "Apple Cocoa Develop" > Date: Thursd

Re: Building 64 bit apps in XCode?

2009-08-20 Thread Greg Parker
On Aug 20, 2009, at 4:12 PM, Duncan Champney wrote: How do you get XCode to generate 32/64 bit PPC/Intel 4-way universal apps? (I need to know both under 10.5 and under 10.6, for an app targeted to >= 10.5) There is an item in the project menu>edit project settings, under the build tab t

Re: NSWindow and Spaces

2009-08-20 Thread Ken Thomases
On Aug 19, 2009, at 8:47 AM, MT wrote: 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 u

Re: Building 64 bit apps in XCode?

2009-08-20 Thread Nick Zitzmann
On Aug 20, 2009, at 5:12 PM, Duncan Champney wrote: It is the second item in the list, "architectures". If I choose 32/64 bit universal, it SHOULD generate a 64 bit able application. However, it does not. If I run my app under 10.6, the 10.6 Activity Monitor app tells me which apps are 64

Building 64 bit apps in XCode?

2009-08-20 Thread Duncan Champney
How do you get XCode to generate 32/64 bit PPC/Intel 4-way universal apps? (I need to know both under 10.5 and under 10.6, for an app targeted to >= 10.5) There is an item in the project menu>edit project settings, under the build tab that SHOULD do this. It is the second item in the li

Re: Detect Keyboard Layout for CGKeyCodes

2009-08-20 Thread Joe Turner
Hey, Thanks for the tip. I started writing my own method, but then when searching for how to get the data from the UCKeyboardLayout, I found some code that I modified to work perfectly. I will share it here for those that need it. - (CGKeyCode)keyCodeForKeyboard:(const UCKeyboardLayout *)

How to create an interface without interface builder

2009-08-20 Thread Jonathan Chacón
Hello, I'm a blind developer and I'm studing Cocoa and ObjetiveC. All documentation I found uses interface builder to add controls to the window. Does anybody know any sample or tutorial to create interfaces using objetiveC without interface bulder? thanks and regards Jonathan Chac

Re: When do I need to override hash?

2009-08-20 Thread David Duncan
Yup, and my mistake in the suggestion :). Probably juggling too many balls int he air again today... On Aug 20, 2009, at 2:16 PM, Clark Cox wrote: I thought we were talking about -hash just returning zero? --Kyle Sluder No, we were talking about: It is, but you can generally do better th

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

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

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

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

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

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

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

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

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.

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

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

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

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

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

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

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

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

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

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

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

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

  1   2   >