Search Results

Search found 6745 results on 270 pages for 'objective j'.

Page 3/270 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Compile C++ file as objective-c++ using makefile

    - by Vikas
    I'm trying to compile .cpp files as objective-c++ using makefile as few of my cpp file have objective code. I added -x objective-c++ as complier option and started getting stray /327 in program error( and lots of similar error with different numbers after /). The errors are around 200. But when I change the encoding of the file from unicode-8 to 16 the error reduces to 23. currently there is no objective-c++ code in the .cpp file but plan to add in future. When i remove -x objective-c++ from complier option ,everything complies fine. and .out is generated. I would be helpful if someone will tell me why this is happening and even a solution for the same Thanks in advance example of my makefile <code> MACHINE= $(shell uname -s) CFLAGS?=-w -framework CoreServices -framework ApplicationServices -framework CoreFoundation -framework CoreWLAN -framework Cocoa -framework Foundation ifeq ($(MACHINE),Darwin) CCLINK?= -lpthread else CCLINK?= -lpthread -lrt endif DEBUG?= -g -rdynamic -ggdb CCOPT= $(CFLAGS) $(ARCH) $(PROF) CC =g++ -x objective-c++ AR = ar rcs #lib name SLIB_NAME=myapplib EXENAME = myapp.out OBJDIR = build OBJLIB := $(addprefix $(OBJDIR)/... all .o files) SS_OBJ := $(addprefix $(OBJDIR)/,myapp.o ) vpath %.cpp path to my .cpp files INC = include files subsystem: make all $(OBJLIB) : |$(OBJDIR) $(OBJDIR): mkdir $(OBJDIR) $(OBJDIR)/%.o:%.cpp $(CC) -c $(INC) $(CCOPT) $(DEBUG) $(CCLINK) $< -o $@ all: $(OBJLIB) $(CLI_OBJ) $(SS_OBJ) $(AR) lib$(SLIB_NAME).a $(OBJLIB) $(CC) $(INC) $(CCOPT) $(SS_OBJ) $(DEBUG) $(CCLINK) -l$(SLIB_NAME) -L ./ -o $(OBJDIR)/$(EXENAME) clean: rm -rf $(OBJDIR)/* dep: $(CC) -MM *.cpp </code>

    Read the article

  • How can Swift be so much faster than Objective-C?

    - by Yellow
    Apple launched its new programming language Swift today. In the presentation, they made some performance comparisons between Objective-C and Python. The following is a picture of one of their slides, of a comparison of those three languages performing some complex object sort: There was an even more incredible graph about a performance comparison working on some encryption algorithm. Obviously this is a marketing talk, and they didn't go into detail on how this was implemented in each. I leaves me wondering though: how can a new programming language be so much faster? In this example, surely you just have a bad Objective-C compiler or you're doing something in a less efficient way? How else would you explain a 40% performance increase? I understand that garbage collection/automated reference control might produce some additional overhead, but this much?

    Read the article

  • implementation of you tube api using Gdata objective-c client

    - by Samrudh
    Currently,I am developing an app in which i implement You Tube API for uploading videos to you tube from app. I implement API using Gdata objective-c client example youtubetest.xcodeproj. but when i upload video i am getting following error: Error Domain=com.goggle.GdataServiceeDomain code=400 "The Operation couldn't" completed.(GData error invalidRequestUri:"invalid request URL")" I try to solve this issue but can't succeeded.How can i solve this? Thanks in advance.

    Read the article

  • Objective-C and sqlite's DATETIME type.

    - by sant0sk1
    I have a sqlite3 table that I'm trying to map to an object in objective-C. One attribute of the table is 'completed_at' which is stored as a DATETIME. I want to create a property on my objective-C class (which inherits from NSObject) that will map well to the 'completed_at' attribute. Objective-C has an NSDate type but I'm not sure if that will map directly?

    Read the article

  • Objective-C wrapper API design methodology

    - by Wade Williams
    I know there's no one answer to this question, but I'd like to get people's thoughts on how they would approach the situation. I'm writing an Objective-C wrapper to a C library. My goals are: 1) The wrapper use Objective-C objects. For example, if the C API defines a parameter such as char *name, the Objective-C API should use name:(NSString *). 2) The client using the Objective-C wrapper should not have to have knowledge of the inner-workings of the C library. Speed is not really any issue. That's all easy with simple parameters. It's certainly no problem to take in an NSString and convert it to a C string to pass it to the C library. My indecision comes in when complex structures are involved. Let's say you have: struct flow { long direction; long speed; long disruption; long start; long stop; } flow_t; And then your C API call is: void setFlows(flow_t inFlows[4]); So, some of the choices are: 1) expose the flow_t structure to the client and have the Objective-C API take an array of those structures 2) build an NSArray of four NSDictionaries containing the properties and pass that as a parameter 3) create an NSArray of four "Flow" objects containing the structure's properties and pass that as a parameter My analysis of the approaches: Approach 1: Easiest. However, it doesn't meet the design goals Approach 2: For some reason, this seems to me to be the most "Objective-C" way of doing it. However, each element of the NSDictionary would have to be wrapped in an NSNumber. Now it seems like we're doing an awful lot just to pass the equivalent of a struct. Approach 3: Seems the cleanest to me from an object-oriented standpoint and the extra encapsulation could come in handy later. However, like #2, it now seems like we're doing an awful lot (creating an array, creating and initializing objects) just to pass a struct. So, the question is, how would you approach this situation? Are there other choices I'm not considering? Are there additional advantages or disadvantages to the approaches I've presented that I'm not considering?

    Read the article

  • Calling javascript from objective-c code

    - by Infinity
    Hello! I found a lots of ways to call objective-c code from javascript, but I want to call the javascript code from objective-c. Last time I submitted a HTML FORM from objective-c, and now I wan't to call a javascript method. What do you think, is there any way to call it and get the response? I am interested in any solution, but I started to think and I think I need to send a html call or something like this, but I am not sure about this because the javascript is client side code, so maybe I need to process it from my objective-c code. What do you think about this?

    Read the article

  • MonoTouch & C# VS Objective C for iphone app

    - by Eyla
    Greeting, I'm a C# programmer guy. I'm planning to start developing app for iphone but I'm not sure if I should use C# under MonoTouch or just use the native language for iphone OS Objective C. Is there a different to program for iphone app using C# or Objective C? Is there limitation using C# to program app for iphone or it can do as much as Objective C can do to develop iphone app?

    Read the article

  • translating Ecmascript (Java,javascript,Actionscript) knowledge to Objective C

    - by eco_bach
    Hi Newcomer to Objective C and trying to translate concepts and sytax I know from ecmascript based languages to Objective C. Is it proper to think of the .h header file in ObjectiveC as an Interface in Actionscript? Lets take the following code example in Objective C which calls a method containing 2 arguments [myTextObject setString: @"Hello World" color: kWhiteColor]; In Actionscript(or javascript) would this be the same as calling 2 accessor methods on 'myTextObject'? ie myTextObject.setString("Hello World") myTextObject.color(kWhiteColor);

    Read the article

  • Objective-C and its relation to C

    - by Daziplqa
    Hi folks, Actually, I am very new to Mobile programming, and need to take your opinions. I am a Java Developer with a C background, and I need to start Learning Objective-C with a target to do mobile app for iPhone and to refresh my knowledge in C (as I know, Objective-C is a pure superset for C, ain't it?). So, the question is, With objective C, can I achieve my two objectives which are again: Do mobile dev for iPhone refresh my refresh my knowledge with C

    Read the article

  • Objective-C @class / import best practice

    - by Winder
    I've noticed that a lot of Objective-C examples will forward declare classes with @class, then actually import the class in the .m file with an import. I understand that this is considered a best practice, as explained in answers to question: http://stackoverflow.com/questions/322597/objective-c-class-vs-import Coming from C++ this feels backwards. I would normally include all needed .h files in the new classes header file. This seems useful since it would make the compiler generate a warning when two classes include each other, at which point I can decide whether this is a bad thing or not then use the same Objective-C style and forward declare the class in the header and include it in the .cpp file. What is the benefit of forward declaring @class and importing in the implementation file? Should it be a best practice in C++ to forward declare classes rather than including the header file? Or is it wrong to think of Objective-C and C++ in these similar terms to begin with?

    Read the article

  • How much of the "Objective-C" I'm learning is universal Objective-C, and not Apple's frameworks?

    - by Chris Cooper
    This question is related to one of my others about C: What can you do in C without “std” includes? Are they part of “C,” or just libraries? I've become curious lately as to what is really contained the the core Objective-C language, and what parts of the Objective-C I've done for iPhone/OS X development is specific to Apple platforms. I know that things like syntax are the same, but for instance, is NSObject and its torrent of NS-subclasses actually part of "standard" Objective-C? Could I use them in, say, Windows? What parts are universal for the most part, and what parts would I only find on an Apple platform? If you want, giving an example of Objective-C used elsewhere as an example of what is more "universal" would help me as well. Thanks! =)

    Read the article

  • using objc_msgSend to call a Objective C function with named arguments

    - by Markus Pilman
    Hi all, I want to add scripting support for an Objective-C project using the objc runtime. Now I face the problem, that I don't have a clue, how I should call an Objective-C method which takes several named arguments. So for example the following objective-c call [object foo:bar]; could be called from C with: objc_msgSend(object, sel_getUid("foo:"), bar); But how would I do something similar for the method call: [object foo:var bar:var2 err:errVar]; ?? Best Markus

    Read the article

  • Objective-C and Android

    - by Tom R
    I've just finished a relatively large project for the Android, and it's left a bitter taste in my mouth with the knowledge that it will never run on one of the most ubiquitous handsets this side of the solar system (the one by that fruity little club). So, for my next project, I want to write it in a way that makes most of the components easily transportable between the iPhone and Android platforms. The way I'm thinking of doing this is by coding most of it in Objective-C, and then adding the platform-specific parts in more Objective-C and Java respectively. On the Android side, this will require using the the NDK. My knowledge of C is good, but my knowledge of Objective-C is close to zero, and I have no desire to learn C++. How sane is the approach above, and is there a better one? Is there any way I can code in Java and still reach the un-hacked iPhone market? And how likely is it that the people I know (iPhone users) will have an Android phone by next year?

    Read the article

  • Integrating Codeigniter and Objective C

    - by Mike
    I'm currently building a social networking site using the codeIgniter PHP framework. One of our major focuses of this site is to be able to upload images through the use of smartphones. We were focusing on building for the iPhone, but the iPhone doesn't let you upload files for some reason beyond me. I have been looking through solutions for days seeing if we could somehow integrate an iPhone app and have come up with nothing. The only thing I have found is using Cocoa Xcode in Objective C to somehow get around the fact. Now I don't know anything about objective C and I was wondering if I could somehow integrate a snippet of objective C into my PHP to allow users to upload photos off their iPhone and onto our site. Is this possible? If so how? If not, does anyone know another work around?

    Read the article

  • Non-member functions in Objective-C

    - by Jellyfingers McSlimedessert
    I want to write a standalone function in Objective-C; so essentially a C-style function, with Objective-C calls in it. For example: NSString* someFunc() { NSString* str = [[NSString alloc] init]; return str; } I declare the function in a header file, and define in it a .m file. However, the function doesn't appear to be compiled in, as the linker complains about the missing symbol. I thought that maybe I should put it in a C file, but then of course it spat at me for writing Objective-C Nonsense in BASI... C. What do?

    Read the article

  • Passing methods/functions as args in Objective C

    - by Baishampayan Ghose
    Hello, I am new to Objective C and I am trying to implement an async library which works with callbacks. I need to figure out a way to pass callback methods as args to my async methods so that the callback can be invoked when the task is finished. What is the best way to achieve this in Objective C? In Python, for example I could easily pass a function, but in Objective C it seems selectors are the way to go(?). Can anyone point me to an example from where I can get some ideas? Thanks in advance.

    Read the article

  • Objective-C member variable assignment?

    - by Alex
    I have an objective-c class with member variables. I am creating getters and setters for each one. Mostly for learning purposes. My setter looks like the following: - (void) setSomething:(NSString *)input { something = input; } However, in C++ and other languages I have worked with in the past, you can reference the member variable by using the this pointer like this->something = input. In objective-c this is known as self. So I was wondering if something like that is possible in objective-c? Something like this: - (void) setSomething:(NSString *)input { [self something] = input; } But that would call the getter for something. So I'm not sure. So my question is: Is there a way I can do assignment utilizing the self pointer? If so, how? Is this good practice or is it evil? Thanks!

    Read the article

  • Why did Dylan lose to Objective-C

    - by Adam Gent
    I have played/worked with many different programming languages and Dylan is still one of my favorites. My question is why did Dylan fail when Objective-C, Ruby and even Scheme have had more success? Was Dylans performance that much worse than Objective-C that Apple went with it or was purely for social/political reasons. Hopefully someone from apple will see this question :) BTW if you have no idea what Dylan is please google Dylan Progrmaming Language.

    Read the article

  • Why did Dylan loose to Objective-C

    - by Adam Gent
    I have played/worked with many different programming languages and Dylan is still one of my favorites. My question is why did Dylan fail when Objective-C, Ruby and even Scheme have had more success? Was Dylans performance that much worse than Objective-C that Apple went with it or was purely for social/political reasons. Hopefully someone from apple will see this question :) BTW if you have no idea what Dylan is please google Dylan Progrmaming Language.

    Read the article

  • String encryption in C# and Objective c

    - by nbojja
    Hi All, I am building a iPhone app which uses c# web services. My c# web services takes user details and validates against my DB and returns xml files. So Now the issue is how to encrypt user details(username and password are 10chars each) in objective c and decrypt in C#. I am very new to cryptography, which method is the best. will it be possible to encrypt in Objective c and Decrypt in C#. thanks..

    Read the article

  • Best way to define an immutable class in Objective C

    - by Patrick Marty
    Hi, I am a newbie in Objective C and I was wondering what is the best way to define an immutable class in Objective-C (like NSString for example). I want to know what are the basic rules one has to follow to make a class immutable. I think that : setters shouldn't be provided if properties are used, they should be readonly accessInstanceVariablesDirectly must be override and return NO Did I forget something ? Thanks

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >