Re: BSD TCP Programming on iPad

2011-04-28 Thread Bing Li
Dear Lance, Your experiences are important to me. I would like to use BSD sockets to implement the peer-to-peer model. I got a basic problem. I follow the book, Unix Network Programming, 3rd edition. When compiling the simple code, TCPEchoServer, some errors exist in unp.h. Moreover, the basic AP

How to store main window frame to user defaults?

2011-04-28 Thread Vyacheslav Karamov
Hi All! I need to save main window size and position to user defaults: NSValue * rect = [NSValue valueWithRect: [[NSApp mainWindow] frame]]; [[NSUserDefaults standardUserDefaults] setObject:rect forKey:@"MainWndFrame"]; but console output is: 2011-04-28 11:45:00.139 UserDefaults[32801:a0f]

Re: How to store main window frame to user defaults?

2011-04-28 Thread Aaron Burghardt
Use NSStringFromRect() and NSRectFromString() to convert to/from a string to store in the defaults. However, it might be easier to set frameAutosaveName and let the window save and restore the frame itself. Just enter the key in the autosave attribute in Interface Builder and it should work. Aa

Show UIActivityIndicatorView asynchronously

2011-04-28 Thread Philip Vallone
Hi, I have a UIViewController that can take a few seconds to load. The view searches an XML file and eventually displays the resuts. I want to show a UIActivityIndicatorView while the view loads. Unfortunately they are on the same thread. How can I get the UIActivityIndicatorView to display be

Re: How to store main window frame to user defaults?

2011-04-28 Thread Vyacheslav Karamov
I can't use Interface builder, because it crashes while opening NIB file. I'm currently using XCode 3.2.6, but NIB file was created with IB 2.x using plug-in. So, where is it better to save main window frame? I've tried to do do it in [NSWindow close]: - (void) close { NSString * rc = NSString

Accessing NSWIndowController attribute from a subview in IB

2011-04-28 Thread Ben Golding
I feel like I should be able to figure this out but I feel like I'm going around circles. I've looked through the mailing list and can't find anything similar (but I might be searching using the wrong terms). I have a document-based app which loads a couple of NSWindowController subclasses.

Re: How to store main window frame to user defaults?

2011-04-28 Thread Matt Gough
How about calling just calling [NSWindow setFrameAutosaveName:@"YourAutosaveName"] during awakeFromNib? Matt On 28 Apr 2011, at 11:32, Vyacheslav Karamov wrote: > I can't use Interface builder, because it crashes while opening NIB file. I'm > currently using XCode 3.2.6, but NIB file was crea

Re: CoreData: "Could not fulfill a fault", but only sometimes…

2011-04-28 Thread Felix Franz
Hi, On Apr 27, 2011, at 11:55 PM, Sean McBride wrote: > On Thu, 21 Apr 2011 10:52:31 +0200, Felix Franz said: > >> I have a strange bug in my CoreData-Application (sql store). I received >> bug reports where the program throws >> an exception "Could not fulfill a fault". This happens while load

Re: How to store main window frame to user defaults?

2011-04-28 Thread Vyacheslav Karamov
It works! Thank you! P.S. But I still can't understand why frame saving code doesn't work from [NSWindow close] 28-Apr-11 14:35, Matt Gough пишет: How about calling just calling [NSWindow setFrameAutosaveName:@"YourAutosaveName"] during awakeFromNib? Matt On 28 Apr 2011, at 11:32, Vyaches

Re: Stack of NSWindow sheets

2011-04-28 Thread Andreas Mayer
Am 28.04.2011 um 04:31 schrieb Lee Ann Rucker: > It would be nice if there was some sort of built-in combining stack, > especially for the info-only dialogs, the way starting multiple file copies > in the Finder gives you one window with multiple sections instead of multiple > windows. Why no

Binding a to-many relationship into a table subview of NSCollectionItemView

2011-04-28 Thread Gustavo Pizano
Hello all. I have been researching and I only found somebody who had the same problem, but the question went unsolved, so Im sorry if I ask again, I hope somebody can enlighten me. I have a NSCollectionView and its respective NSCollectionViewItem, also I have a NSTableView wich displays the

Re: Aliases with NDAlias not appearing where I tell them to be.

2011-04-28 Thread Sean McBride
On Wed, 27 Apr 2011 18:17:21 -0400, Kevin Muldoon said: >Alias file! I've not used NDAlias for alias files, only for alias records. I just looked at the example, and it does seems somewhat crusty. Still, I think you are misunderstanding the 'fromFile' parameter. Have you read Apple's docs for

Re: Show UIActivityIndicatorView asynchronously

2011-04-28 Thread Alexander Spohr
Am 28.04.2011 um 12:26 schrieb Philip Vallone: > Hi, > > I have a UIViewController that can take a few seconds to load. The view > searches an XML file and eventually displays the resuts. I want to show a > UIActivityIndicatorView while the view loads. Unfortunately they are on the > same th

Re: BSD TCP Programming on iPad

2011-04-28 Thread Scott Ribe
On Apr 28, 2011, at 2:45 AM, Bing Li wrote: > But I don't > know which frameworks in Cocoa should be added so that Socket and Bind can > be compiled. I think it's CoreFoundation or CoreServices... -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice __

Re: Accessing NSWIndowController attribute from a subview in IB

2011-04-28 Thread Alexander Spohr
Am 28.04.2011 um 13:28 schrieb Ben Golding: > I have a document-based app which loads a couple of NSWindowController > subclasses. That's fine. In one of the subclasses, I load a nib with a > NSView subclass. It wants to access one of the instance vars in the window > controller subclass.

Re: How to store main window frame to user defaults?

2011-04-28 Thread Aaron Burghardt
On Apr 28, 2011, at 7:42 AM, Vyacheslav Karamov wrote: > It works! > Thank you! > > P.S. But I still can't understand why frame saving code doesn't work from > [NSWindow close] > > 28-Apr-11 14:35, Matt Gough пишет: >> How about calling just calling [NSWindow >> setFrameAutosaveName:@"YourAut

Tab spacing in NSTextView

2011-04-28 Thread Дмитрий Николаев
Hello! I'm trying override - boundingBoxForControlGlyphAtIndex for NSTypesetter, but logs shows that this method never called. If this is most appropriate place to override position of the tab ?___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Re: Binding a to-many relationship into a table subview of NSCollectionItemView

2011-04-28 Thread Gustavo Pizano
Hello again me. So I solved this doing the following. Separate the NSColletionViewItem into a different XIB. In the Main Xib the the Object Controller for the NSColletionViewItem tell it to load from that new XIB. Now the funny part, Bindings and Core Data still doesn't work, so what I did was

Re: Tab spacing in NSTextView

2011-04-28 Thread Kyle Sluder
2011/4/28 Дмитрий Николаев : > Hello! > > I'm trying override - boundingBoxForControlGlyphAtIndex for NSTypesetter, but > logs shows that this method never called. > > If this is most appropriate place to override position of the tab ? No. It will be *far* easier to use -[NSParagraphStyle tabStop

Re: How to store main window frame to user defaults?

2011-04-28 Thread Quincey Morris
On Apr 28, 2011, at 04:42, Vyacheslav Karamov wrote: > P.S. But I still can't understand why frame saving code doesn't work from > [NSWindow close] It doesn't work because NSValue objects aren't valid in a property list, which is what the user defaults are. That's why, if you can't using the w

Re: Accessing NSWIndowController attribute from a subview in IB

2011-04-28 Thread Quincey Morris
On Apr 28, 2011, at 04:28, Ben Golding wrote: > In the window that's loaded from Face.xib, there's a custom view > (SundialView) which needs to access the sundial instance variable in File's > Owner. I just don't seem to be able to control-drag in some order to hook > them up and I think I sho

Re: Show UIActivityIndicatorView asynchronously

2011-04-28 Thread Matt Neuburg
On Thu, 28 Apr 2011 06:26:17 -0400, Philip Vallone said: >Hi, > >I have a UIViewController that can take a few seconds to load. The view >searches an XML file and eventually displays the resuts. I want to show a >UIActivityIndicatorView while the view loads. Unfortunately they are on the >sam

Re: Show UIActivityIndicatorView asynchronously

2011-04-28 Thread Philip Vallone
Thanks. Works like a charm. Regards, Phil Sent from Phil's iPhone On Apr 28, 2011, at 1:38 PM, Matt Neuburg wrote: > On Thu, 28 Apr 2011 06:26:17 -0400, Philip Vallone > said: >> Hi, >> >> I have a UIViewController that can take a few seconds to load. The view >> searches an XML file and

Re: Aliases with NDAlias not appearing where I tell them to be.

2011-04-28 Thread Kevin Muldoon
FSNewAlias() huh? I'll take a look. So, you think I'm reversing the 'fromFile' parameter with 'aliasWithPath' ? That would be embarrassing! Still, the example code shows the following... NSString * kDirOfTestProject = @"~/Developer/Projects/NDAlias/"; // you need to change this to the location of

Re: Aliases with NDAlias not appearing where I tell them to be.

2011-04-28 Thread Quincey Morris
On Apr 28, 2011, at 11:05, Kevin Muldoon wrote: > if( [[NDAlias aliasWithPath:aFilePath fromPath:NSHomeDirectory()] > writeToFile:aliasFilePath] ) Yes, but this isn't what you did, or what you wanted. The sample code is intentionally putting the created alias file in the *current* directo

Re: iOS Version Install Base

2011-04-28 Thread Steve Christensen
We're only supporting iOS 4.0 and later since we feel like there's sufficient adoption rate to make it worthwhile. Certainly if you feel like you still need to support pre-4.0, you could build against the current 4.x SDK, set the deployment target to be iOS 3.x (or whatever), and conditionally i

Re: Aliases with NDAlias not appearing where I tell them to be.

2011-04-28 Thread Sean McBride
On Thu, 28 Apr 2011 14:05:46 -0400, Kevin Muldoon said: >Still, the example code shows the following... Update from git... I have cleaned it up a bit. >The variable aFilePath passed into the function testCreatingAliasFileFor() >is clearly the full path of the file I want an alias of. Correct.

Re: Aliases with NDAlias not appearing where I tell them to be.

2011-04-28 Thread Sean McBride
On Thu, 28 Apr 2011 14:05:46 -0400, Kevin Muldoon said: >[[NSWorkspace sharedWorkspace] selectFile:aliasFilePath >inFileViewerRootedAtPath:@""]; This was wrong though, as 'aliasFilePath' was not a full path. I've fixed that in git. --

Re: iOS Version Install Base

2011-04-28 Thread koko
Steve - I like your suggestion ... thanks. -koko On Apr 28, 2011, at 12:34 PM, Steve Christensen wrote: > We're only supporting iOS 4.0 and later since we feel like there's sufficient > adoption rate to make it worthwhile. Certainly if you feel like you still > need to support pre-4.0, you c

onSocketDidDisconnect in CocoaAsyncSocket

2011-04-28 Thread Bing Li
Dear all, I started to use CocoaAsyncSocket to establish TCP connections among iPads. I got a problem. According to the references ( http://code.google.com/p/cocoaasyncsocket/wiki/Reference_AsyncSocket), onSocketDidDisconnect would be invoked immediately if the connection is not already disconnec

Re: Stack of NSWindow sheets

2011-04-28 Thread Lee Ann Rucker
Oh, it's probably not. So many other interesting things are higher up the stack, though. - Original Message - From: "Andreas Mayer" To: cocoa-dev@lists.apple.com Sent: Thursday, April 28, 2011 5:38:50 AM Subject: Re: Stack of NSWindow sheets Am 28.04.2011 um 04:31 schrieb Lee Ann Rucke

Re: onSocketDidDisconnect in CocoaAsyncSocket

2011-04-28 Thread Michael Dautermann
> > I started to use CocoaAsyncSocket to establish TCP connections among iPads. > > I got a problem. According to the references ( > http://code.google.com/p/cocoaasyncsocket/wiki/Reference_AsyncSocket), > onSocketDidDisconnect would be invoked immediately if the connection is not > already disco

Scroll view within scroll view blocks scrolling

2011-04-28 Thread Indragie Karunaratne
Despite the confusing title, I'm sure this is an issue that someone else has run into before. I have a parent scroll view that houses a bunch of subviews, including an NSTextView (and its own scroll view). The problem is that if I try to scroll vertically through the parent view, the text view's

[Solved] Re: Accessing NSWIndowController attribute from a subview in IB

2011-04-28 Thread Ben Golding
On 29/04/2011, at 00:17, Alexander Spohr wrote: >> I have a document-based app which loads a couple of NSWindowController >> subclasses. That's fine. In one of the subclasses, I load a nib with a >> NSView subclass. It wants to access one of the instance vars in the window >> controller sub

Re: Scroll view within scroll view blocks scrolling

2011-04-28 Thread Kyle Sluder
On Thu, Apr 28, 2011 at 4:12 PM, Indragie Karunaratne wrote: > Despite the confusing title, I'm sure this is an issue that someone else has > run into before. I have a parent scroll view that houses a bunch of subviews, > including an NSTextView (and its own scroll view). The problem is that if

Re: Scroll view within scroll view blocks scrolling

2011-04-28 Thread Michael Dautermann
On Apr 28, 2011, at 7:12 PM, Indragie Karunaratne wrote: > Despite the confusing title, I'm sure this is an issue that someone else has > run into before. I have a parent scroll view that houses a bunch of subviews, > including an NSTextView (and its own scroll view). The problem is that if I

Re: Scroll view within scroll view blocks scrolling

2011-04-28 Thread Quincey Morris
On Apr 28, 2011, at 16:37, Michael Dautermann wrote: > Scroll views within scroll views seem like potentially VERY confusing UI's > for end users. I can't think of any major shipping apps that have scrolling > NSTextViews contained within a parent NSScrollView. Well, Safari.

Re: Scroll view within scroll view blocks scrolling

2011-04-28 Thread Indragie Karunaratne
I have resized all my text views so that all the content is visible without vertical scrolling, and I have disabled the vertical scroller on its scroll view. I would remove it from the scroll view entirely and avoid this issue, but I still need the text view's scroll view to horizontally scroll

Re: Scroll view within scroll view blocks scrolling

2011-04-28 Thread Michael Dautermann
On Apr 28, 2011, at 8:07 PM, Indragie Karunaratne wrote: > I have resized all my text views so that all the content is visible without > vertical scrolling, and I have disabled the vertical scroller on its scroll > view. I would remove it from the scroll view entirely and avoid this issue, > b

Re: Scroll view within scroll view blocks scrolling

2011-04-28 Thread Indragie Karunaratne
I have one inside another. The parent scroll view contains a bunch of stuff (the text view being just one of the subviews). I would use the text view without its own scroll view if it weren't for the fact that I still need horizontal text scrolling. On 2011-04-28, at 6:22 PM, Michael Dautermann

Re: Scroll view within scroll view blocks scrolling

2011-04-28 Thread Kyle Sluder
On Thu, Apr 28, 2011 at 5:07 PM, Indragie Karunaratne wrote: > I have resized all my text views so that all the content is visible without > vertical scrolling, and I have disabled the vertical scroller on its scroll > view. I would remove it from the scroll view entirely and avoid this issue,

Re: Scroll view within scroll view blocks scrolling

2011-04-28 Thread Indragie Karunaratne
I can resort to this if there is no other option, but I would prefer not to have to do that because extending the text view past the margins I have on the parent view wouldn't look that great. On 2011-04-28, at 6:53 PM, Kyle Sluder wrote: > On Thu, Apr 28, 2011 at 5:07 PM, Indragie Karunaratne

Compile Error Wierdness

2011-04-28 Thread koko
I have built an iOS Cocoa Touch Static library. The source is C++. Builds with no error or warnings. NOw I add this library to a View based iOS project. I add a C++ file defining a test C++ class. IN the .cpp I include a header for access to library finctions ... and here is what is wied to

Re: Scroll view within scroll view blocks scrolling

2011-04-28 Thread Indragie Karunaratne
Figured out a super easy solution for this. Override scrollWheel: in an NSScrollView subclass: - (void)scrollWheel:(NSEvent *)theEvent { [super scrollWheel:theEvent]; [[self nextResponder] scrollWheel:theEvent]; } Works great :-) On 2011-04-28, at 6:53 PM, Kyle Sluder wrote: > On Thu,

Re: Scroll view within scroll view blocks scrolling

2011-04-28 Thread Andy Lee
On Apr 28, 2011, at 8:22 PM, Michael Dautermann wrote: > p.s. Quincey mentioned Safari. Bleh. I should've thought of the browsers. > Safari has to handle all kinds of completely fugly website layouts. Also iTunes -- the Apps tab, for example. I suspect, like Safari, it's using a WebView. I won

Re: Scroll view within scroll view blocks scrolling

2011-04-28 Thread Conrad Shultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 4/28/11 7:42 PM, Indragie Karunaratne wrote: > Figured out a super easy solution for this. Override scrollWheel: in > an NSScrollView subclass: > > - (void)scrollWheel:(NSEvent *)theEvent { [super > scrollWheel:theEvent]; [[self nextResponder] scro

Re: Scroll view within scroll view blocks scrolling

2011-04-28 Thread Indragie Karunaratne
Notice that in my code I'm making a call to super, so using the above code, scrolling inside the text view would scroll both the parent scroll view and the text view scroll view at the same time. In my case, 2) was the only important thing for me because my text views don't scroll vertically (on

cpp class keywotd

2011-04-28 Thread koko
I am refining my previous post. What could cause the cpp class keyword to not be recognized when compiling an iOS app? BMetaData.h:13 class BMetaData /Volumes/_working/_working/_iOS/DisplayEmbroidery/../../LibBase/LibBase/BMetaData.h:13:0 /Volumes/_working/_working/_iOS/DisplayEmbroidery/../

Re: cpp class keywotd

2011-04-28 Thread koko
Well, apparently, compiling for iOS app versus iOS static lib treats the processing of the .pch diifferently. Moving some things out of .pch in the app build which are in the .pch of the lib build solved my problem. I would like to know more about this if anyone can shed some light. -koko On

Re: cpp class keywotd

2011-04-28 Thread Quincey Morris
On Apr 28, 2011, at 20:49, koko wrote: > Well, apparently, compiling for iOS app versus iOS static lib treats the > processing of the .pch diifferently. > Moving some things out of .pch in the app build which are in the .pch of the > lib build solved my problem. > I would like to know more about

Re: Scroll view within scroll view blocks scrolling

2011-04-28 Thread Andy Lee
By the way, this is has come up before: --Andy ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comm

Re: cpp class keywotd

2011-04-28 Thread B.J. Buchalter
On Apr 28, 2011, at 11:48 PM, koko wrote: > Well, apparently, compiling for iOS app versus iOS static lib treats the > processing of the .pch diifferently. > Moving some things out of .pch in the app build which are in the .pch of the > lib build solved my problem. > I would like to know more a