iOS: Automatically resizing subviews

2011-06-05 Thread Development
I thought I understood how auto resizing worked but I don't According to the docs if I want to automatically resize all the subviews of a view I need to set the View up with [self setAutoresizesSubviews:YES]; self.contentMode =UIViewContentModeScaleToFill; No? I tried this but

Re: [ANN] CoreParse

2011-06-05 Thread Angus Hardie
On 5 Jun 2011, at 18:22, Jens Alfke wrote: > > On Jun 5, 2011, at 6:21 AM, Thomas Davie wrote: > >> I've just completed firming up the API and documentation for CoreParse. >> CoreParse provides a powerful tokenisation and parsing engine, which uses >> shift-reduce parsing (unlike ParseKit) t

Re: Asynchronous Notification Does NOT Work

2011-06-05 Thread Bing Li
Dear Ken and Jens, I appreciate so much for your detailed explanations! In my system, a server needs to handle requests from remote clients. Multiple local threads are raised to listen to the specific port concurrently. When a request is received by one of the thread, it must notify other respond

Re: [ANN] CoreParse

2011-06-05 Thread Kyle Sluder
How 'bout a link? ;-) --Kyle Sluder (Sent from the bar at BJ's Brewhouse, in Apple HQ's parking lot) On Jun 5, 2011, at 6:21 AM, Thomas Davie wrote: > Hi guys, > > I guess this will get rather overshadowed by some other guy's announcements > in the near future, but I thought I'd throw this ou

Re: [ANN] CoreParse

2011-06-05 Thread Thomas Wetmore
On Jun 5, 2011, at 6:12 PM, Thomas Davie wrote: > On 5 Jun 2011, at 18:22, Jens Alfke wrote: >> On Jun 5, 2011, at 6:21 AM, Thomas Davie wrote: >> >>> I've just completed firming up the API and documentation for CoreParse. >>> CoreParse provides a powerful tokenisation and parsing engine, which

Re: [ANN] CoreParse

2011-06-05 Thread Thomas Davie
On 5 Jun 2011, at 18:22, Jens Alfke wrote: > > On Jun 5, 2011, at 6:21 AM, Thomas Davie wrote: > >> I've just completed firming up the API and documentation for CoreParse. >> CoreParse provides a powerful tokenisation and parsing engine, which uses >> shift-reduce parsing (unlike ParseKit) t

Re: Asynchronous Notification Does NOT Work

2011-06-05 Thread Steve Sisak
At 3:45 AM +0800 6/6/11, Bing Li wrote: In this case, notification might occur among two threads and both of them are not the main thread. I think I can use synchronous notification and threading together to replace asynchronous notification. How to you think about that? I suspect the problem i

Re: Asynchronous Notification Does NOT Work

2011-06-05 Thread Ken Thomases
On Jun 5, 2011, at 2:45 PM, Bing Li wrote: > In this case, notification might occur among two threads and both of them > are not the main thread. This can't work. Notifications do not cross threads. They are delivered on the same thread in which they're posted or queued. What are you trying t

Re: Asynchronous Notification Does NOT Work

2011-06-05 Thread Bing Li
Dear Jens, Thanks so much for your reply! But I have not got a tutorial that I can follow to program RunLoop. So I decide to use threading and signal/wait to control threads. Is it fine? In this case, notification might occur among two threads and both of them are not the main thread. I think I

Re: Howto eliminate the delay for the first call of -(NSMenu*)menuForEvent: (NSTableView class)?

2011-06-05 Thread Ken Thomases
On Jun 5, 2011, at 2:11 PM, Nick wrote: > Thanks for the response. You're welcome. > Yes, submenu Services, in contrary to other submenus, takes some time to pop > up. > I take it, my application has nothing to do with that? Probably correct. Still, if I were you, I'd try my best to figure o

Re: Asynchronous Notification Does NOT Work

2011-06-05 Thread Jens Alfke
On Jun 5, 2011, at 11:59 AM, Bing Li wrote: > One issue is that the notification job is done in a thread I created > explicitly. It is the potential reason? I will test it. Oh, that would do it. The notifications are going to be queued on that thread’s runloop then. Did you create a runloop fo

Re: Howto eliminate the delay for the first call of -(NSMenu*)menuForEvent: (NSTableView class)?

2011-06-05 Thread Nick
Ken, Thanks for the response. Yes, submenu Services, in contrary to other submenus, takes some time to pop up. I take it, my application has nothing to do with that? On other machines it will work just fine without this delay? Do "Services" pop up without delays on your machine? Thanks 2011/6/5 Ke

