Changing an NSView in Xcode 3

Hey there, I'm pretty new to progamming for the mac and I'm having a pretty hard time with Xcode 3. It seems that most of the tutorials and example code out there is aimed at earlier versions of Xcode and there aren't many books for it as well. I come from programming in non GUI environments and have experience in Pascal, Assembler and C to name a few. I also took a paper on OOP using Java at University.
My question is pretty simple I think... I'm trying to write a simple program in Xcode 3 that changes the UI.. so you start with a screen with a button, the user clicks it and the screen changes to another with different buttons. I've seen examples of this for the iphone, which I've tried to modifie to work, on this forum as well as demos for Xcode 2.. I just want to do it for OSX.
Can anyone help? It's really, really frustrating trying to learn on Xcode 3.

Ok, so I get that I need to create another NSView nix file with the second UI in it and I think I can load it... but how do I make it visible instead of the UI created with the main nix?

Similar Messages

  • Changing key bindings in xcode

    I have quite a simple problem: a good portion of the key bindings i set in Xcode simply don't work.
    Example: I set "code sense select next placeholder" as command+E on my desktop..yet on my laptop when I set it to that, it just beeps when I push command+E.
    Second Example: I want to change the default key for popping up the class/method list [currently control+2], but it won't let me change it to command+2, or most other things for that matter. I've had so many problems I don't think ALL of the conflicts can be system/xcode presets that are unchangable.
    How do I force Xcode to use the key bindings I want?
    alternately: How do I see which programs are keeping Xcode from recognizing the key bindings I set?
    Thanks,
    Nick

    xcode 3 fixed this problem. hooray!

  • Change account to update Xcode?

    I have been using my apple ID, my only apple ID forever. All my apps are purchased with this ID. Now as I was updating my apps in the Mac App Store I noticed that Xcode had a new version that didn't show in the updates pane. I have the 4.3.2 version installed and on the store there's a 4.3.3 version available. The buy/Download button does show "Update" in the title, but when I try to update I get this message: "You have updates available for other accounts – To update this application, sign in to the account you used to purchase it." I only have one account, I couldn't have used another.  Anyone had the same problem? Is this a store bug?

    I found a sollution posted by Peter Jarvis that worked for me.
    Select the app in applications folder, right click, select "Move to Trash".
    Launch App Store
    Select updates in the App Store
    Select purchases.
    * App should now show "INSTALL"
    Select INSTALL
    * App is downloaded and installed
    Empty TRASH
    If this does not work, put the current app back and contact apple.
    https://discussions.apple.com/message/13011607#13011607
    Good Luck

  • Change Indent behavior on XCode

    I was forced to work on a C project under Windows and Dev-C++ screwed up all of my formatting. I did a select all the Re-indent, but there are certain other things that I wish it would do. I know it's not standard, but I like indenting between glBegin and glEnd statements as well as glPushMatrix and glPopMatrix. I find that for me it makes the code easier to read. Is there a way to have XCode automatically indent those for me? I have the latest XCode (for Leopard)

    Well, you also have the braces technic. You just add braces around the part you want to indent, I usually do that when, for example, I define macros with start and end statements :
    LOOP_START {
    // My code
    } LOOP_END
    So, you could do that :
    glBegin(); {
    gl...();
    } glEnd();
    However, the scripts might be better if you don't want to have tons of useless braces in your code.
    NB : You can edit a post in Apple Discussion only if it has no replies to it. There's a little bubble icon with a pen on it next to the reply button to edit your message.

  • How to change the language from english to punjabi in Xcode?

    i am trying to make an app for my religon and it requires me to make those letter sysmblos and i want to know how to change a language in xcode
    Thankyou
    reply please ASAP

    have you activated the Gurmukhi keyboard in system preferences/language and text/input sources and then selected it in the "flag" menu at thr top right of your screen?

  • OpenGL on xcode

    Hi! I'm new on this forum and my post is about a cocoa application.
    It's a graphic application that uses openGL library and the original source code was written in c++ on devc++(windows). I changed some things and xcode build the entire project without problems. But when I run it I have this problem:
    ZeroLink: unknown symbol '_glutInit'
    what does it mean?
    please help me!

    The error is saying the linker can't find the symbol glutInit, which is part of the GLUT framework. You need to add the GLUT framework to your project.
    The reason your code built correctly is that you're using ZeroLink, which skips the linking phase. You're usually better off turning off ZeroLink so you can catch the linker errors when you build your project. Choose Build > Allow ZeroLink to turn it off.

  • Xcode project questions

    I have just created a new project in xcode.
    Now,I would like to get rid of the files proj_Prefix.pch and projPriv.h , because i don't need them. However, it seems i can't just delete them, because otherwise xcode complains about not finding them.
    In addition, can i get rid of the files projProj.xcconfig and projlTarget.xcconfig ?
    Oh, and one more question: which files of xcode should i put into the SVN repository?
    Thanks a lot in advance.
    Gabriel.

    You have to remove the proj_Prefix.pch and projPriv.h files from the project to delete them safely. In the project window, select the files you want to delete and press the Delete key. An alert opens asking you if you want to delete the references to the files or delete the files and references. Deleting the reference removes the file from the project but keeps it on your hard disk. Deleting the file and reference removes the file from the project and your hard disk. Deleting the reference, then moving the file to the Trash is safer than deleting the file and reference because you can recover the file if you find out you need it.
    You can get rid of the xcconfig files. Those are Xcode configuration files that contain build settings. Configuration files are useful if you make a lot of changes to Xcode's default build settings. By putting the changed settings in a configuration file, you don't have to change the settings in Xcode for every project.
    The point of a SVN repository is to track the changes you make to files. Put the files you need to track in the repository. At a minimum, you should put your source code files in the repository. What works for me is to put everything but the project's build folder in the repository. When I create a Xcode project I want to place under version control, I temporarily move the project's build folder. After importing the project into the repository and checking out the project's files, I move the build folder back with the project.

  • Change of Icon name

    How can change icon name for project in iphone,
    I tried changing bundle name in xcode that change reflects in simulator but not in iphone,if any body has a idea
    <Post Relocated by Moderator>

    When I needed to change my product name from "MyApp" to "MyApp Lite" I read several threads here, obtaining one or two pieces of the puzzle from each. Here are the steps that finally worked for me:
    To rename an Xcode project and its product:
    1) Rename project folder
    2) Rename .xcodeproj file
    3) *Delete Build folder
    4) Project->Edit Active Target->General: Edit Name
    5) Project->Edit Active Target->Build->Packaging: Edit 'Product Name'
    6) *Project->Edit Active Target->Build->Language: Edit 'Prefix Header'
    7) Repeat 5-6 for all configurations (Debug, Release, Distribution)
    8) *Rename _Prefix.pch file
    9) Build->Clean All Targets for all configurations
    The starred steps may not be necessary, but I'm reporting the exact procedure I logged just to be sure. I think you can also omit the repeats in step 7 by following iphonemediaman's advice to select "All Configurations".
    Note that the above changes your PRODUCT_NAME definition, which may change your App ID. So if you intend to submit your renamed project as an update, you may need to reset the Bundle identifier in info.plist. I.e., if this field includes the default '${PRODUCT_NAME:identifier}',
    replace that portion of the id with the previous project name to build an update:
    10) Edit 'Bundle identifier' in info.plist: com.MyCompany.OldName
    Finally, if your new project name includes spaces, these must be removed in two places:
    11) Remove any spaces from 'Bundle identifier' in info.plist
    12) Remove any spaces in the name of the zip file you upload to the store

  • Xcode Update 5.1.1 issue

    Upgraded to OSX 10.9.2 on Macbook Pro 17" Early 2011.  Since then, there were a number of apps that presented in the App Store for updating.  I clicked "Update All" every time, and haven't had any issues.  Just 6 days ago, 4 apps required updating, including Xcode 5.1.1 -- but it's the only one that won't really do anything.  I turned off asynchronous updating, went back, and no change in behavior: clicking the "Update" button directly just shows the busy-wheel for about 2 seconds, then re-enables the Update button.
    Going onto the Apple site and looking up the Xcode app for downloading, it seems to know that Xcode is installed, and the "Install" button changes its caption to "Update".  Clicking that produces the same behavior.
    I've rebooted, with no behavior change.
    I ran Xcode, and it said that some dependent components needed to be installed, and I let it do so; the About shows I've got version 5.1 installed.  In the Launchpad, It still shows that there's 1 update required in App Store, and it remains Xcode 5.1.1; nothing seems to change this.
    I don't want to uninstall Xcode 5.1 -- I just want it updated.

    Have you been able to figure out the issue?  I'm having the same symptoms with Hotmail via Exchange, except that I'm not using an enterprise iPhone.  You mentioned that Exchange is not syncing, but that Hotmail is.  How did you setup your Hotmail?  POP3?  There's an option for Hotmail via Exchange, and ever since 5.1, I cannot get Hotmail to sync correctly.  If I delete Hotmail emails from the iPhone, it syncs.  But if I delete via Hotmail web client, my iPhone doesn't delete the emails I deleted on the PC.  5.1.1 didn't fix it.  I'm hoping someone has a clue as to what's going on here.

  • Javascript indenting in XCode

    How do I change indenting rules in XCode?
    I have a closure inside a function call, e.g.
    myVariable = Class.create((function() {
    var that;
    and so half the page is used up lining up parameter expression.
    I want to make everything in the block indent normally, rather than use the
    parameter indent rules.
    I have looked in xclangspec files, but can't figure it out.
    Thanks
    M

    There are several ways to call javascript functions from Native XCode to HTML JS.
    But for me, I tried these approaches to accomplish this:
    1.) You may load/reload the HTML with corresponding URL parameters/arguments and on the JavaScript you may need to add a function like the following:
    function getQueryString(){
    var mySearch = window.location.search.substr(1).split("&");
       if (mySearch!="")
            for(var x=0;x<mySearch.length;x++) {
               // loop to all your query string here and perform the javascript functions corresponding to your desired parameter(s)/argument(s)
               // on you example you may call you function here
               sendAlert(mySearch[0]);
    }//end function
    function sendAlert(msg) {
       alert(msg);
    2.) You may directly call the JavaScript functions from the UIWebView delegate methods
    - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType and webViewDidFinishLoad:(UIWebView *)webView
    by calling this method:
    [webView stringByEvaluatingJavaScriptFromString:(NSString*)]
    inside where you may call you local JavaScript like:
    [webView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"sendAlert(%@)", myAlertString]];
    when called within webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationTypemethod the return must be NO.

  • Broken exceptions in Lion/XCode?

    Having upgraded to Lion and noticed that gcc had been removed,
    I downloaded the free verson of XCode from the App store.
    gcc was restored ... but the exceptions are behaving funny.
    Basically, if I throw any exception (with any message) I get
    the following text in the terminal:
    terminate called throwing an exceptionAbort trap: 6
    (with a noticable pause before displaying "Abort trap: 6"
    Anybody else hit this (and found a way around it, even better)?
    Thanks in advance.

    Here was my minimal code:
    #include <stdexcept>
    int main()
              throw std::runtime_error( "Doesn't display this message" );
              return 0;
    For all it's worth, I've found a way around it, essentially just to
    catch all exceptions before exiting, something like:
    #include <stdexcept>
    int main()
         try
              // Call main program here which may throw exceptions
              throw std::runtime_error( "Doesn't display this message" );
         catch( exception &e )
              std::cerr << "Error: " << e.what() << std::endl;
              return 0;
    Whatever's changed in the latest XCode and/or Lion doesn't seem to like
    uncaught exceptions.
    I've never used CGAL, but I'm guessing a similar work-around will
    work there as well.

  • Beginner XCode/Java Question - printf problem

    Hello,
    I have just started playing around with XCode and Java. I entered the statement:
    System.out.printf("%s\n%s\n", "Welcome to", "Java Programming!");
    into the default working java project (File -> New Project -> Java Tool) and Im getting the error "cannot find symbol" after I compiled it. I do not believe this is a syntax error since it was copied straight from a textbook. So, my questions are:
    1. What "symbol" is Xcode refering to?
    2. Does Xcode coem with the latest version of Java?
    3. How can I check the Java version?
    4. Is there a library that needs to be imported to get it working?
    Thanks in advance!

    Hi Arcus
    I think you might have to change some of the Xcode settings to force it to use Java 1.5. Try this:
    - From the menu, select: Project > Edit Active Target 'Your Program Name'
    - From the popup window, select Settings > Simple View > Java Compiler Settings.
    - Set Target VM Version and Source Version to 1.5
    - Dismiss the window by clicking on the red dot at the top left corner.
    Best wishes
    Bob

  • Xcode diverse questions.

    Hello, looking to be a app developer, and I have a few questions about Xcode before I bug Apple. Xcode, as I am informed, runs on Panther, (beleive 1.5 does, or could you tell me the most recent one that will run on Panther? I know Panther is ancient, but thats what I'm running now on my old Powerbook, and I don't want to upgrade till I'm sure I'll be doing this. Also, could you tell me the main differeces between Xcode for Snow Leopard and Xcode for Panther? Thanks alot.

    I would like to tell you definitively the most recent version of Xcode that will run on 10.3, but Apple's "All downloads" site for developers is down right now. I think it is 2.2 or maybe 2.5. Regardless, there are extensive changes between the older Xcodes and Xcode4. Plus, the older Xcodes are from before Xcode development really "took off", so you will have a difficult time finding books or documentation. The hardest part is building the user interface with Interface Builder. That has changed several times over the years and when it says "control-drag from X outlet to Y object" you may be lost if you don't have the exact version of Xcode that matches whatever tutorial you are using.
    There is quite a bit of information available for Xcode3, but Xcode4 has now been released and that is another significant change. The differences are primarily platforms and Interface Builder. Older Xcodes only support Mac development for PPC. Xcode3 can build software for iOS, PPC and Intel Macs, and is a pretty good stand-alone IDE. Xcode4 is focused on iOS and Snow Leopard Intel Macs.

  • XCode Template Layer

    Here is the reason for what I was referring to about xCode Templates being built from a common Core Data database.
    Right now, xcode is developed from the point of view of the computer engineer. Even though the editor is extremely nice and user-friendly, and the core data interface is great, and the interface builder is great for users, the entire package is difficult for most people because in order to use it, you have to be able to frame your mind around the differences that are distinguished by the needs of the computer itself.
    For example, the ability to create variables instantly for use only within an instance is best handled by instance variables while if a variable MUST be readable/writable to other classes, then it at least must be a declared property. But these differences are based on the engineering, and for most users, if every variable could have the ability to be written to or read, it would be easier to design a class. So also for p-lists, which have their use under certain limitations, and also CoreData which might be more difficult than other kinds of variables to access in some cases, but not others.
    So, much of the design of xcode depends on the differentiation demanded by the computer itself, (and met by the solutions of the engineers). But the interface to xCode need not depend on those demands. Template building can consume any amount of time (practically), and the parts that go into xCode can be entered through any sort of interface or data base. It is a missing layer that could connect the average user with xCode. To complete the link, the template files being exported into xCode would still require linking of views to the template-generated IBOutlets and actions, and would still require coding and inspecting the files for errors detected in the xCode editor. Of course, it would be great if a TemplateMaker could update its files and databases with changes made in the xCode editors, but that is beyond my capability (and also not necessary).
    So, anyway, the main reason for the need for an xCode interface is that the xCode format for data, linking and variables is based on the engineering requirements, but a TemplateMaker need not be based on such requirements.

    ...make xCode usable to the way a non-developer doesn't know how to use it.
    That one is going in my quote collection.

  • How can i restore my xcode to write code

    Hello,
    I am a new user for xcode. I did some changes which cause my xcode to look like [IMG]http://i47.tinypic.com/4ptax0.png[/IMG]
    I will be very gateful if you tell me how can i resote it back to write codes.
    thankyou in advance
    gaurav

    Just click on one of the source files in the left hand view.

Maybe you are looking for

  • New External Drive .. NEED HELP PLZ

    Hi i just plugin (usig USB) my new external hard drive ( 160 GB ) and i`m trying to copy some files to it and it shows this msg " the item ... could not be moved because new volume cannot be modified " so how can i make it ? and also it shows the new

  • IPod 2007 160GB Classic Stuck on Apple Logo Reboot?

    Hello Hopefully somebody can help? I have a iPod 2007 160GB Classic which is stuck on the apple logo reboot? I have tried everything posted on the similar topic below without success although I'm a windows user and not mac:- https://discussions.apple

  • Bluetooth and Curve Sync Possible?

    I am using Oulook 2003, BB 8830 and Windows XPpro. I have configured my bluetooth usb. Is it possible to transfer calendar items with bluetooth?   Thanks

  • Stopping in middle of some and playing another. Help?

    My iPod touch is stopping in the middle of a song and playing the next while the original song that I was listening to is being shown. Any suggestions on how to fix it? Please?

  • WRT160N V3 only allows 2 devices at once

    We can only connect two devices to the internet at once.  I have no idea why its being this way considering everything else is running fine. Is this something i can change in basic options inside the router, or is this a hardware issue?