Все вопросы: [macos]

2 214 вопросов

похожие теги: macos-sierramacos-carbon
1
голосов
2ответов
532 просмотров

How to get multiple properties at the same time?

I am using Appscript - a Python interface to AppleScript - in a project of mine that basically gets data from a Mac application. Here is a sample code: asobj = app('Things').to_dos()[0] self.id = asobj.id() self.name = asobj.name() self.status = asobj.status() Every invocation...

29
голосов
2ответов
4777 просмотров

Observing animated property changes in a CALayer

I have a CABasicAnimation that animating a property of a CALayer e.g. bounds.origin. I want to be able to observe the property changing over time, but haven't really found a method that works 100%. I tried using KVO (key-value observation) on the presentationLayer's bounds.origin keypath. The s...

4
голосов
4ответов
1301 просмотров

xUnit Testing Framework for Mac/iPhone

Does anyone know of any xUnit testing frameworks for the Mac OS, more specifically for the iPhone OS? I've seen a couple online, google-toolbox-for-mac & objcUnit, but they don't seem to have had any development on them for a long time. Are there any Objective-C developers out there that pe...

0
голосов
2ответов
171 просмотров

Login to online accounts

First time poster. Back to programming after being away for a few years, trying to clean off the rust. I'm creating a dashboard that will run initially on my laptop (Macbook Pro, 10.4.x O/S). Amongst other things I want it to retrieve latest information from my online accounts. I'm starting w...

1
голосов
2ответов
2163 просмотров

SQLite Access in Objective-C and Cocoa

I am in the process of learning Objective-C for Mac/iPhone development and decided to try and write something useful without looking at the bible (Aaron Hillegass: Cocoa Programming 3rd Edition). I'm writing a simple puzzle game. The data that defines the levels is stored as a string in a SQLite...

0
голосов
2ответов
499 просмотров

Perl Digest::SHA1 not being imported on OS X Leopard Server

I've been trying to get SVN to connect to Atlassian Crowd for authentication but have been running into issues with OS X Leopard Server (10.5.8) and Perl's Digest::SHA1. I've installed it from the source (http://metacpan.org/pod/Digest::SHA1) and if I call it directly from a Perl script it works...

3
голосов
3ответов
1776 просмотров

Are There Any Good Open-Source Mac Application Templates

I am looking to make a Mac version of one of my iPhone apps and was looking for a good ay to hit the ground running. I know how to code in Objective-c and Cocoa, and I know how to piece something together from scratch if I have to, but I am looking for an easier way. Are there any open-source t...

4
голосов
2ответов
4463 просмотров

webbrowser.get("firefox") on a Mac with Firefox "could not locate runnable browser"

I think what I need here is to know which magic command-line or OSA script program to run to start up a URL in an existing Firefox browser, if one is running, or to also start up Firefox if it isn't. On Mac. I'm testing a Python program (Crunchy Python) which sets up a web server then uses Firef...

0
голосов
3ответов
1585 просмотров

How to set Image Perspective

I am working in Mac OS X, 10.6 How can i set the image perspective of any image? I do not want to use CoreImage. Is it possible to do it via NSAffineTransforms. Regards, Dhana.

1
голосов
1ответов
577 просмотров

CoreImage patches problems in 10.6

