Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Sinestro
Oct 31, 2010

The perfect day needs the perfect set of wheels.

Zhentar posted:

Probably because you haven't told your UITableView to use your controller as a data source.

Whut? I am letting my controller autocreate the view, the documentation states that dataSource is set to self.

Adbot
ADBOT LOVES YOU

OHIO
Aug 15, 2005

touchin' algebra

Sinestro posted:

Why is my loving UITableView being retarded and not displaying the data? I have implemented UITableViewDataSource on my controller, so what the gently caress?

ForumListViewController.m
ForumListViewController.h

How are you initializing your ForumListViewController? Maybe you accidentally called the wrong initializer. Are you sure your 'forums' array is being populated?

Sinestro
Oct 31, 2010

The perfect day needs the perfect set of wheels.

OHIO posted:

How are you initializing your ForumListViewController? Maybe you accidentally called the wrong initializer. Are you sure your 'forums' array is being populated?

code:
initialViewController = [[ForumListViewController alloc] init];
That is from my AppDelegate.

Zhentar
Sep 28, 2003

Brilliant Master Genius

Sinestro posted:

Whut? I am letting my controller autocreate the view, the documentation states that dataSource is set to self.

:doh: I checked the documentation before posting that.

Have you tried sticking a breakpoint in tableview: numberOfRowsInSection to see what you're returning?

Sinestro
Oct 31, 2010

The perfect day needs the perfect set of wheels.
It never fires.

Echo Video
Jan 17, 2004

could you please post the code for your appdelegate?

Sinestro
Oct 31, 2010

The perfect day needs the perfect set of wheels.

Echo Video posted:

could you please post the code for your appdelegate?

http://pastie.org/2393496 is the .m, the .h is stock.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Sinestro posted:

http://pastie.org/2393496 is the .m, the .h is stock.

Pretty sure you're leaking your UIWindow there. Otherwise nothing looks fishy. Can we see ForumListViewController?

Sinestro
Oct 31, 2010

The perfect day needs the perfect set of wheels.

pokeyman posted:

Pretty sure you're leaking your UIWindow there. Otherwise nothing looks fishy. Can we see ForumListViewController?

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Sinestro posted:

links I stupidly missed

Sorry!

I just grabbed your code and threw it into a new project and it works no problem, though obviously I'm faking the number of sections, number of rows, and their contents. What's the number of sections you're reporting to your table view?

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

stray posted:

Why is it so hard to find some decent sample code that shows you how to build an app in Xcode 4 that uses a UITabBarController at its root, where one of the tabs gives you a UINavigationController that lets you drill down from a UITableView to a UIView?

I mean, that's got to be one of the most common development scenarios, right? All I could find were a couple of videos, but one is from Xcode 3 and the other shows the guy dragging a nav controller into the tab bar's nib, then pointing it at a totally empty view. For example, when the nav controller is the root view, I know how to change the tab bar's color, but how would I change the color of the nav controller in that example? It kind of cuts off right before the most crucial step.

Sorry for the delay, I blame my kid. :colbert:

Sample project is up here: https://bitbucket.org/veddermatic/navitab/overview

