How do I create a dialog like the following one in Objective-C?
I'm quite new to Objective-C, and I need root access to a file in the /etc directory.
Thanks!!
Yvan
I'm attempting to create an NSArray with a grouping of string literals, however I get the compile error "Initializer element is not constant".
NSArray *currencies = [NSArray arrayWithObjects:@"Dollar", @"Euro", @"Pound", nil];
Could someone point out what I'm doing wrong, and possibly explain the error message?
I'm trying to build with IO for Mac, but I don't seem to have the file with friends installed. When I googled for it, it seemed to me like it was part of, or related to, glut implementation on Mac? Glut is installed. What do I need to do?
I am using Mac OS X 10.6 and installed MAMP and Tomcat.
My Tomcat is installed in /Users/(userID)/Tomcat
I can start Tomcat server in Terminal without a problem
But it cannot be started automatically when Mac OS X is boot up.
I put a file org.apache.tomcat.plist in /Library/LaunchDaemons
Disabled
Label
org.apache.tomcat
ProgramArguments
/Users/henryfok/Tomcat/bin/startup.sh
RunAtLoad
Any hint ?
Does anyone know how to diagnose why eclipse (using Ant) takes over an hour to build a project on a windows box that takes a Mac only 3 minutes to build?
I've checked my eclipse.ini file and it is as identical as a Mac and Windows implementation can be.
hi,
i am working on iphone project, i like to create an svn folder and link that one to my server
I tried to run the below command
fsp3s-MacBook-Pro:~ fsp3$ svnadmin create /ram/Code/SVN
i got the below error
svnadmin: Repository creation failed
svnadmin: Could not create top-level directory
svnadmin: Can't create directory '/ram/Code/SVN': No such file or directory
How to create an SVN folder in mac os x?
thanks!
I'm using Eclipse + the Android SDK on a Mac running Snow Leopard to develop Android apps.
Thing is, Eclipse is really slow - like, it "beach balls" for a few seconds when changing tabs.
Is there anything I can do to improve it's performance?
I am trying to setup my dev environment on my Mac (running Mac OS X 10.6) for my work's rails application. It requires FreeImage and now that I have installed that, I run rake db:migrate and receive the following error:
dyld: lazy symbol binding failed: Symbol not found: _FreeImage_SetOutputMessage
Referenced from: /Users/username/.ruby_inline/Inline_ImageScience_cdab.bundle
Expected in: flat namespace
dyld: Symbol not found: _FreeImage_SetOutputMessage
Referenced from: /Users/username/.ruby_inline/Inline_ImageScience_cdab.bundle
Expected in: flat namespace
Trace/BPT trap
I have tried searching around for the error but am at a complete loss as to where to go or what to try in order to resolve this issue.
Hi,
I am running Mac OSX 10.5.8. I installed matplotlib using macports. I get some examples from the matplotlib gallery like this one, without modification:
http://matplotlib.sourceforge.net/examples/api/unicode_minus.html
I run it, get no error, but the picture does not show up. In Linux Ubuntu I get it.
Do you know what could be wrong here?
Thanks
Hello! I recently created my first bash script, and I am having problems perfecting it's operation. I am trying to copy certain folders from one local drive, to a network drive. I am having the problem of deleting folders once they are copied over, well and also really verifying that they were copied over). Is there a better way to try to delete folders after rsync is done copying? I was trying to exclude the live tv buffer folder, but really, I can blow it away without consequence if need be. Any help would be great! thanks!
#!/bin/bash
network="CBS"
useracct="tvcapture"
thedate=$(date "+%m%d%Y")
folderToBeMoved="/users/$useracct/Documents"
newfoldername="/Volumes/Media/TV/$network/$thedate"
ECHO "Network is $network"
ECHO "date is $thedate"
ECHO "source is $folderToBeMoved"
ECHO "dest is $newfoldername"
mkdir $newfoldername
rsync -av $folderToBeMoved/"EyeTV Archive"/*.eyetv $newfoldername --exclude="Live TV Buffer.eyetv"
# this fails when there is more than one *.eyetv folder
if [ -d $newfoldername/*.eyetv ];
then
#this deletes the contents of the directories
find $folderToBeMoved/"EyeTV Archive"/*.eyetv \( ! -path $folderToBeMoved/"EyeTV Archive"/"Live TV Buffer.eyetv" \) -delete
#remove empty directory
find $folderToBeMoved/"EyeTV Archive"/*.eyetv -type d -exec rmdir {} \;
fi
Is there a way to run a shell script using spot light on Mac OS X 10.6? I would like to be able to invoke a shell script with directly from Spotlight without opening up a terminal
I'm building a program, and I'm quite confident using Objective-C, but I don't know how to programmatically download a file from the web and copy it on the hard drive.
I started with :
NSString url = @"http://spiritofpolo.com/images/logo.png";
NSData* data = [NSData dataWithContentsOfURL:[NSURL URLWithString:url]];
But then I don't know what to do with the data... that sucks, no ;)
Can somebody help?
In system network preference there are some location names.How to get the current or active network location name and list of all network locations? I guess SystemConfiguration.framework supports this but i didn't get exactly which API to use.Thanks in advance for your answer. RegardsDevara Gudda
Is there a way to take my C++ code and cross compile it to run on Windows, Mac OS, and Linux? Is there a tool to do this, or does it have to be manually compiled on each OS via Terminal/Cygwin?
I'm making a new Mac OS X application. (not an iPhone app)
This is document-based application.
It shows a new "Untitled" document instance automatically when it starts up. How can I block this behavior? I wish my application show no window at start up.
I got a programm in haskell outputting utf-8 using the package utf8-string and using only the output functions of this package.
I set the encoding of each file I write to this way :
hSetEncoding myFile utf8
{- myFile may be stdout -}
but when I try to output :
alpha = [fromEnum 0x03B1] {- a -}
instead of the nice alpha letter I got on Linux (or in a file on windows), I got the following :
α
The weird thing is even if I try to write the output on a file, I can't read it back with mvim as an utf-8 file. Is there any way to get the correct behaviour
Hi
I've tried to setup a controller for a document in a document based application, and i'm not sure what is the correct for doing that.
In MyDocument.xib I have set the File's Owner as MyDocument class and the I connected the outlets and actions to it but it doesn't seem to work
Could anybody give me a hand on this?
Cheers
Hi,
I am new to Mac OSX, and I wonder if Xcode can generate , for a given C++ source code, the call graph of the program in a visual way.
I also wonder if for each function, and after a run, whether it can also print the %time spent on the function
If so, I would thank really some links with tutorials or info, after googling I did not find anything relevant
Thanks
Why is it that some Mac Apps are perfectly happy to be simply copied into the /Applications folder, and others require installation-wizard software? Are there advantages to the wizards?
If I have several OS-X Terminal.app windows open, how can I move one Terminal window to another space?
I'm happy to use any scripting or programming language to achieve this, but would prefer AppleScript or calls to standard frameworks.
(Note this is to move only one window of an application not all windows.)
I'm having trouble merging two branches with Gity. When I do a checkout on my master branch and click: "Merge into master" nothing seems to happen...
Any thoughts?
On Tiger, I used a custom python installation to evaluate newer versions and I did not have any problems with that*. Now Snow Leopard is a little more up-to-date and by default ships with
$ ls /System/Library/Frameworks/Python.framework/Versions/
2.3 2.5 2.6 @Current
What could be considered best practice? Using the python shipped with Mac OS X or a custom compiled version in, say $HOME.
Are there any advantages/disadvantages using the one option over the other?
My setup was fairly simple so far and looked like this: Custom compiled Python in $HOME and a $PATH that would look into $HOME/bin first, and subsequently would use my private Python version. Also $PYTHONPATH pointed to this local installation. This way, I did not need to sudo–install packages - virtualenv took care of the rest.
I have the following file structure (XML files 'index.xml' in nested folders):
index.xml
foo/index.xml
foo/sub/index.xml
foo/.../index.xml
bar/.../index.xml
Now I have to transform each of this XML files with a given XSL stylesheet. The result should be the same folder structure (overwriting would be OK). What would be your approach to achieve this?
My system: OS X 10.6, Saxon XSLT processor