In 10.6 with some systems CoreImage CIPerspectiveTransform (And other api's too) results in colored patches in output image. (It seems like hardware related issue And it occurs only with images with resolution above 4000X2500) Is there ay way to come out of this bug? At-last is it possible to u...

10
голосов
6ответов
9747 просмотров

Cannot run/debug Java applications in Eclipse (JavaTimeZone issue)

I'm trying to get started with Eclipse/Java/Scala on a MacBook. The installed JDK was 1.5. The SDT plugin for Scala requires 1.6 which was included in an OS update, but I also manually installed a package from Apple to update 1.6. The problem is that I cannot run anything from Eclipse. I always g...

0
голосов
3ответов
3072 просмотров

Strip metadata from files in Snow Leopard

I found the command "mdls" which will show the metadata but I can't see how to delete it. I want to get rid of the comments "kMDItemFinderComment", "kMDItemWhereFroms" from my files. Is there a way to do this?

17
голосов
5ответов
12291 просмотров

What is CHUD Remover? (Came with Xcode on OS X)

I accidentally stumbled across an application called CHUD Remover that claims to remove CHUD files. It lives in /Developer/Applications/Performance Tools/CHUD. What is CHUD and why would I want to remove CHUD files from my system?

4
голосов
2ответов
1493 просмотров

How to tell if a menu item is 'checked'?

I'm building an Applescript that will scan my network every X minutes, checking for my house's Xbox360 or PS3 and enabling my Transmission BitTorrent client Speed-Limit Mode when either console is online. Currently I can only Pause all transfers or resume all transfers using applescript, as ther...

2
голосов
4ответов
5684 просмотров

Auto-hide the OS X menu bar system-wide

I wish to write a utility to auto-hide the menu bar, much like the dock. This would replicate the a OS X 10.4-only application "Menufela", but for Snow Leopard. [[NSApplication sharedApplication] setPresentationOptions: NSApplicationPresentationAutoHideMenuBar ...

497
голосов
7ответов
421226 просмотров

OS X Terminal Colors

I'm new to OS X, having just gotten a Mac after working with Ubuntu Linux for some time. Among the many things I'm trying to figure out is the absence of colors in my terminal window - like the ones that are shown (on Linux) when running ls -la or git status... I just can't figure out how to act...

1
голосов
1ответов
414 просмотров

Does stringWithContentsOfURL use the system proxy settings?

I am using the following code to fetch the contents of a web page but it needs to follow all the network rules etc as defined in the user's system prefs NSURL *url = [NSURL URLWithString:@"http://thetalkingcloud.com/static/ping_desktop_app.php?v=1.0"]; NSError *theNetworkError; NSStr...

4
голосов
6ответов
2469 просмотров

Brand new Mac, should I use Macports?

got a new mac, need to have it setup ready for development. I heard great things about macports, should i use it? Is it really easier than manually download and compile? anyone has any problems using it? It is for typical ruby web development stuff. thanks

5
голосов
1ответов
3117 просмотров

Force a Mac OS X 32/64-bit universal binary to run 32-bit on an old OS version only?

I want to ship a single 32/64-bit universal binary of my desktop Mac OS X Cocoa app. I don't want to ship two versions. I want it to run as a 64-bit process on Snow Leopard. However, if the app is launched on Leopard, I want to always force it to run as a 32-bit process. NOTE: I know that in t...

11
голосов
6ответов
6817 просмотров

Ruby: cannot parse Excel file exported as CSV in OS X

I'm using Ruby's CSV library to parse some CSV. I have a seemingly well-formed CSV file that I created by exporting an Excel file as CSV. However CSV.open(filename, 'r') causes a CSV::IllegalFormatError. There are no rogue commas or quotation marks in the file, nor anything else that I can see...

2
голосов
2ответов
1519 просмотров

Standard (32/64-bit Universal), WebKit, Flash Plugin and Leopard

I have an Xcode project which builds a Cocoa desktop Browser application. My Browser links to the standard WebKit.framework on the system (it does not embed its own WebKit.framework). The "Base SDK" for my Xcode project is set to "Mac OS X 10.5". The "Valid Architectures" for my Xcode project...

0
голосов
3ответов
64 просмотров

I need to develop a project involving hardware which should also work the same on Windows as well as Macs. Whats the way forward?

Whats the best approach (read painless) that I could take? Primarily, the application needs to record the webcam video + mic recording on the disk and compress the video using ffmpeg (or something similar). So there is hardware involved + running a separate process for encoding. I was seriously...

1
голосов
3ответов
577 просмотров

MacRuby, sheet error

I'm running with MacRuby 0.5 and I have a method: attr_accessor :bookmarkSheet, :mainWindow def createBookmark(sender) NSApp.beginSheet(bookmarkSheet, modalForWindow:mainWindow, modalDelegate:self, didEndSelector:nil, contextInfo:nil) end which is supposed to open up a s...

1
голосов
2ответов
952 просмотров

Objective-C can't use stringWithContentsOfURL data in IF statement

Hey, I'm trying to ping my server and check the version of the app - all goes well so far: NSURL *url = [NSURL URLWithString:@"http://thetalkingcloud.com/static/ping_desktop_app.php?v=1.1"]; NSError *theNetworkError; NSString *content = [NSString stringWithContentsOfURL:url encoding:NSASCII...

0
голосов
1ответов
694 просмотров

How to play next file using Audio Queue Services

What is the right way to play next file using Audio Queue Services? When "play next" button is pressed should I first call AudioQueueStop and then AudioQueuePrime/AudioQueueStart or it is enough to just fill buffers with next file data? The problem is that the latter gives me sound glitches on ...

2
голосов
2ответов
1757 просмотров

Calling an NSAlert from didEndSelector of another NSAlert

I need to bring up an NSAlert based on the response from another NSAlert. However, when I try to call it from the didEndSelector of the first one, all kinds of nasty things happen (like my document window disappearing and warnings about ordering problems printing to console). Any thoughts?

7
голосов
4ответов
2221 просмотров

How do you change a drag-and-dropped image mid-drag?

So I want to drag an object from one source to multiple potential destinations. When the object is over each destination, I want it to 'morph' into a different image. Is there a straightforward way to do this from the NSDragSource perspective?

1
голосов
1ответов
2397 просмотров

How to connect to server via ssh but use native "Connect to Server" in OS X?

I have a remote server I manage via command line on Snow Leopard. I ssh into it, etc. All of my ssh keys are setup, and I have configured a local alias that lets me login with one command. What I'd also like to do is be able to connect to it via ssh, but have it mounted locally as a remote drive....

3
голосов
2ответов
1499 просмотров

localhost django dev server vs. postgres slow on mac os?

Anyone notice slowness from a django dev server running on Mac OS and connecting to a remote (postgres) db? It doesn't seem to be the DNS problem referenced elsewhere. We've got a staging instance running the exact same code on the same remote staging box that's hosting the db, and the performanc...

1
голосов
3ответов
719 просмотров

Calculating hdiutil's compression ratio

In my app I'm using Apple's hdiutil command line utility to create compressed disk images (DMGs) of folders/volumes. Is there any way to calculate the compressed size of a given source path? I've already checked in the man pages, nothing there.