Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Tools & Utilities

Reply
 
LinkBack Thread Tools Display Modes
Old 11-20-2010, 06:15 AM   #1 (permalink)
Registered Member
 
Join Date: Nov 2010
Posts: 2
JohnnyBravo is on a distinguished road
Default New developer, no code insight or intellisense?

Hi all,
Im very new to iOS development, Ive bought the developer licence and am cracking on with my first app.

However Im having an issue following the syntax, to me it doesn't feel intuitive to OO development. So that gets me thinking that Im missing something vital.

in C# properties and methods are available with the following syntax;

[object].[property on method];

So something like;

myObject.Name = "JohnnyBravo";
myObject.SetName("JohnnyBravo again!");

This syntax lends itself to code insight, a feature of the Visual Studio IDE where when I put the full stop I get the full list of properties and methods that I can access in that object. I dont see a simple and easy way of listing properties and methods when I want to access objects in iOS, so Im finding my first steps a little frustrating.

Example, I found myself wasting time trying to figure out how to get the month value out of an NSDate object, only to eventually find through google that you cant. With code insight or similar showing me what properties are available on the object I would have seen right away that no such property exists (which is a little odd).

Im making progress but its slow, I keep leaning back to 'well its easy in C# and Visual Studio' and so, Im here asking for guidance.

How do I maximise the use of the IDE? Can the IDE list for me all the methods and properties an object supports?

Sorry for the long post, its my first on this forum. Hopefully the first of many as I learn more and more.

My thanks
JohnnyBravo
JohnnyBravo is offline   Reply With Quote
Old 11-20-2010, 03:12 PM   #2 (permalink)
Registered Member
 
Join Date: Nov 2010
Posts: 6
menodev is on a distinguished road
Default

type "[aString " and then press escape or any other key/combination that is defined as code completion. as of xcode 4 this list comes also without pressing the key if you want so.
menodev is offline   Reply With Quote
Old 12-27-2010, 06:00 AM   #3 (permalink)
Registered Member
 
Join Date: Nov 2010
Posts: 2
JohnnyBravo is on a distinguished road
Default

My thanks menodev, simple things like this make development so much easier.
JohnnyBravo is offline   Reply With Quote
Old 12-27-2010, 10:32 AM   #4 (permalink)
Registered Member
iPhone Dev SDK Supporter
 
smasher's Avatar
 
Join Date: Jul 2008
Location: San Mateo, CA (San Fran)
Posts: 3,858
smasher will become famous soon enough
Default

Alos, holding down one of the control keys (control? alt? I have my keyboard remapped) will jump you to an object, property, or class's definition in your project. It's the same as right-click "jump to definition." Another opens up the documentation for that class, just like right-click "search in documentation."
__________________

Free Games!
smasher is offline   Reply With Quote
Old 12-28-2010, 06:37 PM   #5 (permalink)
Fly-by-night Innovator
 
Join Date: Jun 2010
Posts: 364
musicwind95 is on a distinguished road
Default

Quote:
Originally Posted by JohnnyBravo View Post
Hi all,
Im very new to iOS development, Ive bought the developer licence and am cracking on with my first app.
Great!

Quote:
Originally Posted by JohnnyBravo View Post
However Im having an issue following the syntax, to me it doesn't feel intuitive to OO development. So that gets me thinking that Im missing something vital.

in C# properties and methods are available with the following syntax;

[object].[property on method];

So something like;

myObject.Name = "JohnnyBravo";
myObject.SetName("JohnnyBravo again!");
Woops...in Objective-C, you would not call myObject.SetName. In Obj-C, dot-syntax does not invoke a(ny ordinary method)—it invokes the proper accessor as necessary.

If you write
NSString *name = myObject.name;
(notice the capitalization of the property, BTW...it's a Cocoa convention...I know C# favors capitalizing the first "word," but Obj-C doesn't)
that invokes the getter method. Notice the property on the right side of the equals.

If you write
myObject.name = newName;
that invokes the setter. Notice the property on the left side of the equals.

Anyway,

Quote:
Originally Posted by JohnnyBravo View Post
This syntax lends itself to code insight, a feature of the Visual Studio IDE where when I put the full stop I get the full list of properties and methods that I can access in that object. I dont see a simple and easy way of listing properties and methods when I want to access objects in iOS, so Im finding my first steps a little frustrating.
In Xcode 3, pressing Escape will display the list of what you can use. This is sometimes buggy (as in, it will tell you that no completions are available), but it doesn't happen too often.

In Xcode 4, this should show up automatically. But Xcode 4 is under NDA...we can't talk about it until it's officially released.

Quote:
Originally Posted by JohnnyBravo View Post
Example, I found myself wasting time trying to figure out how to get the month value out of an NSDate object, only to eventually find through google that you cant. With code insight or similar showing me what properties are available on the object I would have seen right away that no such property exists (which is a little odd).
I've never thought about it that way...from the beginning, I've just jumped to the documentation when I'm not sure of a class. The documentation is actually really clear and helpful (not to mention accessible...⌘⇧? if I remember)...so make the most of it.

Quote:
Originally Posted by JohnnyBravo View Post
Im making progress but its slow, I keep leaning back to 'well its easy in C# and Visual Studio' and so, Im here asking for guidance.

How do I maximise the use of the IDE? Can the IDE list for me all the methods and properties an object supports?

Sorry for the long post, its my first on this forum. Hopefully the first of many as I learn more and more.

My thanks
JohnnyBravo
Good luck on your programming journey!
__________________
If I have helped you, please consider donating. I use PayPal. It would mean a lot to me!


For more iOS Development, check out my blog—Cups of Cocoa. All visitors welcome, but especially beginners!

Hope I have helped!

Please check out IceFall, a new action game available in the App Store!
musicwind95 is offline   Reply With Quote
Old 12-28-2010, 06:39 PM   #6 (permalink)
Fly-by-night Innovator
 
Join Date: Jun 2010
Posts: 364
musicwind95 is on a distinguished road
Default

Quote:
Originally Posted by smasher View Post
Alos, holding down one of the control keys (control? alt? I have my keyboard remapped) will jump you to an object, property, or class's definition in your project. It's the same as right-click "jump to definition." Another opens up the documentation for that class, just like right-click "search in documentation."
I believe it's ⌥-DoubleClick (Option-DoubleClick).
__________________
If I have helped you, please consider donating. I use PayPal. It would mean a lot to me!


For more iOS Development, check out my blog—Cups of Cocoa. All visitors welcome, but especially beginners!

Hope I have helped!

Please check out IceFall, a new action game available in the App Store!
musicwind95 is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 421
11 members and 410 guests
AppleDev, chemistry, Emy, Gi-lo, ipodphone, mistergreen2011, pipposanta, Retouchable, skrew88, SLIC
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,679
Threads: 94,128
Posts: 402,923
Top Poster: BrianSlick (7,990)
Welcome to our newest member, xzoonxoom
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 08:21 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0