Re: Reading in dictionary from txt file: options for speed
Miles wrote: I'm creating a game for where the dictionary file will never get modified, so I'm not really worried about that. I was pretty sure the dictionary was read-only, but that doesn't mean it's always error-free. I was actually thinking of production errors, where the dictionary file accidentally has its final null lost or removed. Such things have been known to happen, and from small errors grave disorder follows unless you code defensively. Sometimes a good design isn't just defending against user mistakes, it's also defending against your own mistakes. Yes, the original suggestion to use strstr(). Not strnstr? http://lists.apple.com/archives/cocoa-dev/2009/Apr/msg01221.html It is slow, for a word that's never found it takes 0.704 seconds on the device. Definitely too long. So what do you think would be fast enough. For example, if it were twice as fast, would that suffice? 10 times faster? 100 times? Remember, it doesn't have to be As Fast As Possible. It only has to be Fast Enough. Next, think about the minimum work needed to achieve the desired speedup. Given a search function and a dictionary, what is the simplest way to make that search function finish in half the time? The first thing that comes to mind for me is to cut the dictionary in half. Boom, the same search function now finishes in half the time. Or cut the dictionary to 1/10 its original size, and the same search function finishes in 1/10 the time. Or 1/100. Or whatever. Now think about multi-volume encyclopedias, the physical book kind. http://en.wikipedia.org/wiki/File:Brockhaus_Lexikon.jpg It's impossible to make a single book large enough to hold all the content, because physical books have physical limits. Instead, the material is broken into equal-sized sections purely for physical convenience, and that section is put into a single book or volume. Within each volume, the content is ordered alphabetically. On the spine of each volume is a short label idnetifying the range it covers, such as a single letter of the alphabet, or portions of the first and last item-names in that volume. If there were only one label on a volume's spine, it should be the first item in a volume, because you can just look at the first item of the next volume to deduce the last possible item in the current volume. Finally, consider the steps needed to search the entire encyclopedia for a single given term. The first step is to identify which volume to use, by looking at the spine labels, then you open only one volume and search it for the term of interest. You gain enormous speed by simply eliminating most of the material, without ever having to open those volumes or even take them off the bookshelf. http://en.wikipedia.org/wiki/Encyclopedia NSString *filePath = [[NSBundle mainBundle] pathForResource: @dictionary ofType: @txt]; stringFileContents = [[NSData alloc] initWithContentsOfMappedFile:filePath]; Does stringFileContents have a null-terminator or not? If not, then re-read what the arguments to strstr() need to be. Does [stringFileContents bytes] provide data in the format strstr() needs to work correctly? Small errors; grave disorder. -- GG ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Cocoa program without xib file
On Apr 16, 2009, at 11:26 PM, Dave Geering wrote: On Fri, Apr 17, 2009 at 1:31 PM, Bill Bumgarner b...@mac.com wrote: What are you trying to do? Building a Cocoa program without a MainMenu.xib [or MainMenu.nib] is possible, but it is not recommended, supported, or at all standard/ typical. b.bum Objective-C-based command-line utilities that use only Foundation framework would be classified as Cocoa, wouldn't they? The OP was asking explicitly about creating a Cocoa application without using a XIB file. I read that as the OP asking about building a GUI application. In general, command line utilities are called Foundation Tools; see the Xcode templates. Though they aren't really limited to just Foundation and lower in that you can, say, pull in Core Data and, even, AppKit (though this is rife with danger). b.bum ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Setting up an auxiliary task for use with Distributed Objects
On Apr 16, 2009, at 11:12 PM, Oleg Krupnov wrote: @Ken with something like: while ([vendedObj shouldKeepRunning]) [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantFuture]]; I think I've seen this code somewhere in the docs, but I haven't and I still don't understand how it can terminate the run loop, if the beforeDate specifies distant future? The shouldKeepRunning flag seems to be checked once at the beginning and never again. Could you explain how it's supposed to work? The -[NSRunLoop runMode:beforeDate:] method returns after processing a single firing of an input source. So, it _can_ block until the date provided if nothing is happening, but if a message comes in via D.O. it will be processed and then control will return to the while loop. Have you considered reversing the roles of the two processes, in terms of which is the server and which the client? You can have the main task register a connection under a known name. It will vend an object with which the auxiliary task will register. It will start the auxiliary task. The auxiliary task will obtain the vended object from the main task using the known name. The auxiliary task will create a worker object. It will pass that worker object to the main task in a check-in message. It will then run the run loop in the manner illustrated above. The main task will passively receive a reference (proxy) for the auxiliary task's worker object. It can then invoke methods of that object just as it would in the design you were working with. It's a smart idea, but I don't see how it could help to block the main process until the aux process is initialized. As I understood, the advantage of this approach is that there's a way to notify the main process asynchronously from the aux process that the latter is ready to work. (So, the main process should temporarily switch into a waiting mode until the notification arrives, right?) I don't know if your main task is a GUI application or not. If it is, then you wouldn't block, you'd just let the main event loop (i.e. run loop) run. When the check-in message arrives (asynchronously), you'd do whatever you want at that time in the implementation of the check- in method. If your main task isn't already running a run loop, you can run it manually in a waiting mode if you like. However, I'm not sure that passing the worker object to the main task will work as you designed. I'm afraid that instead of the proxy, the main task will receive a copy of the worker object, because the worker object is not vended. Isn't it what vending is for - to obtain proxies instead of copies? An explanation would be appreciated. No, vending an object and passing objects by reference/proxy are two independent concepts. It's true that the vended object is always passed by reference and thereby the client receives a proxy. But other objects may also be passed by reference, and the receiver gets a proxy. In fact, pass-by-reference is the default in most cases in D.O. See this article of the Objective-C 2.0 guide, in particular the part about Proxies and Copies: http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/Articles/ocRemoteMessaging.html So, if the aux task passes its worker object to the main task's check- in method, then the main task will actually get a proxy for that worker object. When the main task then invokes methods on the proxy, the work will be carried out in the aux task. (If you want the main task to be able to continue to do other things while the aux task works, those methods on the worker object should probably be oneway void.) Regards, Ken ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Need to simulate iphone camera application
I need to simulate the camera of iphone through code. I know its possible. But I am not sure on how to perform that action. can some one help me on this? Thanks in Advance! ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Advice on server-side web service technology
Am 17.04.2009 um 00:06 schrieb Russell Cook: I am working on a custom Obj-C framework that I need to expose through web services on an Xserve. I am finding a serious lack of support for server-side web services in the Cocoa frameworks. My searching has turned up little from others following this same path. From what I have found, these are my options: - WebObjects (Java, is this still recommended for use? still supported and maintained?) This is your best option. Apple uses it throughout their web services. And you will find at home if you already know Cocoa because Foundation is there. CoreData is a lightweight EOF so that is a known part also. The WO-framework is a logical extension. And it is portable as it is pure Java. Can be deployed standalone, no other appserver (e.g. Tomcat) needed but sill possible. I used it since version 0.9 and tried lots of other application servers. I still think it is the best thing out there - but I do have a strong WO/Cocoa bias anyway, as I work with that stuff since 1991 ;) atze ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: -viewDidMoveToWindow without subclassing? NSViewController?
On a general note, if you want something to happen later than - awakeFromNib, you can always send - performSelector:withObject:afterDelay:cancelPrevious:. If you pass a delay of zero, it will happen the next time through the event loop. I've used this many times to deal with situations similar to what Jerry described. -jcr This is not a book to be tossed aside lightly. Rather, it should be hurled with great force. -Dorothy Parker ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Create Library of Media File
On Apr 16, 2009, at 10:58 PM, Bright wrote: What's the principle of creating the Library? And,how to implement it? This question is far too broad to answer in an e-mail response. It's better if you break the problem down and ask more pointed questions so we don't have to write an entire book in an e-mail to cover all the possible facets of what you could be asking. This document details a good way to approach a mailing list with your query: http://www.catb.org/~esr/faqs/smart-questions.html -- I.S. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Reading in dictionary from txt file: options for speed
On Thu, Apr 16, 2009 at 10:52 PM, Marcel Weiher marcel.wei...@gmail.com wrote: On Apr 16, 2009, at 18:59 , Michael Ash wrote: On Thu, Apr 16, 2009 at 2:47 PM, WT jrca...@gmail.com wrote: since he'll be dealing with the string's raw bytes, won't Miles have to manually add a null byte to terminate the search string? The strnstr() function takes a length, and can thus be safely used on buffers which contain no NUL byte. As far as I can tell it only takes one length, and that's for the string to be searched, so he will have to NULL-terminate the search string (which is what WT was talking about as far as I can tell). Well that would be the case if strnstr() were actually useful for him, which I guess it isn't. Yes, my bad. I thought he meant the string to be searched. I like the terminology needle and haystack for these things. Hard to get mixed up that way, and it seems to be nearly standard usage. Anyway, carry on. Mike ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Setting up an auxiliary task for use with Distributed Objects
On Fri, Apr 17, 2009 at 3:10 AM, Ken Thomases k...@codeweavers.com wrote: On Apr 16, 2009, at 11:12 PM, Oleg Krupnov wrote: @Ken with something like: while ([vendedObj shouldKeepRunning]) [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantFuture]]; I think I've seen this code somewhere in the docs, but I haven't and I still don't understand how it can terminate the run loop, if the beforeDate specifies distant future? The shouldKeepRunning flag seems to be checked once at the beginning and never again. Could you explain how it's supposed to work? The -[NSRunLoop runMode:beforeDate:] method returns after processing a single firing of an input source. So, it _can_ block until the date provided if nothing is happening, but if a message comes in via D.O. it will be processed and then control will return to the while loop. A much simpler technique would be to simply have the DO quit-this-process method call exit(), which will terminate the program directly without having to fall back through the runloop. Mike ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Advice on server-side web service technology
I had the same issue and found gsoap. It uses C++, but can be integrated nicely in a mm file. Sent from my iPhone On 17 Apr 2009, at 09:23, Alexander Spohr a...@freeport.de wrote: Am 17.04.2009 um 00:06 schrieb Russell Cook: I am working on a custom Obj-C framework that I need to expose through web services on an Xserve. I am finding a serious lack of support for server-side web services in the Cocoa frameworks. My searching has turned up little from others following this same path. From what I have found, these are my options: - WebObjects (Java, is this still recommended for use? still supported and maintained?) This is your best option. Apple uses it throughout their web services. And you will find at home if you already know Cocoa because Foundation is there. CoreData is a lightweight EOF so that is a known part also. The WO-framework is a logical extension. And it is portable as it is pure Java. Can be deployed standalone, no other appserver (e.g. Tomcat) needed but sill possible. I used it since version 0.9 and tried lots of other application servers. I still think it is the best thing out there - but I do have a strong WO/Cocoa bias anyway, as I work with that stuff since 1991 ;) atze ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/alex%40j2anywhere.com This email sent to a...@j2anywhere.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
free_garbage and underflow errors when using GC in Cocoa app with SetControlData() and/or HIViewSetText() calls
Hello, I'm writing a Cocoa application which is running under Mac OS X 10.5.6 and it's using garbage collection. The application is compiled in gc- supported mode (I'm aware that gc-only apps are the recommended practice instead of gc-supported ones). The application uses a Carbon view (HIViewRef) to display some textual information (in my situation I'm forced to use Carbon views instead of Cocoa views for couple of specific reasons). I've been seeing the following errors in the console when the application is run: malloc: free_garbage: garbage ptr = 0x1bb9a60, has non-zero refcount = 2 malloc: free_garbage: garbage ptr = 0x1af55d0, has non-zero refcount = 1 malloc: free_garbage: garbage ptr = 0x1b5d740, has non-zero refcount = 3 malloc: *** free() called with 0x1bba4a0 with refcount 0 malloc: reference count underflow for 0x1bba4a0, break on auto_refcount_underflow_error to debug. malloc: free_garbage: garbage ptr = 0x1f43820, has non-zero refcount = 1 malloc: free_garbage: garbage ptr = 0x1f43990, has non-zero refcount = 1 malloc: *** free() called with 0x1b5e0a0 with refcount 0 malloc: reference count underflow for 0x1b5e0a0, break on auto_refcount_underflow_error to debug. malloc: *** error for object 0x1f437e0: Non-aligned pointer being freed (2) By setting a breakpoint to auto_refcount_underflow_error I've been able to find out that these errors occur inside the -[NSCFString finalize] method. By printing values on stack in gdb and using tools like MallocStackLoggingNoCompact, malloc-history, AUTO_RECORD_REFCOUNT_STACKS and auto_print_refcount_stacks() function I've been able to deduce that the string which is being finalized is created and used for the last time here: NSString *string = [anObjCObject aMethodCreatingNSString]; // 'string' is a local variable. 'aMethodCreatingNSString' is basically just return [NSString stringWithFormat:...]; OSStatus status = SetControlData(control, kControlEntireControl, kControlStaticTextCFStringTag, sizeof(CFStringRef), string); // The ControlKind of 'control' is kControlKindStaticText) // 'string' is not referenced after these lines. These errors do not occur every time this code is run - quite contrary, to reproduce these errors I have to run this code usually several hundreds times to get the first underflow or free_garbage error. Documentation of SetControlData says that the passed-in data (i.e. 'string') is copied by this function, so the caller doesn't have to retain it. I've tried replacing SetControlData() with HIViewSetText(), with the same results. The code is compiled without optimizations, so the local 'string' variable shouldn't be collected by GC even if GC doesn't follow the void* argument of SetControlData() function in which 'string' is passed. By examining the refcount stacks printed by the auto_print_refcount_stacks() function I can see that the refcount of 'string' is 1 right after it has been created by CFAllocatorAllocate(), then it drops to 0 when CFMakeCollectible() is called (by the Foundation framework), and then it goes up to 1 again when it's passed to the SetControlData() function which calls CFStringCreateCopy(), so everything seems correct here. But I'm still getting those refcount underflows and free_garbage errors. This problem seems to go away if I add CFRetain(string) and CFRelease(string) around those two lines of code. However, since I can't see why I should be using those functions here I'm feeling that they're only masking the problem instead of fixing it. Are there some issues I've not taken into account? Are there some GC- incompatibility issues with Carbon I should be aware of? Which debugging techniques should I use to investigate this further? Best regards, Nikita Zhuk ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Mac Error Reporting
Good afternoon, I have noticed that every time I let an exception slip from my app I get the Problem Reporter from Apple that enables me to send data about the error to them. Is there any way for me to view the errors my users are sending; or should I implement such a function myself. I ask this question because MS (the evil stepbrother) gives the developers access to the committed exceptions: https://winqual.microsoft.com/help/About_Windows_Error_Reporting_for_Hardware.htm or http://www.sherylcanter.com/articles/oreilly_20040316_wer.php Thanks, Filip van der Meeren fi...@code2develop.com http://sourceforge.net/projects/xlinterpreter ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
How to: continue tracking mouse-drag event even after cursor moves out of the movie....
Hi All, I have two views aligned side by side in parent view (All being NSView's ) I am overriding -(void)mouseDown:(NSEvent *)event - (void)mouseDragged:(NSEvent *)theEvent for some custom drawing in child view subclass To be specific, I draw some rectangle boxes during mouse drag in child view's. Problem: when cursor moves out of the child view( during mouse drag ) , obviously, I am not able to track the event and hence I cannot resize the rectangle. I am looking something like autoScroll for NSScrollView , which tracks the mouse movements even outside the application window... Is there any obvious or complex way to achieve this. Thanks in Advance Rajesh ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: How to: continue tracking mouse-drag event even after cursor moves out of the movie....
On 18/04/2009, at 12:02 AM, rajesh wrote: I am looking something like autoScroll for NSScrollView , which tracks the mouse movements even outside the application window... Is there any obvious or complex way to achieve this. Use NSScrollView? It doesn't have to have visible scrollbars. --Graham ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Customizing IKImageBrowserView
Hi, We are developing a project in which we have a view showing matrix of images ( a common theme). As an enhancement, we would like to support some animations while performing operations like adding, removing, reloading images to this view . As an example we could consider Apple's Preview 4.0. Though we might have to change our existing implementation to some extent, we think switching to IKImageBrowserView is a good option. With this change we can support most of the animations mentioned above. However there are a few things where we think we might run into trouble. 1. We need to customize the selection of the item as in iTunes. 2. We might in the future customize the individual thumbnails. 3. Editing title of the thumbnail. Considering the above 3 requirements we found that IKImageBrowserView is not so flexible. We think it is not possible for us to customize individual images. We tried by overriding drawrect : of IKImageBrowserView. However, we discovered that if drawrect : is overridden in IKImageBrowserView, it displays nothing. So our question boils down to the following: 1. Are we right in our approach of using IKImageBrowserView? 2. If so, how could be achieve the above requirements by leveraging IKImageBrowserView? 2a. Please let us know if there is any workaround for customizing individual images in IKImageBrowserView. 2b. Is there a method to edit text displayed in IKImageBrowserView by clicking on the text area. Thank you. Regards, Srinivas. --- Robosoft Technologies - Come home to Technology Disclaimer: This email may contain confidential material. If you were not an intended recipient, please notify the sender and delete all copies. Emails to and from our network may be logged and monitored. This email and its attachments are scanned for virus by our scanners and are believed to be safe. However, no warranty is given that this email is free of malicious content or virus. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Mac Error Reporting
Is there any way for me to view the errors my users are sending; or should I implement such a function myself. Two general approaches: - SmartCrashReporter, which is easy convenient for you since it's prepackaged. Also somewhat controversial since it injects code into every app launched. (Hint: disclose its use, and make the install optional if you want to avoid criticism.) - On launch, check for new crash reports and send them to yourself (~/Library/Logs/CrashReporter/...) Note that 10.4 appends new reports to a single file per application, while 10.5 creates one file per crash, with different naming conventions. And a variant of that second one: - If you're really ambitious, launch a background helper process to monitor for crash reports as soon as they happen--probably way overkill for most situations. -- Scott Ribe scott_r...@killerbytes.com http://www.killerbytes.com/ (303) 722-0567 voice ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Mac Error Reporting
Thank you, I think I am going for the second choice, with the helper (An directoryobserver that runs in a runloop should do the trick? Right?). If I go without the helperthread, then you do not have any control over when the error will be submitted. The user might never ever try to run the app again... Filip van der Meeren fi...@code2develop.com http://sourceforge.net/projects/xlinterpreter On 17 Apr 2009, at 16:21, Scott Ribe wrote: Is there any way for me to view the errors my users are sending; or should I implement such a function myself. Two general approaches: - SmartCrashReporter, which is easy convenient for you since it's prepackaged. Also somewhat controversial since it injects code into every app launched. (Hint: disclose its use, and make the install optional if you want to avoid criticism.) - On launch, check for new crash reports and send them to yourself (~/Library/Logs/CrashReporter/...) Note that 10.4 appends new reports to a single file per application, while 10.5 creates one file per crash, with different naming conventions. And a variant of that second one: - If you're really ambitious, launch a background helper process to monitor for crash reports as soon as they happen--probably way overkill for most situations. -- Scott Ribe scott_r...@killerbytes.com http://www.killerbytes.com/ (303) 722-0567 voice ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: How to: continue tracking mouse-drag event even after cursor moves out of the movie....
Child views being dynamically created and placed in the parent view , so I tried this in my child view's subclass -(id)initWithFrame:(NSRect)frame{ self = [super initWithFrame:frame]; //NSView if (self) { NSSize frameSize = [NSScrollView frameSizeForContentSize:frame.size hasHorizontalScroller:YES hasVerticalScroller:YES borderType:NSLineBorder]; NSRect scrollFrame = frame; scrollFrame.size = frameSize; NSScrollView *scrollers = [[NSScrollView alloc] initWithFrame:scrollFrame]; [scrollers setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable]; [scrollers setDocumentView:self]; } return self; } but that didn't rescue me am I missing anything ? should I be placing NSScrollView in the parent view ? I think its no different then what I am doing by above code Thanks Rajesh Begin forwarded message: From: rajesh raj...@vangennep.nl Date: April 17, 2009 4:02:16 PM GMT+02:00 To: cocoa-dev Dev cocoa-dev@lists.apple.com Subject: How to: continue tracking mouse-drag event even after cursor moves out of the movie Hi All, I have two views aligned side by side in parent view (All being NSView's ) I am overriding -(void)mouseDown:(NSEvent *)event - (void)mouseDragged:(NSEvent *)theEvent for some custom drawing in child view subclass To be specific, I draw some rectangle boxes during mouse drag in child view's. Problem: when cursor moves out of the child view( during mouse drag ) , obviously, I am not able to track the event and hence I cannot resize the rectangle. I am looking something like autoScroll for NSScrollView , which tracks the mouse movements even outside the application window... Is there any obvious or complex way to achieve this. Thanks in Advance Rajesh ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/rajesh%40vangennep.nl This email sent to raj...@vangennep.nl Begin forwarded message: From: Graham Cox graham@bigpond.com Date: April 17, 2009 4:05:26 PM GMT+02:00 To: rajesh raj...@vangennep.nl Cc: cocoa-dev Dev cocoa-dev@lists.apple.com Subject: Re: How to: continue tracking mouse-drag event even after cursor moves out of the movie On 18/04/2009, at 12:02 AM, rajesh wrote: I am looking something like autoScroll for NSScrollView , which tracks the mouse movements even outside the application window... Is there any obvious or complex way to achieve this. Use NSScrollView? It doesn't have to have visible scrollbars. --Graham ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Cocoa program without xib file
On Fri, Apr 17, 2009 at 2:26 AM, Dave Geering dlgeer...@gmail.com wrote: On Fri, Apr 17, 2009 at 1:31 PM, Bill Bumgarner b...@mac.com wrote: What are you trying to do? Building a Cocoa program without a MainMenu.xib [or MainMenu.nib] is possible, but it is not recommended, supported, or at all standard/typical. Objective-C-based command-line utilities that use only Foundation framework would be classified as Cocoa, wouldn't they? Of course, but such tools don't use Nibs to begin with, so asking how to build them without one wouldn't make much sense. The OP is obviously asking about building a GUI app. sherm-- -- Cocoa programming in Perl: http://camelbones.sourceforge.net ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
starting point for screen-sharing
Hi, i'm need some kind of screen or window sharing for my application. many questions are unsolved, e.g. share the whole screen or the content of a window only (a window/view from any other application), or capture and share the screen as a picture if the view has changed, ... After hours of searching i doesn't have any starting point and have no idea or approach nor what to try or where to look. (which framework, quartz, OpenGL, etc.) Can anybody give me a hint what's generally possible and/or where i can search? Thanks in advance. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Undo (UI Concept)
I am writing a program which has a two-column table. The user can fill in the table with whatever he or she wishes, but sometimes it is possible to determine what should be displayed in the left column by looking at what is displayed in the right column. I have set up the program so that a user can turn on an inference function, so if the user has: Column 1: Blank Column 2: X Then the program will automatically fill in A for column 1 (because there is no other possibility, given the X in column 2). So the table now looks like this: Column 1: A Column 2: X Now, the question is, how to implement undo. There are at least two possibilities: (1) Undo returns column 2 to its previous state, before X was entered. An additional undo is required to revert column 1 to blank. (2) Undo returns column 2 to its previous state, and column 1 to blank. I'm not sure what is best, from the perspective of designing a UI. I have currently implemented (2), but I have a sneaking suspicion (1) might be more appropriate. Note that the A in column 1 is inferred, but there is nothing wrong or odd with it standing alone. Thanks. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness
On Apr 16, 2009, at 9:01 PM, Jerry Krinock wrote: The fact that Core Data cannot fetch using a predicate based on transient properties [1] seems to greatly limit the utility of the NSPredicateEditor view, and makes me very sad. For example, say that my objects are student test results with a 'score' attribute and two dozen other properties. I could give the user an NSPredicateEditor and let them have oodles of fun constructing complex predicates. But what if I need the user to be able to set a predicate with a left-side-expression of letter grade and a right-side-expression popup menu showing 'A' - 'F'. If I could fetch based on a transient 'letterGrade' attribute, I could implement some custom accessors which would calculate 'letterGrade' from 'score' as needed, the predicate emitted from the NSPredicateEditor would just work, and life would be sweet. But since I can't use transient properties in my predicate, providing a popup like that in NSPredicateEditor seems to mean that I'm going to have to somehow deconstruct the compound predicate which Apple put so many man-years of engineering into, have Core Data do sub-fetches, then do my own filtering and put the results back together. I fear that writing bug-free code to handle the general compound predicate would be very time-consuming, and also it would be MVC hell with my NSPredicateEditor subclass (view) code wanting to have model logic such as if score 93, letterGrade = 'A'. I am not really up to speed on NSPredicateEditor, but could you use - ruleEditor:predicatePartsForCriterion:withDisplayValue:inRow: to convert the display case of grade = A-F to a predicate that is actually grade = = score range? I imagine you would need to construct a compound predicate with subpredicates (sub-rows). Either that or use the BETWEEN operator. HTH, Keary Suska Esoteritech, Inc. Demystifying technology for your home or business ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: starting point for screen-sharing
http://developer.apple.com/leopard/overview/imframework.html -- Scott Ribe scott_r...@killerbytes.com http://www.killerbytes.com/ (303) 722-0567 voice ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Undo (UI Concept)
IMHO, if the user performed a single action to get to the current state, then it shouldn't take more than one undo to get to the previous state. So, as a user, I'd prefer #2. On Fri, Apr 17, 2009 at 9:26 AM, K.Darcy Otto do...@csusb.edu wrote: I am writing a program which has a two-column table. The user can fill in the table with whatever he or she wishes, but sometimes it is possible to determine what should be displayed in the left column by looking at what is displayed in the right column. I have set up the program so that a user can turn on an inference function, so if the user has: Column 1: Blank Column 2: X Then the program will automatically fill in A for column 1 (because there is no other possibility, given the X in column 2). So the table now looks like this: Column 1: A Column 2: X Now, the question is, how to implement undo. There are at least two possibilities: (1) Undo returns column 2 to its previous state, before X was entered. An additional undo is required to revert column 1 to blank. (2) Undo returns column 2 to its previous state, and column 1 to blank. I'm not sure what is best, from the perspective of designing a UI. I have currently implemented (2), but I have a sneaking suspicion (1) might be more appropriate. Note that the A in column 1 is inferred, but there is nothing wrong or odd with it standing alone. -- Clark S. Cox III clarkc...@gmail.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Undo (UI Concept)
Yes, I was thinking this too, at first. But then I started to look around to see if I could find analogous situations. The closest I can come is when Pages has a table - let's say 2x2. When the user is in the bottom right cell, and presses tab, two things happen simultaneously: the data is accepted in that cell, and a new line is added to the bottom of the table. When it comes to undoing, the undo add line is first, then undo typing is second. I know this isn't exactly the same, but it does seem to be two undos for one action – and it would be strange for it not to be (that is, to lose the new line, and the typing, all at once). On 17-Apr-09, at 9:33 AM, Clark Cox wrote: IMHO, if the user performed a single action to get to the current state, then it shouldn't take more than one undo to get to the previous state. So, as a user, I'd prefer #2. On Fri, Apr 17, 2009 at 9:26 AM, K.Darcy Otto do...@csusb.edu wrote: I am writing a program which has a two-column table. The user can fill in the table with whatever he or she wishes, but sometimes it is possible to determine what should be displayed in the left column by looking at what is displayed in the right column. I have set up the program so that a user can turn on an inference function, so if the user has: Column 1: Blank Column 2: X Then the program will automatically fill in A for column 1 (because there is no other possibility, given the X in column 2). So the table now looks like this: Column 1: A Column 2: X Now, the question is, how to implement undo. There are at least two possibilities: (1) Undo returns column 2 to its previous state, before X was entered. An additional undo is required to revert column 1 to blank. (2) Undo returns column 2 to its previous state, and column 1 to blank. I'm not sure what is best, from the perspective of designing a UI. I have currently implemented (2), but I have a sneaking suspicion (1) might be more appropriate. Note that the A in column 1 is inferred, but there is nothing wrong or odd with it standing alone. -- Clark S. Cox III clarkc...@gmail.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
C numerical libraries for integrating with Cocoa
Hi, I'm looking for suggestions for C numerical libraries to integrate with a Cocoa app. Either freeware or commercial is okay, I'm looking for something that will compile under Leopard and integrate with Xcode without too much fiddling around. I don't need anything too fancy, solving sets of odes and solving nonlinear equations (in one variable) mostly. Maybe some eigenvalue computations or matrix decomposition down the line. I've been doing some googling, but thought maybe someone here would have some suggestions. Thanks. Chris Goedde ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Undo (UI Concept)
I would not use Pages as a model for undo. There are quite a few areas where its undo are horrific and wrong and have caused me to lose data. On Apr 17, 2009, at 11:48 AM, K.Darcy Otto wrote: Yes, I was thinking this too, at first. But then I started to look around to see if I could find analogous situations. The closest I can come is when Pages has a table - let's say 2x2. When the user is in the bottom right cell, and presses tab, two things happen simultaneously: the data is accepted in that cell, and a new line is added to the bottom of the table. When it comes to undoing, the undo add line is first, then undo typing is second. I know this isn't exactly the same, but it does seem to be two undos for one action – and it would be strange for it not to be (that is, to lose the new line, and the typing, all at once). On 17-Apr-09, at 9:33 AM, Clark Cox wrote: IMHO, if the user performed a single action to get to the current state, then it shouldn't take more than one undo to get to the previous state. So, as a user, I'd prefer #2. On Fri, Apr 17, 2009 at 9:26 AM, K.Darcy Otto do...@csusb.edu wrote: I am writing a program which has a two-column table. The user can fill in the table with whatever he or she wishes, but sometimes it is possible to determine what should be displayed in the left column by looking at what is displayed in the right column. I have set up the program so that a user can turn on an inference function, so if the user has: Column 1: Blank Column 2: X Then the program will automatically fill in A for column 1 (because there is no other possibility, given the X in column 2). So the table now looks like this: Column 1: A Column 2: X Now, the question is, how to implement undo. There are at least two possibilities: (1) Undo returns column 2 to its previous state, before X was entered. An additional undo is required to revert column 1 to blank. (2) Undo returns column 2 to its previous state, and column 1 to blank. I'm not sure what is best, from the perspective of designing a UI. I have currently implemented (2), but I have a sneaking suspicion (1) might be more appropriate. Note that the A in column 1 is inferred, but there is nothing wrong or odd with it standing alone. -- Clark S. Cox III clarkc...@gmail.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/alex%40webis.net This email sent to a...@webis.net Alex Kac - President and Founder Web Information Solutions, Inc. You cannot build a reputation on what you intend to do. -- Liz Smith ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: C numerical libraries for integrating with Cocoa
Check out the Accelerate framework. It includes standard libraries like LAPACK, BLAS, vDSP, and vImage: http://developer.apple.com/performance/accelerateframework.html Kevin -- Kevin Cathey On 17 Apr 2009, at 11:56, Chris Goedde wrote: Hi, I'm looking for suggestions for C numerical libraries to integrate with a Cocoa app. Either freeware or commercial is okay, I'm looking for something that will compile under Leopard and integrate with Xcode without too much fiddling around. I don't need anything too fancy, solving sets of odes and solving nonlinear equations (in one variable) mostly. Maybe some eigenvalue computations or matrix decomposition down the line. I've been doing some googling, but thought maybe someone here would have some suggestions. Thanks. Chris Goedde ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/cathey%40apple.com This email sent to cat...@apple.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Undo (UI Concept)
The problem with the 2 undo approach is when you start to think about redo. What append if you undo twice and redo once. - You restore only one value, and get a state that should not be possible as the inference function would have complete the last row if it was done by the user. - You restore both rows, and that's odd, as you either have one redo that will do nothing, or don't have more redo, but the user will probably expect one as he undo twice. My policy in this case is 'one event = one undo'. Le 17 avr. 09 à 18:48, K.Darcy Otto a écrit : Yes, I was thinking this too, at first. But then I started to look around to see if I could find analogous situations. The closest I can come is when Pages has a table - let's say 2x2. When the user is in the bottom right cell, and presses tab, two things happen simultaneously: the data is accepted in that cell, and a new line is added to the bottom of the table. When it comes to undoing, the undo add line is first, then undo typing is second. I know this isn't exactly the same, but it does seem to be two undos for one action – and it would be strange for it not to be (that is, to lose the new line, and the typing, all at once). On 17-Apr-09, at 9:33 AM, Clark Cox wrote: IMHO, if the user performed a single action to get to the current state, then it shouldn't take more than one undo to get to the previous state. So, as a user, I'd prefer #2. On Fri, Apr 17, 2009 at 9:26 AM, K.Darcy Otto do...@csusb.edu wrote: I am writing a program which has a two-column table. The user can fill in the table with whatever he or she wishes, but sometimes it is possible to determine what should be displayed in the left column by looking at what is displayed in the right column. I have set up the program so that a user can turn on an inference function, so if the user has: Column 1: Blank Column 2: X Then the program will automatically fill in A for column 1 (because there is no other possibility, given the X in column 2). So the table now looks like this: Column 1: A Column 2: X Now, the question is, how to implement undo. There are at least two possibilities: (1) Undo returns column 2 to its previous state, before X was entered. An additional undo is required to revert column 1 to blank. (2) Undo returns column 2 to its previous state, and column 1 to blank. I'm not sure what is best, from the perspective of designing a UI. I have currently implemented (2), but I have a sneaking suspicion (1) might be more appropriate. Note that the A in column 1 is inferred, but there is nothing wrong or odd with it standing alone. -- Clark S. Cox III clarkc...@gmail.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/devlists%40shadowlab.org This email sent to devli...@shadowlab.org ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: starting point for screen-sharing
Stefan Schütz wrote: i'm need some kind of screen or window sharing for my application. Why not use the system-supplied screen-sharing? On Leopard, launch System Preferences and click Sharing. Select Screen Sharing in the Service list, then configure and enable it. Go to the other machine and browse the Network for the machine that's sharing its screen. Double-click to connect (authorization may occur here), then click the Share Screen button after you're connected. BTW, screen sharing uses the VNC protocol, so you can use other VNC clients to connect to the shared screen. -- GG ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
What is this error: error: expected specifier-qualifier-list
I have done a substantial amount of re-coding and now I am getting a compile error: error: expected specifier-qualifier-list before 'mySubClass' What does this mean? Also is there a reference for XCode compiler error messages? Thanks Greg ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: What is this error: error: expected specifier-qualifier-list
Greg Robertson wrote: I have done a substantial amount of re-coding and now I am getting a compile error: error: expected specifier-qualifier-list before 'mySubClass' What does this mean? Google the invariant text of your error message. Suggested keywords: expected specifier-qualifier-list before -- GG ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: What is this error: error: expected specifier-qualifier-list
According to Greg Robertson: I have done a substantial amount of re-coding and now I am getting a compile error: error: expected specifier-qualifier-list before 'mySubClass' What does this mean? The examples I see from Google seem mostly to be that your code is using a user defined type that is not fully defined at that point (usually self-reference in typedefed structs). Hard to say more without seeing the code that gets the error. A specifier-qualifier-list is what you might think of as a type in a declaration. The qualifier part is mostly const or * in various arangements. -- Drew Lawson| I'd like to find your inner child | and kick its little ass ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: C numerical libraries for integrating with Cocoa
Hi Chris, there's Numerical Recipes... http://www.nr.com/ I have the 2nd C edition of the book (there's now a 3rd edition, in C+ +, with lots of new material) and have used their code in the past, with great success. Wagner On Apr 17, 2009, at 6:56 PM, Chris Goedde wrote: Hi, I'm looking for suggestions for C numerical libraries to integrate with a Cocoa app. Either freeware or commercial is okay, I'm looking for something that will compile under Leopard and integrate with Xcode without too much fiddling around. I don't need anything too fancy, solving sets of odes and solving nonlinear equations (in one variable) mostly. Maybe some eigenvalue computations or matrix decomposition down the line. I've been doing some googling, but thought maybe someone here would have some suggestions. Thanks. Chris Goedde ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/jrcapab%40gmail.com This email sent to jrca...@gmail.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
How does a new app learn about its menu?
Hi everyone. I have what I think is a pretty straight forward question about an app's main menu. When creating a new Cocoa app in xCode, the final build seems to just know about how to load its menu. there doesn't seem to be any mention of the NSMenu object in the info.plist, the sourcecode, or a connection in interface builder. I'm curious to know how NSApplication first finds and sets its main menu. The reason I ask is, I would like to learn how to build applcations using a plugin approach (kindof like eclipse / osgi) and it would be great to be able to dynamically add new menu entries based on what plugins are loaded at runtime. thank you for your help. -- Darren Minifie Graduate Studies: Computer Science www.myavalon.ca www.ohsnapmusic.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Problem: sqlite3 and .sqlite-journal files
Hello. As I wrote earlier, in my application a user can open a database or create a new one, and then perform some tasks, the results of which are stored in the said database. However, a strange thing happens: when the user _creates_ a database, everything is stored as hoped. But when the user _opens_ an existing database, nothing is stored in it, and a new file gets created, which name coincides with the name of the database the user opened with - journal in the extension. (I did read about that on the sqlite3 site, but it didn't seem to help). The most puzzling thing about this is that when a database gets created, it is first created with a different name (from the one the user wants it to have), then my app, specifically, a class called DatabaseCreator, creates the necessary tables, populates them with initial data and closes the database. After that that, if a database with the name specified by the user for the new one already exists, it is moved to trash, and the newly created db with the temporary name is renamed to the name given by the user. And after that the class called DatabaseManager, which is a singleton, opens that database the same way it would if the user wanted to open a pre-existing database. I am continuing my search for the possible reason for such a strange behavour, but i would be very grateful for any thoughts in that regard. Thank you in advance. Timofey. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
SQLite 3 crash report - debugging help needed
Namaste! I'm not sure that this is the correct list to post this. My app is done in Cocoa though, with a sqlite 3 backend using CoreData to access/manage it. Here's the short version of the crash log (the whole log can be provided, but I didn't want to clutter this email with what may be useless over-info): Exception Type: EXC_BAD_ACCESS (SIGBUS) Exception Codes: KERN_PROTECTION_FAILURE at 0x0048 Crashed Thread: 0 Thread 0 Crashed: 0 libsqlite3.0.dylib 0x95a677a5 sqlite3VdbeExec + 2821 1 libsqlite3.0.dylib 0x95a72ea2 sqlite3Step + 386 2 libsqlite3.0.dylib 0x95a7355d sqlite3_step + 29 3 com.apple.CoreData 0x905166c8 _execute + 56 4 com.apple.CoreData 0x90515f88 -[NSSQLiteConnection execute] + 632 5 com.apple.CoreData 0x90511e3b newFetchedRowsForFetchPlan_MT + 907 6 com.apple.CoreData 0x9050aa10 -[NSSQLCore objectsForFetchRequest:inContext:] + 304 7 com.apple.CoreData 0x9050a88d -[NSSQLCore executeRequest:withContext:] + 461 8 com.apple.CoreData 0x9050997a - [NSPersistentStoreCoordinator(_NSInternalMethods) executeRequest:withContext:] + 522 9 com.apple.CoreData 0x9050705b -[NSManagedObjectContext executeFetchRequest:error:] + 587 10 com.apple.AppKit0x960df4e8 -[_NSManagedProxy fetchObjectsWithFetchRequest:error:] + 147 11 com.apple.AppKit0x95f81923 - [NSArrayController(NSManagedController) _performFetchWithRequest:merge:error:] + 76 12 com.apple.AppKit0x960dea13 - [NSObjectController(NSManagedController) fetchWithRequest:merge:error:] + 209 13 com.apple.AppKit0x960dea99 - [NSObjectController(NSManagedController) _executeFetch:didCommitSuccessfully:actionSender:] + 106 14 com.apple.AppKit0x9620e03e _NSSendCommitEditingSelector + 66 15 com.apple.AppKit0x95ff4d54 -[NSController _controllerEditor:didCommit:contextInfo:] + 197 16 com.apple.CoreFoundation0x95581a3d __invoking___ + 29 17 com.apple.CoreFoundation0x95581428 -[NSInvocation invoke] + 136 I haven't been able to track this down to anything specific - it doesn't happen with any regularity or frequency, nor does it occur anywhere on my development machine that will allow me to track it down. In short, it seems to just happen. Anyone have any idea how to address this problem??? Thanks in advance! Peace, Love, and Light, /s/ Jon C. Munson II ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: mouseDragged: with NSTableView
On Apr 17, 2009, at 1:56 PM, Ben Lachman wrote: Does anyone know of a way to get a mouseDragged event for a tableview? I've sub-classed NSTableView and it's enclosing scrollview to no effect (doesn't even hit -mouseDragged:). My guess is that it is being eaten by the clip view, but there isn't an easy way to sub-class that from what I can tell. Anyone have any thoughts? Nope...you can't. NSTableView uses the mouse tracking approach instead of the three method approach (which you would want in order to subclass). See: http://developer.apple.com/documentation/Cocoa/Conceptual/EventOverview/HandlingMouseEvents/HandlingMouseEvents.html In short; what are you trying to do? You'll probably have to override mouseDown:, determine if you should call super or not, and if not, write your own mouse-tracking loop as seen above. corbin ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
printer user friendly paper name to internal paper name?
my app is fully recordable and scriptable. when the user changes the page setup, i am able to successfully record it and indicate the paper name chosen via -[NSPrintInfo localizedPaperName]. however, if the user attemps to write a script (either directly or by modifying a previously recorded script), i need to validate any paper name the user has specified. i don't see how to go from a user specified paper name to an internal name such that i can call -[NSPrintInfo setPaperName:]. have i missed something? thanx, ken ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com