mac

uploading a file on mac os x using adobe flex 3

Hi, I've created a fileUpload.mxml component in flex 3 which basically uploads m4a's to a designated server. The general code is below: private var uploadURL:URLRequest; private var file:FileReference; file=new FileReference(); file.browse(getTypes()); var params:URLVariables = new URLVariables(); params.fileID = model.selectedFileUp...

Handling application exit in a Cocoa plug-in loaded into a Carbon application

I have a Cocoa plug-in that is loaded into an existing Carbon application. When the plug-in is first loaded, the Carbon application calls an initialization function, Plugin_Init() and in that function I set up the environment like so: //this is the global autorelease pool static NSAutoreleasePool* globalPool = nil; void Plugin_Init()...

How To Get Xcode Interface Builder To Pop Up When I Click My NIB File?

Hi guys, I am at work and trying to make an application for my company in Xcode, however when I click the Nib file I cannot get the interface builder to pop up. I am on a Mac that has lockdown control on it, and I am wondering if this is affecting my development environment? When I double-click the Nib file nothing happens. It just modal...

Compiling C++ for MacOSX 10.5 and 10.6

I have a reasonably simple C++ program that I can successfully compile on OSX 10.6 using: g++ -O3 -funroll-loops -I /usr/local/include/boost-1_39/ myfile.cpp -o build/myfile However, a user on OSX 10.5 gets the error: dyld: unknown required load command A support forum post suggests adding -isysroot /Developer/SDKs/MacOSX10.5.sdk ...

Need to do the opposite of NSSelectorFromString()

In Cocoa, you can write @selector(mySelectorNameWithObject:) to get a compiled SEL, or at runtime, NSSelectorFromString(@"mySelectorNameWithObject:") with return a SEL. According to Apple documentation: The only thing that makes the selector method name different from a plain string is that the compiler makes sure that selectors are ...

NSImage color shift on Snow Leopard

My app creates NSImages by compositing various other NSImages together. The original images are loaded from files using [NSBitmapImageRep imageRepWithContentsOfFile:]. The final image is then displayed on the screen. A few 10.6 customers have reported that the image they see (sometimes) has shifted colors. Specifically, all of the brigh...

Is it possible to run the iPhone SDK from a flash drive?

I'm getting into iPhone app development, but I have neither the money for a mac mini, nor a PC with hackintosh compatible specs. However, my university has some mac labs that I can access, but to which I cannot install new software. As such, I'm wondering if there is a way to run the iPhone SDK from a usb drive, so that I can start pra...

Is this a known issue in firefox extensions on Mac OS?

I've developed a firefox extension which contains a small dialog defined by this XUL script: <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <prefwindow id="firenowPreferences" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" title="Fire.Now" ondialogaccept='on...

Determine AFP share from a file URL

I writing an application to copy some files to a certain location. It allows the user to choose the destination, which is always on an AFP share. This is done with a NSOpenPanel. The URL that gets returned is: file://localhost/Volumes/Oliver%20Legg's%20Backup/. What I want to accomplish is when the application is started, if the AFP sha...

How to record/obtain sound samples 40ms iLIBC beep/silence

I want to record/Obtain a 40 ms sound sample which produces a BEEP (iLIBC). Does anyone know of any tool which allows me to do this? ...

How to log python program activity in Mac OS X

Hello, I'm pretty new to Python programming so I have this question: How can I log a Python application activity into /var/log with Mac OS X? I tried using syslog module, but it does not seem to write anything. I tried also with the logging module, but I always run into a permission error. How can I do it? Update: import logging im...

How to replace launchd scheduling with a Python program

The Mac OS X system startup program launchd enables job scheduling (similar to cron.) By creating a launchd agent, one can trigger programs through one of the following events: an interval of time has elapsed a certain calendar date has come a file path has been modified something has been placed in a certain directory (queue directory...

EADDRNOTAVAIL when binding 127.0.0.1 on localhost?

I'm getting errno==49 (EADDRNOTAVAIL) when trying to UDP-bind() to 127.0.0.1:47346 running Mac OS X on a G5 (big endian PowerPC). Is there something preventing me from doing so? I've tried other addresses and ports (192.168.1.2 and port 47346) but with no success. Here's a gdb printout of my sockaddr_in: $1 = { sin_len = 0 '\0', s...

How to change only font size for the whole styled text in NSTextView

I need to set a text size (for example to 42) of the selected rich text which uses multiple fonts. I imagine I can check attributes of each group of characters, modify the font size and set attributes back, but looking at the floating Font panel it seems like there should be a very easy and straightforward way to accomplish that. Do I ...

Mac Plugins no longer support GetWindowFromPort?

I'm mantaining an ancient Firefox plugin. It uses GetWindowFromPort to get a WindowPtr object out of the NP_Port object which is the platform specific window data in the WidowPtr object. Now it always returns NULL. NP_Port object is non-null as is the port field (CGraphPtr) of that object. However, without GetWindowFromPort, I no longer...

How to release patches for Java programs

I've recently released a cross platform Java application. For distribution we created a NSIS installer for Windows and used a DMG for Mac (that has JarBundled .app file). We also plan on creating Linux RPMs, DEBs and tarballs. In total that's 5 different distribution methods to look after. My question is: What is the best cross-platf...

How do I test ASP pages locally on Mac/OSX?

Is it possible to test ASP websites locally on a Mac? ...

Objective-C Preferences Window makeKeyAndOrderFront or showWindow?

Hello everybody, I'm working on a new Mac App and want to open my Preferences Window, i've got 2 Nib (xib) Files, one for the main window, and one for the Preferences Window, then i've got a openPreferences Action, which shows the Preferences Window, sth. like this: - (IBAction)openPreferences:(id)sender { PrefCont *cont = [[PrefCo...

How do I install the Mono Winforms Designer on Mac OS X?

I've searched around but was unable to find a good, clear, answer. Can someone please explain to me how I can install the Mono Winforms Designer on Mac OS X? If it's not possible on OS X, can it be done on Linux? And if so, how? Any and all help is appreciated! Thanks. ...

Converting vector image to Quartz 2D code

Is it possible to convert a vector image into Quartz 2D code (mac) so that image can be drawn programmatically? ...