As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I'm looking for a (certainly basic) thing to do in Objective-C/Cocoa : I would like to split my code into multiple files (one for functions, one for tab view N°1 methods, one for tab view N°2 methods, etc) to make my projects well organized.
I would like to be able to call functions and/or methods from my "AppDelegate.m".
But I don't know how to formulate this question correctly to find help around the web. I come from Delphi, and in Delphi you have just to create a new .PAS file and declare it in USES section.
We are in 2013, so it's certainly an ultra-basic way to code properly via XCode :)
Thanks in advance for any help.
Basically, it's the same - except with the C background of Objective-C you will have to create 4 files. Two header files (.h) and two implementations (.m).
Instead of the uses section you will use the #import statement at top of the .m files.
#import "myClassHeader.h"
As this belongs to the more basic tasks in Objective-C or any C-based language, you should start with reading some beginners tutorial, how to define classes and methods.
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
i have made a Mac OS application, that i was wanting to add a feature to. The user adds data to a NSTableView, then the data is compiled into a .xml file. What i want to do is upload that .xml file to a server, and overwrite the existing file named that. How would i do this? I have hear of Apple's Version, but it is for iPhone and looks a bit confusing. I am only 16, and was wanting to know if there is an easier way of uploading a file to a remote server. Thanks!
There are at least a couple built-in ways to do ftp'ing from an OSX application.
Apple has a useful article available here which shows how to do uploading. I'm not certain (it may be dependent on server implementation) if an upload overwrites a previous file or throws an error if a file already exists.
There's also a commercial Objective C library found here ($300) that might have everything you need available. There may be other hints available on related Stack Overflow questions as well.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I facing a problem, on tracking changes made by other developers.
Note: SVN is not used for some reasons.
So, is there any better way apart from individual file comparison using kDiff. This is too tiresome for large number of files.
Such as looking for entire Project's Comparison, for projects created in Xcode.
Thanks.
You can use FileMerge that comes as part of the Xcode package. This will take two directories and compare the contents of the trees rooted at that point showing files only in one tree, that differ in the two trees, etc. For differing files you get a standard visual diff. This should give you what you need quickly and easily, we actually use it in conjunction with svn to compare branches, check merges, etc.
You can use any other SCM, it's a natural way of tracking changes ("Source Control...")
If you still want make own life harder, you can use any OS-specific tool, which can compare directories, not only separate files
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
How to add extensions that developed as modules in yii?
can any one explain extensions as Yii modules and extensions as Yii behavior
Refer
The first part of your Q is a duplicate with this q: https://stackoverflow.com/questions/12008314/modules-in-yii-explain
regarding the "How to Use Modules" part. Modules are may be the easiest way there to extend yii, since all you need to do is two tiny steps:
Extract the code under base directory /protected/modules.
Declare the used module in the application configuration:
return array(
...
'module' => ('moduleName', 'some argument', 'another argument'),
...
);
I haighly recommend taking a look at the docs above then User-Module (as code sample) to get a better understanding to yii modules.
As for "Extending Yii by Behaviors", i have been confused myself for a while about that, until i had a chance to use the Multi-Lingual_Behavior
There is no typical way for extending Yii with behaviors, simply because there are multiple options (as you can see in the docs here & here) for using (attaching) behaviors to components (application, models, controllers, ...etc)
That said, most of yii-extensions there are supported with good Usage docs that are enough in most cases to get them working.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I'm looking for some good information on subclassing. I've really been looking into subclassing for interface design purposes, and for example went through a tutorial on subclassing UIAlertView to achieve a different look, but I would like to find more information on subclassing as a general techinque. I think being able to subclass any UI-based element of an objective c application (such as UIButton, UIToolbar, UITabBar
Etc) would really improve me as a developer. So, any links or publications you guys think I should check out would be great! :D
Subclassing is a great thing to get comfortable with because once you get proficient at it implementing custom controls becomes very easy.
Each class has different caveats for subclassing, so you really need to read the docs for each class. It also helps to read through the header files for the class (not on my mac right now but I think you can right click a class name and it will have an option to show you the header) as they usually have good information in there about subclassing.
I would also recommend looking at the Cocoa Controls Website. I think all of the controls on there have the source code available so you can see the techniques that people are using.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I have an App that is translated to four languages. I find that updating and maintaining the strings files extremely tedious.
Is there a way to edit different translations side by side similar to what IntelliJ provides:
(source: jetbrains.com)
I would also be happy with a simply MS-Excel to Strings conversion script, where the Excel would be the master and the .strings files would be generated.
These apps saved me from a world of hurt. There's no guide, so you'd have to figure it out yourself. The apps are free though and very well designed.
http://www.loc-suite.org/
My company use a tool called Localization Helper from Mac App Store. I reckon it's pretty good.
How about Linguan?