How to get all directories and folders in Tree format

2009-03-11 Thread haresh vavdiya
Hi All, In my application, i have to display all the directories and folders of these directory on left side and user can reach their particular folder and he can get all content of that folder. Like, we want to open Examples folder and then we will select Developer and then example from l

most suitable framework for network app communication?

2009-03-11 Thread Darren Minifie
Hi Everyone I'm working on a music application for the Mac. Eventually I wan to provide an interface to it on an Iphone that is on the same local network. It would be similar to the Remote application Apple created for iTunes. I'm comfortable with socket programming in C, but I was hoping there

Re: most suitable framework for network app communication?

2009-03-11 Thread Scott Anguish
Bonjour would be an excellent way to find clients and servers, yes. Have a look at NSStream, CFStream, and CFNetwork, NSNetServices, CFNetServices. They are all things you may want to consider using. NSNetServices and CFNetServices Programming Guide Bonjour Overview Stream Programming Guide f

Is it possible to make the height of an NSSegmentedControl taller?

2009-03-11 Thread Stuart Malin
I am using an NSSegmentedControl in a toolbar to hold some mutually exclusive selections. I invoke -setImage:forSegment: to set an image for each, but the images are taller than the height of the segments. I don't seem to have any control over that height with the NSRect I use to init the

Re: KVO & Bindings: Proxy object & change notifications

2009-03-11 Thread Dave Keck
Hey Ken, thanks for your reply. > Are you sure that PrefCtrl is returning the same proxy each time? Yes. The proxy object is setup in PrefCtrl's -init, and is never changed. > Also, at the time that you invoke -willChangeValueForKey: have you already > changed your internal state such that invok

Re: KVO & Bindings: Proxy object & change notifications

2009-03-11 Thread Ken Thomases
On Mar 11, 2009, at 2:09 AM, Dave Keck wrote: Also, at the time that you invoke -willChangeValueForKey: have you already changed your internal state such that invoking [theProxy valueForKey:@"someFeature"] returns the "after" value? It should still return the "before" value at that point.

Converting unicode strings to its values

2009-03-11 Thread Christian Netthöfel
Hi Everyone, I'm quite new to Cocoa-development and have a question regarding the conversion of unicode-representations. I have a string containing the unicode values for umlauts or other special characters as strings. What I want to do is to convert them to their real unicode value so t

Re: Is it possible to make the height of an NSSegmentedControl taller?

2009-03-11 Thread Dave Keck
On Tue, Mar 10, 2009 at 10:04 PM, Stuart Malin wrote: > I am using an NSSegmentedControl in a toolbar to hold some mutually > exclusive selections. I invoke -setImage:forSegment: to set an image for > each, but the images are taller than the height of the segments. I don't > seem to have any cont

Re: Converting unicode strings to its values

2009-03-11 Thread Ken Thomases
On Mar 11, 2009, at 3:23 AM, Christian Netthöfel wrote: I'm quite new to Cocoa-development and have a question regarding the conversion of unicode-representations. I have a string containing the unicode values for umlauts or other special characters as strings. What I want to do is to conv

Re: Converting unicode strings to its values

2009-03-11 Thread Michael Vannorsdel
I could be remembering wrong but I think you can append unichars to mutable strings with [mstr appendFormat:@"%C", theunichar]. Or use %S for a null terminated array of unichars. On Mar 11, 2009, at 4:00 AM, Ken Thomases wrote: If a string literal in your source code actually contains the

Re: Is it possible to make the height of an NSSegmentedControl taller?

2009-03-11 Thread Paul Sanders
> If you _really_ need a taller one, you could create your own > custom > control. It wouldn't be too hard, but I recommend making your > images > smaller to fit the stock control. Or perhaps use a tab metaphor (which you would have to code yourself, of course). Maybe this is against the Human

Synthesized instance variables

2009-03-11 Thread Andreas Känner
Hi there, does anybody know if there is an efficient way to directly access instance variables which have been synthesized for the 64bit runtime? Using object_getInstanceVariable is 10 times slower than the code the compiler generates for the synthesized getter. Cheers Andreas

