05 Jun 2009, 03:00
Generic-user-small

Jim Esparza (4 posts)

Guys,

What follows is an email that I sent to your support group – they suggested that I post my issue here. I am doing a straight cut and paste of the original email … Any help would be greatly appreciated …

-—-
I recently purchased some of your videos – GREAT STUFF for a newbie MAC and Xcode user! My questions have to do with the “Power Moves” section of “Becoming Productive In Xcode.”

Having written code for over 30 years, I really liked the code completion keys. However, I’m having some problems modifying them in my environment – my environment doesn’t match what you present in the videos.

I am running OS X Ver 10.5.7, Xcode Ver 3.1.2.

Having written over 1M lines of C, I have developed my own coding format – it’s not the same as typical C formatting, but it works for me (and by the way, everyone who sees it, likes it) I use a very BLOCKED type of format. example below—

just in case this text gets compressed, I will use ~ to indicate appropriate indents and _ to indicate a blank …

if()
{
~
}

if____()
{
~
}

elseif()
{
~
}

etc ….

FWIW: Its really easy to see that for a given IF, because of the spacing between it and the (, that there is an ELSEIF downstream …

But I will return briefly to this ..

According to your video, the way I understand it is that I have the appropriate .xctxtmacro file in my “local” space, it will take precedence over the .xctxtmacro in “global” space. So, to make life easy for now, I copied both the C and ObjectiveC xctxtmacro files to my “local” space. However, my “local” space was NOT where it was demonstrated in the video: perhaps in my version they were moved somewhere else …

The source for the files (/Developer/Applications/Xcode.app) is slightly different. “Xcode.app” is actually just “Xcode” sans the ”.app.” The rest of the path (Contents …. Resources) is identical …

As for the destination, that was different … The video shows the “local” space to be:

.../jim/Library/Application Support/Developer/Shared/Xcode ... There was no "Xcode" directory, so I created it.  I also created the subsequent "Specifications" directory.  I copied the files to this new directory.  I should also say that I uncommented the "DefaultSettings" values and changed them slightly - the purpose for the change was to determine from which file the changes came.

I Quit Xcode, restarted it and there was no change ….

Since that didn’t work AND the Xcode directory didn’t exist, I looked around for another possible directory .. I found …/jim/Library/Application Support/Xcode and rummaged around within it. It didn’t have the Specifications directory either, so I created it and put the two xtxtmacro files into it. Once again, I uncommented the DefaultSettings and changed the IF macro so that I could tell where the change was coming from.

Quit Xcode, restarted it and NO change …

Any thoughts?

Thanks in advance … Oh, BTW (excuse me if this is in the videos, but can I add my own values within the defaults … so I can have the “(” PreSpacing to be different based upon the level? See the “IF” statement of the “IF … ELSEIF” above …

One suggestion: may I suggest that for the videos, you change the finder title bar to show the full directory path that you are accessing—that would make it easier for new kids like me to see :) The command I found to do it is:

defaults write com.apple.finder _FXShowPosixPathInTItle -bool NO

(this only works for 10.5 and above)

Regards,

Jim

05 Jun 2009, 16:10
Mike-120_pragsmall

Mike Clark (51 posts)

Hi Jim:

That’s very strange. Can’t say I’ve heard of this problem before. I have all my custom templates in the directory:

~/Library/Application Support/Developer/Shared/Xcode/Specification

The fact that the Xcode directory didn’t exist on your machine is troubling, and I suspect it’s the root of the problem. It’s as if Xcode isn’t installed for that user (jim in your case).

Do you have this directory?

/Library/Application\ Support/Developer/Shared/Xcode/

(Notice it’s /Library and not ~/Library).

Mike

05 Jun 2009, 17:59
Generic-user-small

Jim Esparza (4 posts)

Mike,

Thanks for taking the time to respond ….

I find /Library/Application Support/

but very strange—I don’t see /Library/Application Support/Developer ….

Hmmm.. very suspicious …

Being very new to the MAC, should/can I just run “iphone_sdk_iphone_os_2.2.19m2621afinal.dmg” again? Will a re-install hurt anything?

BTW: I’m the only user on this system and the original install was under this account …

Thanks again,

Jim

05 Jun 2009, 20:20
Mike-120_pragsmall

Mike Clark (51 posts)

Jim:

A reinstall shouldn’t hurt anything. That’s probably what I’d do in your situation.

Mike

05 Jun 2009, 21:17
Generic-user-small

Jim Esparza (4 posts)

Mike,

Once again, thanks for responding.

I know that this isn’t your responsibility, but I hope you have some spare time to help out a newbie …

I reinstalled the software but I still don’t have /Library/Application Support/Developer !!!

Perhaps you can tell me what is going wrong … I will be VERY specific as to the steps I took …

I double-click on the SDK I downloaded from Apple .. “iphone_sdk_for_iphone_os_2.2.19m2621afinal.dmg”

It pops up a window ”/Volumes/iPhone SDK” w/ 3 icons in it – “About iPhone SDK,” “iPhone SKD” and “Packages” ...

I double-clicked on the “About iPhone SDK” and perused the document …

I double-click on iPhone SDK and I get a popup that says:

“This package contains a program that determines if the software can be installed. Are you sure you want to continue?”

I select “Continue”

It takes me to “Welcome to the iPhone SDK Installer”

I select “Continue”

It takes me to the “Software License Agreement” – I “Agree” (this step happens 2 times)

It takes me to “Custom Install on “Macintosh HD.” I go with the defaults:
“Developer Tools Essentials” is checked and grayed.
“iPhone SDK” is checked.
“System Tools” is checked.
“UNIX Development Support” is checked.
“Mac OS X 10.3.9” is unchecked.
“WebObjects” is unchecked.

I select “Continue” and it asks for an alternate install location .. I don’t change it …

I get ‘Standard Install on “Macintosh HD”’ and a popup that asks for my password (which is blank) – I hit OK

It then goes thru the install process and I get “Install Succeeded” ... and I select “Close” ... that’s it ….

I’ve reinstalled twice (the second time to document this) and still no ”/Library/Application Support/Developer” ....

Any thoughts would be greatly appreciated ….

(Say “Hi” to Nicole)

Regards,

Jim

18 Jun 2009, 14:20
Mike-120_pragsmall

Mike Clark (51 posts)

Jim,

I’m afraid I gave you a bum steer. I decided to remove all the Xcode versions of my machine, remove the /Developer directory entirely, and do a clean install of the iPhone 3.0 SDK. Turns out my /Library/Application Support/Developer directory was a vestige of older versions.

You should have this directory, where the Xcode default templates live:

/Developer/Library/Xcode

The default text macros are still here:

/Developer/Applications/Xcode.app/Contents/PlugIns/TextMacros.xctxtmacro

My custom text macros are still here:

~/Library/Application Support/Developer/Shared/Xcode/Specifications/ObjectiveC.xctxtmacro

If a custom text macro isn’t working, perhaps we should look at your macro specification to see if for some reason it’s not being recognized.

Mike

19 Jun 2009, 17:50
Generic-user-small

Jim Esparza (2 posts)

Mike,

THANK YOU! I’ve been banging my head trying to figure out what’s wrong with my install! Have no idea how much time I spent trying to figure this out ….

Just DL’d SDK 3.0—can I just rename the Xcode directory in /Developers/Applications and then install the new SDK? Or, is there more that I need to do …

I’m working frantically to get up to speed before the seminar in DC …

Thanks for taking the time to help ….

j

22 Jun 2009, 17:22
Mike-120_pragsmall

Mike Clark (51 posts)

Jim,

I generally use the uninstaller and remove all the tools before installing the new version, like so:

sudo /Developer/Library/uninstall-devtools --mode=all

After running that, the /Developer directory is pretty sparse, and I’m guessing you could remove it entirely.

Also, if you’re attending the iPhone Studio, feel free to email us directly (info AT pragmaticstudio DOT com) if you continue to have problems. We want to make sure you get everything installed before the course. :-)

Mike

24 Jun 2009, 20:14
Generic-user-small

Jim Esparza (4 posts)

Mike,

Once again, thanks big time! And thanks for your offer of help—see you in Reston …

Jim

  You must be logged in to comment