Making the Text in a Text Cell change color when the Rows Checkbox has been checked.
I have a NSOutlineView and I want to make the text for a row change color when the check box on that row has been checked. How would I do that? Thanks. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Oh notification, where are you?
On Sep 22, 2009, at 3:03 AM, Rob Keniger wrote: On 22/09/2009, at 2:31 AM, Michael Thon wrote: NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; [nc addObserver:self selector:@selector(sendNotification:) name:@NSMetadataQueryDidFinishGatheringNotification object:nil]; [myThread start]; In the sendNotification: method I send the notification to the other thread using performSelector: onThread: however sendNotification: is never even called. Either the notifications are not, in fact being sent to the main thread or I'm doing something else wrong. There is probably something basic about threads or notifications that I don't understand but I have run out of ideas about what to try next. NSMetadataQueryDidFinishGatheringNotification is a string constant, so you should use it directly and not put it inside the @ string literal container: NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; [nc addObserver:self selector:@selector(sendNotification:) name:NSMetadataQueryDidFinishGatheringNotification object:nil]; @Rob - thanks for pointing that out I did find the problem - my thread needs a runloop in order to process notifications. Following this fellow's blog post: http://confuseddevelopment.blogspot.com/2006_10_01_archive.html I added CFRunLoopRun(); after starting the metadataquery. Inside the method that gets called to process the notification I added: CFRunLoopStop(CFRunLoopGetCurrent ()); to stop the runloop. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Making the Text in a Text Cell change color when the Rows Checkbox has been checked.
On Mon, Sep 21, 2009 at 11:10 PM, Joshua Garnham joshua.garn...@yahoo.co.uk How would I do that? You have a habit of asking these sorts of questions. What have you tried? http://www.whathaveyoutried.com --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 arch...@mail-archive.com
Re: an app that never quits
On Sep 21, 2009, at 1:21 PM, Sixten Otto wrote: On Mon, Sep 21, 2009 at 4:15 PM, Erick Calder e...@arix.com wrote: ok, perhaps there's another way I can solve my problem. I have a little app called Trapster that uses something called push technology... I think what it means is that some server can send my app a signal and even though the app isn't running all the time, it gets woken up and responds to the message... can anyone point me to a howto? The Push Notification Service Programming Guide is here: http://developer.apple.com/iphone/library/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Introduction/Introduction.html Be advised, though, that push notifications are really directed at the *user*. Yes, the alerts you can push provide a convenient way for the user to start up your app (and your app is specifically informed of that), but this isn't like waking up a daemon process on the device. Your app can still only run in the foreground, and only at the discretion of the user, and will still be quit when the user is done with it. (Users can also turn off the push alerts entirely.) wow. ok. I guess that's not going to help much then. I must say that without daemons the range of applications possible seems rather quite narrow to me. thanks - erick (who is struggling to get his first app built) ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: an app that never quits
On Mon, Sep 21, 2009 at 11:30 PM, Erick Calder e...@arix.com wrote: wow. ok. I guess that's not going to help much then. I must say that without daemons the range of applications possible seems rather quite narrow to me. Background processing is a much-desired feature. You can add your voice by filing a bug at http://bugreport.apple.com. --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 arch...@mail-archive.com
IB does not show Outlet/Action section in inspector
When I select an object in IB, the inspector does not display the outlet/action section. Is this a bug? I have installed Xcode on another computer and experienced the same behaviour. I am using Xcode3.2 and snow leopard. Any help? Michael ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: IB does not show Outlet/Action section in inspector
On Mon, Sep 21, 2009 at 11:57 PM, Michael Süssner michael.suess...@utanet.at wrote: When I select an object in IB, the inspector does not display the outlet/action section. Did you remember to click the Outlet inspector? g If so, I would definitely consider that to be a bug. Makes IB kinda useless. See if right-clicking on things produces the popup outlet inspector HUD thingy, to use the technical term. --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 arch...@mail-archive.com
Re: Making the Text in a Text Cell change color when the Rows Checkbox has been checked.
On 22 Sep, 2009, at 08:22, Kyle Sluder wrote: On Mon, Sep 21, 2009 at 11:10 PM, Joshua Garnham joshua.garn...@yahoo.co.uk How would I do that? You have a habit of asking these sorts of questions. What have you tried? http://www.whathaveyoutried.com --Kyle Sluder Excellent article! :-) Thanks for pointing it out. The comments are good too. --colin ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
NSArrayController addObject or insertObject:atArrangedObjectIndex:
Hi all, I have an NSArrayController and am trying to get an add button to work, so that it inserts a new DataRow object at the current selection, or at the end if no selection. Here's my code: - (IBAction) insertDataRow:(id)sender { DataRow* newDataRow = [[DataRow new] autorelease]; [newDataRow setTransactionPending:@insert]; // just a flag in the DataRow object NSUInteger controllerSelectionIndex = [dataRowsController selectionIndex]; if (controllerSelectionIndex == NSNotFound) { [dataRowsController addObject:newDataRow]; } else { [dataRowsController insertObject:newDataRow atArrangedObjectIndex:controllerSelectionIndex]; } } When it gets to either the addObject or insertObject method, it crashes with the error: Program received signal: “EXC_BAD_ACCESS” If I hook up an add button directly to the insert or remove received action of the NSArrayController, it works fine. But I need to run my own method so I can check and set other variables, such as the setTransactionPending property shown above. Can someone please tell me what I'm doing wrong? Thanks, Tom BareFeet ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSArrayController addObject or insertObject:atArrangedObjectIndex:
It looks like dataRowsController is no longer a valid object by the time -addObject:/-insertObject: is called on it. Try running your program with NSZombieEnabled. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSArrayController addObject or insertObject:atArrangedObjectIndex:
On 22 Sep, 2009, at 09:12, BareFeet wrote: Hi all, I have an NSArrayController and am trying to get an add button to work, so that it inserts a new DataRow object at the current selection, or at the end if no selection. Here's my code: - (IBAction) insertDataRow:(id)sender { DataRow* newDataRow = [[DataRow new] autorelease]; [newDataRow setTransactionPending:@insert]; // just a flag in the DataRow object NSUInteger controllerSelectionIndex = [dataRowsController selectionIndex]; if (controllerSelectionIndex == NSNotFound) { [dataRowsController addObject:newDataRow]; } else { [dataRowsController insertObject:newDataRow atArrangedObjectIndex:controllerSelectionIndex]; } } When it gets to either the addObject or insertObject method, it crashes with the error: Program received signal: “EXC_BAD_ACCESS” If I hook up an add button directly to the insert or remove received action of the NSArrayController, it works fine. But I need to run my own method so I can check and set other variables, such as the setTransactionPending property shown above. Can someone please tell me what I'm doing wrong? Dave responded to that. I just thought I'd mention this (from 'Cocoa Bindings Programming Topics') If the controller is in object mode, the method newObject is used to create new objects. The default implementation simply allocates a new object of the class specified by objectClass or theentityName and sends the object a standard init message with no arguments. If your content objects require more complex initialization, you can subclass the appropriate controller class and override the newObject method. --colin___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: drawing/masking one image with the alpha value from another
On 22 Sep 2009, at 06:18, Roland King wrote: I hadn't seen CIFilter, no, that might have been a good avenue to explore however I think that's not available on the phone (and this is for the phone even though I didn't explicitly state that earlier, apologies). So I'll have to use something a bit more primitive. I think perhaps a bitmap context is what I may want CIFilter would be ideal, I think, but if you need to work on an environment without it then I think BravoBug Software (whoever that is) was right; you want to grab the data with the -bitmapData method and manipulate it directly yourself. Of course, that means that you must support any pixel format (and endianness) issues that result, but it does mean you can do what you please with the data. Using a bitmap context IMO is a red herring... I don't see how it helps you to do what you need, and even if you were to misuse such a thing (e.g. drawing rectangles to fill individual pixels), it'd be horribly slow by comparison to direct image manipulation I think. 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 arch...@mail-archive.com
WebView and PickerView problem
Hi, I have small problem. I have WebView in my application and I open website where there are some select elements. When I clicked on select, then PickerView appears. The problem is, when I click Done button in PickerView scrollbar in WebView changes his position. Does anyone know what's going on? Best regards Bartosz Bialecki Dołącz się do Manify! Wyjdźmy na ulice, w WALCE O TAŃSZE PIWO! http://klik.wp.pl/?adr=www.zatanisci.plsid=856 ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: XCode Developer issue. Debugger errors since upgrading to Snow Leopard: unable to read unknown load command 0x80000022
Sorry about coming to this late - I've been away. As I don't see any other responses to this in the list, I am replying. Apologies if it's already been covered. On 14 Sep 2009, at 17:43, maxwellma...@gmail.com wrote: Hi Folks, running XCode in debug mode shows this error countless times in the debug console: unable to read unknown load command 0x8022 I've started seeing this since upgrading to SL. Anyone else spotted it? Cheers, Max You need to upgrade Xcode to 3.2, 0x8022 is the Mach-o load command to load a compressed library. I think this is a new feature in Snow Leopard. In any case, the Xcode 3.1.x debugger doesn't understand it but the 3.2 debugger does. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: XCode Developer issue. Debugger errors since upgrading to Snow Leopard: unable to read unknown load command 0x80000022
No I hadn't had a solution yet. Thanks Jeremy. That's done the trick. Cheers, Max On 22 Sep 2009, at 10:25, Jeremy Pereira wrote: Sorry about coming to this late - I've been away. As I don't see any other responses to this in the list, I am replying. Apologies if it's already been covered. On 14 Sep 2009, at 17:43, maxwellma...@gmail.com wrote: Hi Folks, running XCode in debug mode shows this error countless times in the debug console: unable to read unknown load command 0x8022 I've started seeing this since upgrading to SL. Anyone else spotted it? Cheers, Max You need to upgrade Xcode to 3.2, 0x8022 is the Mach-o load command to load a compressed library. I think this is a new feature in Snow Leopard. In any case, the Xcode 3.1.x debugger doesn't understand it but the 3.2 debugger does. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Why am I always getting the linker error: 'duplicate symbol'...?
You can use an enum to define integer constants enum { x = 123, }; Le 21 sept. 2009 à 23:15, Frederick C. Lee a écrit : I suspected such.Thanks to all. I'm assuming 'const datatype' is better then the compiler directive '#define', due to the use of the compiler for more-efficient code. Hence the attempt. Regards, Ric. On Mon, Sep 21, 2009 at 2:00 PM, Jens Alfke j...@mooseyard.com wrote: On Sep 21, 2009, at 1:24 PM, Kyle Sluder wrote: You might want to review your favorite C documentation. I always preferred KR. Specifically, look up the keyword extern in the index. —Jens ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/devlists%40shadowlab.org This email sent to devli...@shadowlab.org -- Jean-Daniel ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
CoreData SQL tracing...
Sorry for asking this but I was unable to find this in the archives even though I know I read it here before. How can I turn on logging/tracing of the SQL statements issued by CoreData? I need this for an iPhone app running in the simulator. Thanks, Brian. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Oh notification, where are you?
On 2009 Sep 21, at 23:20, Michael Thon wrote: I did find the problem - my thread needs a runloop in order to process notifications. Following this fellow's blog post: http://confuseddevelopment.blogspot.com/2006_10_01_archive.html I added CFRunLoopRun(); after starting the metadataquery. Inside the method that gets called to process the notification I added: CFRunLoopStop(CFRunLoopGetCurrent ()); to stop the runloop. Oh, then if you are using Mac OS 10.5, make sure that this still works in Mac OS 10.6. If not, read my post on this list on 2009-09-20, subject [SOLVED (but not pretty)] Running run loops in 10.6. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSArrayController addObject or insertObject:atArrangedObjectIndex:
On 22/09/2009, at 5:18 PM, Dave Keck wrote: It looks like dataRowsController is no longer a valid object by the time -addObject:/-insertObject: is called on it. Thanks for the reply Dave. That doesn't seem to be the problem. dataRowsController is hooked up via Interface Builder to the NSArrayController. I know it's valid because the method in my code [dataRowsController selectionIndex] works, as does a test method [dataRowsController content]. I think I've found the problem though. It seems that the addObject: or insertObject: method call on the controller actually calls the getter then the setter for the whole array. I had an NSLog in my getter that was actually causing the error: - (void) setDataRows:(NSMutableArray *)newDataRows { NSLog(@setDataRows: count == %@, [newDataRows count]); [dataRows autorelease]; dataRows = newDataRows; [dataRows retain]; } Once I removed the NSLog line (or just the [newDataRows count] method), it works fine. Two followup questions: 1. Why can't I use the array count in the NSlog like that? 2. Does addObject: and insertObject: actually just get the whole array, add the extra object, then write the whole array back to the instance variable? I thought it would be more efficient than that. Thanks, Tom BareFeet ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSArrayController addObject or insertObject:atArrangedObjectIndex:
On 22/09/2009, at 10:40 PM, BareFeet wrote: NSLog(@setDataRows: count == %@, [newDataRows count]); Once I removed the NSLog line (or just the [newDataRows count] method), it works fine. Two followup questions: 1. Why can't I use the array count in the NSlog like that? [collection count] returns an NSUInteger, not an object, so the %@ format specifier is incorrect - you want %d. I expect that was causing some mangling. --Graham ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSArrayController addObject or insertObject:atArrangedObjectIndex:
On 22/09/2009, at 10:40 PM, BareFeet wrote: 2. Does addObject: and insertObject: actually just get the whole array, add the extra object, then write the whole array back to the instance variable? I thought it would be more efficient than that. Not sure why you think this is inefficient, especially. An array in this context is just a pointer to the array object - fetching the whole array doesn't move anything, it just returns the pointer. Writing back means what exactly? Doing a retain/release? That also doesn't move or copy anything - it's super-cheap. If the array is copied along the way there may be some overhead but it may not be all that much. --Graham ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
OR compositing operation?
Hi, I'd like to draw in a graphics context in such a compositing mode: R = MAX(S, D) i.e. out of two colors (source and destination), the maximum color (channel-wise) was chosen. This is basically equivalent to ORing the colors. Is this possible? I don't see such NSCompositingOperation. There's only NSCompositeXOR, but no NSCompositeOR... Thanks! ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
OR compositing operation?
On 22 Sep, 2009, at 15:22, Oleg Krupnov wrote: Hi, I'd like to draw in a graphics context in such a compositing mode: R = MAX(S, D) i.e. out of two colors (source and destination), the maximum color (channel-wise) was chosen. This is basically equivalent to ORing the colors. Is this possible? I don't see such NSCompositingOperation. There's only NSCompositeXOR, but no NSCompositeOR... I'm not quite sure what you mean by maximum color (channel-wise). Do you mean Rr = (Sr Dr) ? Sr : Dr Rg = (Sg Dg) ? Sg : Dg Rb = (Sb Db) ? Sb : Db A quick google threw up http://my.safaribooksonline.com/0672322307/ch14 for the compositing operations. The logic operation XOR appears to be binary (opaque/transparent). It might be that what you want is simply called something else (like NSCompositeSourceOver). A long time ago I remember XORing pixels D' = (S XOR D) changed the colour and (S XOR D') changed it back again. But that was bitwise XOR, ie. Rr0 = Sr0 XOR Dr0 Rr1 = Sr1 XOR Dr1 ... etc. And finally, mathematically, A OR B = (A XOR B) XOR (A AND B) I wonder if any of that helps? :-) ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: OR compositing operation?
Thanks for quick reply. Rr = (Sr Dr) ? Sr : Dr Rg = (Sg Dg) ? Sg : Dg Rb = (Sb Db) ? Sb : Db Yes, that's what I want. After giving it another thought, I see that it's not equivalent to bitwise OR, say MAX (1,2) = 2, wheres OR (1,2) = 3. Anyway, I would like to know if it's possible to use the MAX compositing operation (this time I need MAX, but maybe I will also need other, such as MIN, OR, AND, NOT, whatever). I have checked all values of NSCompositingOperation, but haven't found what I need. They all seem to be dealing with transparency mostly, not with color values. Any ideas? Here's where I found this problem. I'm implementing a cross-fade animation of text. One string fades out, and another string fades in at the same time. The problem is that in areas where the text glyphs from the two strings overlap, the sum of colors results in brighter pixels than each of the strings taken separately. This results in an annoying flash of brighter color in the middle of the animation. I'd like to fix it by limiting the brightness of all pixels by the value of the text color. On Tue, Sep 22, 2009 at 4:58 PM, Colin Howarth co...@howarth.de wrote: On 22 Sep, 2009, at 15:22, Oleg Krupnov wrote: Hi, I'd like to draw in a graphics context in such a compositing mode: R = MAX(S, D) i.e. out of two colors (source and destination), the maximum color (channel-wise) was chosen. This is basically equivalent to ORing the colors. Is this possible? I don't see such NSCompositingOperation. There's only NSCompositeXOR, but no NSCompositeOR... I'm not quite sure what you mean by maximum color (channel-wise). Do you mean Rr = (Sr Dr) ? Sr : Dr Rg = (Sg Dg) ? Sg : Dg Rb = (Sb Db) ? Sb : Db A quick google threw up http://my.safaribooksonline.com/0672322307/ch14 for the compositing operations. The logic operation XOR appears to be binary (opaque/transparent). It might be that what you want is simply called something else (like NSCompositeSourceOver). A long time ago I remember XORing pixels D' = (S XOR D) changed the colour and (S XOR D') changed it back again. But that was bitwise XOR, ie. Rr0 = Sr0 XOR Dr0 Rr1 = Sr1 XOR Dr1 ... etc. And finally, mathematically, A OR B = (A XOR B) XOR (A AND B) I wonder if any of that helps? :-) ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Displaying Strings in custom formats
Hi All, I have a set of lines and needs to display in following format. *This is the list which has a* - the string quality - the another quality - the another quality Now this will explain *some meaning* text in a paragraph with a link say www.google.com. So what is the better approch? I have thought of 2 approches. 1. To read the entire strings from RTF file and dump onto NSTextView. This i tried and worked fine. Only thing is when the mouse was taken over the link, the hand cutsor did not appear. Also it has a drawback that i can't configure the colour of link in RTF. 2. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Displaying Strings in custom formats
Hi All, I have a set of lines and needs to display in following format. *This is the list which has a* - the string quality - the another quality - the another quality Now this will explain *some meaning* text in a paragraph with a link say www.google.com. So what is the better approch? I have thought of a approches. 1. To read the entire strings from RTF file and dump onto NSTextView. This i tried and worked fine. Only thing is when the mouse was taken over the link, the hand cutsor did not appear. Also it has a drawback that i can't configure the colour of link in RTF. Is there any better approch? Thanks Arun KA ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: OR compositing operation?
Thanks for quick reply. Rr = (Sr Dr) ? Sr : Dr Rg = (Sg Dg) ? Sg : Dg Rb = (Sb Db) ? Sb : Db Yes, that's what I want. After giving it another thought, I see that it's not equivalent to bitwise OR, say MAX (1,2) = 2, wheres OR (1,2) = 3. Anyway, I would like to know if it's possible to use the MAX compositing operation (this time I need MAX, but maybe I will also need other, such as MIN, OR, AND, NOT, whatever). I have checked all values of NSCompositingOperation, but haven't found what I need. They all seem to be dealing with transparency mostly, not with color values. Any ideas? Here's where I found this problem. I'm implementing a cross-fade animation of text. One string fades out, and another string fades in at the same time. The problem is that in areas where the text glyphs from the two strings overlap, the sum of colors results in brighter pixels than each of the strings taken separately. This results in an annoying flash of brighter color in the middle of the animation. I'd like to fix it by limiting the brightness of all pixels by the value of the text color. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Displaying Strings in custom formats
If you generate HTML you can get better control over formatting using CSS. Or you can build the formatted text directly using NSAttributedString, although this can be a pain. --Jens {via iPhone} On Sep 22, 2009, at 7:56 AM, Arun arun...@gmail.com wrote: Hi All, I have a set of lines and needs to display in following format. *This is the list which has a* - the string quality - the another quality - the another quality Now this will explain *some meaning* text in a paragraph with a link say www.google.com. So what is the better approch? I have thought of a approches. 1. To read the entire strings from RTF file and dump onto NSTextView. This i tried and worked fine. Only thing is when the mouse was taken over the link, the hand cutsor did not appear. Also it has a drawback that i can't configure the colour of link in RTF. Is there any better approch? Thanks Arun KA ___ 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/jens%40mooseyard.com This email sent to j...@mooseyard.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: CoreData SQL tracing...
On 9/22/09 9:23 PM, Brian Bruinewoud said: Sorry for asking this but I was unable to find this in the archives even though I know I read it here before. How can I turn on logging/tracing of the SQL statements issued by CoreData? I need this for an iPhone app running in the simulator. Perhaps you're thinking of -com.apple.CoreData.SQLDebug 1 (passed as arguments to the app). -- Sean McBride, B. Eng s...@rogue-research.com 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 arch...@mail-archive.com
Re: NSArrayController addObject or insertObject:atArrangedObjectIndex:
On 9/22/09 11:00 PM, Graham Cox said: On 22/09/2009, at 10:40 PM, BareFeet wrote: NSLog(@setDataRows: count == %@, [newDataRows count]); Once I removed the NSLog line (or just the [newDataRows count] method), it works fine. Two followup questions: 1. Why can't I use the array count in the NSlog like that? [collection count] returns an NSUInteger, not an object, so the %@ format specifier is incorrect - you want %d. I expect that was causing some mangling. %d is certainly less wrong than %@ but the most appropriate would be %lu. See: http://developer.apple.com/mac/library/DOCUMENTATION/Cocoa/Conceptual/ Strings/Articles/formatSpecifiers.html#//apple_ref/doc/uid/TP40004265 -- Sean McBride, B. Eng s...@rogue-research.com 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 arch...@mail-archive.com
Re: Core Data memory not freed after reset
On 9/21/09 4:21 PM, Ben Trumbull said: If you're using an NSArrayController in Entity mode, you can turn on Use Lazy Fetching. You'll want to disable auto-rearrange content. Ben, May I ask, why turn off 'auto-rearrange content'? Is it not compatible with 'use lazy fetching'? Or does 'auto-rearrange content' on its own degrade performance somehow? Thanks, -- Sean McBride, B. Eng s...@rogue-research.com 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 arch...@mail-archive.com
Re: NSUndoManager vs @synthesize
Pierre Bernard wrote: Do I still need to write my own accessors in order to perform NSUndoManager registration? Could my model objects observe themselves and register undoable changes in observeValueForKeyPath:ofObject:change:context: ? How does CoreData go about registering changes with the undo manager? Is this done by @synthesize setter or by the NSManagedObjectContext watching the model objects? Is it bad etiquette to do a ping on somebody else’s post? =) I too would really like to hear what the current best practices are for our brave new world of declared properties and synthesized accessors. Does anybody have any experience/suggestions they can share? Best, Benjamin Rister___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Using radio buttons to set an image in an image view
Hi,I want to display one of four images depending on the selection of a set of four radio buttons with tags set to 0,1,2 and 3. The images are in the project root with names one.jpg, two.jpg, etc. I have declared an action in MyDocument called chooseAction and the NSMatrix of radio buttons is connected in such a way that the chooseAction action can detect the value of the tag. This works. I can set the initial value of the image by using actionImagePath = [NSMutableString stringWithString: @/Users/.../one.jpg]; // the full path is hard coded at the moment - worry about that later as the value path for the image view is bound to actionImagePath. What I cannot do is change the image. When I click on the second radio button, I use [actionImagePath setString:@/Users/.../two.jpg]; but the image does not change. Any help with this would be gratefully received. thnx ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Controlling Spaces and retrieving information about the current Space?
I'm fairly new to the Cocoa world and completely new to this mailing list. I hope that I'm posting this question to the correct forum. If not, I'd be grateful for a pointer to a more appropriate place to repost this. Before coming here, I tried to locate the answer I'm looking for on the net. I couldn't find it, but that might just be due to the fact that I don't know the proper way to formulate the question and thereby construct a meaningful search. So again I beg the indulgence of all of you if there are one or more other locations where the answer to my question can be easily found. I actually have two related questions. They both pertain to the Spaces application in Snow Leopard. Is there a way in Cocoa to programmatically query which Space the user is currently looking at? In other words, if I have six Spaces defined and Space 3 happens to be the one which is currently visible on my screen, how can I make some sort of Cocoa-based query to find out that Space 3 is the one that's currently visible? Secondly, is there any way in any of those environments to programmatically switch Spaces? For example, if Space 3 happens to be visible, is there any Cocoa code I can run which will switch the visibility to, say, Space 2? Thanks in advance for any pointers to docs that you can provide. -- HippoMan apple.hippo...@gmail.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Confused about the displaylink callback
Hi I am trying to learn a bit Core Video, and have read through the programming guide several times. In short, I want to use Core Video to display video, but I want to get the frames from ffmpeg. So far I have a very basic working setup, where it actually does display my frames by drawing with Core Image into the opengl context as the example in the CV programming guide. One thing that confuses me though is that it is stated that the display link takes care of the syncing in that way that it calls back when it needs a new frame to display. I'm not sure I'm understanding this correctly though as my callback runs really fast. So, do I need to pass some kind of timebase or something to the display link so that it know how frequently it needs to request a frame. Or do I actually need to decide in the callback wether I want to give it a frame or not? In that case, should I have it render the last frame if I don't have a new one? I can see how it wants to render with the display frame rate, but the movie probably wont have a fps that is the same as the screen refresh rate. My first thought when I read about it was nice, it will just ask for a frame at the correct frame rate. Obviously it doesn't work like that for me. So either I misunderstood the whole concept, or I am missing to tell it how often to call back for a frame. So, I'm not after actual code here, but the theory behind it, as I cannot really sort it out by reading the programming guide. Please bear with me, I know I'm a bit in over my head here, but I won't learn unless I try to push it. :) So, is there anyone that has experience with Core Video that would be willing to shortly explain the theory behind it in regards to the callback frequency. Thanks! Kenny ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: an app that never quits
The Apple iPhone Developer Forum is at- https://devforums.apple.com/community/iphone You will need to log in using your dev account. Best of luck with your application. While the lack of background processing is problematic for many applications, there is still a large variety of apps that can be developed (and hence the 50K+ in the store today...) Greg I actually looked for iPhone specific mailing lists ( but didn't find any and since it seemed to me that iPhone development is actually Cocoa development, I asked here... if you could point me to the location of the iPhone mailing lists I'd appreciate it. I looked here: http://lists.apple.com/mailman/listinfo but the only iPhone list I found had to do with some government thing. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: an app that never quits
On Sep 21, 2009, at 11:31 PM, Kyle Sluder wrote: On Mon, Sep 21, 2009 at 11:30 PM, Erick Calder e...@arix.com wrote: wow. ok. I guess that's not going to help much then. I must say that without daemons the range of applications possible seems rather quite narrow to me. Background processing is a much-desired feature. You can add your voice by filing a bug at http://bugreport.apple.com. But keep in mind that the realities of battery power and 3G networks limit the kind of background processing that's feasible — that's the main reason Apple hasn't let 3rd party apps run in the background yet. - If your daemon made a connection to a server every 15 minutes to poll for data, it would reduce battery life. (Yes, the built-in mail app does this if you're not using push notification, and that already reduces battery life; adding more apps doing that would make it a lot worse.) - If your daemon opened a socket and left it open forever waiting for messages, as IM services do, it would keep the device's radio active to maintain IP connectivity, which would drain the battery. Apple's push notification system uses a similar type of of GSM signaling as SMS messages, so it doesn't require any extra overhead. The carrier sends a signal when a push message is available, and the device wakes up and makes a connection to retrieve the message data. What is feasible, I think, is to allow the notifications to launch the app in some kind of limited background mode where it can do a little bit of processing and then either exit or alert the user. And the notifications could contain larger payloads, so the app could operate directly on the notification without having to make its own connection to fetch data. [Disclaimer: I'm not an expert on mobile devices, batteries or GSM/3G radios. This is all stuff I've had explained to me over the past year or two by people who know more than I do.] —Jens___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
RTF in MultilineTextField
Hi, I have written a sample code which displays the contents of RTF file in Mutiline text filed. The RTF file has a text which is styled like a web-link. when i run the program, the link appears as a normal text. But if i click on the textfiled area it appears properly. why this is behaving like this? Thanks Arun KA code.tar.gz Description: GNU Zip compressed data ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Controlling Spaces and retrieving information about the current Space?
On Sep 21, 2009, at 4:39 PM, Hippo Man wrote: Is there a way in Cocoa to programmatically query which Space the user is currently looking at? In other words, if I have six Spaces defined and Space 3 happens to be the one which is currently visible on my screen, how can I make some sort of Cocoa-based query to find out that Space 3 is the one that's currently visible? You could use the (CoreGraphics, not Cocoa) API CGWindowListCreateDescriptionFromArray to get a window description dictionary for a window, and then look at the WorkspaceID data in that dictionary. There is no defined mapping from WorkspaceID to a particular space, however. Secondly, is there any way in any of those environments to programmatically switch Spaces? For example, if Space 3 happens to be visible, is there any Cocoa code I can run which will switch the visibility to, say, Space 2? No, there is no API (in Cocoa or otherwise) to control the active space. -eric ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: drawing/masking one image with the alpha value from another
On Sep 21, 2009, at 9:32 PM, Roland King wrote: I'm trying to construct an image which is colored according to the alpha value of a different image. I've been hunting around the Quartz Core docs and I can't figure out a good way to do this. The motivation is to do something similar to what apple does on the iphone tabbar items which are drawn white or blue using the alpha of the image you supply and it's a pretty good effect I want to reuse. Just use your second image as a mask via CGContextClipToMask(). If you use a normal image, then the alpha values are used as alpha for the drawing you do which should do exactly what you want. -- David Duncan Apple DTS Animation and Printing ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: OR compositing operation?
On Sep 22, 2009, at 6:22 AM, Oleg Krupnov wrote: Hi, I'd like to draw in a graphics context in such a compositing mode: R = MAX(S, D) i.e. out of two colors (source and destination), the maximum color (channel-wise) was chosen. This is basically equivalent to ORing the colors. This is the Lighten blend mode (kCGBlendModeLighten). There doesn't appear to be a corresponding NS composting mode, and I'm not sure why, but you can easily get a CGContext from an NSGraphicsContext by asking it for its graphicsPort, so this shouldn't be hard to integrate. -- David Duncan Apple DTS Animation and Printing ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Controlling Spaces and retrieving information about the current Space?
There is very little external control over Spaces. Be sure to file enhancement request radars. So far we have the following: 1) In 10.6 you can ask a window whether or not it is on the active Space ( [NSWindow isOnActiveSpace]) 2) CGWindow.h allows you to query for the space id (kCGWindowWorkspace) that a window is on. Note that this key is only present on visible windows. The API that you use is CGWindowListCreateDescriptionFromArray this API is slow (I saw a lot of time spent in XML decoding on 10.5), so try to use it as little as possible 3) When you create a new document window (and show it), it is placed on the active Space Combine these as needed. For example, to determine whether or not a (candidate) window is on the active Space on 10.5, I ended up doing: - Creating a new 1 by 1 document window show it. Use #2 to get its space id. I now have the id of the active space. (dispose of the window) - Get the space id for the candidate window compare with the id calculated above Obviously this is not desirable code, but this is all we have at the current point in time. Jesper On Sep 21, 2009, at 4:39 PM, Hippo Man wrote: I'm fairly new to the Cocoa world and completely new to this mailing list. I hope that I'm posting this question to the correct forum. If not, I'd be grateful for a pointer to a more appropriate place to repost this. Before coming here, I tried to locate the answer I'm looking for on the net. I couldn't find it, but that might just be due to the fact that I don't know the proper way to formulate the question and thereby construct a meaningful search. So again I beg the indulgence of all of you if there are one or more other locations where the answer to my question can be easily found. I actually have two related questions. They both pertain to the Spaces application in Snow Leopard. Is there a way in Cocoa to programmatically query which Space the user is currently looking at? In other words, if I have six Spaces defined and Space 3 happens to be the one which is currently visible on my screen, how can I make some sort of Cocoa-based query to find out that Space 3 is the one that's currently visible? Secondly, is there any way in any of those environments to programmatically switch Spaces? For example, if Space 3 happens to be visible, is there any Cocoa code I can run which will switch the visibility to, say, Space 2? Thanks in advance for any pointers to docs that you can provide. -- HippoMan apple.hippo...@gmail.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/jsbache%40adobe.com This email sent to jsba...@adobe.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Suppressing Crash Reporter dialogs for a task
I have an application that launches an NSTask and checks to see if it returned successfully. The task checks the validity of certain files and in some cases, the task could definitely crash if the data is corrupt - that is the whole purpose of launching a separate task. This is not a problem as the application notifies the user if the task was not successful. However, when the task crashes, a Crash Reporter dialog appears which could be confusing for the user and ugly if several appear at once. Is there any way to suppress these messages and prevent them from appearing? I know there is a terminal command to suppress Crash Reporter dialogs for the entire OS - is there a similar method of suppressing them for a single app or task? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: RTF in MultilineTextField
On Sep 22, 2009, at 9:12 AM, Arun wrote: I have written a sample code which displays the contents of RTF file in Mutiline text filed. The RTF file has a text which is styled like a web-link. when i run the program, the link appears as a normal text. But if i click on the textfiled area it appears properly. Try using an NSTextView instead. Text fields are lighter-weight than text views and sort of 'cheat' in the way they draw the text when not active; I think there might be some glitches in the case of special highlighting like for links. (Also keep in mind that the shorter the piece of code you post, the more likely that someone will read it. Most people aren't going to volunteer to read through an entire source file looking for bugs.) —Jens___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Suppressing Crash Reporter dialogs for a task
On Tue, Sep 22, 2009 at 9:47 AM, Mark Woods mwoods...@googlemail.com wrote: The task checks the validity of certain files and in some cases, the task could definitely crash if the data is corrupt - that is the whole purpose of launching a separate task. This is not a problem as the application notifies the user if the task was not successful. Perhaps instead of crashing, you should design this tool to return nonzero if the file is invalid? --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 arch...@mail-archive.com
Re: Suppressing Crash Reporter dialogs for a task
Easier said than done. It's QuickTime that's crashing. I'm calling canInitWithFile first and checking for errors with movieWithFile:error: but in certain instances it will still crash. On Sep 22, 2009, at 5:53 PM, Kyle Sluder wrote: On Tue, Sep 22, 2009 at 9:47 AM, Mark Woods mwoods...@googlemail.com wrote: The task checks the validity of certain files and in some cases, the task could definitely crash if the data is corrupt - that is the whole purpose of launching a separate task. This is not a problem as the application notifies the user if the task was not successful. Perhaps instead of crashing, you should design this tool to return nonzero if the file is invalid? --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 arch...@mail-archive.com
Re: Suppressing Crash Reporter dialogs for a task
On Sep 22, 2009, at 9:47 AM, Mark Woods wrote: However, when the task crashes, a Crash Reporter dialog appears which could be confusing for the user and ugly if several appear at once. Is there any way to suppress these messages and prevent them from appearing? I'm pretty sure there is, but I don't see anything relevant in NSTask.h. It's possible you have to use lower-level calls like fork/ exec to get that degree of control. The task checks the validity of certain files and in some cases, the task could definitely crash if the data is corrupt - that is the whole purpose of launching a separate task. This is not a problem as the application notifies the user if the task was not successful. This kind of rings an alarm bell in my head. The problem is that, if your subtask isn't explicitly handling invalid data, it could do far worse things than simply crash. For example, it could go into an infinite loop, or start allocating memory like crazy till it fills up its address space (which can drag the user's system to its knees for a while). Worst, it's possible that malicious data could be used to take over the process and run arbitrary code — there have been many attacks on web browsers that exploited buffer-overrun bugs in decoders for innocuous data types like JPEG files. Sure, you could use the sandbox API to run the task without privileges to do nasty stuff to the user's system, and call setrlimit to limit its address space, and you set some arbitrary timeout to decide that it's gone into the weeds and kill it. But I think it makes more sense to write the parser defensively in the first place. —Jens___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: IB does not show Outlet/Action section in inspector
On Tue, 22 Sep 2009 08:57:14 +0200, Michael S?ssner michael.suess...@utanet.at said: When I select an object in IB, the inspector does not display the outlet/action section. Is this a bug? I have installed Xcode on another computer and experienced the same behaviour. I am using Xcode3.2 and snow leopard. (1) This is an Xcode question, not a Cocoa question, and belongs on the Xcode list. (2) Select *how*? Single-clicking an object in IB does not change what the inspector shows; it is up to you to navigate the inspector. Double-clicking an object in IB does not bring up a dialog where you can create outlets and actions, as it did in earlier versions; instead, you create outlets and actions in Xcode (in your header, in code) and IB automatically sees them. m. -- matt neuburg, phd = m...@tidbits.com, http://www.tidbits.com/matt/ A fool + a tool + an autorelease pool = cool! AppleScript: the Definitive Guide - Second Edition! http://www.tidbits.com/matt/default.html#applescriptthings ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Using radio buttons to set an image in an image view
On Tue, 22 Sep 2009 11:40:10 +0100, Martin Hawkins martin.hawk...@gmail.com said: I can set the initial value of the image by using actionImagePath = [NSMutableString stringWithString: @/Users/.../one.jpg]; // the full path is hard coded at the moment - worry about that later as the value path for the image view is bound to actionImagePath. What I cannot do is change the image. When I click on the second radio button, I use [actionImagePath setString:@/Users/.../two.jpg]; That change is happening behind the back of KVO (key-value observing), so the binding does not know about it. m. -- matt neuburg, phd = m...@tidbits.com, http://www.tidbits.com/matt/ A fool + a tool + an autorelease pool = cool! AppleScript: the Definitive Guide - Second Edition! http://www.tidbits.com/matt/default.html#applescriptthings ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
UITableView Custom cell with image
I have a UITableViewCell with a UIImageView that's 44X44 pixels. I'm loading three different tables with a total of around 200 images none of which are more than 100k. So. My problem is memory warnings that cause the app to quit quite unceremoniously. I have tried loading the image when the cell is viewed. That makes an ugly stutter. And no help with memory warnings. I have tried storing the image in memory and simple adding the image to the UIImageView when the cell is returned. Same problem, lots of stutter and memory warnings. What can I do to have the image in the cell, without the memory problems? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Suppressing Crash Reporter dialogs for a task
On 22 Sep 2009, at 18:01, Jens Alfke wrote: On Sep 22, 2009, at 9:47 AM, Mark Woods wrote: However, when the task crashes, a Crash Reporter dialog appears which could be confusing for the user and ugly if several appear at once. Is there any way to suppress these messages and prevent them from appearing? I'm pretty sure there is, but I don't see anything relevant in NSTask.h. It's possible you have to use lower-level calls like fork/ exec to get that degree of control. This is getting a bit off-topic, but I don't think you'll be able to do that even at that level. The crash report mechanism, AFAIK, works by using the Mach exception port for the process to trigger a crash report when it crashes. If you was *your* process that crashed, on normal UNIX-like systems you can use signal handlers to catch the crash and do something about it. Likewise, on a normal UNIX-like platform you'd get a SIGCHLD from the system and you could check the process exit status. Or you could act as a debugger using the ptrace() API. On OS X though, you can't (or couldn't, last I checked which was some time ago) intercept the system crash reporter using signal-related APIs because it's triggered by the lower-level Mach exception port. Even if you somehow handle the signal (in the parent or the child process), the crash reporter is still triggered via the Mach exception port. And when I last looked at the sources for the OS X version of GDB, it was somewhat more hairy than the simple ptrace() API might lead you to believe... plus in any case QuickTime is probably one of those programs that acts to defend itself against debugging. Of course, I haven't looked to see if any of this has changed on Snow Leopard... The task checks the validity of certain files and in some cases, the task could definitely crash if the data is corrupt - that is the whole purpose of launching a separate task. This is not a problem as the application notifies the user if the task was not successful. This kind of rings an alarm bell in my head. The problem is that, if your subtask isn't explicitly handling invalid data, it could do far worse things than simply crash. Agreed. The OP should validate the data in his own code first if there is any risk that it might be booby-trapped somehow. *And* report the crashes to Apple as they're clearly bugs. 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 arch...@mail-archive.com
Re: UITableView Custom cell with image
On Sep 22, 2009, at 12:26 PM, Development wrote: I have a UITableViewCell with a UIImageView that's 44X44 pixels. I'm loading three different tables with a total of around 200 images none of which are more than 100k. So. My problem is memory warnings that cause the app to quit quite unceremoniously. I have tried loading the image when the cell is viewed. That makes an ugly stutter. And no help with memory warnings. I have tried storing the image in memory and simple adding the image to the UIImageView when the cell is returned. Same problem, lots of stutter and memory warnings. What can I do to have the image in the cell, without the memory problems? Don't load all of the images into memory. 200 images X 100K/image = 20MB. I don't think iPhone applications can use that much memory successfully. -- Rick Genter rick.gen...@gmail.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: UITableView Custom cell with image
Please post your code. One app I have displays a list of 1,089 items. Three rows are visible on the screen and each row displays an image of size 89 x 128. I use the standard method of reusing table cells and simply assign the image only when the cell is to be displayed. There is some stuttering, but only if I try to flick through the list very fast. Normal swipes are fluid. This is also on a 3G iPhone. Sent from my iPhone On Sep 22, 2009, at 2:26 PM, Development developm...@fornextsoft.com wrote: I have a UITableViewCell with a UIImageView that's 44X44 pixels. I'm loading three different tables with a total of around 200 images none of which are more than 100k. So. My problem is memory warnings that cause the app to quit quite unceremoniously. I have tried loading the image when the cell is viewed. That makes an ugly stutter. And no help with memory warnings. I have tried storing the image in memory and simple adding the image to the UIImageView when the cell is returned. Same problem, lots of stutter and memory warnings. What can I do to have the image in the cell, without the memory problems? ___ 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/rsharp%40mac.com This email sent to rsh...@mac.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: drawing/masking one image with the alpha value from another
On Tue, Sep 22, 2009 at 9:20 AM, David Duncan david.dun...@apple.comwrote: On Sep 21, 2009, at 9:32 PM, Roland King wrote: I'm trying to construct an image which is colored according to the alpha value of a different image. I've been hunting around the Quartz Core docs and I can't figure out a good way to do this. The motivation is to do something similar to what apple does on the iphone tabbar items which are drawn white or blue using the alpha of the image you supply and it's a pretty good effect I want to reuse. Just use your second image as a mask via CGContextClipToMask(). If you use a normal image, then the alpha values are used as alpha for the drawing you do which should do exactly what you want. Also, this bit So for instance if I my drawing color is D and the point on my underlying image is {r,g,b,a}, I want to draw a point of color S * a. seems to have a typo, but there are compositing modes for whatever operation you're talking about here. DestinationIn is Result = DestinationColor * SourceAlpha. So you could do CGContextBeginTransparencyLayer, draw mask with SourceOver, draw color to be masked with DestinationIn, CGContextEndTransparencyLayer. There are quite a few modes that use only the alpha channel from either source or destination. -Ken ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: UITableView Custom cell with image
First, you should be reusing table cells as a basic first step. If you're not doing that, start now. Second, you should solve your stutter problem by returning the cell right away and asynchronously loading the image into the cell. If you don't hold up cell creation/ display on loading of the image, you won't have stutter, and you can then add the image to the cell when it's ready. Luke On Sep 22, 2009, at 12:26 PM, Development wrote: I have a UITableViewCell with a UIImageView that's 44X44 pixels. I'm loading three different tables with a total of around 200 images none of which are more than 100k. So. My problem is memory warnings that cause the app to quit quite unceremoniously. I have tried loading the image when the cell is viewed. That makes an ugly stutter. And no help with memory warnings. I have tried storing the image in memory and simple adding the image to the UIImageView when the cell is returned. Same problem, lots of stutter and memory warnings. What can I do to have the image in the cell, without the memory problems? ___ 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/luketheh%40apple.com This email sent to luket...@apple.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Core Data memory not freed after reset
On Sep 22, 2009, at 8:54 AM, Sean McBride wrote: On 9/21/09 4:21 PM, Ben Trumbull said: If you're using an NSArrayController in Entity mode, you can turn on Use Lazy Fetching. You'll want to disable auto-rearrange content. Ben, May I ask, why turn off 'auto-rearrange content'? Is it not compatible with 'use lazy fetching'? Or does 'auto-rearrange content' on its own degrade performance somehow? auto-rearrange content is very expensive. Preserve selection can also be expensive, although not nearly as bad. But if we're talking about a million object table view (which is a little odd, btw, most UIs have ... and more instead) then extraneous layout options will add up fast. I have a vague and hazy memory that auto-rearrange content is not compatible with use lazy fetching. If you run into trouble, file a bug, and disable auto-rearrange content as a workaround. - Ben ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Core Data memory not freed after reset
On 9/22/09 1:59 PM, Ben Trumbull said: If you're using an NSArrayController in Entity mode, you can turn on Use Lazy Fetching. You'll want to disable auto-rearrange content. Ben, May I ask, why turn off 'auto-rearrange content'? Is it not compatible with 'use lazy fetching'? Or does 'auto-rearrange content' on its own degrade performance somehow? auto-rearrange content is very expensive. Preserve selection can also be expensive, although not nearly as bad. But if we're talking about a million object table view (which is a little odd, btw, most UIs have ... and more instead) then extraneous layout options will add up fast. Thanks for this info. I have a vague and hazy memory that auto-rearrange content is not compatible with use lazy fetching. If you run into trouble, file a bug, and disable auto-rearrange content as a workaround. I asked because I've just recently turned 'auto-rearrange content' ON in most of my array controllers (so that my tableviews stay sorted when the user changes some string). My tables rarely have more that 10 rows though. I've not yet tried lazy fetching but am now forewarned. :) Thanks, -- Sean McBride, B. Eng s...@rogue-research.com 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 arch...@mail-archive.com
Re: IB does not show Outlet/Action section in inspector
Yeah, I also thought that the Xcode mailing list is the right one. But the list seams to be a little bit inactive. I wanted to know if anyone else has detected the same behaviour. To clarify, I have opened the identity view in the inspector panel and it does not display the add outlet/action section after I have selected an object. :-( g Michael Am 22.09.2009 um 19:25 schrieb Matt Neuburg: On Tue, 22 Sep 2009 08:57:14 +0200, Michael S?ssner michael.suess...@utanet.at said: When I select an object in IB, the inspector does not display the outlet/action section. Is this a bug? I have installed Xcode on another computer and experienced the same behaviour. I am using Xcode3.2 and snow leopard. (1) This is an Xcode question, not a Cocoa question, and belongs on the Xcode list. (2) Select *how*? Single-clicking an object in IB does not change what the inspector shows; it is up to you to navigate the inspector. Double- clicking an object in IB does not bring up a dialog where you can create outlets and actions, as it did in earlier versions; instead, you create outlets and actions in Xcode (in your header, in code) and IB automatically sees them. m. -- matt neuburg, phd = m...@tidbits.com, http://www.tidbits.com/matt/ A fool + a tool + an autorelease pool = cool! AppleScript: the Definitive Guide - Second Edition! http://www.tidbits.com/matt/default.html#applescriptthings Mit freundlichem Gruß Michael Süssner Dipl.-Ing. Wimbergergasse 10-44 1070 Wien Tel: +43 (1) 5268251 Mobil: +43 (676) 7955229 ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Cocoa-dev Digest, Vol 6, Issue 1355
On Sep 21, 2009, Greg Guerin wrote: How do you know the original file at path0 contained several thousand bytes? Because I put them there: [hndl0 writeData:[NSData dataWithBytes:buffer length:lngth]]; and checked them: bytes = [hndl0 seekToEndOfFile]; Is there a possibility it was a file with an empty data-fork but a non-empty resource fork? I don't think so given that seekToEndOFile worked as expected. Also, if the old code ran without any problem, why change it? -- GG There's the rub. The original code used methods that are now deprecated. Don ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: IB does not show Outlet/Action section in inspector
Are you having this problem with all objects or only instances of your own class? Did you use IBOutlet when you declared the outlets? Maybe you could show us your header file. Does it help if you force IB to re-read your header with File - Read Class Files...? --Andy On Sep 22, 2009, at 5:06 PM, Michael Süssner michael.suess...@utanet.at wrote: Yeah, I also thought that the Xcode mailing list is the right one. But the list seams to be a little bit inactive. I wanted to know if anyone else has detected the same behaviour. To clarify, I have opened the identity view in the inspector panel and it does not display the add outlet/action section after I have selected an object. :-( g Michael Am 22.09.2009 um 19:25 schrieb Matt Neuburg: On Tue, 22 Sep 2009 08:57:14 +0200, Michael S?ssner michael.suess...@utanet.at said: When I select an object in IB, the inspector does not display the outlet/action section. Is this a bug? I have installed Xcode on another computer and experienced the same behaviour. I am using Xcode3.2 and snow leopard. (1) This is an Xcode question, not a Cocoa question, and belongs on the Xcode list. (2) Select *how*? Single-clicking an object in IB does not change what the inspector shows; it is up to you to navigate the inspector. Double- clicking an object in IB does not bring up a dialog where you can create outlets and actions, as it did in earlier versions; instead, you create outlets and actions in Xcode (in your header, in code) and IB automatically sees them. m. -- matt neuburg, phd = m...@tidbits.com, http://www.tidbits.com/matt/ A fool + a tool + an autorelease pool = cool! AppleScript: the Definitive Guide - Second Edition! http://www.tidbits.com/matt/default.html#applescriptthings Mit freundlichem Gruß Michael Süssner Dipl.-Ing. Wimbergergasse 10-44 1070 Wien Tel: +43 (1) 5268251 Mobil: +43 (676) 7955229 ___ 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/aglee%40mac.com This email sent to ag...@mac.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: IB does not show Outlet/Action section in inspector
On Sep 22, 2009, at 5:06 PM, Michael Süssner wrote: I have opened the identity view in the inspector panel and it does not display the add outlet/action section after I have selected an object. In IB 3.2, this functionality was moved to the Library window. In the Library window, select the Classes tab, then in the bottom pane select the Outlets or Actions tab. -- Bill Cheeseman b...@cheeseman.name ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: IB does not show Outlet/Action section in inspector
On Tue, Sep 22, 2009 at 2:06 PM, Michael Süssner michael.suess...@utanet.at wrote: Yeah, I also thought that the Xcode mailing list is the right one. But the list seams to be a little bit inactive. Which xcode list you looking at? I see tens of emails a day on the Xcode list. This is the list you want... http://www.lists.apple.com/mailman/listinfo/xcode-users -Shawn ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: FileManager Problem Post OS X 10.6 Installation
___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSManagedObject Initialization Methods Not Called
On Sep 21, 2009, at 4:04 PM, Mike Abdullah wrote: More information please. What store type are you using? On 21 Sep 2009, at 20:12, Richard Somers wrote: I have a core data document based application. When a file on the disk is opened -awakeFromInsert and -awakeFromFetch are never called for one of my NSManagedObject objects. Why is not one of these methods getting called when the object is loaded into memory from disk? Here is a distilled version of my code. The actual code is a little more involved than this but not by much. The code works very well except for the life cycle methods of NSManagedObject. // The Xcode data model has 3 entities: Parent, Child1, and Child2. There are // no relationships. // The Parent class has no properties or methods. It provides a root class // which can be iterated to access all children. @interface Parent : NSManagedObject @end @implementation Parent @end // Child1 has no properties but does have ivars. @interface Child1 : Parent { ivar1; ivar2; } @end @implementation Child1 - (void)awakeFromInsert { [super awakeFromInsert]; // Initialization ... } - (void)awakeFromFetch { [super awakeFromFetch]; // Initialization ... } - (void)didTurnIntoFault { // Cleanup ... } @end // Child2 has properties but no ivars. @interface Child2 : Parent @property (retain) NSNumber *attribute1; @property (retain) NSNumber *attribute2; @end @implementation Child2 @dynamic attribute1; @dynamic attribute2; - (void)awakeFromInsert { [super awakeFromInsert]; // Initialization ... } - (void)awakeFromFetch { [super awakeFromFetch]; // Initialization ... } - (void)didTurnIntoFault { // Cleanup ... } // End of code Results of various actions. Child1 or Child2 object with in memory store Action Life Cycle Result Add Object awakeFromInsert (correct) Remove Object didTurnIntoFault (correct) Child1 object with xml, SQLite, or binary on disk store Action Life Cycle Result Open File nothing (should be awakeFromFetch) Remove Object awakeFromFetch (should be didTurnIntoFault) Child2 object with xml, SQLite, or binary on disk store Action Life Cycle Result Open File awakeFromFetch (correct) Remove Object nothing (should be didTurnIntoFault) As you can see sometimes the corect life cycle method is called and sometimes not. Any insight or comments on what might be the problem would be appreciated. Richard ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: an app that never quits
On Sep 21, 2009, at 11:31 PM, Kyle Sluder wrote: On Mon, Sep 21, 2009 at 11:30 PM, Erick Calder e...@arix.com wrote: wow. ok. I guess that's not going to help much then. I must say that without daemons the range of applications possible seems rather quite narrow to me. Background processing is a much-desired feature. You can add your voice by filing a bug at http://bugreport.apple.com. done. I hope somebody reads this stuff since it's obviously a matter of (poor) policy, rather than of technical difficulty. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: an app that never quits
On Sep 22, 2009, at 3:01 AM, Greg Reichow wrote: The Apple iPhone Developer Forum is at- https://devforums.apple.com/community/iphone You will need to log in using your dev account. thanks for the link. are you using it? I see a Log in now button which, when I press, returns me to the same page... ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: an app that never quits
On Sep 22, 2009, at 9:06 AM, Jens Alfke wrote: On Sep 21, 2009, at 11:31 PM, Kyle Sluder wrote: On Mon, Sep 21, 2009 at 11:30 PM, Erick Calder e...@arix.com wrote: wow. ok. I guess that's not going to help much then. I must say that without daemons the range of applications possible seems rather quite narrow to me. Background processing is a much-desired feature. You can add your voice by filing a bug at http://bugreport.apple.com. one final recourse of a solution for me: is there such a thing as cron on the iPhone whereby I could schedule a bit of processing to occur every x seconds? is there any other solution I'm not thinking of? But keep in mind that the realities of battery power and 3G networks limit the kind of background processing that's feasible — that's the main reason Apple hasn't let 3rd party apps run in the background yet. I understand the concern for battery power, but to legislate daemons out of existence on account of that seems silly since clearly one can still write apps that drain power needlessly and users still get to select which apps they install. I mean, it's not like there isn't a whole community out there to arbitrate whether an app sucks power. Apple's push notification system uses a similar type of of GSM signaling as SMS messages, so it doesn't require any extra overhead. The carrier sends a signal when a push message is available, and the device wakes up and makes a connection to retrieve the message data. What is feasible, I think, is to allow the notifications to launch the app in some kind of limited background mode where it can do a little bit of processing and then either exit or alert the user. And the notifications could contain larger payloads, so the app could operate directly on the notification without having to make its own connection to fetch data. I wholly concur. apps like loopt are a wonderful concept that sadly don't accomplish their purpose given the current policy constraints. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSImage rotation regression?
FYI: a while ago I asked about a possible NSImage rotation regression and Ken responded with: I dropped the code below in a test app, and it seemed to work fine on 10.6 with 90 as the number of degrees. Perhaps you could make a full test app that demonstrates the issue? In doing that I found the problem before I even tried my rotation code. NSString *path = [[NSBundle mainBundle] pathForResource:@img ofType:@cr2]; if (path) { image = [[NSImage alloc] initWithContentsOfFile: path]; } [imageWell setImage: image]; That code, if compiled with the 10.5 SDK, needs rotation. The same code compiled with the 10.6 SDK is already rotated. Trying to rotate again does the wrong thing. Example project that shows the issue (including the image as it came from the camera) at http://www.snafu.org/imagebug.dmg Set the active SDK to 10.6 and compile and run to see the image rotated (without my rotation code being called). Clean, set the active SDK to 10.5, compile and run to see an unrotated image. I've only run this code on 10.6 -- don't know what will happen if run on 10.5. I didn't see any mention of this in the documentation or release notes. Did I miss it? /\/\arc ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Strategies for tracking a tricky (typing) slowdown/lag bug
Many thanks for the reply, Jens, much appreciated. Using sample via the Terminal proved very useful. Interestingly, while I was messing with the settings trying to get it to work, I found something while my app was supposedly idle before I even set it up ready to hammer away at the keys - there was a QuickTime callback (the app can handle various types of file) that was being called repeatedly in the background even when no QuickTime file was being used or viewed. I'd missed this before because I had been so busy sampling and testing the app while hammering the keys that I had failed to do so while idle, so the responsible calls got buried in other stuff. Initial tests suggest this has improved things a little, but I'm not confident it's the only cause. The way that typing would get slower and slower over time, and then speed up again once the app was quit and relaunched, means that I'm still worried there's a nasty memory bug lurking somewhere. Now that the QuickTime bug is out of the way, sampling while typing in full screen is mostly only giving me internal text view methods, and the ones of my own I've already tried commenting out and re-testing to no discernible effect. Sampling only gives me an idea of where the time is being spent, not (at least on the commandline) what is eating up memory (and as I say, I've had no luck with Leaks). And when I try to hammer the keys while running some Instruments - such as Activity Monitor and Zombies at the same time - my MacBook becomes so unresponsive because of the data the Instruments are trying to process that I end up having to reboot. For the record, I'm not using any deprecated APIs in the text system. My app is linked against 10.4 and above, but with runtime checks to use newer methods where possible. So, if run on Leopard or above, for instance, it uses non-contiguous layout etc. (The text system is normally fast, as you say, but has its limitations - for instance, it can slow to a crawl when editing at the top of a long text using justified alignment.) Many thanks again for the pointers. If anyone has any further suggestions for next steps in trying to locate the cause of such a tricky slowdown issue (as I say, the slow down only appears after typing a couple of thousand words, with the app having been running a couple of hours, and is fine when it's relaunched again) for which I'm not having much luck so far with Instruments, I'd be very grateful. All the best, Keith --- On Tue, 9/22/09, Jens Alfke j...@mooseyard.com wrote: From: Jens Alfke j...@mooseyard.com Subject: Re: Strategies for tracking a tricky (typing) slowdown/lag bug To: Keith Blount keithblo...@yahoo.com Cc: cocoa-dev@lists.apple.com Date: Tuesday, September 22, 2009, 12:42 AM On Sep 21, 2009, at 3:40 PM, Keith Blount wrote: My app uses a heavily modified version of the OS X text system and has some typing lag issues. Generally it has always been fine, but in some circumstances typing would slow down (sometimes this is in part attributable to the fault of the OS X text system itself, which can slow to a crawl when trying to deal with even a few thousand words of justified text, but mostly it seems to be the result of a combination of factors in the highly customised and subclassed version of the text system my app uses). The text system is normally really fast. IIRC, it might have some backward-compatibility hacks that will cause it to work less efficiently if it finds that it's been customized in some deprecated ways (instead of just failing.) Are you sure the techniques you're using are the currently recommended ones and you're not using any deprecated APIs? Given that it gets slower over time and with typing, but clears out as soon as it’s quit and re-launched, I figured this must be a memory problem, but Leaks doesn’t seem to give me any useful information The first thing I would use is sampling. Use the 'sample' tool, the sample command in ActivityMonitor, or Shark's CPU sampling mode to see where the time is going. For things that require user interaction, what I usually do is enter sleep 5; sample MyApp 5 at a shell, then immediately click into my app and start banging away at it so it's busy when the sampling begins. —Jens ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Strategies for tracking a tricky (typing) slowdown/lag bug
On Sep 22, 2009, at 3:51 PM, Keith Blount wrote: Many thanks again for the pointers. If anyone has any further suggestions for next steps in trying to locate the cause of such a tricky slowdown issue (as I say, the slow down only appears after typing a couple of thousand words, with the app having been running a couple of hours, and is fine when it's relaunched again) for which I'm not having much luck so far with Instruments, I'd be very grateful. Do you only see the slowdown after *typing* several thousand words, or if you paste several thousand words do you see the same issue? -- Rick Genter rick.gen...@gmail.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Strategies for tracking a tricky (typing) slowdown/lag bug
On Sep 22, 2009, at 3:51 PM, Keith Blount wrote: Initial tests suggest this has improved things a little, but I'm not confident it's the only cause. The way that typing would get slower and slower over time, and then speed up again once the app was quit and relaunched, means that I'm still worried there's a nasty memory bug lurking somewhere. Slowdown doesn't necessarily mean memory leak. Use top or Activity Monitor to look at the 'RPRVT' of your app — that's the amount of non- shared memory it's allocated that's in RAM. Unless you see that ballooning to hundreds of megabytes, I don't think memory is the problem. —Jens___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: an app that never quits
On Sep 22, 2009, at 3:44 PM, Erick Calder wrote: one final recourse of a solution for me: is there such a thing as cron on the iPhone whereby I could schedule a bit of processing to occur every x seconds? No. The current policy on the OS is that 3rd party code does not execute unless the user is visibly in that app. I understand the concern for battery power, but to legislate daemons out of existence on account of that seems silly since clearly one can still write apps that drain power needlessly and users still get to select which apps they install. I mean, it's not like there isn't a whole community out there to arbitrate whether an app sucks power. I don't entirely agree with the policy, but I don't think it's 'silly'. I think you're falling into the classic engineer's mistake of considering any problem you haven't personally worked on to be trivial. :) If an app's not visibly running, you as an end-user can't tell what it's doing. If I install five apps and then my battery starts to go dead after two hours, how do I know which one it was? Or maybe it was some other app that got updated to a new version yesterday, or an app that hasn't updated but its server changed something that's now triggering a latent client-side bug... The reducto-ad-absurdum example that's been given is the [alleged] Task Manager UI in Windows Mobile. Apple doesn't want users to have to grope through cryptic details of heap sizes and 'commit charges' to figure out why their phone doesn't work. To be honest, you kind of missed the big debate about this back in 2008 after the original SDK was released (and again when the push notification service was announced.) You can probably google around to find all the old threads on mailing lists and tech blogs. —Jens___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: an app that never quits
Note that when filing this kind of bug, it's always better to explain more precisely your use case (not just let me have background processes!) as it might help design a suited solution within the constraints of the device (same way Push notifications was proposed to solve many use cases) -- Julien On Wed, Sep 23, 2009 at 12:32 AM, Erick Calder e...@arix.com wrote: On Sep 21, 2009, at 11:31 PM, Kyle Sluder wrote: On Mon, Sep 21, 2009 at 11:30 PM, Erick Calder e...@arix.com wrote: wow. ok. I guess that's not going to help much then. I must say that without daemons the range of applications possible seems rather quite narrow to me. Background processing is a much-desired feature. You can add your voice by filing a bug at http://bugreport.apple.com. done. I hope somebody reads this stuff since it's obviously a matter of (poor) policy, rather than of technical difficulty. ___ 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/jjalon%40gmail.com This email sent to jja...@gmail.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Getting content out of a WebView
I have a simple application which has a WebView and NSTextView and two buttons. Both views are editable. What I'd like to be able to do is edit in either view and then sync with the other view. I can do this in the direction from the NSTextView to the WebView but not vice versa. I'm able to type some HTML in the NSTextView and have it display in the HTML view. And getting the data from the WebView through the mainFrame and dataSource works for the initial contents but not the edited contents. The dataSource always returns the unedited content. I've tried editing in the WebView then turning off editing thinking that this may be needed to push the changes but with no luck. I feel like I am overlooking something simple here, but can't seem to find anything in the documentation. -- Eddie Aguirre ed...@markzware.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSImage rotation regression?
On 23/09/2009, at 8:46 AM, Marco S Hyman wrote: FYI: a while ago I asked about a possible NSImage rotation regression I didn't see any mention of this in the documentation or release notes. Did I miss it? Yep. Have a look at the AppKit release notes, specifically the section: NSImage: Orientation metadata (e.g. exif) now respected by default You probably need to use the - (id)initWithDataIgnoringOrientation: (NSData *)data method that it mentions. -- Rob Keniger ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
automatically send the email from code using NSWorkspace
I've set up some code to send an email from my app like so: [[NSWorkspace sharedWorkspace] openURL: [NSURL URLWithString:eMailString]]; it works fine, but I want to go ahead and have it automatically send the email, rather than display the email on screen (ready to send)... Can someone point me in the correct direction? thanks in advance Jon. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
NSArrayController bindings: next hurdle.
Hi, just when I thought it was safe to go back into the water... So, I have an NSArrayController (in IB). Its Content Array is bound to an NSMutableArray (of 'Element') instance in my AppDelegate. If I alter an Element in a KVC way, then the Array Controller notices this and the NSTableView is updated correctly. I connected some NSButtons to the add:, insert: and remove: actions of the NSArrayController. If I click any of these, the app crashes. I had a look at some sample code (Aperture Edit Plugin - Borders Titles, listed under 'remove:' in the NSArrayController Class Reference) and was astonished to find that the NSArrayController there isn't bound to *any* array. The add and delete buttons there are connected to the App, which then creates objects and simply asks the NSArrayController to addObject: [the object] or remove: [whatever's selected]. So, in this case, the Array Controller has its own internal anonymous array, and is happy to add and delete from that. Is it the case then, that if the NSArrayController is *bound* to an external array, then that external bit of code (in my case my AppDelegate) is responsible for adding and deleting items??? NSObjectController and its subclasses are initialized with the method initWithContent:, passing a content object or nil if you intend to use the content bindings. You can explicitly set the content of an existing controller using the setContent: method. It is far more common to provide content for controllers by establishing a binding to one of their exposed Controller Content bindings. (from the Cocoa Bindings Programming Topics: Providing Controller Content) I didn't pay too much attention to this, since my code doesn't initialize the Controller - IB does that. In any case, it says It is far more common to provide content for controllers by establishing a binding which is presumably why the sample code doesn't do it :-) Is there any hint that add: and remove: et al. won't work in the case that a binding has been established? Or are these still supposed to work, and there's something else wrong with my code? what code? I haven't got any code. I've got bindings and icons in an IB window... *rgh* from GDB: Program received signal: “EXC_BAD_ACCESS”. sharedlibrary apply-load-rules all (thank you GDB) from asm: #13 0x7fff824ba122 in -[NSApplication sendEvent:] #12 0x7fff82584967 in -[NSWindow sendEvent:] #11 0x7fff8266a135 in -[NSControl mouseDown:] #10 0x7fff8269c1a3 in -[NSButtonCell trackMouse:inRect:ofView:untilMouseUp:] #9 0x7fff8266b68b in -[NSCell trackMouse:inRect:ofView:untilMouseUp:] #8 0x7fff825e019d in -[NSControl sendAction:to:] #7 0x7fff825e023e in -[NSApplication sendAction:to:from:] #6 0x7fff826ee668 in -[NSArrayController remove:] #5 0x7fff826ef868 in -[NSArrayController _removeObjectAtArrangedObjectIndex:objectHandler:] #4 0x7fff826efd87 in -[NSArrayDetailBinder removeObjectFromMasterArrayRelationshipAtIndex:selectionMode:] #3 0x7fff826f05ef in -[NSArrayDetailBinder _performArrayBinderOperation:singleObject:multipleObjects:singleIndex:multipleIndexes:selectionMode :] #2 0x7fff82644fde in -[NSArrayDetailBinder _refreshDetailContentInBackground:] #1 0x7fff82645435 in _NSValueOfClassWithSpecialSpecificErrorMessage #0 0x7fff823953cc in objc_msgSend_vtable4 So, once again, please unconfuse me... --colin___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: automatically send the email from code using NSWorkspace
On Sep 22, 2009, at 8:16 PM, jon wrote: it works fine, but I want to go ahead and have it automatically send the email, rather than display the email on screen (ready to send)... Can someone point me in the correct direction? Use NSAppleScript or the scripting bridge. There's some sample code on ADC that will show you how to use the scripting bridge to send a message. 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 arch...@mail-archive.com
Stability on Snow Leopard
Hi, The program which worked perfectly on Leopard, crashes frequently at various stages on Snow Leopard. Also it may or may not crash at the same stage on different runs, e.g. on bringing up a NSSavePanel in a sheet. What do I need to do to make it robust on Snow Leopard. Is it less forgiving in terms of Memory Management? Do I need to go for code signing, will that help improve stability? Thanks, Nick ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSArrayController bindings: next hurdle.
On Tue, Sep 22, 2009 at 7:21 PM, Colin Howarth co...@howarth.de wrote: So, I have an NSArrayController (in IB). Its Content Array is bound to an NSMutableArray (of 'Element') instance in my AppDelegate. No. It's bound to a property of some object. Please be precise; NSMutableArray isn't KVO-compliant, so if you have indeed bound to a property of an array then you're going to have problems. So please describe the ordered collection property to which you've bound your array controller. Are you exposing it as an NSMutableArray? Just an NSArray? Or are you using the ordered to-many accessor methods? --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 arch...@mail-archive.com
Re: Getting content out of a WebView
I don't have example code handy, but I'd try parsing the DOM tree, which is abstracted by a series of Obj-C WebView classes. On Sep 22, 2009, at 5:53 PM, Eddie Aguirre wrote: I have a simple application which has a WebView and NSTextView and two buttons. Both views are editable. What I'd like to be able to do is edit in either view and then sync with the other view. I can do this in the direction from the NSTextView to the WebView but not vice versa. I'm able to type some HTML in the NSTextView and have it display in the HTML view. And getting the data from the WebView through the mainFrame and dataSource works for the initial contents but not the edited contents. The dataSource always returns the unedited content. I've tried editing in the WebView then turning off editing thinking that this may be needed to push the changes but with no luck. I feel like I am overlooking something simple here, but can't seem to find anything in the documentation. -- Eddie Aguirre ed...@markzware.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/colin.cornaby%40mac.com This email sent to colin.corn...@mac.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Stability on Snow Leopard
This question is impossible to answer. My app crashes, why?! Your answer is in the crash logs, stack traces, logged unhandled exceptions… everywhere but this mailing list. If you have a crasher that you have investigated and think is not your fault, *then* you can ask someone to take a look at it. That means posting your code and the stack trace from the crash. --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 arch...@mail-archive.com
Handling a File Drag to my Window
I want to us e the whole window of my application as the drop target for files dragged onto it from the Finder but there are a couple of things I can't seem to figure out: I would like to show some sort of visual feedback. I tried subclassing the content view of the window thinking it would automatically hilite, but I can't get it to. Note I set focus ring to default in IB for this. Also the drag icon doesn't update to show a '+' symbol. After I get the file what should I do to make sure the document is still set up correctly. I currently call my documents readFromURL: ofType: error: method to load the file but I am not sure if that is correct as calling synchronizeWindowTitleWithDocumentName afterwards doesn't change the title of the window to the new file name. Note that I would like to reuse the document and window, not create a new one. This is what I am currently doing inside my NSWindowController subclass: - (void)awakeFromNib{ [[self window] registerForDraggedTypes:[NSArray arrayWithObjects:NSURLPboardType, nil]]; } - (NSDragOperation)draggingEntered:(id NSDraggingInfo)sender { return NSDragOperationGeneric; } - (BOOL)performDragOperation:(id NSDraggingInfo)sender{ NSPasteboard *pboard = [sender draggingPasteboard]; if ( not [[pboard types] containsObject:NSURLPboardType] ) return NO; if( not [[self document] readFromURL:[NSURL URLFromPasteboard:pboard] ofType:@AVR Hex File error:nil]) return NO; [self synchronizeWindowTitleWithDocumentName]; return YES; } thanks for any help! Peter ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: an app that never quits
On Sep 22, 2009, at 5:49 PM, Julien Jalon wrote: Note that when filing this kind of bug, it's always better to explain more precisely your use case (not just let me have background processes!) as it might help design a suited solution within the constraints of the device (same way Push notifications was proposed to solve many use cases) -- Julien good point. https://bugreport.apple.com/cgi-bin/WebObjects/RadarWeb.woa/81/wo/d4pVlGRwwwrvnJzKRwJWhM/4.43 On Wed, Sep 23, 2009 at 12:32 AM, Erick Calder e...@arix.com wrote: On Sep 21, 2009, at 11:31 PM, Kyle Sluder wrote: On Mon, Sep 21, 2009 at 11:30 PM, Erick Calder e...@arix.com wrote: wow. ok. I guess that's not going to help much then. I must say that without daemons the range of applications possible seems rather quite narrow to me. Background processing is a much-desired feature. You can add your voice by filing a bug at http://bugreport.apple.com. done. I hope somebody reads this stuff since it's obviously a matter of (poor) policy, rather than of technical difficulty. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: an app that never quits
On Sep 22, 2009, at 4:27 PM, Jens Alfke wrote: On Sep 22, 2009, at 3:44 PM, Erick Calder wrote: one final recourse of a solution for me: is there such a thing as cron on the iPhone whereby I could schedule a bit of processing to occur every x seconds? No. The current policy on the OS is that 3rd party code does not execute unless the user is visibly in that app. perhaps I an ask the question differently: if you wanted to be able to respond to physical events (say the location of the phone, or time of day, etc.) throughout the day in some unattended fashion, how would you do it? the thought comes about because maybe app visibility is not a problem (if that is really the only requirement) vis-á-vis user involvement i.e. if I could install a trigger to bring up my app and it could just close itself, maybe I could get away with a solution. I understand the concern for battery power, but to legislate daemons out of existence on account of that seems silly since clearly one can still write apps that drain power needlessly and users still get to select which apps they install. I mean, it's not like there isn't a whole community out there to arbitrate whether an app sucks power. I don't entirely agree with the policy, but I don't think it's 'silly'. I think you're falling into the classic engineer's mistake of considering any problem you haven't personally worked on to be trivial. :) you're right, of course. I'm sure much thought has gone into these decisions. still I feel there is a compelling business case for allowing processing in some automatic way i.e. background processing ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: an app that never quits
On 23/09/2009, at 1:06 PM, Erick Calder wrote: perhaps I an ask the question differently: if you wanted to be able to respond to physical events (say the location of the phone, or time of day, etc.) throughout the day in some unattended fashion, how would you do it? You can't. the thought comes about because maybe app visibility is not a problem (if that is really the only requirement) vis-á-vis user involvement i.e. if I could install a trigger to bring up my app and it could just close itself, maybe I could get away with a solution. It's just not possible in the current implementation. As others have stated, file a bug if you want things to change. -- Rob Keniger ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSArrayController bindings: next hurdle.
On 23 Sep, 2009, at 04:46, Kyle Sluder wrote: On Tue, Sep 22, 2009 at 7:21 PM, Colin Howarth co...@howarth.de wrote: So, I have an NSArrayController (in IB). Its Content Array is bound to an NSMutableArray (of 'Element') instance in my AppDelegate. No. It's bound to a property of some object. Please be precise; NSMutableArray isn't KVO-compliant, so if you have indeed bound to a property of an array then you're going to have problems. So please describe the ordered collection property to which you've bound your array controller. Are you exposing it as an NSMutableArray? Just an NSArray? Or are you using the ordered to-many accessor methods? --Kyle Sluder I was trying to be precise :-) Array Controller Attributes: Object Controller: Mode: Object Class: LensElement Prepares Content: yes Editable: yes Array Controller Bindings: Controller Content: Content Array (Trace App Delegate.elements) Bind to: Trace App Delegate Model Key Path: elements Array Controller Connections: Received Actions: remove: --- Push Button (Delete Element) ... Bindings: Content Array---Trace App Delegate / elements Referencing Bindings: arrangedObjects.radius---Value / Table Column (radius) ... elements is an instance of an NSMutableArray. The members of the array are instances of LensElement: @interface LensElement : NSObject { NSNumber*radius; ... } @property (copy, nonatomic) NSNumber*radius; @end @interface TraceAppDelegate : NSObject NSApplicationDelegate { NSWindow*window; NSMutableArray *elements; LensElement *element; } @property (assign) IBOutlet NSWindow *window; @property (assign) NSMutableArray *elements; @property (assign) LensElement *element; @end ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Handling a File Drag to my Window
On 23/09/2009, at 12:48 PM, Peter Zegelin wrote: I would like to show some sort of visual feedback. I tried subclassing the content view of the window thinking it would automatically hilite, but I can't get it to. Note I set focus ring to default in IB for this. Also the drag icon doesn't update to show a '+' symbol. To change the appearance of a view in response to dragging operations, you should implement the -draggingEntered:, -draggingUpdated: and - draggingExited: protocol methods. To make the plus sign appear next to the cursor, you need to return NSDragOperationCopy as the NSDragOperation from the -draggingEntered: and/or -draggingUpdated: protocol methods. Note that this is only appropriate for dragging events where you're actually copying the content. -- Rob Keniger ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Handling a File Drag to my Window
On 23/09/2009, at 12:48 PM, Peter Zegelin wrote: I would like to show some sort of visual feedback. I tried subclassing the content view of the window thinking it would automatically hilite, but I can't get it to. Note I set focus ring to default in IB for this. Also the drag icon doesn't update to show a '+' symbol. The drag cursor will show a + when you return NSDragOperationCopy. No visual drop target feedback is shown by default - you have to do that yourself. Typically this involves having a flag set in your view shows drag highlight that is set on drag enter and cleared on drag exit, drop, etc. At these times you also call -setNeedsDisplay: on the view. In your -drawRect: method you test the flag and if set draw the appropriate highlight. Focus rings don't come into it - they indicate keyboard focus, and are nothing to do with drag/drop. After I get the file what should I do to make sure the document is still set up correctly. I currently call my documents readFromURL: ofType: error: method to load the file but I am not sure if that is correct as calling synchronizeWindowTitleWithDocumentName afterwards doesn't change the title of the window to the new file name. Try calling setFileURL: instead (or maybe as well, before synchronize...) --Graham ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Stability on Snow Leopard
Hi, Thanks for the quick and appropriate reply. My intention was to get some general responses on two things: Memory Management in a program on SnowLeopard (strictly needed?) and the need for code signing. Of course, I'll need to tackle the crash situations individually, and they are a lot. Thanks, Nick On 23-Sep-2009, at 8:18 AM, Kyle Sluder wrote: This question is impossible to answer. My app crashes, why?! Your answer is in the crash logs, stack traces, logged unhandled exceptions… everywhere but this mailing list. If you have a crasher that you have investigated and think is not your fault, *then* you can ask someone to take a look at it. That means posting your code and the stack trace from the crash. --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 arch...@mail-archive.com
Re: NSArrayController bindings: next hurdle.
... And, of course, the accessors are @synthesized in the @implementation. On 23 Sep, 2009, at 05:09, Colin Howarth wrote: On 23 Sep, 2009, at 04:46, Kyle Sluder wrote: On Tue, Sep 22, 2009 at 7:21 PM, Colin Howarth co...@howarth.de wrote: So, I have an NSArrayController (in IB). Its Content Array is bound to an NSMutableArray (of 'Element') instance in my AppDelegate. No. It's bound to a property of some object. Please be precise; NSMutableArray isn't KVO-compliant, so if you have indeed bound to a property of an array then you're going to have problems. So please describe the ordered collection property to which you've bound your array controller. Are you exposing it as an NSMutableArray? Just an NSArray? Or are you using the ordered to-many accessor methods? --Kyle Sluder I was trying to be precise :-) Array Controller Attributes: Object Controller: Mode: Object Class: LensElement Prepares Content: yes Editable: yes Array Controller Bindings: Controller Content: Content Array (Trace App Delegate.elements) Bind to: Trace App Delegate Model Key Path: elements Array Controller Connections: Received Actions: remove: --- Push Button (Delete Element) ... Bindings: Content Array---Trace App Delegate / elements Referencing Bindings: arrangedObjects.radius---Value / Table Column (radius) ... elements is an instance of an NSMutableArray. The members of the array are instances of LensElement: @interface LensElement : NSObject { NSNumber*radius; ... } @property (copy, nonatomic) NSNumber*radius; @end @interface TraceAppDelegate : NSObject NSApplicationDelegate { NSWindow*window; NSMutableArray *elements; LensElement *element; } @property (assign) IBOutlet NSWindow *window; @property (assign) NSMutableArray *elements; @property (assign) LensElement *element; @end ___ 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/colin%40howarth.de This email sent to co...@howarth.de ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Stability on Snow Leopard
On Sep 22, 2009, at 8:16 PM, Navneet Kumar wrote: My intention was to get some general responses on two things: Memory Management in a program on SnowLeopard (strictly needed?) and the need for code signing. Memory management is always required. You can choose between retain/ release or Garbage Collection when targeting Mac OS X. Garbage Collection is not available on the iPhone. Even when choosing GC, it doesn't mean that memory management somehow magically disappears. Code signing? You can sign code for desktop applications, but it isn't required. For iPhone applications, they must be signed upon submission to the app store or when deploying to the device. There is lots of information about doing so in the iPhone developer portal (http://developer.apple.com/ ). Of course, I'll need to tackle the crash situations individually, and they are a lot. If the app is crashing under Snow Leopard, but not under Leopard, it is most likely because of latent bugs in your code that happen to crash under Snow Leopard, but not Leopard. b.bum ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: automatically send the email from code using NSWorkspace
great, found it, Thank you. do you (or someone) know how to get the current machine's default Email address for sending email? rather than typing it into a field like this. emailMessage.sender = [self.fromField stringValue]; thanks again, Jon. On Sep 22, 2009, at 8:35 PM, Nick Zitzmann wrote: On Sep 22, 2009, at 8:16 PM, jon wrote: it works fine, but I want to go ahead and have it automatically send the email, rather than display the email on screen (ready to send)... Can someone point me in the correct direction? Use NSAppleScript or the scripting bridge. There's some sample code on ADC that will show you how to use the scripting bridge to send a message. 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 arch...@mail-archive.com
Re: NSArrayController bindings: next hurdle.
On Tue, Sep 22, 2009 at 8:09 PM, Colin Howarth co...@howarth.de wrote: @property (assign) NSMutableArray *elements; If you're not running with garbage collection, KABOOM. --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 arch...@mail-archive.com
Re: NSArrayController bindings: next hurdle.
On Tue, Sep 22, 2009 at 9:17 PM, Colin Howarth co...@howarth.de wrote: Well *of course* I am now running with garbage collection... Typo, or perhaps I'm misinterpreting the sarcasm? I suppose I should read up on declared properties and garbage collection to try and understand what was kabooming... If you in fact are not using garbage collection, you want to read the Memory Management Programming Guide and commit it to, erm, memory: http://developer.apple.com/mac/library/DOCUMENTATION/Cocoa/Conceptual/MemoryMgmt/MemoryMgmt.html --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 arch...@mail-archive.com
Re: an app that never quits
I had a thought: how do alarms work? the application (the Clock) isn't running all the time, yet, 7am the alarm goes off... how did the Clock get itself started (without my permission)? and if you look at the alarms... there is no Clock window! it's just a message of some kind... so how does that work and can I do the same thing? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: IB does not show Outlet/Action section in inspector
I have the problem with every object even the one from the examples (Apple). I have instantiated an NSObject from the IB Library and then I've tried to add an outlet. Still, no outlet section in the inspector (identity). g Michael Am 22.09.2009 um 23:23 schrieb Andy Lee: Are you having this problem with all objects or only instances of your own class? Did you use IBOutlet when you declared the outlets? Maybe you could show us your header file. Does it help if you force IB to re-read your header with File - Read Class Files...? --Andy On Sep 22, 2009, at 5:06 PM, Michael Süssner michael.suess...@utanet.at wrote: Yeah, I also thought that the Xcode mailing list is the right one. But the list seams to be a little bit inactive. I wanted to know if anyone else has detected the same behaviour. To clarify, I have opened the identity view in the inspector panel and it does not display the add outlet/action section after I have selected an object. :-( g Michael Am 22.09.2009 um 19:25 schrieb Matt Neuburg: On Tue, 22 Sep 2009 08:57:14 +0200, Michael S?ssner michael.suess...@utanet.at said: When I select an object in IB, the inspector does not display the outlet/action section. Is this a bug? I have installed Xcode on another computer and experienced the same behaviour. I am using Xcode3.2 and snow leopard. (1) This is an Xcode question, not a Cocoa question, and belongs on the Xcode list. (2) Select *how*? Single-clicking an object in IB does not change what the inspector shows; it is up to you to navigate the inspector. Double- clicking an object in IB does not bring up a dialog where you can create outlets and actions, as it did in earlier versions; instead, you create outlets and actions in Xcode (in your header, in code) and IB automatically sees them. m. -- matt neuburg, phd = m...@tidbits.com, http://www.tidbits.com/matt/ A fool + a tool + an autorelease pool = cool! AppleScript: the Definitive Guide - Second Edition! http://www.tidbits.com/matt/default.html#applescriptthings Mit freundlichem Gruß Michael Süssner Dipl.-Ing. Wimbergergasse 10-44 1070 Wien Tel: +43 (1) 5268251 Mobil: +43 (676) 7955229 ___ 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/aglee%40mac.com This email sent to ag...@mac.com Mit freundlichem Gruß Michael Süssner Dipl.-Ing. Wimbergergasse 10-44 1070 Wien Tel: +43 (1) 5268251 Mobil: +43 (676) 7955229 ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: an app that never quits
On Sep 22, 2009, at 9:30 PM, Erick Calder wrote: I had a thought: how do alarms work? the application (the Clock) isn't running all the time, yet, 7am the alarm goes off... how did the Clock get itself started (without my permission)? and if you look at the alarms... there is no Clock window! it's just a message of some kind... so how does that work and can I do the same thing? Because the alarm clock application -- an application written by Apple -- is implemented to work that way. To summarize the answer given to you several times now: Background applications are not possible in App Store compatible applications. You can use push notifications to push information to the user's iPhone. If you want it changed, file a bug. This is not on topic for cocoa-dev and, thus, end of thread. iPhone specific development forums are available at http:// devforums.apple.com/ -- feel free to take up the discussion there, however the answers won't be any different. b.bum ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: an app that never quits
There are few ways I know of that would make this possible. One way is a daemon, which is started every time the computer starts (or possibly when you log in). The daemon then runs in the background and provides notifications when necessary. Another way this is possible (a more commonly used and easier way) is just to set the app as an LSUIElement. This is done by editing your apps Info.plist and adding this key: keyLSUIElement/key true / An LSUIElement is almost like a background application, it has no Dock icon and no menu bar, making it virtually invisible. The app can then be set as a login item by the app installer so it runs when you log on. Hope this helps On 2009-09-22, at 10:30 PM, Erick Calder e...@arix.com wrote: I had a thought: how do alarms work? the application (the Clock) isn't running all the time, yet, 7am the alarm goes off... how did the Clock get itself started (without my permission)? and if you look at the alarms... there is no Clock window! it's just a message of some kind... so how does that work and can I do the same thing? ___ 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/pcwiz.support%40gmail.com This email sent to pcwiz.supp...@gmail.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: an app that never quits
On Sep 22, 2009, at 9:30 PM, Bill Bumgarner wrote: On Sep 22, 2009, at 9:30 PM, Erick Calder wrote: I had a thought: how do alarms work? the application (the Clock) isn't running all the time, yet, 7am the alarm goes off... how did the Clock get itself started (without my permission)? and if you look at the alarms... there is no Clock window! it's just a message of some kind... so how does that work and can I do the same thing? Because the alarm clock application -- an application written by Apple -- is implemented to work that way. no need to state the obvious. if Clock can do what it does, then it's possible to do it... I'm interested to know how I can do the same thing ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com