Re: bypass NSApp

2009-07-09 Thread Julien Isorce
Hi, Thx for the reply. First I think you did not understood my questions. In other platform, it's possible to run the GUI main loop in any thread. On macosx, there is a difference between the main run loop and the other NSRunLoop. I am trying to isolate this difference in order to avoid to run th

NSStream, parsing NSData to struct

2009-07-09 Thread Carlo Gulliani
hello, i have NSData ... NSData *d = [NSData dataWithBytes:(char*)&buffer length:len]; NSLog(@"%@", d); // and I have structure typedef struct mrim_header { u_long magic; u_long proto; u_long seq; u_long msg; u_long dlen; u_longIP; u_longPort; u_charReserved[16]; }mrim_header; how can i pa

Re: NSStream, parsing NSData to struct

2009-07-09 Thread Graham Cox
On 09/07/2009, at 8:28 PM, Carlo Gulliani wrote: hello, i have NSData ... NSData *d = [NSData dataWithBytes:(char*)&buffer length:len]; NSLog(@"%@", d); // 00185918 b08259d8 1e00> and I have structure typedef struct mrim_header { u_long magic; u_long

Re: bypass NSApp

2009-07-09 Thread Bill Bumgarner
On Jul 9, 2009, at 2:46 AM, Julien Isorce wrote: I am trying to isolate this difference in order to avoid to run the main loop in the main thread. Don't bother. Cocoa is quite explicitly designed to not support event processing on any thread other than the main thread. No amount of "tr

Re: unarchiving a font collection

2009-07-09 Thread edward m taffel
hello to anyone that took notice of this issue & appology to fontDescriptorsInCollection: on further investigation i discovered, deficient descriptor-count return from fontDescriptorsInCollection may be remedied by recreating the problem collection(s) (in Font Book); it appears the problem

Wake computer from sleep

2009-07-09 Thread Mr. Gecko
Hello, I'm working on an alarm and I'm wondering what would be the best way to make it wake up the computer. I've heard of IOPMSchedulePowerEvent and I think it's the best way, but I'll need root privileges and I'm guessing the best way to do that without making a security hole is to have a h

Using private APIs

2009-07-09 Thread Todd Heberlein
From time to time someone posts a question about using non-public Apple APIs -- you know, the ones that let you do something really cool or fast but causes your app to break on a future OS release. :) Anyways, I saw this purported private API for OS X, and I thought I'd share it. Pretty fu

Re: Using private APIs

2009-07-09 Thread Dave DeLong
I think the far more interesting question beyond this superbly-named method (and kudos to the engineer who put it in) is "Does this actually do anything?" Dave On Jul 9, 2009, at 11:08 AM, Todd Heberlein wrote: From time to time someone posts a question about using non-public Apple AP

[MEETING] Toronto Area Cocoa & WebObjects Developer Group - July 14

2009-07-09 Thread Karl Moskowski
The next meeting of tacow/Toronto CocoaHeads will be held on Tuesday, July 14 at 6:30 PM at Ryerson University. Up-to-date info and directions are available at and . Karl Moskowski Voodoo Ergonomics Inc.

Re: NSDocument's -close method calls itself?

2009-07-09 Thread Sean McBride
On 7/2/09 11:52 AM, Quincey Morris said: >On Jul 2, 2009, at 10:34, Sean McBride wrote: > >> I'm trying to find somewhere to undo what was done in my NSDocument >> subclass' initializer. Specifically, to start/stop KVO >> observation. It >> seemed like 'close' would be a good place. > >'close' i

Re: Confused about NSPrintInfo margins

2009-07-09 Thread Joel Norvell
Graham, I'm not sure if this is exactly what you were talking about, but I did a test in the printShowingPrintPanel of a program I'd written. The NSPrintInfo methods setLeftMargin, setBottomMargin, setRightMargin and setTopMargin all affect the margin values within the NSPrintInfo instance. H

Re: Clarification on accessors? (was: Yet another memory management question)

2009-07-09 Thread Ricky Sharp
On Jul 8, 2009, at 10:16 PM, Jeff Laing wrote: No, it doesn't. It would in fact violate the encapsulation principle if your -dealloc method required your accessors to not rely on certain state. The "ability to override accessors violates encapsulation" because it adds additional restric

[Moderator] Re: Using private APIs

