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
some kinda jackal
Feb 25, 2003

 
 
drat. Wonder what the difference could be :(

If it's not too much trouble, could one of you guys try to open my project and see if you can get it to work right?

http://dl.dropbox.com/u/58959/SpeakLine.zip

e: I don't mean do any work for me, just try to disable the resize handle, build and run. Curious to see if it's my machine or my project or what.

some kinda jackal fucked around with this message at 00:36 on Apr 19, 2012

Adbot
ADBOT LOVES YOU

some kinda jackal
Feb 25, 2003

 
 
Ugh loving THANK YOU pokeyman. That's got to be a bug of some kind. Wonder if I should try to report it.

some kinda jackal
Feb 25, 2003

 
 
Hey is there a checkbox I can set somewhere to tell XCode to @synthesize my properties with the underscored local variables by default? I could have sworn it did that sometimes and I just created a new class and I had to go back and edit my @synthesize statements to reflect what I wanted.

some kinda jackal
Feb 25, 2003

 
 

pokeyman posted:

I haven't found such a wonderful checkbox. If it's any consolation, Xcode will autocomplete the underscore.

Yup. It seems to know what I want it to do so I was hoping there was some way to make it do it without my intervention. Ah well.

Well while I'm asking dumb XCode newb questions, I did something to where my debugger pane stays open after I stop my application. I can close it just fine, but it sticks around after I quit my app EVERY time so having to click to close it to get that screen real estate back is annoying.

Oh nevermind that's a behaviour thing I can change, because I NSLog some poo poo. I think I got this.

some kinda jackal fucked around with this message at 04:23 on Apr 19, 2012

some kinda jackal
Feb 25, 2003

 
 
What really? So I can tell it to auto-synth the properties with underscores? :aaaaa:

That owns. 4.4'll probably be out by the time I'm doing any serious development anyway.

some kinda jackal
Feb 25, 2003

 
 
After tolling around in Xcode for the better part of a week trying to bootstrap myself into Cocoa and Objective-C, the one thing I *really* wish Apple had was some sort of app that I could open on my iPad, then if I option-click something in Xcode I had the option to bring up the reference documentation in that app instead of making me flip between the organizer window and Xcode itself.

I mean because I usually keep Xcode fullscreen :tipshat:

some kinda jackal
Feb 25, 2003

 
 
If you made the background a little lighter I think the second would work much better. If you're going to keep it that dark then the first would be easier to read.

My choice would be #2 but only with the background colour that you're using now, in that last screenshot.




And now something completely different:

I know we all love reducing the amount of code we write, but did anyone besides me have this weird feeling of "okay that was a little TOO easy" when they first bound something like an NSArrayController to a tableview and pretty much just wired everything up in the xib?

Don't get me wrong, I love that there's less code to work with, but something about it just seems TOO easy. Like I'm somehow doing it wrong, even though everything is working. It's a completely psychological barrier.

I wonder if all people who come to ObjC/Cocoa from other languages go through this phase of worrying that they're not doing it right because they didn't have to write as much code as they expected.

some kinda jackal fucked around with this message at 06:33 on Apr 20, 2012

some kinda jackal
Feb 25, 2003

 
 
Thanks for the link to Cocoa Design Patterns, I'll pick that one up when I'm through with the Big Nerd Ranch book :)

some kinda jackal
Feb 25, 2003

 
 
Hi guys, so another (probably) asinine question from an Objective-C newb:

If I'm going to do something like:

@interface MyClass : NSObject {
NSString *someString;
}
@property (copy) NSString *someString;

and then I @synthesize someString in my implementation, do I really need to explicitly declare the instance variable in my interface? My understanding is that @synthesize will declare it for me.

Now I'm going through the Big Nerd Ranch book and it's still got me explicitly declaring my ivars. Is this just Good Practice™ so the code is easily understandable, or is there some deeper reason why I'd declare an ivar if I'm going to make it a property anyway?

I understand that not everything needs to be a property, of course, and those I would explicitly declare in the interface.

edit: That is to say, I don't want to start my obj-c "career" off to a bad start by taking unnecessary shortcuts, but the double-declaration seems very redundant so unless it's absolutely necessary I'd really rather just learn to do it more efficiently from the get-go.

I'm also picking up a copy of their basic Obj-C book so I can thumb through it.

some kinda jackal fucked around with this message at 20:21 on Apr 23, 2012

some kinda jackal
Feb 25, 2003

 
 
Yeah I think we talked about the underscore thing but I wasn't sure if I asked about the backing variable. I'll go read back and hopefully I didn't just ask the same question twice ;)

some kinda jackal
Feb 25, 2003

 
 
Interesting, I didn't realize synthesized ivars won't show up in the watch window. Is that just in auto mode or is there no way to (visually) inspect synthesized variables at all?

edit: Outside of the debugger cli I mean.

some kinda jackal
Feb 25, 2003

 
 
