Cocoa - Not loading any window at startup ...
Hi, I'm relatively new to Cocoa but have an application that's coming along nicely. Mostly when I have come across an issue I have managed to find a solution using Google but this particular one has me stumped. My application has three window, a notification window (similar to Growl) that pops up when particular events happen, a window that pops-up when the user clicks the dock icon and a preferences window that pops up when the user selects preferences from a StatusBarItem I have added to the status bar (or at least thats how it should work). All windows are in MainMenu.nib The problem I'm having is that I don't want any windows to open when the application launches, and at the moment the notification window opens (as it's the only windows I've actually implemented so far), and I also don't want a main menu because I've added a custom menu to the status bar. I've looked at NSUIElement and LSUIElement but they remove the dock icon also, and I need the dock icon, plus they still launch the window. So ultimatley my question is, how do launch/setup my application so that I get a dock icon, but no menu bar and so that no window is opened when launched, only when the user does something that prompts a window. Thanks in advance. -Mic ___ 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 [EMAIL PROTECTED]
10.5.2 release notes?
Hi Guys, Does anyone know if there are some release notes specific for 10.5.2? I remember reading on some blog that there was an NSTreeController bugfix. I can't seem to be able to find any details on Google other than these http://docs.info.apple.com/article.html?artnum=307109 which have no mention of it. Thanks, Jon Jonathan P Dann: Trainee Medical Physicist - Homepage - Flickr contact | [EMAIL PROTECTED] - 07515-352-490 | skype - jonathandann ___ 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 [EMAIL PROTECTED]
Re: Cocoa - Not loading any window at startup ...
On 6 Mar 2008, at 11:05, [EMAIL PROTECTED] wrote: nothing at all [EMAIL PROTECTED] - posting empty messages to cocoa-dev ... Seriously, please post an actual question, not just a subject line. As it is, even *with* the subject line you chose, we have no idea exactly what you're trying to do. There are several possible reasons you might not want a window, and the advice you'll get here may differ depending on which reason you have for doing this. Kind regards, Alastair. -- http://alastairs-place.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 [EMAIL PROTECTED]
Cocoa - Not loading any window at startup ...
___ 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 [EMAIL PROTECTED]
Re: Deinterlacing QTCaptureDecompressedVideoOutput
Hi Robert, I just tried to save the captured image to a mov file with the length of one frame and than open it as a QTMovie and export it again as an jpeg. When I look at the QTMovie the image it's ok, but the exported image looks the same as the image captured with an image buffer. The strange thing is when i use quicktime to capture and export a frame it looks fine, so maybe it has something to do with the settings of the DV component? I'm very new in this cocoa programming so it's just guessing. Could you show me an example using the CVPixelBuffer so I know the other possibilities before I continue with this approach? Thanks, Bram 2008/3/5, Robert Douglas [EMAIL PROTECTED]: I ran in to a similar problem while analyzing incoming HDV images and I didn't find any simple solution. My approach now is to create a second CVPixelBuffer with half the number of lines and copy every second line into that buffer. Or two buffers to get better temporal resolution. I haven't yet gotten around to writing the field images to a file so there may be issues with rectangular pixels, but output to a CIImage-based view works well. I'd be interested in hearing of other solutions, Rob On 5-Mar-08, at 9:11 AM, Bram Loogman wrote: Hi, When I use QTCaptureDecompressedVideoOutput to capture a still image from a QTCaptureSession with a DV camera as input device, the image is interlaced. Which looks very ugly for moving objects. I basically use the code from the 'Creating a QTKit Stop or Still Motion Application' tutorial in the QTKit Capture Programming Guide to get an image buffer and than store it as a jpeg image. I looked at the camera settings but it's not possible to change the shutter speed or something like that. Is there a way to deinterlace the output from the QTCaptureSession? Thanks, Bram ___ 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/rdouglas%40mac.com This email sent to [EMAIL PROTECTED] ___ 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 [EMAIL PROTECTED]
Re: Cocoa - Not loading any window at startup ...
Hi, To prevent your window to open at startup, uncheck the 'Visible At Launch' box in your window settings (in Interface Builder). I don't know a supported way to create an application that appears in the Dock but has the same behaviour than a LSUIElement. Le 6 mars 08 à 12:55, [EMAIL PROTECTED] a écrit : Hi, I'm relatively new to Cocoa but have an application that's coming along nicely. Mostly when I have come across an issue I have managed to find a solution using Google but this particular one has me stumped. My application has three window, a notification window (similar to Growl) that pops up when particular events happen, a window that pops-up when the user clicks the dock icon and a preferences window that pops up when the user selects preferences from a StatusBarItem I have added to the status bar (or at least thats how it should work). All windows are in MainMenu.nib The problem I'm having is that I don't want any windows to open when the application launches, and at the moment the notification window opens (as it's the only windows I've actually implemented so far), and I also don't want a main menu because I've added a custom menu to the status bar. I've looked at NSUIElement and LSUIElement but they remove the dock icon also, and I need the dock icon, plus they still launch the window. So ultimatley my question is, how do launch/setup my application so that I get a dock icon, but no menu bar and so that no window is opened when launched, only when the user does something that prompts a window. Thanks in advance. -Mic ___ 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 [EMAIL PROTECTED] ___ 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 [EMAIL PROTECTED]
Re: Cocoa - Not loading any window at startup ...
As your window is in the same nib than your menu, you can simply bind your menu item's action to the makeKeyAndOrderFront: method of the window. If you also want to add a button to close your window, bind the button's action to performClose: If you need a more complex logic, you can create an Outlet in your controller (and create a controller class if you do not already have one), bind this Outlet to your window, and then do whathever you want with your window. Le 6 mars 08 à 13:37, [EMAIL PROTECTED] a écrit : Hi Jean-Daniel, I thought it would be something simple, which is probably why I couldn't find any reference for it on Google :-) Will check this when I get home. If this is the case, how does one then go about opening and closing the window, from say a menu item attached to an action ?? Thanks -Mic On Mar 6 2008, Jean-Daniel Dupas wrote: Hi, To prevent your window to open at startup, uncheck the 'Visible At Launch' box in your window settings (in Interface Builder). I don't know a supported way to create an application that appears in the Dock but has the same behaviour than a LSUIElement. Le 6 mars 08 à 12:55, [EMAIL PROTECTED] a écrit : Hi, I'm relatively new to Cocoa but have an application that's coming along nicely. Mostly when I have come across an issue I have managed to find a solution using Google but this particular one has me stumped. My application has three window, a notification window (similar to Growl) that pops up when particular events happen, a window that pops-up when the user clicks the dock icon and a preferences window that pops up when the user selects preferences from a StatusBarItem I have added to the status bar (or at least thats how it should work). All windows are in MainMenu.nib The problem I'm having is that I don't want any windows to open when the application launches, and at the moment the notification window opens (as it's the only windows I've actually implemented so far), and I also don't want a main menu because I've added a custom menu to the status bar. I've looked at NSUIElement and LSUIElement but they remove the dock icon also, and I need the dock icon, plus they still launch the window. So ultimatley my question is, how do launch/setup my application so that I get a dock icon, but no menu bar and so that no window is opened when launched, only when the user does something that prompts a window. Thanks in advance. -Mic ___ 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 [EMAIL PROTECTED] ___ 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 [EMAIL PROTECTED]
Re: large documents with doc based app
On 06.03.2008, at 01:13, Kyle Sluder wrote: On Wed, Mar 5, 2008 at 6:40 PM, Torsten Curdt [EMAIL PROTECTED] wrote: I though NSData would handle the access just transparently. Otherwise that would be good to keep in mind also for files slightly smaller than 2GB :) While NSData certainly has the capability to do memory-mapped IO, it would be rather useless if that was all it can do. Sorry, WDYM? Look into +[NSData dataWithContentsOfMappedFile:]. Well, the question is whether the default Cocoa document based app skeleton uses that constructor. cheers -- Torsten ___ 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 [EMAIL PROTECTED]
CoreData, bindings, and tableviews, oh my
I've looked but I'm probably using the wrong search terms or I'm missing something so obvious that noone else has had any trouble with it. Since most of what I write supports quite old Mac OS X versions, I'm only just now starting to experiment with CoreData and I've run into a stumper fairly early. I've got a window with 2 NSTableView objects on it. One was created by dragging an entity from the data model into the window and letting IB create a multi-object view. The second was created manually (still in IB, I don't mean in code) and has a single column bound to one of the same fields as is the first table through the same array controller. The generated table is about 4.5 rows tall, while the one I made can show about 13 rows. My data set has 10 entries. Now here's the problem. My manually-created table only shows the correct value for a row once it has been displayed in the generated table. So on launch I can see the correct data for the first 5 rows, and the remainder are zeroes. Logging awakeFromFetch confirms that the latter rows haven't been read. As I scroll the generated table, the values will fill in in the table I created. I've compared every facet of the tables I can think of, but obviously there's a difference I'm missing. Any pointers regarding what that is would be appreciated. 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 [EMAIL PROTECTED]
Re: Deferring a selector until later, but before painting
Could you create the control hidden, then defer whatever sets the value of the control and defer a setHidden:NO? --Brady ___ 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 [EMAIL PROTECTED]
Re: 10.5.2 release notes?
On 3/6/08 12:23 PM, Jonathan Dann said: Hi Guys, Does anyone know if there are some release notes specific for 10.5.2? I remember reading on some blog that there was an NSTreeController bugfix. I can't seem to be able to find any details on Google other than these http://docs.info.apple.com/article.html?artnum=307109 which have no mention of it. You mean detailed releases notes geared towards developers? I think they stopped doing that years ago. :( Something like this: http://developer.apple.com/technotes/tn2002/tn2053.html -- Sean McBride, B. Eng [EMAIL PROTECTED] Rogue Researchwww.rogue-research.com Mac Software Developer Montréal, Québec, Canada ___ 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 [EMAIL PROTECTED]
Re: large documents with doc based app
On 6 Mar 2008, at 00:13, Kyle Sluder wrote: On Wed, Mar 5, 2008 at 6:40 PM, Torsten Curdt [EMAIL PROTECTED] wrote: I though NSData would handle the access just transparently. Otherwise that would be good to keep in mind also for files slightly smaller than 2GB :) While NSData certainly has the capability to do memory-mapped IO, it would be rather useless if that was all it can do. Look into +[NSData dataWithContentsOfMappedFile:]. Unfortunately that doesn't really help. On 32-bit systems, the limitation is (usually) address space, not RAM or swap. IIRC OS X does leave more than 2GB of address space free for applications, but it's easy to fragment it and end up in a situation where the largest contiguous piece is too small. If you need to load more than 2GB of data into memory, you're going to want to be 64-bit. If, on the other hand, you can load it in pieces somehow, that's the way to go here. Depending on the data you're working with, you may also find that you could approach the problem differently, e.g. by processing it as a stream, or by entering it into a database engine (most DB engines are already set up to cope with more data than will fit in RAM). Unfortunately the best solution is dependent on the application domain. Kind regards, Alastair. -- http://alastairs-place.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 [EMAIL PROTECTED]
How to set Document Icon when saving
I am making a simple text editor(document based). I have set the app icon, but can't figure out how to make the documents saved with the text editor have my document icon. I am saving files using the following functions writeRTFDToFile:atomically:YES writeToFile:atomically:NO How do you set the document icon? ___ 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 [EMAIL PROTECTED]
Re: How to set Document Icon when saving
On Mar 6, 2008, at 4:23 PM, Lincoln Green wrote: How do you set the document icon? Typically you don't. The Finder will query Launch Services and automatically associate your documents with the correct icon based on the information found in your applications property list - And also based on user preferences, in the case of a shared document type with multiple possible applications to choose from. See for example: http://developer.apple.com/documentation/Cocoa/Conceptual/Documents/Concepts/DocTypePList.html#//apple_ref/doc/uid/2024-BHADAGHF http://developer.apple.com/documentation/Cocoa/Conceptual/Documents/Tasks/ImplementingDocApp.html j o a r ___ 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 [EMAIL PROTECTED]
Re: Cocoa - Not loading any window at startup ...
On Mar 6, 2008, at 13:55, [EMAIL PROTECTED] wrote: So ultimatley my question is, how do launch/setup my application so that I get a dock icon, but no menu bar and so that no window is opened when launched, only when the user does something that prompts a window. You don't - because no other app work like this, and it will be very strange for the user when they have a dock icon that does nothing when clicked. You have to decide what type of app you want - regular app with a menu and a dock icon or background app that run without a dock or menu. Best Regards, Nir Soffer ___ 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 [EMAIL PROTECTED]
Re: Cocoa - Not loading any window at startup ...
I want the dock icon to have a menu appear above it when clicked, similar to how stacks work in Leopard. So not that unusual really ... also Dashboard works the same way, dock icon with no menu. On 6 Mar 2008, at 15:27, Nir Soffer wrote: On Mar 6, 2008, at 13:55, [EMAIL PROTECTED] wrote: So ultimatley my question is, how do launch/setup my application so that I get a dock icon, but no menu bar and so that no window is opened when launched, only when the user does something that prompts a window. You don't - because no other app work like this, and it will be very strange for the user when they have a dock icon that does nothing when clicked. You have to decide what type of app you want - regular app with a menu and a dock icon or background app that run without a dock or menu. Best Regards, Nir Soffer ___ 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 [EMAIL PROTECTED]
Re: large documents with doc based app
On 6 Mar 2008, at 16:34, Aaron Burghardt wrote: If you don't mind working with the POSIX APIs (e.g., Unix system calls), there is mmap(). Unlike NData, it lets you specify a window onto the file so that you can control how much of your address space is mapped to the file at a given time. That's true, though it's equivalent (in approach) to loading the file in pieces, in that you can only see a small piece of the file's data in memory at any time. Again, it depends on the application domain as to whether using mmap(), [p]read()/[p]write()/NSFileHandle or even fread()/fwrite() will be the most efficient. Also, you'll need to concern yourself with the system page size if you use mmap(), which is easy enough, it's just something you don't normally need to worry about with higher level routines or the non-memory-mapped I/O routines. Kind regards, Alastair. -- http://alastairs-place.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 [EMAIL PROTECTED]
Re: Send an event to another app
On Mar 5, 2008, at 8:40 PM, Nick Zitzmann wrote: On Mar 5, 2008, at 9:20 PM, Alex Kac wrote: I realize that under OS X things are different and they simply don't work that way. I also know that menus do have a handler and I *assume* that even if a menu is greyed out or a sheet is open (which I understand is modal) that the main window can still handle events or messages. So what I want to do under OS X is write my own app that periodically will force this app to save its document by calling the same handler as what the Save menu command would call. Again, I do realize that bad things may happen, but for this app we are using its worth trying for me. Typically you'd do this by issuing an AppleScript command, which you can do with the NSAppleScript class. Something like tell application MyApp to save document in front of documents ought to work if the hypothetical MyApp is an NSDocument-based application. The correct script (while the above does happen to be syntactically valid), the proper script would be 'tell application MyApp to save front document. (save document 1 would be equivalent.) However, that doesn't guarantee that the application will do anything with the command. Presuming that this is a Cocoa application you're dealing with, it would have to (a) be NSDocument-based, and (b) have declared itself to be scriptable, which application writers are not required to do. Try dropping the application on Script Editor and see if you get anything. It's also possible to drive an application by manipulating its UI using the Accessibility API, but that wouldn't work in your case, since it would amount to clicking the Save menu command, which you say is disabled. I'm not sure what the goal here is. If it's to find out whether or not the application freaks out when asked to save something that it's already trying to save, then if it's impossible to ask it to do that, then your question would appear to be answered. --Chris Nebel AppleScript Engineering ___ 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 [EMAIL PROTECTED]
Re: Deferring a selector until later, but before painting
Oh, wait… this requires Leopard :| Is there anything that works with Tiger? I'm trying to avoid Leopard dependencies when there are easy substitutes. John Stiles wrote: Actually, in this case, it seems like a perfect fit for what I'm doing. I'm already using a subclassed view anyway. I will definitely take a look at -viewWillDraw:. BTW, views don't actually have delegates—many control subclasses do, e.g. NSTableView has one—but a plain NSView does not. Thanks, Ken! I'll let you know if this resolves my issue. I highly suspect that it will. j o a r wrote: On Mar 6, 2008, at 8:32 AM, Ken Ferry wrote: Or can you do your final setup in -viewWillDraw? For some kinds of problems, you could synchronously mark whatever state you're interested as invalid, then resolve any invalidated state in -viewWillDraw. This would be an appropriate way to do deferred layout, for example. I think it's unfortunate to have to resolve to subclassing for this type of problem - The OP might end up having to subclass several different NSControl subclasses to make it work. Perhaps NSView should provide some sort of notification or delegation scheme to supplement this method? j o a r ___ 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/jstiles%40blizzard.com This email sent to [EMAIL PROTECTED] ___ 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/jstiles%40blizzard.com This email sent to [EMAIL PROTECTED] ___ 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 [EMAIL PROTECTED]
Re: CoreAnimation efficiency
On Mar 6, 2008, at 5:43 AM, Half Activist wrote: As I'm investigating on which drawing techniques to use for a software I'm planing to create, imagine a kind of vector drawing program (that's not really that but a somewhat similar). In its actual version, all drawing relies on NSBezierPath/Quartz primitives and is really fast. Now, I'd like to use CALayers and CoreAnimation extensively, so my questions are the following: - Should I take care of not using too much Layers like with NSView (currently I have 1 view that draws all). By too much, in the worst case scenario I could use tens of thousands of layers (or more!) (actually ~one per object drawn) - Is there a performance slowdown if I use too many of them? - Would it take quite a lot of memory? - etc. I ain't no CA expert, but the simple existence of 10K's of layers aren't necessarily a problem. However, in my experience, if you start compositing them all to provide a single logical view, you'd be in trouble. I ran into serious performance issues with just dozens of (admittedly, pretty large--1Kx800) layers that were semi-transparent, in 2.5-D space. (All of them using simple images.) I'm going to have to do something much more intelligent (using tiled layers for producing the images on demand), and I have to avoid transparency between layers. Cheers! --Chris Ryland / Em Software, Inc. / www.emsoftware.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 [EMAIL PROTECTED]
Re: Deferring a selector until later, but before painting
On Leopard, this solution works perfectly. I get a chance to update my view right before it draws, which is exactly what the doctor ordered. Any way to get this on Tiger or am I just out of luck? John Stiles wrote: Oh, wait… this requires Leopard :| Is there anything that works with Tiger? I'm trying to avoid Leopard dependencies when there are easy substitutes. John Stiles wrote: Actually, in this case, it seems like a perfect fit for what I'm doing. I'm already using a subclassed view anyway. I will definitely take a look at -viewWillDraw:. BTW, views don't actually have delegates—many control subclasses do, e.g. NSTableView has one—but a plain NSView does not. Thanks, Ken! I'll let you know if this resolves my issue. I highly suspect that it will. j o a r wrote: On Mar 6, 2008, at 8:32 AM, Ken Ferry wrote: Or can you do your final setup in -viewWillDraw? For some kinds of problems, you could synchronously mark whatever state you're interested as invalid, then resolve any invalidated state in -viewWillDraw. This would be an appropriate way to do deferred layout, for example. I think it's unfortunate to have to resolve to subclassing for this type of problem - The OP might end up having to subclass several different NSControl subclasses to make it work. Perhaps NSView should provide some sort of notification or delegation scheme to supplement this method? j o a r ___ 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/jstiles%40blizzard.com This email sent to [EMAIL PROTECTED] ___ 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/jstiles%40blizzard.com This email sent to [EMAIL PROTECTED] ___ 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 [EMAIL PROTECTED]
Interface to shut down cores and/or processors?
I have a shiny new Mac Pro and am chasing some bugs in parallel applications that may have to do with things like cache flushing, memory barriers and OSAtomicwhatever. I recall from somewhere, I think, that there is an mechanism somewhere, selectively to disable processor cores (or perhaps entire processors, in the case of the Mac Pro). Such a mechanism would be very useful for my tests. If there is a Cocoa interface to this mechanism, perhaps someone could tell me what it is? If there is a non-Cocoa interface, perhaps someone could advise me off- line? I am a little hampered in searching the usual references in that I do not quite know what keywords to use. Thanks very much ... -- Jay Reynolds Freeman - [EMAIL PROTECTED] http://web.mac.com/jay_reynolds_freeman (personal web site) ___ 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 [EMAIL PROTECTED]
Syntax error when declaring an IBOutlet
Hi, My app has three objects - world, mapview, and game, and they need to know about each other in various combinations: mapview needs an outlet to world and game, and game needs an outlet to world. I've ctrl-clicked them all together appropriately in IB, and now I'm trying to declare the IBOutlets in code. So in mapview.h: #import Cocoa/Cocoa.h #import World.h #import Game.h @interface WMapView : NSView { IBOutlet Game * game; IBOutlet World * world; int view_x, view_y, window; } This worked fine and complied correctly. But the following code (identical, as far as I can tell) in game.h: #import Cocoa/Cocoa.h #import World.h @interface Game : NSObject { IBOutlet World * world; } Throws up: 'syntax error before World' in the IBOutlet statement. I was able to get around this by replacing #import World.h with @class World in game.h. I have another class, Display, that gives me the same error as the one in game.h - I've omitted it here for clarity. Basically, the mapview.h #import / IBOutlet is the only one that worked correctly. My questions are: 1. Why does identical code work in one file and not in the others? 2. Why should @class work when #import doesn't? Hillegass flat out says that the two are interchangeable. Thanks, Mark ___ 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 [EMAIL PROTECTED]
Re: Interface to shut down cores and/or processors?
Install the CHUD tools, and the in /Developers/Extra/PreferencePanes you can find the processor pref pane that do what you want. I remeber there is also some CHUD header that allow you to do it programatically, but don't remeber where. Le 6 mars 08 à 19:12, Jay Reynolds Freeman a écrit : I have a shiny new Mac Pro and am chasing some bugs in parallel applications that may have to do with things like cache flushing, memory barriers and OSAtomicwhatever. I recall from somewhere, I think, that there is an mechanism somewhere, selectively to disable processor cores (or perhaps entire processors, in the case of the Mac Pro). Such a mechanism would be very useful for my tests. If there is a Cocoa interface to this mechanism, perhaps someone could tell me what it is? If there is a non-Cocoa interface, perhaps someone could advise me off-line? I am a little hampered in searching the usual references in that I do not quite know what keywords to use. Thanks very much ... -- Jay Reynolds Freeman - [EMAIL PROTECTED] http://web.mac.com/jay_reynolds_freeman (personal web site) ___ 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 [EMAIL PROTECTED] ___ 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 [EMAIL PROTECTED]
Re: Syntax error when declaring an IBOutlet
Whats in World.h? On Thu, Mar 6, 2008 at 1:16 PM, Mark Teagarden [EMAIL PROTECTED] wrote: Hi, My app has three objects - world, mapview, and game, and they need to know about each other in various combinations: mapview needs an outlet to world and game, and game needs an outlet to world. I've ctrl-clicked them all together appropriately in IB, and now I'm trying to declare the IBOutlets in code. So in mapview.h: #import Cocoa/Cocoa.h #import World.h #import Game.h @interface WMapView : NSView { IBOutlet Game * game; IBOutlet World * world; int view_x, view_y, window; } This worked fine and complied correctly. But the following code (identical, as far as I can tell) in game.h: #import Cocoa/Cocoa.h #import World.h @interface Game : NSObject { IBOutlet World * world; } Throws up: 'syntax error before World' in the IBOutlet statement. I was able to get around this by replacing #import World.h with @class World in game.h. I have another class, Display, that gives me the same error as the one in game.h - I've omitted it here for clarity. Basically, the mapview.h#import / IBOutlet is the only one that worked correctly. My questions are: 1. Why does identical code work in one file and not in the others? 2. Why should @class work when #import doesn't? Hillegass flat out says that the two are interchangeable. Thanks, Mark ___ 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/enki1711%40gmail.com This email sent to [EMAIL PROTECTED] ___ 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 [EMAIL PROTECTED]
Re: Interface to shut down cores and/or processors?
On 3/6/08 10:12 AM, Jay Reynolds Freeman said: I have a shiny new Mac Pro and am chasing some bugs in parallel applications that may have to do with things like cache flushing, memory barriers and OSAtomicwhatever. I recall from somewhere, I think, that there is an mechanism somewhere, selectively to disable processor cores (or perhaps entire processors, in the case of the Mac Pro). Such a mechanism would be very useful for my tests. If there is a Cocoa interface to this mechanism, perhaps someone could tell me what it is? Too low level for Cocoa I think. Assuming you're on 10.5, take a look at: /Developer/Extras/PreferencePanes/Processor.prefPane It can turn off CPUs. -- Sean McBride, B. Eng [EMAIL PROTECTED] Rogue Researchwww.rogue-research.com Mac Software Developer Montréal, Québec, Canada ___ 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 [EMAIL PROTECTED]
Re: Syntax error when declaring an IBOutlet
On Mar 6, 2008, at 10:16 AM, Mark Teagarden wrote: I have another class, Display, that gives me the same error as the one in game.h - I've omitted it here for clarity. Basically, the mapview.h #import / IBOutlet is the only one that worked correctly. My questions are: 1. Why does identical code work in one file and not in the others? It's not identical. It's also not code--it's a preprocessor directive which is important because they have a tendency toward their own logic. I'll bet your World.h includes '#import Game.h' which creates an import cycle when imported from Game.h, but not when imported by WMapView.h. 2. Why should @class work when #import doesn't? Hillegass flat out says that the two are interchangeable. Where does he say that? I see the following in 2e Cocoa Programming: You could replace '@class PreferenceController;' with '#import PreferenceController.h'. This statement would import the header, and the compiler would learn that PreferenceController was a class. Because the 'import' command requires the compiler to parse more files, '@class' will often result in faster builds. which does _not_ call them interchangeable. Ignoring the fact that @class is faster than #import (a nice benefit in and of itself), it's a good rule of thumb to only use @class declarations for your project headers and only actually #import project headers from .m files, precisely to avoid these import cycles. pg ___ 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 [EMAIL PROTECTED]
RE: Why [NSApplication _deallocHardCore:] crash in my Safari Plug In
Yep, no luck. -Original Message- From: j o a r [mailto:[EMAIL PROTECTED] Sent: Thursday, March 06, 2008 3:12 AM To: Joe Jones Subject: Re: Why [NSApplication _deallocHardCore:] crash in my Safari Plug In On Mar 6, 2008, at 1:52 AM, Joe Jones wrote: Any ideas on how I can see what is getting on the autorelease pool? Or how to stop this from happening? Have you tried to run this with NSZombieEnabled? http://www.google.com/search?q=site:developer.apple.com +NSZombieEnabled j o a r ___ 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 [EMAIL PROTECTED]
TableColumn Enabled binding on 10.4/10.5
My Table Column Bindings to an NSArrayController are set like this: Binding: Value Controller Key: arrangedObjects Model Key Path: theName (this is a String) Binding: Enabled Controller Key: arrangedObjects Model Key Path: enabled (this is a Boolean) All this works perfectly well on 10.5, i.e. the rows in the TableView are greyed out if enabled is false. However, on 10.4 all rows appear as usual, not greyed out. A false- row *does* grey out (inversely, so to speak) if it is selected, though. XCode3/IB3 used here. What am I missing? Thanks, Knut ___ 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 [EMAIL PROTECTED]
Re: Syntax error when declaring an IBOutlet
Hi Paul, I'll bet your World.h includes '#import Game.h' which creates an import cycle when imported from Game.h, but not when imported by WMapView.h. Actually, it does. I was concerned that all of these objects needed outlets to each other, and that since (in my imperfect understanding) I had to import the headers of any object I wanted an outlet to point to, that there might be some a problem with all of those #imports. Since my understanding was that Obj-C uses #import instead of #include specifically to ensure that a header was only loaded once, I thought that would solve those types of problems. 2. Why should @class work when #import doesn't? Hillegass flat out says that the two are interchangeable. Where does he say that? I see the following in 2e Cocoa Programming: You could replace '@class PreferenceController;' with '#import PreferenceController.h'. This statement would import the header, and the compiler would learn that PreferenceController was a class. Because the 'import' command requires the compiler to parse more files, '@class' will often result in faster builds. which does _not_ call them interchangeable. Well, I am perfectly willing to admit that I was wrong but frankly I didn't see anything in there suggesting that they were NOT interchangeable, especially as there wasn't any discussion of differences between the two. In reading it, I felt like @class was simply introduced with no actual explanation of what it did. Anyway, I think you're right about my program having an import cycle, which I will now read up on. Thank you very much for your help. Mark ___ 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 [EMAIL PROTECTED]
Fwd: fyi - Mac OS native GDL2 / GSWeb Installer package
FYI, in case somebody still has to maintain some ObjC WebObjects-4.5 Webapp and/or wants an EOF clone in Objective-C (because he finds CoreData to light weighted or whatever): Here is what you need: A WO-4.5 clone with EOF working from within Xcode: Anfang der weitergeleiteten E-Mail: Von: Tim McIntosh [EMAIL PROTECTED] Datum: 6. März 2008 08:47:25 MEZ An: GNUstep Developers [EMAIL PROTECTED] Betreff: fyi - Mac OS native GDL2 / GSWeb Installer package Hi All, I mentioned this last week over on the GSW Hackers list, but I'll repeat it here in case anyone is interested who doesn't subscribe to that list (I've also made some progress since my original post) - I've been working on a Mac OS native port of the GSWeb and GDL2 frameworks, for use with Xcode and the Cocoa frameworks outside of a full GNUstep environment. I have put together Installer packages for Mac OS 10.4 and 10.5, which can be found here: http://hoth.radiofreeomaha.net:3000/~tmcintos/GNUstepWeb/ I have made a number of minor changes that I eventually intend to either undo or get accepted into the mainline. One difference in this version that may never make it into the mainline is the use of Cocoa-style (native) KVC (as opposed to WO-4.5 style), which I wanted for use with the WO5 app that I'm porting. You are welcome to try it out if you're interested. Please keep in mind that this is unsupported work-in-progress. The build is Universal but I've only tested on PowerPC (no Intel machines here). Your mileage may vary. Thanks, -Tim ___ Gnustep-dev mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/gnustep-dev regards, Lars ___ 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 [EMAIL PROTECTED]
Cocoa-dev and iPhone policy
Hi everybody, I was just wondering what the policy will be when it comes to Cocoa vs Cocoa-touch questions. Obviously they are related, obviously this will lead to a huge increase in traffic (not necessarily bad). Assuming that there would be a separate Cocoa-touch/iphone-dev mailinglist (don't know?) it would be cool if cocoabuilder.com could still aggregate them like it does with the omni vs cocoa-dev list... Cheers, Alex ** ** Alexander Griekspoor PhD ** ** mekentosj.com EnzymeX - To cut or not to cut 2006 Winner of the Apple Design Awards Best Mac OS X Scientific Solution http://www.mekentosj.com/enzymex ** ___ 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 [EMAIL PROTECTED]
Re: Cocoa-dev and iPhone policy
On Mar 6, 2008, at 12:23 PM, Alexander Griekspoor wrote: I was just wondering what the policy will be when it comes to Cocoa vs Cocoa-touch questions. The SDK is subject to NDA, so you should not discuss it in public. mmalc ___ 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 [EMAIL PROTECTED]
Re: Cocoa-dev and iPhone policy
Ok, that makes things clear. My apologies, Alex On 6 mrt 2008, at 20:28, mmalc crawford wrote: On Mar 6, 2008, at 12:23 PM, Alexander Griekspoor wrote: I was just wondering what the policy will be when it comes to Cocoa vs Cocoa-touch questions. The SDK is subject to NDA, so you should not discuss it in public. mmalc ** ** Alexander Griekspoor PhD ** ** mekentosj.com Papers - Your Personal Library of Science 2007 Winner of the Apple Design Awards Best Mac OS X Scientific Solution http://www.mekentosj.com/papers ** ___ 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 [EMAIL PROTECTED]
Re: Syntax error when declaring an IBOutlet
On Mar 6, 2008, at 12:00 PM, Mark Teagarden wrote: Hi Paul, I'll bet your World.h includes '#import Game.h' which creates an import cycle when imported from Game.h, but not when imported by WMapView.h. Actually, it does. I was concerned that all of these objects needed outlets to each other, and that since (in my imperfect understanding) I had to import the headers of any object I wanted an outlet to point to, that there might be some a problem with all of those #imports. Since my understanding was that Obj-C uses #import instead of #include specifically to ensure that a header was only loaded once, I thought that would solve those types of problems. It does, but that's dependent on it successfully including it in the first place. It's a fair oversimplification to think of #import (and even #include) as simply insert contents of this file right here directives; once you hit an include cycle, though, you will never be able to generate the all includes inserted final output for compilation. You're not the first coder who has run into this, and you won't be the last. 2. Why should @class work when #import doesn't? Hillegass flat out says that the two are interchangeable. Where does he say that? I see the following in 2e Cocoa Programming: You could replace '@class PreferenceController;' with '#import PreferenceController.h'. This statement would import the header, and the compiler would learn that PreferenceController was a class. Because the 'import' command requires the compiler to parse more files, '@class' will often result in faster builds. which does _not_ call them interchangeable. Well, I am perfectly willing to admit that I was wrong I didn't intend it to be harsh or pedantic. Your statement just seemed like something rather out of place to put in the mouth of a respected author, so I was wondering where you found the flat out statement. but frankly I didn't see anything in there suggesting that they were NOT interchangeable, especially as there wasn't any discussion of differences between the two. In reading it, I felt like @class was simply introduced with no actual explanation of what it did. That could definitely be argued. It *is* a statement that makes more sense in hindsight. As far as I know, @class just flags that class name as a specialized version of 'id'. When it comes time to send messages to that object, you will need to have #imported the header to know its method signatures. But there are only rare instances when you need to know those signatures in the header file so defaulting to @class seems to be the safe way to go. pg ___ 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 [EMAIL PROTECTED]
Re: CoreData, bindings, and tableviews, oh my
on 3/6/08 6:50 AM, [EMAIL PROTECTED] purportedly said: Since most of what I write supports quite old Mac OS X versions, I'm only just now starting to experiment with CoreData and I've run into a stumper fairly early. I've got a window with 2 NSTableView objects on it. One was created by dragging an entity from the data model into the window and letting IB create a multi-object view. The second was created manually (still in IB, I don't mean in code) and has a single column bound to one of the same fields as is the first table through the same array controller. The generated table is about 4.5 rows tall, while the one I made can show about 13 rows. My data set has 10 entries. Now here's the problem. My manually-created table only shows the correct value for a row once it has been displayed in the generated table. So on launch I can see the correct data for the first 5 rows, and the remainder are zeroes. Logging awakeFromFetch confirms that the latter rows haven't been read. As I scroll the generated table, the values will fill in in the table I created. I've compared every facet of the tables I can think of, but obviously there's a difference I'm missing. Any pointers regarding what that is would be appreciated. I don't know if NSArrayController supports being bound from two different collection-type views. You probably need a separate controller, either bound in the same way as the first (to the managed object context) or bound to the first array controller. Best, 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 [EMAIL PROTECTED]
Re: Creating outlets
With Xcode 3 it works much better to make all source code changes, including adding new outlets or actions, from in Xcode, and then in IB invoke the Synchronize with Xcode command from under the File menu. Don't follow the advice in the Hillegas book for creating new classes or outlets from in IB, it doesn't seem to work very well in that direction. All the Apple tutorials which have been updated for Leopard now recommend doing things that way. On Mar 6, 2008, at 1:23 PM, Mark Teagarden wrote: Hi, Is there an order I should use when I'm creating a new object and defining its outlets? Should I create the class in Xcode, hard-code the IBOutlets in the header file, and then instantiate it in Interface Builder and ctrl-click everything together? Or should I create the class in Xcode, then instantiate, create outlets, and ctrl-click everything in IB? If I make changes in header files etc, do I need to do anything special to the instances in IB, or will they reflect changes I've made automatically? My concern is that when I use IB to create outlets, then go back to xcode and add IBOutlets in the header file, that it's causing some kind of conflict - I've been getting weird errors to do with setting IBOutlet. It's all the more difficult because I'm using Hillegass to learn but I'm coding with Xcode 3. Thanks, Mark ___ 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/adam%40thejenkins.org This email sent to [EMAIL PROTECTED] ___ 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 [EMAIL PROTECTED]
Re: Cocoa-dev and iPhone policy
Official information is forthcoming. On Mar 6, 2008, at 12:31 PM, I. Savant wrote: I was just wondering what the policy will be when it comes to Cocoa vs Cocoa-touch questions. Obviously they are related, obviously this will lead to a huge increase in traffic (not necessarily bad). Assuming that there would be a separate Cocoa-touch/iphone-dev mailinglist (don't know?) it would be cool if cocoabuilder.com could still aggregate them like it does with the omni vs cocoa-dev list... While I understand from mmalc's response that the SDK is under NDA, I'd like to add my vote for a separate mailing list if/when the NDA is lifted. Anything specific to the iPhone / Cocoa-Touch (horrible name, by the way) should go to that list. More general Cocoa topics could be covered in either list. ___ 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 [EMAIL PROTECTED]
Using an auto incremented NSNumber as attribute in a NSManagedObject
Hey guys, First, let me say that I'm just starting to pick up Cocoa and Objective-C, and so far, I love it. Core Data seems to be an elegant solution to some of my past problems (mainly Java persistence). I am however having problems finding information regarding auto incremented attributes, namely an NSNumber attribute. I've created the attribute with the Data Modeler and set up all of the relationships I require. Everything worked, so I read about implementing a subclass of NSManagedObject and defining a -awakeFromInsert method. This appears to be working for some of the other fields, such as the date, but I'm having problems determining how exactly to increment the number. For example, when I create my first object, I want the numeric id field to be 1. Each subsequent insert should be the previous numeric id field + 1. I've read some of the posts regarding performing this and the general thought on this process is to create an additional entity in my data model containing the current maximum index then perform fetch, increment and get value of that field and use that for the incremented value of my new object. I'm not sure if this is still the only way or even the preferred way to perform this feat. I'm kind of worried about locking that counter field until the new managed object has been created to avoid any increment problems. Additionally, I've tried accessing the docs located at the link below, but I keep getting connection errors, anyone else having problems accessing the documentation? http://developer.apple.com/documentation/Cocoa/Reference/CoreDataFramework/Classes/NSManagedObject_Class/Reference/NSManagedObject.html Regards, Joshua Preston [EMAIL PROTECTED] ___ 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 [EMAIL PROTECTED]
Re: Using an auto incremented NSNumber as attribute in a NSManagedObject
It's a little busy at the developer website, since they just announced the iPhone SDK. I think there's nothing to do but wait... Best, Hank On Mar 6, 2008, at 4:05 PM, Joshua Preston wrote: Hey guys, First, let me say that I'm just starting to pick up Cocoa and Objective-C, and so far, I love it. Core Data seems to be an elegant solution to some of my past problems (mainly Java persistence). I am however having problems finding information regarding auto incremented attributes, namely an NSNumber attribute. I've created the attribute with the Data Modeler and set up all of the relationships I require. Everything worked, so I read about implementing a subclass of NSManagedObject and defining a - awakeFromInsert method. This appears to be working for some of the other fields, such as the date, but I'm having problems determining how exactly to increment the number. For example, when I create my first object, I want the numeric id field to be 1. Each subsequent insert should be the previous numeric id field + 1. I've read some of the posts regarding performing this and the general thought on this process is to create an additional entity in my data model containing the current maximum index then perform fetch, increment and get value of that field and use that for the incremented value of my new object. I'm not sure if this is still the only way or even the preferred way to perform this feat. I'm kind of worried about locking that counter field until the new managed object has been created to avoid any increment problems. Additionally, I've tried accessing the docs located at the link below, but I keep getting connection errors, anyone else having problems accessing the documentation? http://developer.apple.com/documentation/Cocoa/Reference/CoreDataFramework/Classes/NSManagedObject_Class/Reference/NSManagedObject.html Regards, Joshua Preston [EMAIL PROTECTED] ___ 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/hank.list %40runbox.com This email sent to [EMAIL PROTECTED] ___ 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 [EMAIL PROTECTED]
Re: 10.5.2 release notes?
On Mar 6, 2008, at 8:48 AM, Sean McBride wrote: On 3/6/08 12:23 PM, Jonathan Dann said: Hi Guys, Does anyone know if there are some release notes specific for 10.5.2? I remember reading on some blog that there was an NSTreeController bugfix. I can't seem to be able to find any details on Google other than these http://docs.info.apple.com/article.html?artnum=307109 which have no mention of it. You mean detailed releases notes geared towards developers? I think they stopped doing that years ago. :( Something like this: http://developer.apple.com/technotes/tn2002/tn2053.html I think you want to check out the various AppKit release notes (these should also be part of your local install of dev tools too). I don't have online URLs handy since Apple's dev site is getting hammered due to iPhone SDK downloads. ___ Ricky A. Sharp mailto:[EMAIL PROTECTED] Instant Interactive(tm) http://www.instantinteractive.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 [EMAIL PROTECTED]
Re: Using an auto incremented NSNumber as attribute in a NSManagedObject
- (void)awakeFromInsert { static int tempID = 1; [super awakeFromInsert]; self.employeeID = [NSNumber numberWithInt:tempID++]; } What do you think will happen when the application is quit, then run the next time? How will it remember the last tempID? -- 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 [EMAIL PROTECTED]
Re: Using an auto incremented NSNumber as attribute in a NSManagedObject
On Mar 6, 2008, at 1:05 PM, Joshua Preston wrote: I am however having problems finding information regarding auto incremented attributes, namely an NSNumber attribute. What do you want to do with this? Core Data manages primary foreign keys for you via object IDs and relationships, so you don't have to do anything with those yourself. (And those are the typical uses of auto- incrementing fields or sequences.) -- Chris ___ 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 [EMAIL PROTECTED]
Re: Deferring a selector until later, but before painting
On Thu, Mar 6, 2008 at 9:59 AM, John Stiles [EMAIL PROTECTED] wrote: On Leopard, this solution works perfectly. I get a chance to update my view right before it draws, which is exactly what the doctor ordered. Any way to get this on Tiger or am I just out of luck? Out of luck. Well, you can do the work in -drawRect:, but if any of the work you do invalidates display, it'll be delicate code (meaning it may be hard to get it to work right, or relatively fragile between releases). It might be good to implement a -resolveInvalidatedStuff method, then call it from both -viewWillDraw and -drawRect:. Then, on Leopard, you'll never actually be doing any work in drawRect: because you will have already resolved all state. If it works on Tiger at that point, great, and if not, any further tricky work you do is targeting an unchanging OS. Make sense? I think it's unfortunate to have to resolve to subclassing for this type of problem - The OP might end up having to subclass several different NSControl subclasses to make it work. Perhaps NSView should provide some sort of notification or delegation scheme to supplement this method? Maybe.. I was guessing that John was writing a custom view, because that's mostly where it seems to come up. Existing Cocoa view classes do already support an invalidation model in places where it seems useful - consider -[NSTableView reloadData]. But, maybe. File radars when you hit places in your real code where you'd want it. :-) -Ken Cocoa Frameworks ___ 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 [EMAIL PROTECTED]
Re: Deferring a selector until later, but before painting
On Mar 6, 2008, at 9:59 AM, John Stiles wrote: On Leopard, this solution works perfectly. I get a chance to update my view right before it draws, which is exactly what the doctor ordered. Any way to get this on Tiger or am I just out of luck? If nothing else you can use the hammer approach of NSDisableScreenUpdates()/NSEnableScreenUpdates(), although this is usually used when you want multiple windows to appear without a flash... -- David Duncan Apple DTS Animation and Printing [EMAIL PROTECTED] ___ 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 [EMAIL PROTECTED]
Re: Deferring a selector until later, but before painting
On Thu, Mar 6, 2008 at 2:06 PM, John Stiles [EMAIL PROTECTED] wrote: Ken Ferry wrote: On Thu, Mar 6, 2008 at 9:59 AM, John Stiles [EMAIL PROTECTED] wrote: On Leopard, this solution works perfectly. I get a chance to update my view right before it draws, which is exactly what the doctor ordered. Any way to get this on Tiger or am I just out of luck? Out of luck. Well, you can do the work in -drawRect:, but if any of the work you do invalidates display, it'll be delicate code (meaning it may be hard to get it to work right, or relatively fragile between releases). It might be good to implement a -resolveInvalidatedStuff method, then call it from both -viewWillDraw and -drawRect:. Then, on Leopard, you'll never actually be doing any work in drawRect: because you will have already resolved all state. If it works on Tiger at that point, great, and if not, any further tricky work you do is targeting an unchanging OS. Make sense? Hmm. What I'm doing is almost certainly going to invalidate display, so I am probably just out of luck for Tiger. If there was some bulletproof solution that could be made to work under Tiger, that would have been nice, but it's not a big deal. I don't currently anticipate this code being used under Tiger. I just like to write things so that we could use them as far back as reasonably possible, in case plans change. I guess if that does happen, I can bring back the old code and Tiger users can live with the controls-changing-after-display behavior that we had before. Note that implementing -viewWillDraw won't keep your code from running on Tiger, the method just won't get called. That's what I was getting at with the hybrid drawRect:/viewWillDraw approach. -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 [EMAIL PROTECTED]
Re: Deferring a selector until later, but before painting
Ken Ferry wrote: On Thu, Mar 6, 2008 at 2:06 PM, John Stiles [EMAIL PROTECTED] wrote: Ken Ferry wrote: On Thu, Mar 6, 2008 at 9:59 AM, John Stiles [EMAIL PROTECTED] wrote: On Leopard, this solution works perfectly. I get a chance to update my view right before it draws, which is exactly what the doctor ordered. Any way to get this on Tiger or am I just out of luck? Out of luck. Well, you can do the work in -drawRect:, but if any of the work you do invalidates display, it'll be delicate code (meaning it may be hard to get it to work right, or relatively fragile between releases). It might be good to implement a -resolveInvalidatedStuff method, then call it from both -viewWillDraw and -drawRect:. Then, on Leopard, you'll never actually be doing any work in drawRect: because you will have already resolved all state. If it works on Tiger at that point, great, and if not, any further tricky work you do is targeting an unchanging OS. Make sense? Hmm. What I'm doing is almost certainly going to invalidate display, so I am probably just out of luck for Tiger. If there was some bulletproof solution that could be made to work under Tiger, that would have been nice, but it's not a big deal. I don't currently anticipate this code being used under Tiger. I just like to write things so that we could use them as far back as reasonably possible, in case plans change. I guess if that does happen, I can bring back the old code and Tiger users can live with the controls-changing-after-display behavior that we had before. Note that implementing -viewWillDraw won't keep your code from running on Tiger, the method just won't get called. That's what I was getting at with the hybrid drawRect:/viewWillDraw approach. Right. So I can leave it implemented, but for Tiger, I can check the AppKit version and if it's below the Leopard value, I can call my method via -performSelector:withObject:afterDelay: and get the same effect. It just will have a brief blink. I suppose I could also experiment with disabling screen updates to get past that hurdle. Honestly, for now, it's probably not all that important... I'll just accept that Tiger has limitations, and if I end up needing to target Tiger after all, I'll worry about it then. For now I'll stay focused on Leopard. Thanks for your suggestions; I appreciate the help! ___ 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 [EMAIL PROTECTED]
Re: Using an auto incremented NSNumber as attribute in a NSManagedObject
I.S., Hence the don't use in production clause. That method starts at 1 every time the application is launched, so not the complete solution in my case, it was only there as a reference to incrementing a value (arguably for my own use). The idea would be to persist that number in the data model. Regards, Joshua Preston [EMAIL PROTECTED] On Mar 6, 2008, at 4:52 PM, I. Savant wrote: - (void)awakeFromInsert { static int tempID = 1; [super awakeFromInsert]; self.employeeID = [NSNumber numberWithInt:tempID++]; } What do you think will happen when the application is quit, then run the next time? How will it remember the last tempID? -- 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 [EMAIL PROTECTED]
Re: Using an auto incremented NSNumber as attribute in a NSManagedObject
Chris, The short answer is for quick look ups. My application creates a new managed object which represents a new issue. When the person done with the entry completes it, they should be issued a tracking number. For reasons ubiquitous with telephone support, I am attempting to only utilize numeric values. So for example, I create a new ticket, I should be able to look it up by a human readable index using very low tech means--think telephone keypad... Now I won't claim to be the expert on this subject, but it did seem to me that the indexes (keys) created by core data would probably not use a simple integer for key look ups, or allow me to specify a range of valid numbers. I mean, for ease of use, I was going to start my range in the millions to keep a consistent length of the reference id. Regards, Joshua Preston [EMAIL PROTECTED] On Mar 6, 2008, at 4:56 PM, Chris Hanson wrote: On Mar 6, 2008, at 1:05 PM, Joshua Preston wrote: I am however having problems finding information regarding auto incremented attributes, namely an NSNumber attribute. What do you want to do with this? Core Data manages primary foreign keys for you via object IDs and relationships, so you don't have to do anything with those yourself. (And those are the typical uses of auto-incrementing fields or sequences.) -- Chris ___ 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 [EMAIL PROTECTED]
Presumably iphone does Objective-C 2.0?
So given that Core is supported by the iphone are all the Objective-C 2.0features supported too? So you can write iphone apps that use GC should you so wish? I've yet to see the SDK which hopefully will answer these questions. also given so much overlap b/w iphone SDK and Cocoa SDK do they coexist together nicely or can you get by with existing tools plus frameworks plus simulator? Don't see any reason to have two copies of Xcode, IB etc just to do iphone development. ___ 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 [EMAIL PROTECTED]
Re: Using an auto incremented NSNumber as attribute in a NSManagedObject
On Thu, Mar 6, 2008 at 5:32 PM, Joshua Preston [EMAIL PROTECTED] wrote: Chris, The short answer is for quick look ups. My application creates a new managed object which represents a new issue. When the person done with the entry completes it, they should be issued a tracking number. For reasons ubiquitous with telephone support, I am attempting to only utilize numeric values. So for example, I create a new ticket, I should be able to look it up by a human readable index using very low tech means--think telephone keypad... You could issue a fetch request at startup, store its @max in some ivar in a MOC subclass, and use that instead of the local static variable. Still a pain, but might do you what you want. --Kyle Sluder ___ 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 [EMAIL PROTECTED]
[moderator] Re: Presumably iphone does Objective-C 2.0?
Folks, Please remember that this is not public information. Even the documentation requires an NDA and login to get access. Succinctly, the iPhone can't be discussed here. WWDR does have more information forthcoming. thanks scott On Mar 6, 2008, at 3:49 PM, Kevin Vanwulpen wrote: Hi Note: iPhone OS does not support memory management using the garbage collection feature that is in Mac OS X v10.5 and later. Can be read at this link: http://developer.apple.com/iphone/gettingstarted/docs/creatingiphoneapps.action So I would say ...at least not the AGC aspect of Obj-C 2.0 Kevin Dave Camp wrote: That's not what he was asking. He was specifically asking about Objective-C 2.0. It has functionality not present in previous versions of the language. Dave On Mar 6, 2008, at 2:48 PM, Conrad Taylor wrote: Hi, I'm sure that iPhone has always done Objective-C because the iPhone is running a core version of the Mac OS X operating system. -Conrad On Thu, Mar 6, 2008 at 2:34 PM, Robert Nicholson [EMAIL PROTECTED] wrote: So given that Core is supported by the iphone are all the Objective-C 2.0features supported too? So you can write iphone apps that use GC should you so wish? I've yet to see the SDK which hopefully will answer these questions. also given so much overlap b/w iphone SDK and Cocoa SDK do they coexist together nicely or can you get by with existing tools plus frameworks plus simulator? Don't see any reason to have two copies of Xcode, IB etc just to do iphone development. ___ 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/conradwt%40gmail.com This email sent to [EMAIL PROTECTED] ___ 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/dave%40criticalpath.com This email sent to [EMAIL PROTECTED] ___ 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/kevinvanwulpen%40gmail.com This email sent to [EMAIL PROTECTED] ___ 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/scott%40cocoadoc.com This email sent to [EMAIL PROTECTED] ___ 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 [EMAIL PROTECTED]
Re: Using an auto incremented NSNumber as attribute in a NSManagedObject
Kyle, Where would be the ideal spot to place this fetch request? Regards, Joshua Preston [EMAIL PROTECTED] On Mar 6, 2008, at 6:47 PM, Kyle Sluder wrote: You could issue a fetch request at startup, store its @max in some ivar in a MOC subclass, and use that instead of the local static variable. Still a pain, but might do you what you want. --Kyle Sluder ___ 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 [EMAIL PROTECTED]
Re: Using an auto incremented NSNumber as attribute in a NSManagedObject
Where would be the ideal spot to place this fetch request? -applicationDidFinishLaunching: ...? -- 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 [EMAIL PROTECTED]
Re: 10.5.2 release notes?
Does anyone know if there are some release notes specific for 10.5.2? I remember reading on some blog that there was an NSTreeController bugfix. ... You mean detailed releases notes geared towards developers? I think they stopped doing that years ago. :( Something like this: http://developer.apple.com/technotes/tn2002/tn2053.html Actually some subsystems do ship release notes as a part of developer docs, and they can be detailed. For instance: http://developer.apple.com/releasenotes/Cocoa/AppKit.html However, there often are no developer release note updates for software updates. To answer the original question, there are two NSTreeController bug fixes in 10.5.2; the one you may be thinking of is 5622232: NSTreeController: points to invalid object after deletion. Ali ___ 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 [EMAIL PROTECTED]
Grabbing current Safari webpage url
Good evening all... Is there a way of finding out what is the current topmost webpage being viewed by Safari? Somehow then grabbing the url title of that page? I have seen a couple applications that do exactly that. You goto a web page using Safari, but then goto the other applications window, and press a button. That application somehow acquires the information from Safari, and then uses it for some purpose. Some Bookmark apps do it this way, as well as some download utilities. I think I can get this information using Applescript, but one of the developers hinted that he was not using Applescript to do this. Is there an application service or Safari API that passes your application this information? Information (or better yet, source code) for doing this whatever your method would be appreciated! Thanks, Steve Sheets Midnight Mage Software ___ 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 [EMAIL PROTECTED]
Re: Intel mac required for iPhone development
I'm just curious but why? Well, since various Apple people have already pointed out discussing the iPhone SDK is part of an NDA, so there's no way you'll get an answer. I'm sure it revolves around the fact that limiting the sw and hw supported reduces the development effort for that team, but we'll never know exactly… Mark___ 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 [EMAIL PROTECTED]
Re: Intel mac required for iPhone development
Dunno, Maybe its a scheme to make me buy a new mac? Sent from my iPhone On Mar 6, 2008, at 9:30 PM, Robert Nicholson [EMAIL PROTECTED] wrote: I'm just curious but why? Pls note I own 3 intel macs Sent from my iPhone ___ 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/joshua.preston%40prestoncentral.com This email sent to [EMAIL PROTECTED] ___ 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 [EMAIL PROTECTED]
Re: Grabbing current Safari webpage url
On Mar 6, 2008, at 7:59 PM, Steve Sheets wrote: Is there a way of finding out what is the current topmost webpage being viewed by Safari? Yes, through AppleScript. I think I can get this information using Applescript, but one of the developers hinted that he was not using Applescript to do this. Is there an application service or Safari API that passes your application this information? Mac OS X does not allow applications to get NSWindows or WindowRefs of other applications' windows for obvious security reasons (unless the developer creates a back door via DO), so I don't see how that would be possible. Nick Zitzmann http://www.chronosnet.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 [EMAIL PROTECTED]
GetMonitorFromWindow
Hi List, Presently i am adding DualMonitor support to my application. If user drags application window to more than 50% portion to other monitor, i have to dispaly it fully in second monitor, otherwise undo the drag operation. Is Apple provides any api like GetMonitorFromWindow() in VB? Thanks, - Apparao. ___ 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 [EMAIL PROTECTED]
Localized Apple Help (HTML) doesn't load
Hi Folks: I'm having a problem where localized versions of my local HTML help don't load, and I don't know how to debug this. For example, if I change the system preferences to Japanese, and click on the Help Menu item, the Apple Help Viewer app launches, its main window appears, but no help page shows. If I drag the index.html file from the Japanese.lproj folder in my app's Resources folder onto the Help Viewer icon in the doc, the help page loads and displays properly. So, it doesn't seem like there's anything wrong with the HTML itself. I've double checked that the name of the folder matches the plist entries, and is readable. Here's the relevant entry in my Info.plist: keyCFBundleHelpBookFolder/key stringMemoryMiner Help/string keyCFBundleHelpBookName/key stringMemoryMiner Help/string Here's the relevant entry in the InfoPlist.strings file for Japanese: CFBundleHelpBookName = MemoryMiner ヘルプ; Am I missing something? Any help would be greatly appreciated. Best regards, John___ 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 [EMAIL PROTECTED]
Re: Grabbing current Safari webpage url
On Thu, Mar 6, 2008 at 7:39 PM, Nick Zitzmann [EMAIL PROTECTED] wrote: On Mar 6, 2008, at 7:59 PM, Steve Sheets wrote: I think I can get this information using Applescript, but one of the developers hinted that he was not using Applescript to do this. Is there an application service or Safari API that passes your application this information? Mac OS X does not allow applications to get NSWindows or WindowRefs of other applications' windows for obvious security reasons (unless the developer creates a back door via DO), so I don't see how that would be possible. The developer might have been making a distinction between Apple Events and AppleScript. Scripting Bridge, for example, would allow you to pull this information from Safari without using AppleScript. AppleScript and the Scripting Bridge use the same basic mechanism to talk to Safari, which is Apple Events. I don't think there's much reason to avoid using Apple Events in some form for this task. Seems well suited. -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 [EMAIL PROTECTED]
Re: Grabbing current Safari webpage url
You can use Scripting Bridge to do the same things you could do in AppleScript, but in Objective-C, or other languages. http://developer.apple.com/documentation/Cocoa/Conceptual/ScriptingBridgeConcepts/Introduction/chapter_1_section_1.html On Mar 6, 2008, at 9:59 PM, Steve Sheets wrote: Good evening all... Is there a way of finding out what is the current topmost webpage being viewed by Safari? Somehow then grabbing the url title of that page? I have seen a couple applications that do exactly that. You goto a web page using Safari, but then goto the other applications window, and press a button. That application somehow acquires the information from Safari, and then uses it for some purpose. Some Bookmark apps do it this way, as well as some download utilities. I think I can get this information using Applescript, but one of the developers hinted that he was not using Applescript to do this. Is there an application service or Safari API that passes your application this information? Information (or better yet, source code) for doing this whatever your method would be appreciated! Thanks, Steve Sheets Midnight Mage Software ___ 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/adam%40thejenkins.org This email sent to [EMAIL PROTECTED] ___ 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 [EMAIL PROTECTED]
Re: GetMonitorFromWindow
So you mean --- there is no APIs avialable. - Apparao On 3/7/08, Roy Lovejoy [EMAIL PROTECTED] wrote: On Mar 6, 2008, at 9:01 PM, Apparao Mulpuri wrote: Hi List, Presently i am adding DualMonitor support to my application. If user drags application window to more than 50% portion to other monitor, i have to dispaly it fully in second monitor, otherwise undo the drag operation. so... you don't want your application to behave as a normal mac application has for the last 21 years of multiple monitorness? since 1987, if the user makes window spans multiple monitors, it's the user's choice to do so. 'correcting' the user by moving the window AFTER they have positioned it is a sure way annoy the heck out of them. ___ 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/apparao.forums%40gmail.com This email sent to [EMAIL PROTECTED] ___ 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 [EMAIL PROTECTED]
Re: GetMonitorFromWindow
On Mar 6, 2008, at 10:48 PM, Apparao Mulpuri wrote: So you mean --- there is no APIs avialable. There is, but you really shouldn't be doing what you're trying to do unless you have an extremely good reason. It's perfectly OK for a user to have a window straddle two screens. Nick Zitzmann http://www.chronosnet.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 [EMAIL PROTECTED]
Re: GetMonitorFromWindow
Actually this is one of our client requirement, he simply follows the windows product(where this functionity is available). So i should implement it. If APIs available, Could you please provide those Thanks, - Apparao On 3/7/08, Nick Zitzmann [EMAIL PROTECTED] wrote: On Mar 6, 2008, at 10:48 PM, Apparao Mulpuri wrote: So you mean --- there is no APIs avialable. There is, but you really shouldn't be doing what you're trying to do unless you have an extremely good reason. It's perfectly OK for a user to have a window straddle two screens. Nick Zitzmann http://www.chronosnet.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 [EMAIL PROTECTED]
Re: Grabbing current Safari webpage url
If you are looking to do it in Applescript (you want it to work in 10.4, for example), here is the script I use: tell application System Events if application process Safari exists then tell application Safari to get URL of document 1 end tell To get the title of the webpage, just substitute name for URL Then, call it with NSApplescript and grab the result with an NSAppleEventDescriptor Adam Leonard On Mar 6, 2008, at 9:27 PM, Adam P Jenkins wrote: You can use Scripting Bridge to do the same things you could do in AppleScript, but in Objective-C, or other languages. http://developer.apple.com/documentation/Cocoa/Conceptual/ScriptingBridgeConcepts/Introduction/chapter_1_section_1.html On Mar 6, 2008, at 9:59 PM, Steve Sheets wrote: Good evening all... Is there a way of finding out what is the current topmost webpage being viewed by Safari? Somehow then grabbing the url title of that page? I have seen a couple applications that do exactly that. You goto a web page using Safari, but then goto the other applications window, and press a button. That application somehow acquires the information from Safari, and then uses it for some purpose. Some Bookmark apps do it this way, as well as some download utilities. I think I can get this information using Applescript, but one of the developers hinted that he was not using Applescript to do this. Is there an application service or Safari API that passes your application this information? Information (or better yet, source code) for doing this whatever your method would be appreciated! Thanks, Steve Sheets Midnight Mage Software ___ 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/adam %40thejenkins.org This email sent to [EMAIL PROTECTED] ___ 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/adam%40caffeinatedcocoa.com This email sent to [EMAIL PROTECTED] ___ 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 [EMAIL PROTECTED]
How to debug a nib loading error?
Folks; Tiger 10.4.11 -- XC 2.4.1 I'm baffled by an IB error. Reasonable development has been on-going. Pretty stringent Build Rules and no errors or warnings. I decide to do a clean build, torch the app's prefs file and the CoreData store. I want to focus on the initial installation phase of the app... To my great surprise I cannot now get the app to launch successfully. It ran fine 15 minutes beforehand... Regardless of whether I 'Run' or 'Debug' I get the exact same result: I get all the way through the appDelegate's -awakeFromNib and the pref window opens (as I expect on first launch) but the debugger kicks in with the following: #0 0x90a594c7 in objc_msgSend #1 0xb7b8 in ?? #2 0x932849d8 in loadNib #3 0x932843d9 in +[NSBundle(NSNibLoading) _loadNibFile:nameTable:withZone:ownerBundle:] #4 0x9328403a in +[NSBundle(NSNibLoading) loadNibFile:externalNameTable:withZone:] #5 0x93283f7c in +[NSBundle(NSNibLoading) loadNibNamed:owner:] #6 0x93283cc3 in NSApplicationMain #7 0x00405ffc in main at main.m:18 In the Console I see: Normal log messages that I generate and expect (including the 'end-of-awake-from-nib' stamp) Program received signal: EXC_BAD_ACCESS. I have the [NSException raise] as a Global breakpoint but it doesn't fire. Using the po command I can tell that MainMenu is the nib involved; the prefs window is in a separate nib... How do I track this down? Steve ___ 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 [EMAIL PROTECTED]
Re: GetMonitorFromWindow
On Mar 6, 2008, at 11:12 PM, Apparao Mulpuri wrote: Actually this is one of our client requirement, he simply follows the windows product(where this functionity is available). So i should implement it. If APIs available, Could you please provide those OK, I guess a business requirement counts as being a very good reason... -[NSWindow screen] returns the screen that the majority of the window is on. Check the NSScreen documentation for more details. Nick Zitzmann http://www.chronosnet.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 [EMAIL PROTECTED]
Re: GetMonitorFromWindow
Might also want to let your client know that you care more about meeting requirements than providing optimal value. ___ 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 [EMAIL PROTECTED]