This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
Pierre Bernard (author)
Sun Sep 20 07:21:47 -0700 2009
| name | age | message | |
|---|---|---|---|
| |
PropertyFromInstanceVariable.pl | ||
| |
README.textile | Sun Aug 09 08:55:09 -0700 2009 |
README.textile
Xcode property from ivar
This is 99.9% the very handy script from Cocoa with Love . All that I’ve added is support for underscore naming of ivars (which will generate a synthesize with an alias), an explicit “assign” declaration for non-pointer types (just because I like it), and generation of a release in the dealloc method (or a new dealloc method if there isn’t one already) for pointer types.
Installation Instructions
- Open Xcode, go to Scripts menu, select Edit User Scripts
- Add a new shell script (I put it under the “Code” section)
- Double-click the name to change it (“Generate Property” is what I use)
- Double-click the cmd column to set a hotkey (cmd-shift-p is what I use — I had to restart for this to be picked up)
- Select “Entire Document” for Input
- Select “Home Directory” for Directory
- Select “Discard Output” for Output
- Select “Display in Alert” for Errors
- Clear out the existing script
- Paste the contents of PropertyFromInstanceVariable.pl into the script area
Usage Instructions
- Go to an ivars block and type NSString *_name; (or whatever your declaration might be)
- Triple click the ivar line (to select the entire line)
- Run the “Generate Property” script (cmd-shift-p, or run it from the menu)
- Thank Matt Gallagher