2009-07-09 Thread Scott Anguish
This is not for discussion here. The guidelines are very clear that private API isn't to be be discussed here. On 2009-07-09, at 1:08 PM, Todd Heberlein wrote: From time to time someone posts a question about using non-public Apple APIs -- you know, the ones that let you do something really

Cocoa / Objective-C developers wanted

2009-07-09 Thread Gideon King
Want to work with the latest tools and a 30 inch screen? Want to work for a company where innovation and software development is taken seriously? Want flexible working hours and no silly dress code? Want a career where what you achieve really matters? Are you a clever problem solver with an

[MEET] Reminder : LA CocoaHeads meeting tonight at 7:30pm

2009-07-09 Thread Rob Ross
Greetings LA CocoaHeads. Tonight will be seeing a demo of the iPhone app "TapStar" and discussing what went into making it. You can read about TapStar here: http://toucharcade.com/2009/07/03/tapstar-sony-music-licensed-rhythm-game/ We will also be discussing the public announcements from WWDC

Re: Clarification on accessors? (was: Yet another memory management question)

2009-07-09 Thread Ben Trumbull
-init and -dealloc are special in that the object is not in a consistent state during those methods (it either hasn't yet entered it's "initial" state or is transitioning out of its "final" state). If your accessors rely on the internal state of the object being "normal", they could blow up

Re: NSPopupButton to display fonts in the fonts themselves

2009-07-09 Thread Peter Ammon
On Jul 8, 2009, at 6:15 PM, I. Savant wrote: On Jul 8, 2009, at 9:06 PM, Peter Ammon wrote: So for menus that may take a while to build, consider appending the items as they come in (like the Airport status item), or showing a "Building..." item until you're ready to add the complete set o

Cocoa developers in Victoria BC

2009-07-09 Thread DKJ
If you're in Victoria BC or its environs, and would like to join an informal group of fellow sufferers, please contact me off-list. (iPhone OS developers are also welcome, of course.) dkj ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Plea

Re: NSPopupButton to display fonts in the fonts themselves

2009-07-09 Thread Peter Ammon
On Jul 8, 2009, at 8:02 PM, Graham Cox wrote: On 09/07/2009, at 11:06 AM, Peter Ammon wrote: - (BOOL)menu:(NSMenu *)menu updateItem:(NSMenuItem *)item atIndex: (NSInteger)index shouldCancel:(BOOL)shouldCancel is actually invoked on some sort of background thread/queue, so implementing th

[MEET] BYU CocoaHeads meeting tonight at 7:00pm

2009-07-09 Thread Dave DeLong
Hi everyone, This is a reminder that BYU CocoaHeads will be meeting tonight at 7:00pm MDT in W210 TNRB on BYU Campus. (http://map.byu.edu/?building=tnrb ) We'll be having a presentation on Core Data and might even have cookies (the edible kind). See you there! Dave DeLong President, BY

Re: bypass NSApp

2009-07-09 Thread Scott Thompson
Sent from my iPhone On Jul 9, 2009, at 10:04 AM, Bill Bumgarner wrote: On Jul 9, 2009, at 2:46 AM, Julien Isorce wrote: I am trying to isolate this difference in order to avoid to run the main loop in the main thread. Don't bother. Cocoa is quite explicitly designed to not support ev

CFBundleTypeName

2009-07-09 Thread Chris Idou
http://devworld.apple.com/ReleaseNotes/Cocoa/AppKit.html "Use of these keys becomes optional: CFBundleTypeName" http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/Articles/PListKeys.html "This key is required" What is the truth? I'm trying to create a document by passing

disguising method and variable names in binary

2009-07-09 Thread justin webster
is there a way to replace all method and variable names with something meaningless at build time? obviously these things need meaningful names for my sake but I don't care what they're called in the binary. I've tried setting the "strip" build settings for my target but still see method nam

Re: disguising method and variable names in binary

2009-07-09 Thread Kyle Sluder
On Thu, Jul 9, 2009 at 5:15 PM, justin webster wrote: > is there a way to replace all method and variable names with something > meaningless at build time? No, there isn't. Why would you want to do this? > obviously these things need meaningful names for my sake but I don't care > what they're c

Re: disguising method and variable names in binary

2009-07-09 Thread Bill Bumgarner
On Jul 9, 2009, at 5:15 PM, justin webster wrote: is there a way to replace all method and variable names with something meaningless at build time? obviously these things need meaningful names for my sake but I don't care what they're called in the binary. Not really; KVO, KVC, Bindings, C

Re: Confused about NSPrintInfo margins

2009-07-09 Thread Graham Cox
Thanks Joel, certainly setting the margins directly does work. What I'm left wondering is what they are actually for - they are never set by he Page Setup panel and never change with changes to paper size, printer, etc. My conclusion is that these fields are merely a convenience for speci

Re: NSPopupButton to display fonts in the fonts themselves

2009-07-09 Thread Graham Cox
On 10/07/2009, at 8:11 AM, Peter Ammon wrote: No, the menu:updateItem:atIndex:shouldCancel: API does not support that. Every item gets updated before the menu is shown. It is entirely synchronous. Thanks for the clarification Peter - looks like my suggestion was off base then. Very us

Re: TableView displaying a zillion empty rows Problem Solved!

2009-07-09 Thread Brian Hughes
I really appreciate all the help, it kept me searching for an answer. Ron Fleckner was the closest to diagnosing the problem. I had "plugged the unit into the wall socket" but I forgot to turn the breaker back on. I had failed to call reloadData. Sorry Andy, I didn't find the answer in the b

Re: TableView displaying a zillion empty rows Problem Solved!

2009-07-09 Thread Andy Lee
Argh, when I think of all the times reloadData has been the *first* suggestion from the list in response to an NSTableView problem! Thanks for keeping us posted. :) --Andy On Jul 9, 2009, at 10:43 PM, Brian Hughes wrote: I really appreciate all the help, it kept me searching for an answer.

Re: bypass NSApp

2009-07-09 Thread Stephen J. Butler
On Thu, Jul 9, 2009 at 6:09 PM, Scott Thompson wrote: > To empasize this point. Consider, for example, the method > performSelectorOnMainThread:. We use this API in several place to ensure > that functionality is performed on the same thread that is processing user > events. If code were able to

NSConnection Proxy Crash

2009-07-09 Thread Mr. Gecko
Hello, I'm having a problem after I send a message to a proxy application through NSConnection. my code is daemonServer = [[NSConnection connectionWithRegisteredName:@"MGMDaemon" host:nil] retain]; if (daemonServer==nil) { NSLog(@"Couldn't connect to daemon server."); return

Toolbar Example

2009-07-09 Thread Anthony Smith
Can anybody recommend a toolbar example using Interface Builder? All the ones I've seen manage toolbars through code. I'm just trying to get my toolbar items to enable. I'm sure it's dead simple but I'm still trying to wrap my head around bindings and key/value coding. Thanks. Anthony sm

NSSavePanel delegate Methods called by NSOpenPanel

2009-07-09 Thread Daniel Demiss
Hi all, I'm a little confused by the following situation: I have an NSPathControl (PopUp-Style) that should only allow certain paths to be selected. Therefore I have a controller-object that I set as the delegate of the NSPathControl and the NSOpenPanel that will be presented if a user clicks o

Re: Clarification on accessors? (was: Yet another memory management question)

2009-07-09 Thread Charles Srstka
On Jul 9, 2009, at 4:29 PM, Ben Trumbull wrote: It may be that under certain circumstances (dictionary storage, synthesized properties on 10.5, etc) that you must use an accessor method even in init & dealloc. That requires more care, is more error prone, and less flexible. In particular,

how to hide/display titlebar?

2009-07-09 Thread 李剑
Dear all, how to hide/display titlebar of cocoa window? i hope the window can be show full size when playing vedio! _ Messenger安全保护中心,免费修复系统漏洞,保护Messenger安全! http://im.live.cn/safe/ ___

Re: Toolbar Example

2009-07-09 Thread Graham Cox
On 10/07/2009, at 3:20 PM, Anthony Smith wrote: Can anybody recommend a toolbar example using Interface Builder? All the ones I've seen manage toolbars through code. I'm just trying to get my toolbar items to enable. I'm sure it's dead simple but I'm still trying to wrap my head around bin

Re: Toolbar Example

2009-07-09 Thread Anthony Smith
Thanks. I messed around with selector and didn't think I was heading down the right path. The direction helps. I think I'll be able to handle it from here. On Jul 10, 2009, at 1:28 AM, Graham Cox wrote: On 10/07/2009, at 3:20 PM, Anthony Smith wrote: Can anybody recommend a toolbar exampl