But here's the step by step, which is so simple, I was able to figure it out!



  • Create new project from Tab Bar Application template.
  • Add new Class to your project that is a UITableViewController delegate (right click->New File -> UIViewController template -> pick Sublcass of: UITableViewController) Name it 'NavigationRoot' or something
  • Click on MainWindow.xib, and get into the expanded left view so you can drill down into things.
  • Expand the Tab Bar Controller so you can see the Tab Bar and the two View Controller objects in there (First View Controller and Second View Controller)
  • From the Library, drag in a Navigation Controller and nest it inside the Tab Bar Controller in-between the existing ones or before or after them: choose your own adventure! (you can delete either or both of the "stock" ones if you want.)
  • You will see a second view looking thing pop up in your editor. Do not panic, this is fine.
  • Expand the NAvigation Controller you just added
  • Click on the View Controller - Root View Controller, and in the inspector, change the class to NavigationRoot.
  • Edit your NavigationRoot.m file to give your table a row with some witty text.
  • Run your project in the simulator. Hooray!
  • Add another view controller, and edit your NavigationRoot.m to push it when you select your witty text row. (I am glossing over this step since I'm guessing you know how to do it.)
  • Run your project again!
  • Enjoy!

stray
Jun 28, 2005

"It's a jet pack, Michael. What could possibly go wrong?"

Lumpy posted:

Sample project is up here: https://bitbucket.org/veddermatic/navitab/overview
Who's the man? Lumpy's the man.

Thanks, buddy! I'll dive into the code this weekend!

Sinestro
Oct 31, 2010

The perfect day needs the perfect set of wheels.

pokeyman posted:

Sorry!

I just grabbed your code and threw it into a new project and it works no problem, though obviously I'm faking the number of sections, number of rows, and their contents. What's the number of sections you're reporting to your table view?

0. I honestly don't even know.

dizzywhip
Dec 23, 2005

I'm getting the following strange memory errors in my project that I can't figure out:

code:
malloc: auto malloc[3688]: attempted to remove unregistered weak referrer 0x102748e90
malloc: auto malloc[3688]: attempted to remove unregistered weak referrer 0x102748ee0
I've done a bit of diagnosing, but now I'm stuck.

First off, this is a standard Mac cocoa app using garbage collection. The error occurs infrequently (but consistently) when a CALayer object is being created within a particular method in my project, and the messages always come in pairs. Here's an example of a call stack when the error is logged (linked for huge).

In that particular call stack the error is being logged from a layer being created as the backing layer of a subview I'm creating. But the error can also happen when I'm just doing something like CALayer* layer = [CALayer layer].

Clearly it's a garbage collection issue, but I don't see what I could be doing wrong that could be causing this issue. The error is only occurring when this particular method is called (layers created elsewhere in the app haven't ever had this problem), so it also seems to be specific to this particular context. But again, I have no idea what's wrong.

It doesn't seem to have any noticeable effect from the user's perspective, but I'd still like to get rid of it. Anyone have any ideas on what might be causing it?

Echo Video
Jan 17, 2004

Sinestro posted:

0. I honestly don't even know.

maybe something is up with the 'forums' object that the table is using? I'd check its properties after it's had 'loadForums' called on it, and when it's being used as a table data source in functions like numberOfRowsInSection, to make sure that the appropriate data is actually stored in it. your table view might be displaying just fine - there just might not be any data to be displayed.

nolen
Apr 4, 2004

butts.
I've been out of the iPhone programming game for a while so I decided to update to the latest Xcode. Biggest mistake of my life apparently.

I removed the older versions by running the uninstaller scripts, downloaded 4.1.1 from the App Store, ran the installer, and launched Xcode.

It immediately crashed. I looked up some information online and I guess I have to reinstall iTunes to fix the crash? Okay, weird, but I did that. No more crash.

So I attempted to start a new test project and run it in the Simulator immediately. 13 errors and I haven't even touched a line of code? What the gently caress is this bullshit?



I've googled around a bit but can't find anything other than "reinstall 10.7 and try again". Please tell me that isn't the solution. I really really really shouldn't have to wipe my OS just to install this hosed up version of the developer tools...right?

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

nolen posted:

So I attempted to start a new test project and run it in the Simulator immediately. 13 errors and I haven't even touched a line of code? What the gently caress is this bullshit?



I've googled around a bit but can't find anything other than "reinstall 10.7 and try again". Please tell me that isn't the solution. I really really really shouldn't have to wipe my OS just to install this hosed up version of the developer tools...right?

Well, the errors all seem to stem from whatever build process not having permissions for the files/directories it needs to use. So: is your ~/Library folder owned by you? (chown -R or Get Info.) And can you try closing Xcode, deleting ~/Library/Developer, then opening Xcode again?

superh
Oct 10, 2007

Touching every treasure

nolen posted:

I've been out of the iPhone programming game for a while so I decided to update to the latest Xcode. Biggest mistake of my life apparently.

I removed the older versions by running the uninstaller scripts, downloaded 4.1.1 from the App Store, ran the installer, and launched Xcode.

It immediately crashed. I looked up some information online and I guess I have to reinstall iTunes to fix the crash? Okay, weird, but I did that. No more crash.

So I attempted to start a new test project and run it in the Simulator immediately. 13 errors and I haven't even touched a line of code? What the gently caress is this bullshit?



I've googled around a bit but can't find anything other than "reinstall 10.7 and try again". Please tell me that isn't the solution. I really really really shouldn't have to wipe my OS just to install this hosed up version of the developer tools...right?

Or, barring what pokeyman said, try using Disk Utility to repair permissions on the drive?

nolen
Apr 4, 2004

butts.

pokeyman posted:

And can you try closing Xcode, deleting ~/Library/Developer, then opening Xcode again?


After trying a Repair Permissions and nothing changing, I did this. It worked!


Thanks to both of you!

2nd Rate Poster
Mar 25, 2004

i started a joke
Can someone recommend a good merge tool that is not filemerge?

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

2nd Rate Poster posted:

Can someone recommend a good merge tool that is not filemerge?

git

Zhentar
Sep 28, 2003

Brilliant Master Genius
KDiff3 works well, although visually speaking it's not a well done port.

ynohtna
Feb 16, 2007

backwoods compatible
Illegal Hen

2nd Rate Poster posted:

Can someone recommend a good merge tool that is not filemerge?

If you mean a visual merge tool then P4merge from the Perforce toolkit is pretty powerful and has been a great assistance for those rare but painful overly postponed cross-team mega-branch convergences.

baby puzzle
Jun 3, 2011

I'll Sequence your Storm.
I'm having trouble building a C++ program.

edit: nevermind. I'll probably have to ask the author.

baby puzzle fucked around with this message at 02:04 on Aug 21, 2011

some kinda jackal
Feb 25, 2003

 
 
Looks like ObjC/CocoaTouch is a use-it-or-lose-it thing for me, so I'm going back to square one with CS193p and various books. I'm current on both XCode and MacOS X. Will I need to worry about things like ARC getting in my way if I start a brand new project today, or will they be transparent as long as I use the old memory model of manually retaining and releasing?

All of my material is pre Xcode4.2. I was hoping to wait until CS193p updated with an Xcode4 and hopefully new memory management model semester but I really want to start getting a handle on this skillset again, so I can't really afford to wait. I suppose if the new semester is on iTunes and starts up soon I won't be too heavily invested in the current semester that I can't just start over.

e: Oh it looks like I won't need to worry about ARC in 4.1 anyway I guess.

some kinda jackal fucked around with this message at 13:46 on Aug 22, 2011

nolen
Apr 4, 2004

butts.
So the latest Xcode only came with the 4.3 SDK and I'd like to at least try and target 4.2 to target a wider group of iOS owners.

http://developer.apple.com/ios/download.action?path=/ios/ios_sdk_4.2__final/xcode_3.2.5_and_ios_sdk_4.2_final.dmg

This link has the old Xcode and the 4.2 SDK, but before I waste time downloading it all, will I be able to just extract the 4.2 SDK from the installer and use it with Xcode 4.1?

some kinda jackal
Feb 25, 2003

 
 
Can't you target 4.2 by just not using 4.3+ features? Sorry if that's a dumb question, but I'm curious how people manage to build apps that can still run on 3.1 platforms if all they can get is the newest SDK.

Simulated
Sep 28, 2001
Lowtax giveth, and Lowtax taketh away.
College Slice
If you set your target to 4.2 then you can only use 4.2 features and you can build for earlier versions. It isn't perfect but it is pretty good. Personally I've just installed the earliest version of Xcode I want the SDK for, then upgrade each one to the next. That will leave you with multiple SDK versions installed.

Apple really should offer that automatically, along with letting developers downgrade test devices... But they'd rather just force everyone to upgrade and I understand that point of view too.

Doc Block
Apr 15, 2003
Fun Shoe
Yep, just set the deployment target to 4.2, which will cause anything introduced in 4.3 to be weakly-linked so that it will still run on 4.2.

Of course, if you use any 4.3-specific features you'll have to check and see if the OS supports them at run time.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
Is there any point to implementing -dealloc in an app delegate? It's seemingly never called, which makes sense because why bother calling it if the process is about to die anyway, but then I'm pointlessly implementing it. Literally dead code that I have to keep up. And it's painful enough having to declare properties three times.

ARC can't get out of beta soon enough.

nolen
Apr 4, 2004

butts.
Excellent. Thanks for the explanation guys!

some kinda jackal
Feb 25, 2003

 
 
Does anyone know of a way to get the iOS Device Simulator to open on the same screen as a fullscreen'd Xcode 4 window in Lion? It's annoying since Xcode is like the last window out of four fullscreen apps, and if I want to check out my debugger I either need to un-fullscreen Xcode or flip back and forth four pages between the simulator and xcode window :(

lord funk
Feb 16, 2004

I must have downloaded this example project, and now this pops up every time I open another project. I've deleted the repository again and again, but it always comes back. Where is this POS living?

Only registered members can see post attachments!

nolen
Apr 4, 2004

butts.

lord funk posted:

I must have downloaded this example project, and now this pops up every time I open another project. I've deleted the repository again and again, but it always comes back. Where is this POS living?



I had an issue similar to this and it turned out that Xcode hosed up my user account on my machine. I couldn't even authenticate preference panes or log back in with my usual credentials.

Booting into Single User Mode and mounting the system then rebooting magically "fixed" it.


Ever since upgrading to Lion and "upgrading" to Xcode 4.1, I've had nothing but weird hosed up issues. I'll probably do a clean install on my machine after this project is finished.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

lord funk posted:

I must have downloaded this example project, and now this pops up every time I open another project. I've deleted the repository again and again, but it always comes back. Where is this POS living?



Check out the organizer, I think there's lists of projects and/or repositories. Try deleting anything that looks relevant to that dialog box.

lord funk
Feb 16, 2004

pokeyman posted:

Check out the organizer, I think there's lists of projects and/or repositories. Try deleting anything that looks relevant to that dialog box.

I did this again and again - I could even reload Xcode, check that it's not there, and then it will reappear 5 seconds later.

Turns out I had to hunt down the project folder and delete it.

Simulated
Sep 28, 2001
Lowtax giveth, and Lowtax taketh away.
College Slice
Man, I'm creating a new account for an LLC and the hoops you need to jump through are amazing. They now want notarized copies of the partnership agreement. Why the Secretary of State's letter accepting the LLC isn't enough I'll never know...

So word to the wise kids... You'll need the following to open a corporate developer account:

+ SoC letter/acknowledgment of your LLC formation
+ Partnership or operating agreement, signed and notarized
+ A letter on company letterhead stating who you are and that you are authorized to sign legal agreements on behalf of the company along with your contact information


They also prefer everything to be faxed for some reason, though scanned PDFs emailed have worked so far but the fax line should be active this week so I can start faxing documents on paper (?).

Another protip: If you have business FIOS (which I need for my static IPs), you can get a phone line for free right now, at least compared to my old plan. For the same price as my 25/15 I can get 25/25 + phone line. For $2/mo more I can get 35/35 + phone line. I'm almost certain this is due to the massive decline of the wireline business. This will be the first time I've ever had a landline in my adult life.

PT6A
Jan 5, 2006

Public school teachers are callous dictators who won't lift a finger to stop children from peeing in my plane

Ender.uNF posted:

Man, I'm creating a new account for an LLC and the hoops you need to jump through are amazing. They now want notarized copies of the partnership agreement. Why the Secretary of State's letter accepting the LLC isn't enough I'll never know...

So word to the wise kids... You'll need the following to open a corporate developer account:

+ SoC letter/acknowledgment of your LLC formation
+ Partnership or operating agreement, signed and notarized
+ A letter on company letterhead stating who you are and that you are authorized to sign legal agreements on behalf of the company along with your contact information


They also prefer everything to be faxed for some reason, though scanned PDFs emailed have worked so far but the fax line should be active this week so I can start faxing documents on paper (?).

Another protip: If you have business FIOS (which I need for my static IPs), you can get a phone line for free right now, at least compared to my old plan. For the same price as my 25/15 I can get 25/25 + phone line. For $2/mo more I can get 35/35 + phone line. I'm almost certain this is due to the massive decline of the wireline business. This will be the first time I've ever had a landline in my adult life.

Weird. For a Canadian corporation, I only had to fax my articles of incorporation. The GST agreement had to be mailed, though, and that took a while.

some kinda jackal
Feb 25, 2003

 
 
I'm still bitter about Apple not accepting Canadian Sole Proprietorships as legitimate business entities :mad:

Adbot
ADBOT LOVES YOU

kitten smoothie
Dec 29, 2001

Ender.uNF posted:

Man, I'm creating a new account for an LLC and the hoops you need to jump through are amazing. They now want notarized copies of the partnership agreement. Why the Secretary of State's letter accepting the LLC isn't enough I'll never know...

So word to the wise kids... You'll need the following to open a corporate developer account:

+ SoC letter/acknowledgment of your LLC formation
+ Partnership or operating agreement, signed and notarized
+ A letter on company letterhead stating who you are and that you are authorized to sign legal agreements on behalf of the company along with your contact information


They also prefer everything to be faxed for some reason, though scanned PDFs emailed have worked so far but the fax line should be active this week so I can start faxing documents on paper (?).

I'm surprised, I had no problem like this when I opened an account only a few months ago. I just had to fax a copy of my secretary of state's certificate of incorporation. They even accepted a printout of the archived version from the state SOS' website, not the original copy they sent me when I incorporated 13 years ago.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply