Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

dennisfett

macrumors newbie
Original poster
Apr 17, 2011
6
0
Hi,

i've just logged in first time in this forum. I'm new to Objective C and would like you to help me :cool:
How to find a file directory in xCode and copy it for example to the Desktop?!

Greetings
Dennis
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
hm...can i pls get an example of code, and where to put it!?

I don't do examples. It is my firm belief that people just copy and paste without understanding what they are using which helps no one. I expect that there are examples in the Apple library.

As to where to put it how can we possibly know? We have no idea what your code looks like, what your goals and aims are.

I suggest you read the documentation and try things out. If you have code with specific questions or problems then you might get some help.
 

dennisfett

macrumors newbie
Original poster
Apr 17, 2011
6
0
ok.
is that code right?
- (BOOL)fileManager:(NSFileManager *)fileManager shouldCopyItemAtPath:(NSString *)srcPath toPath:(NSString *)dstPath

i've added a fileManager class to my project.
If a button is pressed a folder should be copied to my Desktop. I don't know how to go on now. In the Apple Library is no example for that.
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
As noted in the documentation that is a delegate message. If you don't know what that means stop programming and go and read the documentation. This is just one of the documents you should have read and understood all of before writing any code.
 

wlh99

macrumors 6502
Feb 7, 2008
272
0
Hi,

i've just logged in first time in this forum. I'm new to Objective C and would like you to help me :cool:
How to find a file directory in xCode and copy it for example to the Desktop?!

Greetings
Dennis

How new to Objective-C are you? Do you know any other object-oriented programming?

What have you done you have so far on this project? Does it compile and do anything at all?

What you are asking is non-trivial for someone with no experience. Quite frankly, if someone posted the entire code to do what you want, you likely still couldn't make it work.
 

dennisfett

macrumors newbie
Original poster
Apr 17, 2011
6
0
I'm really new, maybe 1 week ago i've started. I know not much...I can make an action and connect it in Interface Builder, so if a button is pressed anything happens. But i wouldn't know what to write, that anything happens. I will teach myself some basics now i think...
 

SidBala

macrumors 6502a
Jun 27, 2010
533
0
Do you have any prior programming experience?

Programming is much more than knowing how to use the interface builder.

To learn Obj-C, you really need to be familiar with C/C++ and OOP concepts.
 

notjustjay

macrumors 603
Sep 19, 2003
6,056
167
Canada, eh?
no

What is OOP? :confused:
Object Orientated Programing?
Pls tell me how to learn everything! :eek:
Books/Links... if necessary

Yes, OOP is short for object oriented programming.

I don't want to sound rude, but Google is going to be much more help to you than posting messages in a forum if you need to learn some basics. It's going to be way faster to get answers than waiting for people to reply, for one thing. There are lots of tutorials on the web. And you should get used to using Google for looking up code examples -- something even experienced programmers do all the time.

In my job as a software engineer I use Google very regularly to look up APIs and get familiar with design patterns and data structures, especially when learning a new language. For example, when I had to quickly pick up some Ada, I didn't even know how to print text to the console, but Google bailed me out again and again.

Best of luck to you as you begin your journey of learning!
 

jiminaus

macrumors 65816
Dec 16, 2010
1,449
1
Sydney
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.