Quick xCode usage question

Discussion in 'iOS Programming' started by ryans79, Jun 7, 2009.

  1. ryans79 macrumors regular

    Joined:
    Apr 12, 2009
    #1
    Hello,

    I am new to Macs, and new to xCode as well so kindly excuse if this is a "everybody knows" question...

    When start to type for example "CGRectMake"
    xcode automatically code completes it before i am even half way through, then i get the types of data i am supposed to enter
    something like
    Code:
    CGRectMake(<#CGFloat x#>, <#CGFloat y#>, <#CGFloat width#>, <#CGFloat height#>)
    as you can see it takes 4 parameters, i usually click on each parameter and enter its value... is there some where to jump to each parameter without using the mouse?

    eg:
    like when on a webpage with a form how you press tab to jump from one textbox etc to another?

    °°
    ryan
     
  2. DaveP macrumors 6502

    DaveP

    Joined:
    Mar 18, 2005
    #2
    I spent 15 minutes a year ago or so trying different cmd-tab, etc commands and couldn't figure anything out. I hope someone tells me I'm wrong though and there is a way.
     
  3. ryans79 thread starter macrumors regular

    Joined:
    Apr 12, 2009
    #3
    Heh! Hello my windows comrade!
    Glad to know i'm not the only one :D
    Yep, i tried a few combinations myself with no luck...

    Theres gotta be a way or its just silly...
     
  4. lloyddean macrumors 6502a

    Joined:
    May 10, 2009
    Location:
    Des Moines, WA
    #4

    Hello Ryan,

    Depends upon your "Key Binding" as set in the Xcode Preference.
    Assuming the default Control-/ should do what you want.
     
  5. lloyddean macrumors 6502a

    Joined:
    May 10, 2009
    Location:
    Des Moines, WA
    #6
    With the default Key Binding that'll bring up the completion list with a match to the last character typed.
     
  6. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #7
    Hmm, Possibly I changed it at some point.

    It's Edit > Select Next Placeholder and whatever binding you have for that.

    Apparently the Xcode default key bindings has control / and the Metrowerks compatible has control , for Select Next Placeholder.
     
  7. mccannmarc macrumors 6502

    mccannmarc

    Joined:
    Aug 15, 2008
    Location:
    Manchester, UK
    #8
    I told you about the ctrl + / keyboard shortcut a few weeks ago in your "What is this warning/error? (Newb warning)" thread when the use of codesense was mentioned.

    Nice to see my help is taken notice of.....
     
  8. ryans79 thread starter macrumors regular

    Joined:
    Apr 12, 2009
    #9
    Sorry about that, the problem is I am using a Nordic keyboard and that does not work... its a bit of a strange layout.
    Your help in the old thread was most helpful and i still use a lot of those tips:)
     
  9. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #10
    What is your setting for Edit > Select Next Placeholder is your Preference's Key Bindings?
     
  10. mccannmarc macrumors 6502

    mccannmarc

    Joined:
    Aug 15, 2008
    Location:
    Manchester, UK
    #11
    I'll let you off ;)
     
  11. ryans79 thread starter macrumors regular

    Joined:
    Apr 12, 2009
    #12
    Oh no you dont! Not so fast mister! Am in the middle of taking pics of my Mac so you guys can explain it to me!!!:D:p
     
  12. ryans79 thread starter macrumors regular

    Joined:
    Apr 12, 2009
    #13
    Ok, some old questions and a fresh batch of new ones :)

    Under edit I couldnt find those key bindings, this is what i got under edit:

    [​IMG]

    This is what i got under keyboard shortcuts:
    [​IMG]

    This is my weird ass keyboard
    [​IMG]

    took me some time to get used to it and understand it (google helped) for example square brackets are alt 8 and 9, curly braces are alt+shift 8and9, its just a slightly funny setup imho.

    Doing a command (apple key) plus comma got me this window pop up, i thought it would help you guys help me...
    [​IMG]

    And finally, question, what does this key do? i have never used it so far and never seen it on a windows keyboard.
    [​IMG]


    Oops, one last question, i know the Mac has bluetooth but for the love of god i cant get my nokia to connect to it via bluetooth to transfer pics... is the Mac's bluetooth for something specific that it wont let me connect via my mobile's BT?

    Thanks!
    Ryan

    Edit, sorry about the quality of the pics, taken out via my mobiles camera, although thanks to mccannmarc I sometimes do take snapshots/screenshots on the Mac
     
  13. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #14
    Alright, looks like I'm gonna have to step you all the way through this:
    Xcode > Preferences. Key Bindings. Menu Key Bindings. Action: Edit > Select Next Placeholder.

    What be there?

    EDIT: Oops, missed this part:
    Scroll down to where it says "Select Next Placeholder".
     

    Attached Files:

  14. ryans79 thread starter macrumors regular

    Joined:
    Apr 12, 2009
    #15

    Sorry about that, guess i should have warned you I am totally new to this so baby steps are needed.

    Anyways, couldnt find "select next placeholder", heres what i did find:
    [​IMG]
     
  15. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #16
    Please scroll down until the top-level action View is visible. Still no "Select Next Placeholder"?

    Ah! I see it now!
    [​IMG]
    See that "Select Next Placeholder" is grayed out, but has ^/ ? That's your shortcut!
     
  16. ryans79 thread starter macrumors regular

    Joined:
    Apr 12, 2009
    #17
    Got one!

    It show it as ^/

    but if i can only reach my slash by using the shift+7 how do i work it?
     
  17. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #18
    ctrl + shift + 7
     
  18. ryans79 thread starter macrumors regular

    Joined:
    Apr 12, 2009
    #19
    Yay! It works!

    Would appreciate you tackling the other 2 questions above if you have time :p
    To remind you:
    Thanks!
     
  19. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #20
    Sorry, can't help you with those.
     
  20. ryans79 thread starter macrumors regular

    Joined:
    Apr 12, 2009
    #21
    No problem, you answered my main question, thanks!
     
  21. lloyddean macrumors 6502a

    Joined:
    May 10, 2009
    Location:
    Des Moines, WA
    #22
    Ryan,

    Keyboard symbols can be looked up within the help system.

    Goto the Finder, click the "Help" Menu and type "Key Symbols".

    Select the first result in the list that appears and you should be
    presented with a Key/Symbol table.
     
  22. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #23
    ctrl + shift + 7 is basically impossible to use for this purpose, IMO. I guess you're not using a US English keyboard. Actually control-/ and control-, are also a pain to use on a US keyboard because they require both hands.

    I recommend you find some convenient two character command key combination to use for this purpose. Best would be a combo that uses one hand.
     
  23. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #24
    Um, yeah, like ryans79 already said...
    I don't know about you but I find I do a lot of coding with both hands on the keyboard, thus the advantage of using keyboard shortcuts.
     
  24. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #25
    Yes, of course. Maybe you're a better typist than me but coordinating three fingers on two command keys plus a character while I have to look at the screen is an (unnecessary) effort. Frankly, I can't find the control key without looking. My suggestion is make a better key combo. Up to you.
     

Share This Page