Re: Synthesized instance variables

2009-03-11 Thread Jean-Daniel Dupas
Le 11 mars 09 à 13:10, Andreas Känner a écrit : Hi there, does anybody know if there is an efficient way to directly access instance variables which have been synthesized for the 64bit runtime? Using object_getInstanceVariable is 10 times slower than the code the compiler generates for th

Re: Synthesized instance variables

2009-03-11 Thread Paul Sanders
> does anybody know if there is an efficient way to directly > access > instance variables which have been synthesized for the 64bit > runtime? > Using object_getInstanceVariable is 10 times slower than the > code the > compiler generates for the synthesized getter. Try object->instance_var, ra

Re: Background Process?

2009-03-11 Thread A.M.
On Mar 11, 2009, at 2:42 AM, Ken Thomases wrote: All irrelevant, as there's no need for any signaling of any run loop input sources to allow timers to fire. And the best source is the source: http://www.opensource.apple.com/darwinsource/10.5.6/CF-476.17/CFRunLoop.c static void __CFRunLoopTi

Re: NSSlider changed notification

2009-03-11 Thread Steve Christensen
As previous replies have mentioned, if you're looking for continuous change, you need to make sure that "continuous" is set to YES, either by checking "continuously send action while sliding" in IB or by calling [mySlider setContinuous:YES]. You could keep track of changes to the slider val

Re: Background Process?

2009-03-11 Thread Kyle Sluder
On Wed, Mar 11, 2009 at 2:42 AM, Ken Thomases wrote: > There is, in fact, no need for a dummy input source.  A timer is sufficient > to keep a run loop "running", which is to say blocked.  I was one of the > incorrect folks who propagated this myth, unfortunately, but was corrected. >  Either a du

Re: Synthesized instance variables

2009-03-11 Thread Jean-Daniel Dupas
Le 11 mars 09 à 16:03, Andreas Känner a écrit : Hi, Am 11.03.2009 um 13:27 schrieb Jean-Daniel Dupas: Le 11 mars 09 à 13:10, Andreas Känner a écrit : Hi there, does anybody know if there is an efficient way to directly access instance variables which have been synthesized for the 64bit

Compile Problems

2009-03-11 Thread Barry Fawthrop
Greetings All I'm trying to build a kerberos based application for the iPhone 2.2.1 I'm getting errors like this ... ... Compiling /Users//Desktop//Classes/crypto/enc_provider/des.mm (1 errors) error: 'krb5int_c_mit_des_zeroblock' was not declared in this scope Compiling /Users//De

Handling WebView DOM events in Cocoa

2009-03-11 Thread Dave Carrigan
All, I've been the WebKit docs, but haven't been able to find an answer to a pretty basic (to my mind) question. I want to have an obc-c method get called when a DOM event (click, mouseover, etc.) happens inside the WebView. I was looking for some kind of DomEventDelegate kind of thing, b

Re: Examples or Documentation for Non-document-based Multi-window App

2009-03-11 Thread Michael Ash
On Tue, Mar 10, 2009 at 6:09 PM, Grant Erickson wrote: > Suppose I were writing an application, perhaps similar to the example at > http://en.wikibooks.org/wiki/Programming_Mac_OS_X_with_Cocoa_for_beginners/B > uilding_a_GUI (or many of the examples in /Developer/Examples/...) that had > no file-b

Re: iPhone book recommendations

2009-03-11 Thread Barry Fawthrop
Donald Hall wrote: > I'm not sure if this is the most appropriate list for this question, but > here goes: > > Can anyone recommend a good book to get started on iPhone programming? > I've been using Cocoa for several years now, so I don't need a really > basic starter book. I've looked at several

Re: Compile Problems

2009-03-11 Thread I. Savant
On Wed, Mar 11, 2009 at 12:18 PM, Barry Fawthrop wrote: > ... > I'm getting errors like this > ... > Compiling /Users//Desktop//Classes/crypto/enc_provider/des.mm (1 > errors) > error: 'krb5int_c_mit_des_zeroblock' was not declared in this scope > Compiling /Users//Desktop//Cla

Re: Compile Problems

2009-03-11 Thread Barry Fawthrop
I. Savant wrote: > On Wed, Mar 11, 2009 at 12:18 PM, Barry Fawthrop wrote: > >> ... >> I'm getting errors like this >> ... >> Compiling /Users//Desktop//Classes/crypto/enc_provider/des.mm (1 >> errors) >> error: 'krb5int_c_mit_des_zeroblock' was not declared in this scope >> Compiling

Re: EXC_BAD_ACCESS on NSImageView::setImage

2009-03-11 Thread Scott Ribe
Does your setImage method retain the image? -- 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 moderator comments to t

Re: Background Process?

2009-03-11 Thread Shawn Erickson
#import @interface Foo : NSObject - (void)run; - (void)fire:(NSTimer*)time; @end @implementation Foo - (void) run { NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; [NSTimer scheduledTimerWithTimeInterval:5.0 target:self selector:@selector(fire:) userInfo:nil repeats:YES];

Re: Garbage collected and non-garbage collected

2009-03-11 Thread Robert Mullen
As I have waded into the code a little more I see that this entire struct is allocated using calloc() in an init and freed with free(). How does that work with GC? I have tried __strong and some CFRetain and CFRelease to no avail but want to try rearranging things a little bit there. I thin

Re: Background Process?

2009-03-11 Thread Shawn Erickson
On Tue, Mar 10, 2009 at 11:02 PM, Kyle Sluder wrote: > On Wed, Mar 11, 2009 at 1:53 AM, Roland King wrote: >> So you just add the timer to the runloop, run it, it sleeps until the timer >> fires, does its thing and then goes back to sleep again. What am I missing? > > Well, there is a sentence di

Cocoaheads Lake Forest (92630) meeting 3/11/2009 (tonight!) at 7 pm on "Modeling a Game with the Cocoa Frameworks"

2009-03-11 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, 3/11. Joe Sickel w

Re: Garbage collected and non-garbage collected

2009-03-11 Thread Joar Wingfors
On Mar 11, 2009, at 10:03 AM, Robert Mullen wrote: As I have waded into the code a little more I see that this entire struct is allocated using calloc() in an init and freed with free(). How does that work with GC? The GC only manages memory that's allocated from the managed heap, and t

Re: Background Process?

2009-03-11 Thread Kyle Sluder
On Wed, Mar 11, 2009 at 12:59 PM, Shawn Erickson wrote: > #import I did the exact same thing and was actively running it under Instruments when Ken's message came in last night. At first I thought it was repeatedly calling -runInMode:untilDate: but Instruments told me otherwise. --Kyle Sluder

Re: setFrame: not working in custom event loop

2009-03-11 Thread Mike Manzano
Nope that didn't do it. Same symptoms. Any other ideas before I throw in the gauntlet and rewrite it? On Mar 10, 2009, at 5:41 PM, Jesper Storm Bache wrote: When you modify a window it registers itself as needing redrawing in the current run loop. If you are performing active tracking, you

Re: setFrame: not working in custom event loop

2009-03-11 Thread Mike Manzano
Well, I just rewrote it, and it's doing exactly the same thing. You can see this from the debug output: 2009-03-11 11:15:50.092 SkootUI[13145:10b] Will Set To: {{0, 0}, {743, 604}} 2009-03-11 11:15:50.097 SkootUI[13145:10b] After: {{0, 0}, {743, 604}} 2009-03-11 11:15:50.179 SkootUI[131

problems with NSTextField destroying background

2009-03-11 Thread Memo Akten
Hi All, I am creating everything programatically: one custom NSWindow -> one NSView (my root view), that has multiple custom NSViews attached, in each one is an NSBox and NSTextField. My problem is, I want the NSTextField to be transparent (and show the NSBox behind), but instead it's making

Re: Garbage collected and non-garbage collected

2009-03-11 Thread Greg Parker
On Mar 11, 2009, at 10:03 AM, Robert Mullen wrote: As I have waded into the code a little more I see that this entire struct is allocated using calloc() in an init and freed with free(). How does that work with GC? I have tried __strong and some CFRetain and CFRelease to no avail but want to

Re: setFrame: not working in custom event loop

2009-03-11 Thread Andy Lee
I'm guessing the problem is that you are only calling setFrame: on subview 0, thereby increasing the total width of the subviews. You are assuming subview 1 will adjust by the same amount as you added/ subtracted from subview 0. But actually, adjustSubviews scales both subviews down so the

Re: State of performing tasks with elevated privileges

2009-03-11 Thread Sidney San Martín
All right, those are fair points. But I forgot to mention that what also worries me about that method is this paragraph from the Authorization Services Programming Guide: "You may be tempted to use the function AuthorizationExecuteWithPrivileges to perform privileged operations rather tha

[SOLVED] Re: setFrame: not working in custom event loop

2009-03-11 Thread Mike Manzano
That was exactly it. Thank you very much! Mike On Mar 11, 2009, at 11:48 AM, Andy Lee wrote: I'm guessing the problem is that you are only calling setFrame: on subview 0, thereby increasing the total width of the subviews. You are assuming subview 1 will adjust by the same amount as you a

Re: problems with NSTextField destroying background

2009-03-11 Thread Benjamin Stiglitz
> My problem is, I want the NSTextField to be transparent (and show the > NSBox behind), but instead it's making a hole in the NSBox to show the > desktop, what am I missing? For historical reasons the NSTextField fills its content with NSRectFill, which uses the NSCompositeCopy compositing op

Time Zone Names

2009-03-11 Thread Rick Mann
According to the docs, acceptable time zone names include names like "US/Pacific". What are the other names that can be used? Central, Mountain, Atlantic? What's Hawaii's in this style? I can't find "US/*" names in the list supplied by [NSTimeZone knownTimeZoneNames], or in online sources.

Re: State of performing tasks with elevated privileges

2009-03-11 Thread Nick Zitzmann
On Mar 11, 2009, at 12:52 PM, Sidney San Martín wrote: "You may be tempted to use the function AuthorizationExecuteWithPrivileges to perform privileged operations rather than creating and calling your own setuid tool. Although this might seem like an easy solution, using the Authorizatio

Re: Time Zone Names

2009-03-11 Thread A.M.
On Mar 11, 2009, at 3:15 PM, Rick Mann wrote: According to the docs, acceptable time zone names include names like "US/Pacific". What are the other names that can be used? Central, Mountain, Atlantic? What's Hawaii's in this style? I can't find "US/*" names in the list supplied by [NSTimeZ

Re: problems with NSTextField destroying background

2009-03-11 Thread Joel Norvell
Hi Memo, Try doing setDrawsBackground:NO when you initialize your NSTextFields. HTH, Joel ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderat

Re: Time Zone Names

2009-03-11 Thread Nick Zitzmann
On Mar 11, 2009, at 1:15 PM, Rick Mann wrote: According to the docs, acceptable time zone names include names like "US/Pacific". What are the other names that can be used? Central, Mountain, Atlantic? What's Hawaii's in this style? If you'd like to know, then take a look at the contents of

Re: Odd interaction of NSTrackingArea behaviour with drag and drop [BUG?]

