Send me your Xcode project and let me take a look at what's going on, I won't 
have steady internet access for just a bit but I'll take a look ASAP

Sent from my iPhone

> On Aug 28, 2013, at 13:36, Alex Hall <[email protected]> wrote:
> 
> I know it has been some time since this thread ended, but I saved the below 
> message and just implemented the code therein. When I run it, I am told that 
> the build was successful, yet I get no window at all. As was instructed, I 
> erased the xib file entirely, and I have a suspicion that there is more to do 
> with instantiating a view so the Mac knows what to show than what is in the 
> below snippet. So, how might one get this to actually run? Also, should I 
> update app delegate.h, or will Xcode take care of it? I am asking here 
> because, frustratingly, I see an empty table when I switch to the debug 
> viewer, so I have no errors or warnings to work off of.
>> On Jul 5, 2013, at 7:39 PM, Tyler Thompson <[email protected]> wrote:
>> 
>> I’d like to post this little code snippet for anybody who’s interested. This 
>> is for OSX apps (as i find them easier to test) and it’s incredibly simple, 
>> but it’ll give anyone who is interested an idea of how to do what we’ve been 
>> talking about.
>> 
>> So i created a new project under Xcode and DELETED the .xib file (so the 
>> Interface Builder is never touched)
>> I named my Xcode project skipIB
>> 
>> I didn’t touch appDelegate.h but here’s what i’ve written for appDelegate.m
>> 
>> #import "AppDelegate.h"
>> 
>> @implementation AppDelegate
>> 
>> - (void)applicationDidFinishLaunching:(NSNotification *)aNotification
>> {
>>     // Insert code here to initialize your application
>>     NSButton *myButton = [[NSButton alloc] initWithFrame:NSMakeRect(0, 0, 
>> 50, 50)];
>>     // We create a simple square button at the bottom left of the screen 
>> position 0,0
>>     [[_window contentView] addSubview:myButton];
>>     // We tell our applications main window to add our button to its view
>>     [myButton setAction:@selector(buttonPressed)];
>>     // We tell our button to use our buttonPressed method when the button is 
>> pressed...
>> }
>> 
>> -(void)buttonPressed
>> {
>>     NSLog (@"YOU PRESSED THE BUTTON");
>>     //We send a message to our debugger to let us know our button was pressed
>> }
>> 
>> @end
>> 
>> 
>> The point of this snippet is to show the ease of skipping the interface 
>> builder. This is accessible, you can run it, and press said button. To do 
>> this on IOS would have slightly different syntax, but the same idea applies. 
>> It actually took me longer to comment this code than it did to look up 
>> NSButtons setAction method in the apple docs and write the rest of the code.
>> 
>> I can’t say i’d provide a tutorial, but I would be more than happy to work 
>> with any individuals interested in writing apps for either IOS or OSX. I 
>> invite you all to try this code, i’ve just tested it (with voiceOver) and 
>> everything seems to be working’ fine :)
>> 
>> 
>>> On Jul 5, 2013, at 4:50 PM, Alex Hall <[email protected]> wrote:
>>> 
>>> I don't know enough about Objective-c to know one way or the other, I'm 
>>> just telling you what people on those two lists said. The other problem in 
>>> all this is that, if you do find a tutorial on making UIs without IB, the 
>>> author assumes you are very well-versed in the language already. Beginners 
>>> generally use IB since it does the hard work that they do not understand, 
>>> plus it has myriad advantages (accessibility, proper declarations, plain 
>>> old ease of use, proper placement of code in files...) A step-by-step 
>>> buide, at the end of which we have a fully accessible, if simple, app and 
>>> where IB is not even mentioned, would be ideal.
>>>> On Jul 5, 2013, at 6:29 PM, Tyler Thompson <[email protected]> 
>>>> wrote:
>>>> 
>>>> I’m beta testing xcode 5 and it doesn’t look like anything has changed in 
>>>> that respect. While i have no desire to argue what you’ve pointed out I 
>>>> would like to say I disagree, i believe it’s not very difficult to ignore 
>>>> IB altogether if that’s what somebody chooses, I think the biggest danger 
>>>> is you can end up not making your app accessible by doing this.
>>>> 
>>>> 
>>>>> On Jul 5, 2013, at 4:07 PM, Alex Hall <[email protected]> wrote:
>>>>> 
>>>>> There are two lists, xcode-users and objc-language, both at apple.com. I 
>>>>> am on both, and I asked them about laying out apps programatically and 
>>>>> foregoing IB entirely. I was basically told that it is difficult to 
>>>>> impossible and I would really need to be able to use IB to do anything 
>>>>> useful. Plus, while it *may* be possible to not use IB, as others have 
>>>>> said, every tutorial and book out there assumes you are using it, and for 
>>>>> good reason. Even Apple's own tutorials, one of which I tried to walk 
>>>>> through a few months ago, offered no alternatives to IB. I have reported 
>>>>> the unfortunate accessibility bug that prevents VO users from 
>>>>> control-dragging actions a few times, so they most definitely know it 
>>>>> exists. Perhpas Xcode5 will fix it and all this discussion will be moot.
>>>>>> On Jul 5, 2013, at 2:10 PM, Barry Hadder <[email protected]> wrote:
>>>>>> 
>>>>>> Hi,
>>>>>> 
>>>>>> Actually, the developers of IB don't know any more about OBJC or apis 
>>>>>> than anyone else.  It is just a convenient way of designing the UI and 
>>>>>> other aspects of the architecture of an app.  There are also performance 
>>>>>> benefits for using IB in that you have the ability to only loads 
>>>>>> resources in to memory when they are needed, such as windows or panels.  
>>>>>> You can also initialize the values of object properties in the xib so 
>>>>>> you don't have to actually instantiate the object at run time.
>>>>>> 
>>>>>> 
>>>>>> It does not write your app for you.  You can't possibly develop an app 
>>>>>> with it unless you know objective C and C.  If you drag a button or 
>>>>>> textfield out of the library on to your canvas and position it in the 
>>>>>> window, it still does absolutely nothing with out code.
>>>>>> 
>>>>>> All of the documentation for all of the apis used in IB, or any others 
>>>>>> can be found on develper.apple.com.  For example, just go to google and 
>>>>>> type NSButton or UITableViewController and the class references will be 
>>>>>> at or very near the top of the search results.
>>>>>> 
>>>>>> Hear is some objective c links:
>>>>>> http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/Introduction/Introduction.html
>>>>>> https://developer.apple.com/library/mac/#referencelibrary/GettingStarted/Learning_Objective-C_A_Primer/index.html
>>>>>> 
>>>>>> A Cocoa link:
>>>>>> https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CocoaFundamentals/Introduction/Introduction.html
>>>>>> 
>>>>>> a Mac app development link:
>>>>>> https://developer.apple.com/library/mac/#referencelibrary/GettingStarted/RoadMapOSX/books/RM_YourFirstApp_Mac/Articles/GettingStarted.html
>>>>>> 
>>>>>> Some IOS development links:
>>>>>> http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphone101/Articles/00_Introduction.html
>>>>>> http://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/SecondiOSAppTutorial/Introduction/Introduction.html
>>>>>> http://developer.apple.com/library/ios/#documentation/General/Conceptual/iCloud101/GettingStarted/GettingStarted.html%23//apple_ref/doc/uid/TP40011317-CH2-SW1
>>>>>> 
>>>>>> If you have a Mac and you are interested in app development, You have 
>>>>>> all of the tools and documentation at your disposal.  You don't need to 
>>>>>> buy any special books to learn how to do things.  I posted a lot of 
>>>>>> links, but that is just a fraction of what is available.  I'm just 
>>>>>> trying to show people that there is lots of docs out there.
>>>>>> 
>>>>>> Later to day or tomorrow, I will post on how to lay out a simple window 
>>>>>> and create an outlet and action in your code using IB.  I've posted this 
>>>>>> before and I'm sure it is in the archives somewhere, but I think I can 
>>>>>> do a much better job.  For one thing, I'm not going to explain how to 
>>>>>> use vo as no one has any business doing any kind of work with XCode 
>>>>>> until you know how to do that.
>>>>>> 
>>>>>> Hope that helps.
>>>>>> 
>>>>>> 

-- 
You received this message because you are subscribed to the Google Groups 
"MacVisionaries" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/macvisionaries.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to