Search Results

Search found 5400 results on 216 pages for 'osx leopard'.

Page 163/216 | < Previous Page | 159 160 161 162 163 164 165 166 167 168 169 170  | Next Page >

  • Can a method return an NSRange?

    - by Dan Donaldson
    I have a method that returns an NSRange. When I call this method from outside the class I get a compile error. NSRange tmpRange; tmpRange = [phrase rangeInString:searchString forString:theLetter goingForward:YES]; return tmpRange.location == -1; in the .h file: #import <Foundation/Foundation.h> @interface Phrase : NSObject { } - (NSRange) rangeInString:(NSString *) tgt forString:(NSString *) find goingForward:(BOOL) fwd; @end This method is called within the Phrase object by other methods without problems. The compiler says 'incompatible types in assignment'. Can anyone explain this to me? I assume it has to do with returning an NSRange/struct type value generated outside the object, but I don't know why it works in one place and not the other.

    Read the article

  • How can I automate new system provisioning with scripts under Mac OS X 10.6?

    - by deeviate
    I've been working on this for days but simply cannot find the correct references to make it work. The idea is to have a script that will baseline newly purchased Macs that comes into the company with basic stuffs like set autologin to off, create a new admin user (for remote admins to access for support, set password to unlock screensaver and etc) . Sample list for baseline that admins have to do on each new machine: Click the Login Options button Set Automatic Login: OFF Check: Show the Restart, Sleep, and Shutdown buttons Uncheck: Show input menu in login window Uncheck: Show password hints Uncheck: Use voice over in the login window Check: Show fast user switching menu as Short Name (note: this is only part of a long list to do on each machine) I've managed to find some references to make some parts work. Like autologin can be unset with: defaults write /Library/Preferences/.GlobalPreferences com.apple.userspref.DisableAutoLogin -bool TRUE and I've kinda found ways to muscle in a new user creation (including prompts) with AppleScript and shell commands. But generally its tough finding ways to do somewhat simple things like turn on password to get out of screensaver or to allow fast user switching. References are either too limited or just no where to be seen (e.g. I can unset autologin via cli but the very next setting on the system preference "show restart, sleep and shutdown buttons" is somewhere else and I can't find any command line to make it set) Does anyone have any ideas on a list, document, reference or anything of where each setting on the system resides so that I can be pointed to make it work? or maybe sample scripts for the above example... My thanks for reading thus far—a huge thank you for whoever that has any info on the above.

    Read the article

  • cannot use Debug with old Xcode 3.1

    - by OhHenry
    I have a mac os x application, which was developed in Xcode 3.3.1, now I need to re-develop it. Of course, I cannot build it in the newest Xcode 4.5, and it's hard for me to change the settings to make it work in Xcode 4.5. So I downloaded the Xcode 3.3.1, it builds ok. But I just cannot use the debugging. The nslog can display normally in the console. I need to debug. Anyone know how to fix it?

    Read the article

  • Sharing Code, Images and Core Data models across iPhone and Mac project

    - by Robert
    Hi, I am maintaining a fairly large mac project and an iphone client for this project. Some code as well as some images and core data models are shared between these two projects. I want to create a shared framework containing this shared components but to my surprise, frameworks like we cocoa developers known them are not supported on the iphone os. Currently I see the following options: a) Include the files in both projects (much tedious work) b) Create a static library for both projects and manually copying the images/core data models c) Create a static lib for iphone and a framework for mac Any suggestions?

    Read the article

  • How can I gain root access on a Mac OS X system without wiping the OS?

    - by Richard T
    My father died recently and I've inherited his Mac. I'd love to put it to use in my own life, but I don't want to wipe its brains out just so I can reconfigure it to use in my network, etc. His old files are historically important to me—I trust you can understand my desire to keep them. I can log in as I had an account on the machine before he passed, but that's about it.

    Read the article

  • Strange Puzzle - Invalid memory access of location

    - by Rob Graeber
    The error message I'm getting consistently is: Invalid memory access of location 0x8 rip=0x10cf4ab28 What I'm doing is making a basic stock backtesting system, that is iterating huge arrays of stocks/historical data across various algorithms, using java + eclipse on the latest Mac Os X. I tracked down the code that seems to be causing it. A method that is used to get the massive arrays of data and is called thousands of times. Nothing is retained so I don't think there is a memory leak. However there seems to be a set limit of around 7000 times I can iterate over it before I get the memory error. The weird thing is that it works perfectly in debug mode. Does anyone know what debug mode does differently in Eclipse? Giving the jvm more memory doesn't help, and it appears to work fine using -xint. And again it works perfectly in debug mode. public static List<Stock> getStockArray(ExchangeType e){ List<Stock> stockArray = new ArrayList<Stock>(); if(e == ExchangeType.ALL){ stockArray.addAll(getStockArray(ExchangeType.NYSE)); stockArray.addAll(getStockArray(ExchangeType.NASDAQ)); }else if(e == ExchangeType.ETF){ stockArray.addAll(etfStockArray); }else if(e == ExchangeType.NYSE){ stockArray.addAll(nyseStockArray); }else if(e == ExchangeType.NASDAQ){ stockArray.addAll(nasdaqStockArray); } return stockArray; } A simple loop like this, iterated over 1000s of times, will cause the memory error. But not in debug mode. for (Stock stock : StockDatabase.getStockArray(ExchangeType.ETF)) { System.out.println(stock.symbol); }

    Read the article

  • What's the difference between starting a process from the dock vs. the command line on OS X

    - by Josh Knauer
    I'm debugging an issue on OS X that only occurs when the application is started from the dock. It does not happen when the app is started from the command line. What is the difference between the two scenarios? The code I'm working with is a c++ based bundled plug-in being loaded in a third party app. I've attached to the process with GDB in both scenarios and the only difference I can see is that a couple of extra dylibs are loaded in the process when running from the command line and that the base address of my library is slightly different in the two scenarios. I've tried changing my linkage to i-prebind and/or -bind_at_load to no avail.

    Read the article

  • CALayer Position Contents to Bottom Left

    - by Louis
    I am attempting to draw an image onto a CALayer. I only need an image, so I have created my later as follows: CALayer *layer = [CALayer layer]; I add my image as follows: NSImage *img = [[NSImage alloc] initWithContentsOfFile:@"path/to/img.png"]; [layer setContents:img]; This works, however it draws my images to fill the entire parent frame (stretching my image in the process). Reading the docs, I found the following: [layer setContentsGravity:@"kCAGravityBottomLeft"]; I am attempting to draw my image in the bottom left of the parent frame, however no matter what I do it draws my icon in the bottom center. Is there anyway to specify the bottom left?

    Read the article

  • How to make Finder 'Open With' work for my application (XCode, OS X)?

    - by Adion
    I have created an application that is capable of playing audio files. This in itself works fine, and so does drag&drop from finder to my application. What I would like as well, is that people can use my application from Finder using the Open With menu (or even allow them to set my application as default for a certain file type) After a lot of searching, I found that I should configure a document type in XCode (Editing information property lists) I successfully added such a type named 'Music File', with UTI 'public.mp3' When I now right-click an MP3 file, my application is listed in the 'Open With' menu. Trying to use it, my app opens, but I get a warning message saying "The document could not be opened. App cannot open files in the 'Music File' format" It doesn't appear to be passed through the command line as is the case in Windows. My application does support drag&drop from Finder, and this is working fine too. I don't really know where to look next, so it would be great if anyone could point me in the right direction. My application isn't using NSDocument, so the 'Class' field doesn't apply for me I think (and according to the docs this field isn't required, but it doesn't say how to handle it without a Class)

    Read the article

  • xcode 4 creating a 2d grid (range and domain)

    - by user1706978
    I'm learning how to program c and i'm trying to make a program the finds the range (using an equation with x as the domain) of a 2d grid...ive already attempted it, but it's giving me all these errors on Xcode, any help?(As you can see, I'm quite stuck!) #include <stdio.h> #include <stdlib.h> float domain; float domain = 2.0; float domainsol(float x ) { domain = x; float func = 1.25 * x + 5.0; return func; } int main(int argc, const char * argv[]) { }

    Read the article

  • Applescript - Get status of windows ( Visible or in the dock )

    - by user1329172
    I need some help for my appleScript. For all open windows, I want to know which one is hidden (in the dock), which one is visible and which one is focused? To list windows I use : tell application "System Events" set procs to processes set windowName to {} repeat with proc in procs try if exists (window 1 of proc) then repeat with w in windows of proc copy w's name to the end of windowName end repeat end if end try -- ignore errors end repeat end tell return windowName I tried focused property: copy w's focused to the end of windowName and selected property: copy w's selected to the end of windowName But this doesn't work! Thanks for help!

    Read the article

  • nm utility to get what is defined in .so file returns error

    - by Narek
    I need to get the symbols defined in .so file. I use latest Mac OS and I do this: /usr/bin/nm -gC libs/armeabi/libhello.so error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm: invalid argument -C Usage: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm [-agnopruUmxjlfAP[s segname sectname] [-] [-t format] [[-arch ] ...] [file ...] As I understand this is another nm utility? It is connected with XCode? How to fix this issue?

    Read the article

  • Problems With SWT on Mac

    - by Jav
    I've got a java project that uses an SWT UI and I'm having trouble deploying it on any Mac OS X computers. The program itself works perfectly on Windows when it is either run from within Eclipse or from a jar file. On Mac, the program also works fine in Eclipse, but when I try to run it from a jar file, I get the following error: 2010-04-30 13:33:04.564 java[17825:41b] *** _NSAutoreleaseNoPool(): Object 0x10b9b0 of class NSCFString autoreleased with no pool in place - just leaking Stack: (0x944acf4f 0x943b9432 0x678fb79 0x35a19b1 0x359ba7f) 2010-04-30 13:33:04.566 java[17825:41b] *** _NSAutoreleaseNoPool(): Object 0x115ef0 of class NSCFNumber autoreleased with no pool in place - just leaking Stack: (0x944acf4f 0x943b9432 0x678a0b0 0x35a19b1 0x359ba7f) 2010-04-30 13:33:04.567 java[17825:41b] *** _NSAutoreleaseNoPool(): Object 0x121000 of class NSCFString autoreleased with no pool in place - just leaking Stack: (0x944acf4f 0x943b9432 0x678fb79 0x35a19b1) 2010-04-30 13:33:04.581 java[17825:41b] *** _NSAutoreleaseNoPool(): Object 0x123720 of class NSPathStore2 autoreleased with no pool in place - just leaking Stack: (0x944acf4f 0x943ba637 0x943c238f 0x943c1e8e 0x943c694b 0x678992e 0x35a19b1) 2010-04-30 13:33:04.582 java[17825:41b] *** _NSAutoreleaseNoPool(): Object 0x12d660 of class NSPathStore2 autoreleased with no pool in place - just leaking Stack: (0x944acf4f 0x943ba637 0x943b9739 0x943c3eb2 0x943c6b22 0x678992e 0x35a19b1) ... ... ... The actual error is much larger, and continues until the program crashes. I know that I am using the correct swt.jar file and I have tried running the program with the -XstartOnFirstThread VM argument, but still have not had any luck. Does anybody have any ideas or any suggestions where I could start looking for a solution? Thanks.

    Read the article

  • Moving to 64-bit on OS X?

    - by ML
    Hi All, What is the best practice for moving to 64-bit on OS X? Using the 10.6 SDK and 64-bit intel as my SDK and target. I have int32 types to change Does OS X have an 'int64' or would one use a 'long long'? Where might I find a resource to available data types? What other issues are there?

    Read the article

  • Sending a message to nil?

    - by Ryan Delucchi
    As a Java developer who is reading Apple's Objective-C 2.0 documentation: I wonder as to what sending a message to nil means - let alone how it is actually useful. Taking an excerpt from the documentation: There are several patterns in Cocoa that take advantage of this fact. The value returned from a message to nil may also be valid: If the method returns an object, any pointer type, any integer scalar of size less than or equal to sizeof(void*), a float, a double, a long double, or a long long, then a message sent to nil returns 0. If the method returns a struct, as defined by the Mac OS X ABI Function Call Guide to be returned in registers, then a message sent to nil returns 0.0 for every field in the data structure. Other struct data types will not be filled with zeros. If the method returns anything other than the aforementioned value types the return value of a message sent to nil is undefined. Has Java rendered my brain incapable of grokking the explanation above? Or is there something that I am missing that would make this as clear as glass? Note: Yes, I do get the idea of messages/receivers in Objective-C, I am simply confused about a receiver that happens to be nil.

    Read the article

  • Creating NSApp inside another nsviewcontroller

    - by DesperateLearner
    I have opened my mac app in a new nsviewcontroller - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { self.masterViewController = [[MasterViewController alloc] initWithNibName:@"MasterViewController" bundle:nil]; [self.window.contentView addSubview:self.masterViewController.view]; self.masterViewController.view.frame = ((NSView*)self.window.contentView).bounds; } Masterviewcontroller has a customized view in the .xib file. When I need to create an NSApp sheet in this NSViewController for another, I'm calling [NSApp beginSheet:_newDataWindow modalForWindow:window modalDelegate:self didEndSelector:nil contextInfo:nil]; I have to use 'window' for beginSheetModalForWindow. But how do I call it from another NSViewController. I end up with compilation error.

    Read the article

  • Implementing a 30 day time trial

    - by svintus
    Question for indie Mac developers out there: How do I implement a 30-day time trial in a non-evil fashion? Putting a counter in the prefs is not an option, since wiping prefs once a month is not a problem for an average user. Putting the counter in a hidden file somewhere sounds a bit dodgy - as a user I hate when apps sprinkle my hard drive with random files. Any ideas?

    Read the article

  • Python 3.1: Syntax Error for Everything! (Mac OS X)

    - by Nathan G.
    I updated to Python 3.1.3 (I've got OS X 10.6). If I type python in Terminal, I get a working 2.6.1 environment. If I type python3 in Terminal, I get a 3.1.3 environment. Everything looks fine until I do something. If I try to run print "hello", I get a syntax error. This problem is the same in IDLE. I tried deleting everything for 3.1 and then reinstalling, but it hasn't worked. Ideas? Thanks in advance!

    Read the article

  • equivalent to getch(), mac/linux crash

    - by acidzombie24
    Hey guys. So I am using getch() and my app crashes instantly. Including when doing: int main() { getch(); } I can't find the link but supposedly the problem is, it needs to turn off buffering or something strange along those lines and I still want cout to work along with cross platform code. I was told to use std::cin.get(), but I'd like the app to quit when a key is pressed, not when the user typed in a letter or number then press enter to quit. Is there any function for this? The code must work under Mac (my os) and Windows.

    Read the article

  • Detecting modifier keys held down during startup in OS/X (or Windows)?

    - by Tom Swirly
    I've searched here and not found any question that really covers this. I have a cross-platform Windows-OS/X application in which I'd like to be able to detect whether modifier keys like shift or control are being held down while the application starts up. We'd like to do this to allow the application to start up without reading its preferences file, in case that somehow gets corrupted (we saw in testing a prefs bug, now fixed, that made the window size 0 by 0, for example). We're using the excellent and comprehensive cross-platform C++ library named Juce. Unfortunately, Juce's master tells me that he believes this is impossible on OS/X at least since you only get keyboard events and there is no way to read the state of the keys unless something changes. Is this true? Or is there some way around this? I'm almost sure I've used Mac programs that used this mechanism to bypass their preferences. Or... stepping up one level... is there another solution to providing the functionality of "run the program but don't read the prefs file" other than "holding a key down while launching the program"? This is consumer software so we can't expect too much from the user. The final solution will end up being a cross-platform one so hints on the Windows side will also be appreciated. Thanks, and be well! I'll report in with progress on my end.

    Read the article

  • Multiboot USB (OSX only): How to customize partition name?

    - by wrk2bike
    Trying to deal with all the Mac OSX recovery disks I've got by moving them to bootable USB images. I've got a big USB drive with multiple partitions for each recovery disk, and it's easy to use Disk Utility to "restore" the recovery DVD to a partition. When I boot my target Mac while holding down the Alt key, I can see all my bootable images and they work great. Problem is, they've all got the same name: "Mac OS X Install DVD." I manage Macs of various vintages. If my target Mac needs 10.6.3 for example, my only option seems to be to try each one until I get past the "Mac OSX can't be installed on this computer" message. I originally named my partitions with the OSX revision number, but that name is replaced by the disk image name during Disk Utility restore. Is there any way to customize the name during or after Disk Utility restore? I tried making a new DVD image on disk first and renaming it, but when I restore it to my recovery partition it has the original name. EDIT: After booting to the wrong partition, and getting the "..can't be installed" message, I can open the Startup Disk menu and see the other partitions - and as I select each one, the info at the bottom indicates which OS revision is on that partition. So I know the info is in there! Just want it at the boot screen if possible.

    Read the article

< Previous Page | 159 160 161 162 163 164 165 166 167 168 169 170  | Next Page >