Anyone who's gone through the Big Nerd Ranch 4th edition MacOS coding book:

Is it normal to have absolutely no loving idea what is happening in the NSUndoManager chapter? I understand what is happening at the beginning where he talks about the KVC proxy objects, but he doesn't really go into any detail on what the code he's adding really does or how it fits into the grand scheme of things other than "oh the nscontentarray will use these". I'm really disliking bindings because there's so much happening under the hood that I feel I'm missing out on understanding things I ought to be seeing. I'd really prefer they just used the coded version of this app instead of the bindings version :(

In the end I've gone through it twice now and I still feel like I'm just copying lines from the book without understanding why or how they tie together.

some kinda jackal
Feb 25, 2003

 
 

Carthag posted:

:words:

Thanks for this. I think I understand the KVC aspect of what is happening now that I've gone over it a THIRD time along with your description, but my feeling of "I'm just typing poo poo in for some reason" is that NSArrayController is a very vague concept at this stage. I realize that it'll be using these methods at some point, but there is no clear indication of what happens when. Hence I would have much preferred if he had us work with the manually coded version we did as a challenge exercise a chapter or two back rather than this NSArrayManager bound one.

The best analogy to how I'm feeling is that he told us to write some code and throw it in a sealed box and things happen magically.

I'm sure this will get better as I start to understand more about how NSArrayManager works. I think my post was mostly out of frustration because up to that point I'd been following the book at a steady clip and this is the first thing that really gave me the fits.

some kinda jackal
Feb 25, 2003

 
 
OSX filesystem case insensitivity strikes again :twisted:

Wonder why they defaulted the iOS FS to case insensitive.

some kinda jackal
Feb 25, 2003

 
 

lord funk posted:

And another reason to never, never trust that the simulator results will be the same on the actual device.

I'll never forget my first foray into iOS development. I wrote a spiffy little demo app that ran like greased lightning in the simulator.

Then I'm pretty sure I made this face when I tried to run it on my iPhone 3G: :stonk:

some kinda jackal
Feb 25, 2003

 
 
Hey speaking of that, is the 2009 edition still the newest publishing of that book?

some kinda jackal
Feb 25, 2003

 
 
Haha well in that case guess what I just unearthed in my box of books from the last time I tried to get serious about Objective-C :tipshat:

Along with a bunch other books like the first edition of the Big Nerd Ranch book. Oh god the aqua and pinstripes everywhere! And oh god everything is hideous. Did we really live like this? :stonk:

some kinda jackal
Feb 25, 2003

 
 
Does Xcode's HIG hinting engine not work properly with NSBox objects?

I have an NSBox that I want to resize up, but it doesn't give me any HIG hints when the top of the box comes near any other UI items. It lets me resize it up without so much as a "hey this box is kind of overlapping some buttons now".

some kinda jackal
Feb 25, 2003

 
 

jerkstore77 posted:

What are the current options for iOS development on Windows? I'm new to this, and have ordered the big nerd ranch books. I want to do the exercises in the books but dont really want to shell out cash for a mac or a developer account until I know I want to do this for real. So long as I can complie and test the examples, I'll be ok for now.

If you've got some decently compatible hardware you can just try to hackintosh your PC, but that's out of the scope of this thread.

some kinda jackal
Feb 25, 2003

 
 
I assume 4.4 will be backported to 10.7 right? RIght now it's a 10.8 only beta thing, but I can't imagine that wouldn't be the case.

some kinda jackal
Feb 25, 2003

 
 
Whaaaaat and all this time I've been booting my ML vmware image to play with 4.4 :mad:

Thanks for the tidbit though :)

some kinda jackal
Feb 25, 2003

 
 
I guess this is like a really dumb question, but do you have a document based app? If so, did you close the only window last time you opened the app? If you hit Cmd-N does your window show up?

I'm not some kind of amazing developer but I've run across that a few times going through the Big Nerd Ranch book.

some kinda jackal
Feb 25, 2003

 
 
Pretty newb question regarding ARC.

My understanding is that it's a compile-time process that adds the relevant retain/release style statements to the code in one way or another. I don't know if that's a gross oversimplification or not, but if that's the case shouldn't it be relatively trivial for the compiler to inspect the code and be able to physically tell me where to put release/retain statements in a sort of "convert FROM ARC to legacy" process?

Of course I'm not really asking if that's implemented in any way, just whether that's something that would feasibly be possible given how (I think I understand) ARC works.

some kinda jackal
Feb 25, 2003

 
 

Doc Block posted:

Yes, that would be possible. Not that it'd be worth implementing, but possible.

I figured this was the case. I'm still on an iPhone 3G so I'd really love to keep targetting 4.2 if I could, but I've become so reliant on ARC that it would be more trouble than it's worth now.

some kinda jackal
Feb 25, 2003

 
 
Oh hell. I guess I'm good, then!

some kinda jackal
Feb 25, 2003

 
 
Thanks for the ARC info.

Also:

Doc Block posted:

If memory serves, ARC is only supported on iOS 4.3 and up, not 4.2.

Oh well. I'll probably upgrade my phone long before I have any sort of app written anyway :)

some kinda jackal
Feb 25, 2003

 
 
Gordon Cole let us know what you end up deciding about your popover situation because I've got a view that I'd like to display edge-to-edge in a popover as well.

Can't believe there isn't an option for that :(

some kinda jackal
Feb 25, 2003

 
 

Ah, fair enough.

I wonder if there is a way to deliver suggestions like this to Apple. It doesn't feel like something that ought to go into the Bug Reporter but I think that's actually exactly where it needs to be suggested.

some kinda jackal
Feb 25, 2003

 
 
I might throw the question up on StackOverflow. That place has been pretty good for some obscure questions.

some kinda jackal
Feb 25, 2003

 
 
I'm pretty sure you can run iosnoop in terminal and just filter by pid, but that's really hacky.

some kinda jackal
Feb 25, 2003

 
 
I can see both sides of the argument. That said, it feels like we've been cut off cold turkey.

some kinda jackal
Feb 25, 2003

 
 
I'm bummed that my OG iPad won't get 6, but I'm MORE scared that people will start compiling with 6 as the minimum target without even using 6+ features, cutting out the OG for no good reason.

I'm planning on keeping mine, even if I do end up getting a new one.

some kinda jackal
Feb 25, 2003

 
 
Has anyone here done any work with tesseract optical character recognition?

I'd love to use it as an alternative (repetitive) text input method in an ipad app but I'd love to hear any firsthand reports.

Mainly because bringing up the on screen keyboard to enter numbers in like 20 separate fields seems annoying. I mean I would make it optional, but it would be baller if I could get numeric input through character recognition first.

some kinda jackal
Feb 25, 2003

 
 
What is the recommended JSON parser library if I want to target OSX pre-10.7? I realize that 10.7 comes with an Apple-provided JSON parser but I'd prefer to target all the way back to 10.5 or 10.6 if I can help it.

some kinda jackal
Feb 25, 2003

 
 
Awesome, thank you both. Speed isn't too much of an issue so I'm going to not use JSONKit due to his grave warnings about ARC compatibility.

some kinda jackal
Feb 25, 2003

 
 
Pretty much. Plus I'm sure they're really raring to fix the poo poo out of iOS Maps.

some kinda jackal
Feb 25, 2003

 
 
Yeah I have both a personal (free) account and a paid company account and it just asks which I'd like to use when I log in. It's pretty good even though I wish it would just give me access to all the assets I have available to me at any given time. Oh well.

Also apparently Apple stopped recognizing a Sole Proprietorship as an actual corporation like a week before I decided to get a paid developer account (a few years ago) :suicide:

Spent so much time/money (well, not that much money) registering a SP just for Apple and ended up not being able to use it anyway.

some kinda jackal
Feb 25, 2003

 
 
Is PyObjC still a thing with Xcode4? I heard there were some major incompatibilities with the new IB replacement if you wanted to add a GUI to Python.

I have a Python thing I really just want to throw a quick menubar GUI onto without rewriting the whole thing in ObjC.

some kinda jackal
Feb 25, 2003

 
 
How do you guys manage multiple NSURLConnections in the same class? Do you key off something in the connection:DidReceiveData: delegate method and route the data to the appropriate property or what? I'm coding on flu meds so if this is really obvious I apologize :(

Adbot
ADBOT LOVES YOU

some kinda jackal
Feb 25, 2003

 
 
Thanks for all the replies guys. Since I have about four or five API calls that I need to make I think I'm going to go the completion blocks route so I can easily throw all relevant code together.



Also I have another question that I'm almost ashamed to ask because I'm sure I'm overlooking something so ridiculously basic that when I figure out what's wrong it'll make my eyes roll:

I have a preferences window that I launch from an NSMenu in an NSStatusItem. The NSMenuItem in my status bar just calls a "requestPreferenceWindow" method in my overall app controller class:

code:
- (IBAction)requestPreferenceWindow:(id)sender {
    NSLog(@"Preference window requested");
    if (!preferenceWindowController) {
        preferenceWindowController = [[LJPreferenceWindowController alloc] init];
    }
    [preferenceWindowController showWindow:self];
}
The first time I open the preference window everything is fine. If I close the window and then try to reopen it from the statusitem nothing happens. I get the second "preference window requested" nslog in my console but no window ever shows up.

In my interface, the preferenceWindowController is just defined as:

LJPreferenceWindowController* preferenceWindowController;

This feels like some sort of "cocoa programming 101" error but I've been racking my brain for the past half hour trying to figure it out.




edit: Ugggggggggh I didn't have my controller's window property bound to the actual window. Fuckin' a. I spent a day trying to fix this stupid bug.

some kinda jackal fucked around with this message at 20:21 on Jan 11, 2013

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