Re: Asynchronous Notification Does NOT Work

2011-06-05 Thread Bing Li
Dear Ken, According to your reply, I think the threads I created explicitly caused the problem? So asynchronous notification cannot be used in this case? Thanks so much! Best, Bing On Mon, Jun 6, 2011 at 2:34 AM, Ken Thomases wrote: > On Jun 5, 2011, at 11:20 AM, Bing Li wrote: > > > My syste

Re: Asynchronous Notification Does NOT Work

2011-06-05 Thread Bing Li
Dear Jens, I just checked carefully. The instance of NSNotificationQueue keeps alive when posting. One issue is that the notification job is done in a thread I created explicitly. It is the potential reason? I will test it. Thanks, Bing On Mon, Jun 6, 2011 at 1:13 AM, Jens Alfke wrote: > > On

Re: Asynchronous Notification Does NOT Work

2011-06-05 Thread Ken Thomases
On Jun 5, 2011, at 11:20 AM, Bing Li wrote: > My system is a Cocoa Application. I know RunLoop is created automatically in > such a project. So asynchronous notification should work. A Cocoa application does automatically run the run loop of the main thread, if you allow it. So, I have a couple

Re: [ANN] CoreParse

2011-06-05 Thread Jens Alfke
On Jun 5, 2011, at 6:21 AM, Thomas Davie wrote: > I've just completed firming up the API and documentation for CoreParse. > CoreParse provides a powerful tokenisation and parsing engine, which uses > shift-reduce parsing (unlike ParseKit) to support a wide range of context > free grammars. >

Re: Howto eliminate the delay for the first call of -(NSMenu*)menuForEvent: (NSTableView class)?

2011-06-05 Thread Jens Alfke
On Jun 5, 2011, at 7:40 AM, Ken Thomases wrote: > You probably have a misbehaving service (or application which provides a > service) installed. Or something is corrupted in your system configuration. > > pbs is the pasteboard server. It coordinates the pasteboard and, in that > capacity, se

Re: Asynchronous Notification Does NOT Work

2011-06-05 Thread Jens Alfke
On Jun 5, 2011, at 9:20 AM, Bing Li wrote: >// This line does not work. > // [[[NSNotificationQueue alloc] > initWithNotificationCenter:[NSNotificationCenter defaultCenter]] > enqueueNotification:[NSNotification > notificationWithName:@"CONNECTION_DISCONNECTED" > object:self userInfo

Asynchronous Notification Does NOT Work

2011-06-05 Thread Bing Li
Dear all, I just learned the technique of asynchronous notification. This is the first time for me to use it in my system. However, I got a weird problem. Only synchronous notification works well. If replacing the synchronous notification lines of code with asynchronous ones, it does not work. My

Re: Good and updated book for iPhone development

2011-06-05 Thread Wilker
Thanks guys, I bought the: Beginning iPhone 4 Development: Exploring the iOS SDK Kindle Version It seems cool, but I will sure I will look for others later :) Thanks for you suggestions. --- Wilker Lúcio http://about.me/wilkerlucio/bio Kajabi Consultant +55 81 82556600 On Sat, Jun 4, 2011 at

Re: Howto eliminate the delay for the first call of -(NSMenu*)menuForEvent: (NSTableView class)?

2011-06-05 Thread Ken Thomases
On Jun 5, 2011, at 7:28 AM, Nick wrote: > Everything works fine, except that when the user clicks first time on the > TableView after application has loaded, i get this > "__CFServiceControllerBeginPBSLoadForLocalizations > timed out while talking to psb" message in the console output, and a few >

[ANN] CoreParse

2011-06-05 Thread Thomas Davie
Hi guys, I guess this will get rather overshadowed by some other guy's announcements in the near future, but I thought I'd throw this out there. I've just completed firming up the API and documentation for CoreParse. CoreParse provides a powerful tokenisation and parsing engine, which uses sh

Howto eliminate the delay for the first call of -(NSMenu*)menuForEvent: (NSTableView class)?

2011-06-05 Thread Nick
Hello! I am trying to add a context menu to the NSTableView. For this purpose, I have subclassed NSTableView, and implemented this method: -(NSMenu*)menuForEvent:(NSEvent*)evt { NSPoint point = [self convertPoint:[evt locationInWindow] fromView:NULL]; int column = [self columnAtPoi