2009-03-11 Thread Luke Evans
Well, further playing strongly suggests this is a bug to me (and I'll log it as such). The stuttering ...mouseEntered-mouseExited...mouseEntered- mouseExited... events as you drag within a single tracking area happen even in the simplest NSView: http://idisk.mac.com/luke_e-Public/TrackingTe

Re: Time Zone Names

2009-03-11 Thread Rick Mann
On Mar 11, 2009, at 12:25:49, Nick Zitzmann wrote: On Mar 11, 2009, at 1:15 PM, Rick Mann wrote: According to the docs, acceptable time zone names include names like "US/Pacific". What are the other names that can be used? Central, Mountain, Atlantic? What's Hawaii's in this style? If y

Re: Time Zone Names

2009-03-11 Thread Rick Mann
On Mar 11, 2009, at 12:29:05, Philip Ershler wrote: From the Date & Time control panel Hawaii seems to be HST (ST denoting standard time I believe. Central is currently CDT (for daylight savings). Mountain is MDT, Eastern is EDT and Atlantic is ADT. Thanks. The problem I'm facing is that

Re: Time Zone Names

2009-03-11 Thread Nick Zitzmann
On Mar 11, 2009, at 2:14 PM, Rick Mann wrote: I can't find "US/*" names in the list supplied by [NSTimeZone knownTimeZoneNames], or in online sources. That's because they were taken out in Leopard. Several other countries' were as well. Huh. They seem to exist in /usr/share/zoneinfo W

Re: Time Zone Names

2009-03-11 Thread Rick Mann
On Mar 11, 2009, at 13:16:33, Nick Zitzmann wrote: On Mar 11, 2009, at 2:14 PM, Rick Mann wrote: I can't find "US/*" names in the list supplied by [NSTimeZone knownTimeZoneNames], or in online sources. That's because they were taken out in Leopard. Several other countries' were as well.

Re: Time Zone Names

2009-03-11 Thread Nick Zitzmann
On Mar 11, 2009, at 2:18 PM, Rick Mann wrote: I see. Do you know why that was done? No. I can only guess that they were redundant... Nick Zitzmann ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do n

subclassing UIScrollView

2009-03-11 Thread David Cake
I've sub-classed UI Scroll view. Ultimately, what I am trying to do is allow scrolling in only certain directions. Just using a delegate, I can determine which direction scrolling is taking place it, but there doesn't seem to be any way I can do anything about it until it is over. My

NSMenuItem Binding Problem

2009-03-11 Thread Adil Saleem
Hi,   I am having a little difficulty with bindings of NSMenuItem. I am binding it's value with an integer variable (as it says in the documentation online). The value 1 is supposed to set it's state ON and 0 to OFF and -1 to mixed state.   However, the problem is that the actual state of the m

Re: subclassing UIScrollView

2009-03-11 Thread David Duncan
On Mar 11, 2009, at 2:39 PM, David Cake wrote: I've sub-classed UI Scroll view. Ultimately, what I am trying to do is allow scrolling in only certain directions. Just using a delegate, I can determine which direction scrolling is taking place it, but there doesn't seem to be any way I can

Is cascading Nib Loading from -awakeFromNib permissible?

2009-03-11 Thread Stuart Malin
In my MainMenu Nib I have a controller object. The code for that controller object has an -awakeFromNib method. That method invokes NSBundle's -loadNibNamed: method to load yet another Nib. Doing this leads to repeating invocations of the -awakeFromNib method of the initial controller (it i

Re: Is cascading Nib Loading from -awakeFromNib permissible?

2009-03-11 Thread Stuart Malin
On Mar 11, 2009, at 12:37 PM, Dave Keck wrote: It looks like this is your answer: http://lists.apple.com/archives/cocoa-dev/2008/Apr/msg02276.html It sounds like the object is the file's owner of the nibs that you're loading using loadNibNamed:. Is this correct? Also check out: http://www.go

Karaoke like algorithm

2009-03-11 Thread Ariel Rodriguez
I'm working on a Karaoke-like application. I need to print out to the screen text lines at a given time, and then, paint each word at a given time. I keep thinking on an elegant way to do such that, and, i hace to tell, i am afraid, i have not get it right :(. Here's what i am doing (in pseu

Re: Is cascading Nib Loading from -awakeFromNib permissible?

2009-03-11 Thread Ken Thomases
On Mar 11, 2009, at 5:49 PM, Stuart Malin wrote: I am getting infinite calls, not double calls. It sounds to me like you're getting double calls and you're turning them into infinite calls. If you load a nib inside of -awakeFromNib, and you don't guard against being called again, you'll l

Re: Is cascading Nib Loading from -awakeFromNib permissible?

2009-03-11 Thread Stuart Malin
On Mar 11, 2009, at 1:03 PM, Ken Thomases wrote: On Mar 11, 2009, at 5:49 PM, Stuart Malin wrote: I am getting infinite calls, not double calls. It sounds to me like you're getting double calls and you're turning them into infinite calls. If you load a nib inside of - awakeFromNib, and

Re: How to get all directories and folders in Tree format

2009-03-11 Thread Graham Cox
On 11/03/2009, at 5:58 PM, haresh vavdiya wrote: Hi All, In my application, i have to display all the directories and folders of these directory on left side and user can reach their particular folder and he can get all content of that folder. Like, we want to open Examples folde

Re: Garbage collected and non-garbage collected

2009-03-11 Thread Greg Parker
On Mar 11, 2009, at 4:31 PM, Robert Mullen wrote: Approach 2 seems appealing but my initial go at it went less than sterling. All access to the struct appears to be incorrect and whereas most of the data contained before seemed to have integrity now it almost immediately bombs with either

Weak Linking Crash

2009-03-11 Thread Simone Manganelli
So I'm trying to weak link the SDL_mixer framework (svn source avaliable here: http://svn.libsdl.org/trunk/SDL_mixer ) to a Cocoa project, the Mac OS X port of Descent 2 (svn source available here: https://d2x-xl.svn.sourceforge.net/svnroot/d2x-xl ). I've followed the instructions on Apple'

Re: Weak Linking Crash

2009-03-11 Thread Greg Parker
On Mar 11, 2009, at 5:47 PM, Simone Manganelli wrote: So I'm trying to weak link the SDL_mixer framework (svn source avaliable here: http://svn.libsdl.org/trunk/SDL_mixer ) to a Cocoa project, the Mac OS X port of Descent 2 (svn source available here: https://d2x-xl.svn.sourceforge.net/svnroot

Re: State of performing tasks with elevated privileges

2009-03-11 Thread Michael Ash
On Wed, Mar 11, 2009 at 3:22 PM, Nick Zitzmann wrote: > What it's saying is AEWP() will run pretty much anything you tell it to run. > That is not always a good thing, because the secure tool can be swapped by > some malware, which would cause AEWP() to run the wrong tool. This is one of > the few

Re: Poof! Recently-saved Core Data document suddenly gets dirty

2009-03-11 Thread Dave Fernandes
I recently had this problem when opening existing documents in Tiger. No problem in Leopard. It helped me figure out what was changing by overriding willChangeValueForKey in my NSManagedObject subclass. (You are never supposed to do this in shipping code.) #ifdef DEBUG_MANAGED_OBJECT_CHANGE

Re: subclassing UIScrollView

2009-03-11 Thread David Cake
At 2:47 PM -0700 11/3/09, David Duncan wrote: On Mar 11, 2009, at 2:39 PM, David Cake wrote: I've sub-classed UI Scroll view. Ultimately, what I am trying to do is allow scrolling in only certain directions. Just using a delegate, I can determine which direction scrolling is taking place it,

Re: Weak Linking Crash

2009-03-11 Thread Simone Manganelli
Il giorno Mar 11, 2009, alle ore 6:22 PM, Greg Parker ha scritto: -weak_framework often doesn't work by itself. If the function declaration isn't marked weak_import in the header file, then the compiler may optimize out your `function != NULL` check and call the weak-linked function anyway.

Re: Time Zone Names

2009-03-11 Thread Andrew Thompson
These are called Olsen names. One typically uses a city style. e.g. America/New_York, Europe/London. Which is a bit arbitrary but captures the DST thing well. In theory, the timezone ET captures EST and EDT but the 2 letter names are even more ambiguous than the 3 letter names, and I am not