Search Results

Search found 11020 results on 441 pages for 'cocoa dev'.

Page 5/441 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Cocoa - calling a VIEW method from the CONTROLLER

    - by eemerge
    Hello everyone, Got a little problem i asked about it before but maybe i didnt ask properly. I have a cocoa application, which amongst other things, must do the following task: - load some images from the disk, store them in an array and display them in a custom view. In the Interface Builder i have a CustomView and an OBJECT that points to TexturesController.h The custom view is a custom class, TextureBrowser. Below is the code for the controller and view: TexturesController #import <Cocoa/Cocoa.h> @class TextureBrowser; @interface TexturesController : NSObject { IBOutlet NSTextField *logWindow; IBOutlet TextureBrowser *textureView; NSMutableArray *textureList; } @property textureView; -(IBAction)loadTextures:(id)sender; -(IBAction)showTexturesInfo:(id)sender; @end TextureBrowser @interface TextureBrowser : NSView { NSMutableArray *textures; } @property NSMutableArray *textures; -(void)loadTextureList:(NSMutableArray *)source; @end These are just the headers. Now , what i need to do is: when loadTextures from the TexturesController is called, after i load the images i want to send this data to the view (TextureBrowser), for example, store it in the NSMutableArray *textures. I tried using the -(void)loadTextureList:(NSMutableArray*)source method from the view, but in the TextureController.m i get a warning : No -loadTextureList method found This is how i call the method : [textureView loadTextureList: textureList]; And even if i run it with the warning left there, the array in the view class doesnt get initialised. Maybe im missing something...maybe someone can give a simple example of what i need to do and how to do it (code). Thanks in advance.

    Read the article

  • Cocoa: getting a Table View cell to send action messages

    - by underthetable
    I'm really having trouble getting a Cocoa Table View cell to send action messages. At the most basic level, in IB there is an action assigned for the NSTextViewCell object, and after editing and pressing Return nothing happens. So I have an IBOutlet hooked up to the NSTextViewCell, and have been experimenting with NSActionCell messages to it. But the Table View seems to pretty much just ignore them. I've also tried subclassing NSTextViewCell, but the methods I'm seeing all look like they want to pass values to the object from somewhere, not return a value from inside the object to configure its behavior. I'm pretty new to programming and Cocoa -- can someone explain each thing that needs to be overridden and how and where to do it?

    Read the article

  • From iPhone OS to cocoa on OSX...

    - by David
    Hi - this is quite a basic OSX/cocoa question. I come from an iPhone OS development background. I'm now trying to write apps for OSX, but I don't understand where cocoa on OSX decides where the program gets control. I can see the main function, but where does program control go from there? Say for example I want to programatically create a window with an NSView in it once the app has finished launching - how would I do that? There is no app delegate created that I can see, in iPhone OS I would wait for the - (void) applicationDidFinishLaunching:(UIApplication *)application method to be called. I really don't want to use the Interface Builder or NIB files to setup my window/view. How would I go about this? Any help would be much appreciated - Cheers, David

    Read the article

  • Cocoa NSStatusBar Global HotKey

    - by Craig
    I have created an NSStatusBar cocoa application which sits in the system status bar. I want to assign a hotkey so that when pressed it toggles my applications and show the menu. Is this possible?, In my searching and experimenting I have found a few different ways of assigning global hot keys that can be pressed when your application is in the background but I can't find any way to problematically make the menu show. Is this possible?, If anyone thinks a way of assigning a global hotkey is best please post it. Thanks. One of the hotkey tutorials I found was on http://dbachrach.com/blog/2005/11/program-global-hotkeys-in-cocoa-easily/ for anyone interested.

    Read the article

  • Working with the Objective-C/Cocoa flat namespace

    - by Stephen Blinkhorn
    I've not found anything that addresses my specific name space question as yet. I am working on some AudioUnit plug-ins featuring Cocoa based GUIs. The plug-ins use a common library of user interface classes (sliders, buttons etc) which are simply added to each Xcode project. When I recompile and distribute updates it is pretty much guaranteed that at least one user interface class will have been updated since the last release. If the user launches an older plug-in before an updated plug-in then the old Cocoa classes are already loaded into the run time and the plug-in attempts to use the older implementations - often resulting in a failure one way or another. I know frameworks are the intended solution but the overhead and backwards compatibility issues are not ideal. I prefix all class names where possible but what options do I have to ensure that each plug-in contains unique class names for the shared user interface classes?

    Read the article

  • Creating iPhoto albums using Cocoa Scripting Bridge

    - by robinjam
    I'm tearing my hair out trying to create a new album from a Cocoa Application. In applescript it's a nice simple procedure: tell application "iPhoto" new album name "Album" end tell But I can't work out how this is done in Cocoa via the Scripting Bridge. I've tried this: iPhotoApplication *iPhoto = [SBApplication applicationWithBundleIdentifier:@"com.apple.iPhoto"]; iPhotoAlbum *newAlbum = [[[[iPhoto classForScriptingClass:@"album"] alloc] initWithProperties:[NSDictionary dictionaryWithObject:@"Album" forKey:@"name"]] autorelease]; [[iPhoto albums] addObject:newAlbum]; But that had no effect. Please help!

    Read the article

  • Combining Cocoa and MySQL

    - by BryCry
    Hey guys, i was searching SO for help on this, but i can't seem to find a concrete solution. Is, or isn't it possible to connect to a mysql database with Cocoa? Because i'm working on a program that i'd like to extend to a database, but i sure as hell don't know how! I mean, that cocoa-mysql package is heavily outdated, and i dont even know what a C wrapper is! Can someone please tell me how to do this, or atleast burst my bubble to tell me that it can't be done? Thanks!

    Read the article

  • Proper design a Model-Controller in Cocoa?

    - by legege
    Hi, I'm trying to design a simple Cocoa application and I would like to have a clear and easy to understand software architecture. Of course, I'm using a basic MVC design and my question concerns the Model layer. For my application, the Model represents data fetched on the Internet with a XML-RPC API. I'm planning to use Core Data to represent a locally fetched version. How should the data be loaded initially? I'm reading the Cocoa Design Pattern book, and they talk about a Model-Controller that is centric to the Model. How would that be done? Thanks!

    Read the article

  • Cocoa Bindings in the face of a million of items in an NSArray

    - by François Beausoleil
    I'm writing a GUI for MongoDB using Cocoa. It's going well, but I don't know how to make KVO properties that would be lazily loaded. How does one handle that? For instance, viewing the documents in a Mongo collection. The collection might have a million items in it. I suspect I shouldn't be downloading the full 2-5 GiB of data to my Cocoa app, then format and display 20 rows. How does one implement that? I called my project Mongo Explorer, available on GitHub. Specifically, how would I code MECollection#reload to be lazy? Do I need to implement a data source delegate for my NSTableView?

    Read the article

  • authorization services question cocoa

    - by Marius
    Sorry for being a total beginner in cocoa and for asking the following stupid question, but it's too confusing for me to google it myself or maybe i'm just missing something. I need to run a shellscript with elevated privileges in cocoa. As i understand, "AuthorizationExecuteWithPrivileges" is the correct way to do it. So i've created an application and tried to use some code from one example i found online. The problem is ... if i understand it correctly ... there should be a Security framework in /System/Library/Frameworks that i have to import to the project, but ... it's not there. What am i missing here? Thank you.

    Read the article

  • How do I figure out which version of OpenCL comes with my nvidia-current-dev package?

    - by levesque
    I am running Ubuntu 10.04 with an nvidia geforce GT 240 card. I installed nvidia-current-dev with apt-get, thus I got a bunch of headers and lib files for OpenCL. However, I am unable to figure out if I have OpenCL 1.0 or 1.1 (could be 1.2, though I doubt it). Does anyone know a way to figure out which version of OpenCL comes with the nvidia-current-dev package (version: 195.36.24-0ubuntu1~10.04.2)? If not, is there another place where I could get an answer?

    Read the article

  • File bug for iPhone SDK

    - by leolobato
    Hello guys, How exactly filling bugs for the iPhone SDK with Apple works? I've always seen people mentioning we should fill bugs and duplicates is their way of measuring priority, but it's not clear to me: How to actually fill the bug; How to flag someone else's bug as a duplicate, and; What do I need to tell people I've filled that bug and they should help me get it fixed by posting duplicates, if they're interested. I couldn't find this process detailed anywhere - just snippets of information, so I figure you guys could help me (and all other developers fresh in Cocoa / Cocoa-touch development) by detailing it here. Thanks!

    Read the article

  • NSTableView doesn't populate with array objects until a new object is added via the controller

    - by Luke
    I have an NSTableView and an array controller set up as shown here, using cocoa bindings: https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/TableView/PopulatingViewTablesWithBindings/PopulatingView-TablesWithBindings.html#//apple_ref/doc/uid/10000026i-CH13-SW3 In my app delegate during applicationDidFinishLaunching I have the following snippet in here, initialising the array and filling it with objects array = [[NSMutableArray alloc] init]; SomeObject* foo = [[Object alloc] init]; foo.text = @"sup"; [array addObject:foo]; //Repeat this a few times However, when I build the app and run it I end up with an empty table. However, if I bind a button to the array controller's add: input and click it during runtime (this adds a new object to the array and table) then the table will show the new object first, with the objects added during applicationDidFinishLaunching following it. Why does this happen? And is there a way to make my table populate without having to add an element first?

    Read the article

  • Robots &amp; Pencils Bring iOS Dev Camp/Dev School to Winnipeg

    - by D'Arcy Lussier
    My buddy Paul Thorsteinson from Robots and Pencils has come up with an elaborate way to collect his Mac power adaptor that I keep forgetting to mail to him – he’s coming to town with Jonathan Rasmusson to run an iPhone Dev Camp and two-day Dev School here in Winnipeg! From the email he sent me: We are going to be bringing our successful iOS dev school out to the 'Peg in October as well has hosting a dev camp on the Friday night (comparable to a .net user group type deal).  If you know any peeps in Manitoba who are interested in these, please pass along!  .Net developers are welcome to come and heckle as well ;) Winnipeg iPhone Dev Camp October 26th Marlborough Hotel, 5:30pm Cost: $10 http://ios-dev-camp-winnipeg-eorg.eventbrite.com/ ^for devs of any level interested in meeting other devs hearing talks of all levels.  Food and networking Winnipeg iPhone Dev School October 27th, 28th, Marlborough Hotel Cost: $899 + GST http://academy.robotsandpencils.com/training ^For devs looking to get their feet wet in iOS dev Paul has spoken at Prairie Dev Con before and is vastly knowledgeable in mobile development. You can see his work in Spy vs Spy, Catch the Princess, World Explorer for Minecraft, Deco Windshield (yes they run their entire business on their iPad), Anthm, Own This World and too many other apps. If you’re into iOS development, looking to get in, or wanting to improve your skills, consider these great professional development opportunities! D

    Read the article

  • I am trying to deploy my first rails app using Capistrano and am getting an error.

    - by Andrew Bucknell
    My deployment of a rails app with capistrano is failing and I hoping someone can provide me with pointers to troubleshoot. The following is the command output andrew@melb-web:~/projects/rails/guestbook2$ cap deploy:setup * executing `deploy:setup' * executing "mkdir -p /var/www/dev/guestbook2 /var/www/dev/guestbook2/releases /var/www/dev/guestbook2/shared /var/www/dev/guestbook2/shared/system /var/www/dev/guestbook2/shared/log /var/www/dev/guestbook2/shared/pids && chmod g+w /var/www/dev/guestbook2 /var/www/dev/guestbook2/releases /var/www/dev/guestbook2/shared /var/www/dev/guestbook2/shared/system /var/www/dev/guestbook2/shared/log /var/www/dev/guestbook2/shared/pids" servers: ["dev.andrewbucknell.com"] Enter passphrase for /home/andrew/.ssh/id_dsa: Enter passphrase for /home/andrew/.ssh/id_dsa: [dev.andrewbucknell.com] executing command command finished andrew@melb-web:~/projects/rails/guestbook2$ cap deploy:check * executing `deploy:check' * executing "test -d /var/www/dev/guestbook2/releases" servers: ["dev.andrewbucknell.com"] Enter passphrase for /home/andrew/.ssh/id_dsa: [dev.andrewbucknell.com] executing command command finished * executing "test -w /var/www/dev/guestbook2" servers: ["dev.andrewbucknell.com"] [dev.andrewbucknell.com] executing command command finished * executing "test -w /var/www/dev/guestbook2/releases" servers: ["dev.andrewbucknell.com"] [dev.andrewbucknell.com] executing command command finished * executing "which git" servers: ["dev.andrewbucknell.com"] [dev.andrewbucknell.com] executing command command finished * executing "test -w /var/www/dev/guestbook2/shared" servers: ["dev.andrewbucknell.com"] [dev.andrewbucknell.com] executing command command finished You appear to have all necessary dependencies installed andrew@melb-web:~/projects/rails/guestbook2$ cap deploy:migrations * executing `deploy:migrations' * executing `deploy:update_code' updating the cached checkout on all servers executing locally: "git ls-remote [email protected]:/home/andrew/git/guestbook2.git master" Enter passphrase for key '/home/andrew/.ssh/id_dsa': * executing "if [ -d /var/www/dev/guestbook2/shared/cached-copy ]; then cd /var/www/dev/guestbook2/shared/cached-copy && git fetch origin && git reset --hard 369c5e04aaf83ad77efbfba0141001ac90915029 && git clean -d -x -f; else git clone [email protected]:/home/andrew/git/guestbook2.git /var/www/dev/guestbook2/shared/cached-copy && cd /var/www/dev/guestbook2/shared/cached-copy && git checkout -b deploy 369c5e04aaf83ad77efbfba0141001ac90915029; fi" servers: ["dev.andrewbucknell.com"] Enter passphrase for /home/andrew/.ssh/id_dsa: [dev.andrewbucknell.com] executing command ** [dev.andrewbucknell.com :: err] Permission denied, please try again. ** Permission denied, please try again. ** Permission denied (publickey,password). ** [dev.andrewbucknell.com :: err] fatal: The remote end hung up unexpectedly ** [dev.andrewbucknell.com :: out] Initialized empty Git repository in /var/www/dev/guestbook2/shared/cached-copy/.git/ command finished failed: "sh -c 'if [ -d /var/www/dev/guestbook2/shared/cached-copy ]; then cd /var/www/dev/guestbook2/shared/cached-copy && git fetch origin && git reset --hard 369c5e04aaf83ad77efbfba0141001ac90915029 && git clean -d -x -f; else git clone [email protected]:/home/andrew/git/guestbook2.git /var/www/dev/guestbook2/shared/cached-copy && cd /var/www/dev/guestbook2/shared/cached-copy && git checkout -b deploy 369c5e04aaf83ad77efbfba0141001ac90915029; fi'" on dev.andrewbucknell.com andrew@melb-web:~/projects/rails/guestbook2$ The following fragment is from cap -d deploy:migrations Preparing to execute command: "find /var/www/dev/guestbook2/releases/20100305124415/public/images /var/www/dev/guestbook2/releases/20100305124415/public/stylesheets /var/www/dev/guestbook2/releases/20100305124415/public/javascripts -exec touch -t 201003051244.22 {} ';'; true" Execute ([Yes], No, Abort) ? |y| yes * executing `deploy:migrate' * executing "ls -x /var/www/dev/guestbook2/releases" Preparing to execute command: "ls -x /var/www/dev/guestbook2/releases" Execute ([Yes], No, Abort) ? |y| yes /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.17/lib/capistrano/recipes/deploy.rb:55:in `join': can't convert nil into String (TypeError) from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.17/lib/capistrano/recipes/deploy.rb:55:in `load'

    Read the article

  • Cocoa equivalent of the Carbon method getPtrSize

    - by Michael Minerva
    I need to translate the a carbon method into cocoa into and I am having trouble finding any documentation about what the carbon method getPtrSize really does. From the code I am translating it seems that it returns the byte representation of an image but that doesn't really match up with the name. Could someone give me a good explanation of this method or link me to some documentation that describes it. The code I am translating is in a common lisp implementation called MCL that has a bridge to carbon (I am translating into CCL which is a common lisp implementation with a Cocoa bridge). Here is the MCL code (#_before a method call means that it is a carbon method): (defmethod COPY-CONTENT-INTO ((Source inflatable-icon) (Destination inflatable-icon)) ;; check for size compatibility to avoid disaster (unless (and (= (rows Source) (rows Destination)) (= (columns Source) (columns Destination)) (= (#_getPtrSize (image Source)) (#_getPtrSize (image Destination)))) (error "cannot copy content of source into destination inflatable icon: incompatible sizes")) ;; given that they are the same size only copy content (setf (is-upright Destination) (is-upright Source)) (setf (height Destination) (height Source)) (setf (dz Destination) (dz Source)) (setf (surfaces Destination) (surfaces Source)) (setf (distance Destination) (distance Source)) ;; arrays (noise-map Source) ;; accessor makes array if needed (noise-map Destination) ;; ;; accessor makes array if needed (dotimes (Row (rows Source)) (dotimes (Column (columns Source)) (setf (aref (noise-map Destination) Row Column) (aref (noise-map Source) Row Column)) (setf (aref (altitudes Destination) Row Column) (aref (altitudes Source) Row Column)))) (setf (connectors Destination) (mapcar #'copy-instance (connectors Source))) (setf (visible-alpha-threshold Destination) (visible-alpha-threshold Source)) ;; copy Image: slow byte copy (dotimes (I (#_getPtrSize (image Source))) (%put-byte (image Destination) (%get-byte (image Source) i) i)) ;; flat texture optimization: do not copy texture-id -> destination should get its own texture id from OpenGL (setf (is-flat Destination) (is-flat Source)) ;; do not compile flat textures: the display list overhead slows things down by about 2x (setf (auto-compile Destination) (not (is-flat Source))) ;; to make change visible we have to reset the compiled flag (setf (is-compiled Destination) nil))

    Read the article

  • DRY Authenticated Tasks in Cocoa (with distributed objects)

    - by arbales
    I'm kind of surprise/infuriated that the only way for me to run an authenticated task, like perhaps sudo gem install shi*t, is to make a tool with pre-written code. I'm writing a MacRuby application, which doesn't seem to expose the KAuthorization* constants/methods. So.. I learned Cocoa and Objective-C. My application creates a object, serves it and calls the a tool that elevates itself and then performs a selector on a distributed object (in the tool's thread). I hoped that the distributed object's methods would evaluated inside the tool, so I could use delegation to create "privileged" tasks. If this won't work, don't try to save it, I just want a DRY/cocoa solution. AuthHelper.m //AuthorizationExecuteWithPrivileges of this. AuthResponder* my_responder = [AuthResponder sharedResponder]; // Gets the proxy object (and it's delegate) NSString *selector = [NSString stringWithUTF8String:argv[3]]; NSLog(@"Performing selector: %@", selector); setuid(0); if ([[my_responder delegate] respondsToSelector:NSSelectorFromString(selector)]){ [[my_responder delegate] performSelectorOnMainThread:NSSelectorFromString(selector) withObject:nil waitUntilDone:YES]; } RandomController.m - (void)awakeFromNib { helperToolPath = [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/AuthHelper"]; delegatePath = [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/ABExtensions.rb"]; AuthResponder* my_responder = [AuthResponder initAsService]; [my_responder setDelegate:self]; } -(oneway void)install_gems{ NSArray *args = [NSArray arrayWithObjects: @"gem", @"install", @"sinatra", nil]; [NSTask launchedTaskWithLaunchPath:@"/usr/bin/sudo" arguments:args]; NSLog(@"Ran AuthResponder.delegate.install_gems"); // This prints. } ... other privileges tasks. "sudo gem update --system" for one. I'm guessing the proxy object is performing the selector in it's own thread, but I want the current (privileged thread) to do it so I can use sudo. Can I force the distributed object to evaluate the selector on the tool's thread? How else can I accomplish this dryly/cocoaly?

    Read the article

  • Cocoa/Objective-C - Child window with text input without main window becoming inactive

    - by Josh
    Hello All, I have a need to spawn a window that will hover just above my main window in a cocoa application. I want this main window to allow the user to enter some text in an input box. All is well until the text input box actually gains focus. The main window becomes "deactivated." This window is borderless and is a slightly custom shape -- its more like a hover card than anything else, I suppose. Basically, I'd like this thing to work almost exactly like Spotlight (Apple + Space) -- you can enter text, but this is such an an ancillary operation that in the context of the greater UX, you don't want the jarring effect of the main window graying out (becoming inactive). You'll notice when you have some application open and in-focus, spotlight will not cause the window of that application to become inactive. This problem arises because text input seems to REQUIRE that the child window become the key window (it will not let you place the cursor in the text input field). When it becomes key, the main window becomes inactive. So far I've tried: Subclassing NSWindow for my main application and overriding isKeyWindow such that it only loses key when the application is no longer the users focus (as opposed to the window). This had the unintended effect of colliding with key status of the child window and having very strange effects on the keyboard input (some keys are not captured, like delete) Creating a view instead of a window. Doesn't work because of this problem -- you cannot draw over a Webkit WebView these days. Anybody Cocoa/OSX wizards have any ideas? I've become a little obsessed with this one. An itch I can't scratch.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >