Hello, I'm studing cocoa and trying to create an app as closest as possible
of a real app. It's a simple app the consume the rest api of Gist (
gist.github.com). My source code is in github (
http://github.com/danielvlopes/Snipper)

I started separating all the components of my screen in to diferent nibs and
ViewControllers. Everything is ok, but I have a strange behavior when I load
the views for my Splitview.

I have the following nibs:
MainMenu.xib
MainWindow.xib
SidebarView.xib
ContentView.xib

My MainWindow.xib is controlled by MainWindowController and in that file I
load the other nibs inside the splitview that lives in MainWindow.xib. I
also do a HTTP request to load my snippets inside a model called Library. In
the line bellow I create the controllers for both sides of splitView and
added him as subviews.

http://github.com/danielvlopes/Snipper/blob/master/Classes/Controllers/MainWindowController.m#L47

This method is called in initWithWindowNibName and right after that I call
the method to do the HTTP request. The problem is that HTTP request delays
the return of self in initWithWindowNibName and this causes a blank screen
before it finish. There is any way to do the HTTP request assincronously?

The images of the problem:
http://cl.ly/2QdS and http://cl.ly/2Qfi

Thanks in advance and sorry for the big question.

--
Daniel Lopes
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to