Re: Daemon safe SMTP frameworks

2011-09-29 Thread Jens Alfke
On Sep 28, 2011, at 10:41 PM, Aaron Scott wrote: I am build a foundation tool that needs to send email alerts. Does anyone know the best/easiest way to accomplish this. I can't seem to find any daemon safe SMTP frameworks. In the past I’ve simply invoked /usr/bin/sendmail using NSTask.

Re: Daemon safe SMTP frameworks

2011-09-29 Thread Aaron Scott
Thanks Jens, I use a GUI app that connects to the daemon (foundation tool) and sets the SMTP server info. I have just found skpsmtpmessage which looks like it might do the job. I just have to modify it as it was built for iOS. Thanks, Aaron On 29/09/2011, at 4:13 PM, Jens Alfke wrote:

Re: NSDocument Serialization (-performSynchronousFileAccessUsingBlock: and friends)

2011-09-29 Thread Kyle Sluder
On Wed, Sep 28, 2011 at 10:55 PM, Kyle Sluder kyle.slu...@gmail.com wrote: I'd really appreciate if the documentation spelled out exactly how NSDocument uses these methods. To give an example of a specific NSDocument usage that I'd like to know about: how does asynchronous saving use

Re: (Problems) Scaling NSViews with scaleUnitSquareToSize

2011-09-29 Thread Eric Wing
Oops. Didn't realize the photo album (image links) needed permissions changed. That should be fixed now. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators

Initial Object in Array Controller

2011-09-29 Thread David Mirabito
Hello, I've a simple application which for now just shows a tableview with a list of expenses ... NSArrayController (many of these are just the default...) Avoid Empty Selection - NO Preserve Selection - NO Select Inserted Objects - YES Clear Filter Predicate on

Re: Initial Object in Array Controller

2011-09-29 Thread Quincey Morris
On Sep 29, 2011, at 02:42 , David Mirabito wrote: My understanding is that because of 'preparesContent=YES' it manages the array internally, which i get at with the [myController content]. Not quite so. Array controllers *always* manage a (separate) array, or an array property if configured

Re: Receiving Crash Reports

2011-09-29 Thread Torsten Curdt
And another one... https://github.com/tcurdt/feedbackreporter cheers, Torsten ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at

Selecting UIButtons with code

2011-09-29 Thread Eric E. Dolecki
I am missing something simple here. The following code doesn't work. I have 4 UIButtons, tagged 1,2,3,4 - (IBAction)clickedButton:(id)sender { int tag = [sender tag]; for(int i=1;i5;i++){ UIButton *button = (UIButton *)[self.view viewWithTag:tag]; if(i != tag){

Re: Selecting UIButtons with code

2011-09-29 Thread John Andersson
You should probably change to: UIButton *button = (UIButton *)[self.view viewWithTag:i]; (i instead of tag) Regards /John 29 sep 2011 kl. 14:52 skrev Eric E. Dolecki: I am missing something simple here. The following code doesn't work. I have 4 UIButtons, tagged 1,2,3,4 -

Re: Core Data : Undo Delete : Cannot fulfill a fault

2011-09-29 Thread Jerry Krinock
On 2011 Sep 28, at 19:21, Dave Fernandes wrote: I tried to reproduce this problem in my app and couldn't. I'm not surprised because it took me two years to find this corner case. After adding sufficient AppleScriptability to my app, I'm now able to reproduce it with a failure rate of about

Re: Selecting UIButtons with code

2011-09-29 Thread Eric Dolecki
Haha omg thanks :) Sent from my iPhone On Sep 29, 2011, at 9:03 AM, John Andersson john_ml...@peekaboo.se wrote: You should probably change to: UIButton *button = (UIButton *)[self.view viewWithTag:i]; (i instead of tag) Regards /John 29 sep 2011 kl. 14:52 skrev Eric E. Dolecki:

NSDocument-oriented app and -keydown

2011-09-29 Thread Nick
how can I get a keydown (and keyup) events in an NSDocument-oriented application for a particular document's window? I'd like to get a control activated/deactivated on the window, depending on whether the specific key is pressed or released. I have found this:

Re: NSDocument-oriented app and -keydown

2011-09-29 Thread Kyle Sluder
On Thu, Sep 29, 2011 at 7:42 AM, Nick eveningn...@gmail.com wrote: how can I get a keydown (and keyup) events in an NSDocument-oriented application for a particular document's window? I'd like to get a control activated/deactivated on the window, depending on whether the specific key is

Re: Receiving Crash Reports

2011-09-29 Thread koko
Thanks to all for suggestions. I was unaware that crash reports were routed to our iTunes Connect account . Question here, we distribute through the App Store as well other means. So, will all be routed or just those that came fe the App Store? I had been looking at UKCrashReporter and

Re: controller question

2011-09-29 Thread Ariel Feinerman
2011/9/28 Ariel Feinerman arielfap...@gmail.com I try to expline the problem. There is m_array (M) loaded from the file in the one nib, then there is other two view controllers' nibs (C) with views (V). One of them uses array controller to show and delete only, when the other is used for

Re: NSDocument-oriented app and -keydown

2011-09-29 Thread Jerry Krinock
On 2011 Sep 29, at 07:42, Nick wrote: but this does not let (as i understand) attach the event to the particular window-document, it is application wide. How can I receive such an event in an NSDocument's subclass? I'm not sure what you mean by attach the event, Nick, but the Mac has

Re: NSDocument Serialization (-performSynchronousFileAccessUsingBlock: and friends)

2011-09-29 Thread Kevin Perry
The header documentation for -performSynchronousFileAccessUsingBlock: (which also applies to performAsynchronousFileAccessUsingBlock:) says: this method's primary use is to wait for asynchronous saving, but in contrast with that method it is only for use to wait for the part of an

Re: NSDocument-oriented app and -keydown

2011-09-29 Thread Kyle Sluder
On Thu, Sep 29, 2011 at 8:30 AM, Jerry Krinock je...@ieee.org wrote: On 2011 Sep 29, at 07:42, Nick wrote: but this does not let (as i understand) attach the event to the particular window-document, it is application wide.  How can I receive such an event in an NSDocument's subclass?

Cleaning up a window with blocks

2011-09-29 Thread Eric Gorr
The intent of the following code is to implement a quick and easy way to bring up a window and provide a way to clean up after it closes. The problem is that it is crashing. I believe I am missing something obvious here and was hoping that someone could remove the blinders... - (void)

Re: Cleaning up a window with blocks

2011-09-29 Thread Thomas Davie
A quick scan over the code says that your issue is that you're referring to theObserver inside theObserver, which, when the block is constructed, as not yet been assigned the result of addObserverForName:... Bob if (*ra4 != 0xffc78948) { return false; } On 29 Sep 2011, at 17:37, Eric Gorr

Re: controller question

2011-09-29 Thread Quincey Morris
On Sep 29, 2011, at 08:20 , Ariel Feinerman wrote: 2011/9/28 Ariel Feinerman: I try to expline the problem. There is m_array (M) loaded from the file in the one nib, then there is other two view controllers' nibs (C) with views (V). One of them uses array controller to show and delete

Re: NSDocument-oriented app and -keydown

2011-09-29 Thread Nick
Thank you ___ 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:

Re: NSDocument-oriented app and -keydown

2011-09-29 Thread Richard Somers
On Sep 29, 2011, at 8:42 AM, Nick wrote: how can I get a keydown (and keyup) events in an NSDocument-oriented application for a particular document's window? I'd like to get a control activated/deactivated on the window, depending on whether the specific key is pressed or released. Key

Re: Receiving Crash Reports

2011-09-29 Thread Sean McBride
On Thu, 29 Sep 2011 09:12:31 -0600, koko said: Thanks to all for suggestions. I was unaware that crash reports were routed to our iTunes Connect account . Question here, we distribute through the App Store as well other means. So, will all be routed or just those that came fe the App Store? I

Re: NSDocument Serialization (-performSynchronousFileAccessUsingBlock: and friends)

2011-09-29 Thread Kyle Sluder
On Thu, Sep 29, 2011 at 9:20 AM, Kevin Perry kpe...@apple.com wrote: If it were to call the fileAccessCompletionHandler any earlier then it might be possible, for example, for -fileModificationDate to be invoked on the main thread after -writeSafelyToURL: has written the file, but before the

Re: NSDocument Serialization (-performSynchronousFileAccessUsingBlock: and friends)

2011-09-29 Thread Kevin Perry
On Sep 29, 2011, at 12:00 PM, Kyle Sluder wrote: On Thu, Sep 29, 2011 at 9:20 AM, Kevin Perry kpe...@apple.com wrote: If it were to call the fileAccessCompletionHandler any earlier then it might be possible, for example, for -fileModificationDate to be invoked on the main thread after

Re: Cleaning up a window with blocks

2011-09-29 Thread Ken Thomases
On Sep 29, 2011, at 11:42 AM, Thomas Davie wrote: A quick scan over the code says that your issue is that you're referring to theObserver inside theObserver, which, when the block is constructed, as not yet been assigned the result of addObserverForName:... You can fix that by declaring

Re: Cleaning up a window with blocks

2011-09-29 Thread Eric Gorr
Ya, thanks. I spotted that almost immediately after I posted the message. On Sep 29, 2011, at 4:22 PM, Ken Thomases wrote: On Sep 29, 2011, at 11:42 AM, Thomas Davie wrote: A quick scan over the code says that your issue is that you're referring to theObserver inside theObserver, which,

Question about SMJobBless

2011-09-29 Thread Eric Gorr
I cannot seem to locate any documentation on this, so hopefully someone can confirm the behavior I am seeing with Apple's sample SMJobBless code located at: http://developer.apple.com/library/mac/#samplecode/SMJobBless/Introduction/Intro.html#//apple_ref/doc/uid/DTS40010071 I was under the

creating multiple NSTimers

2011-09-29 Thread Tom Hohensee
For the life of me I cannot figure this one out. I need to create an indeterminate amount of timers for an app I am working on. The app is petty simple. For example, provide a list of ip enabled devices with times to shut off and the app executes the device's shutdown at the specified time.

Re: creating multiple NSTimers

2011-09-29 Thread Eric E. Dolecki
Can't you use a loop and then stuff the timers into an NSMutableArray or NSMutableDictionary to access? On Thu, Sep 29, 2011 at 5:47 PM, Tom Hohensee tom.hohen...@gmail.comwrote: For the life of me I cannot figure this one out. I need to create an indeterminate amount of timers for an app I

Re: creating multiple NSTimers

2011-09-29 Thread David Duncan
On Sep 29, 2011, at 2:47 PM, Tom Hohensee wrote: However, I do not know wether the user will have 1 device or 100 devices. Do I have to setup a finite amount of timers (ultimately having a limit on the number of devices that can be added) or is there a better way? I have googled for a

Re: Core Data : Undo Delete : Cannot fulfill a fault

2011-09-29 Thread Jerry Krinock
On 2011 Sep 29, at 11:20, Quincey Morris wrote: I'm pretty sure (though I never really thought about it before today) that Core Data undo *doesn't* work across 'save:' boundaries. The documentation for [NSManagedObjectContext undo:]… If I'm right, you should be clearing the undo stack at

Re: creating multiple NSTimers

2011-09-29 Thread Tom Hohensee
Yes. What I have worked on is using an array of timers fired sequentially. Each firing of the timer sets up the next one in the array. Each new addition to the array requires invalidating of the active timer and reordering of the array according to times. But i have run into problems when

Re: Selecting UIButtons with code

2011-09-29 Thread David Rowland
This line, UIButton *button = (UIButton *)[self.view viewWithTag:tag]; is returning something that is not a UIButton, and it won't respond to setSelected. On Sep 29, 2011, at 5:52 AM, Eric E. Dolecki wrote: I am missing something simple here. The following code doesn't work. I

Re: creating multiple NSTimers

2011-09-29 Thread David Duncan
I think you need to backup and explain exactly what your requirements are. If you really do need to track these timers, you will probably need an array or dictionary, but if these timers are all one-shot and they configure the next timer to execute, there seems little reason to maintain your

Re: Selecting UIButtons with code

2011-09-29 Thread Eric E. Dolecki
I had a brain fart. That line DID return a UIButton, but only when the tag matched i :) Google Voice: (508) 656-0622 Twitter: eric_dolecki XBoxLive: edolecki PSN: eric_dolecki http://blog.ericd.net On Thu, Sep 29, 2011 at 6:14 PM, David Rowland rowla...@sbcglobal.netwrote:

Re: creating multiple NSTimers

2011-09-29 Thread Conrad Shultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 9/29/11 3:06 PM, Tom Hohensee wrote: Yes. What I have worked on is using an array of timers fired sequentially. Each firing of the timer sets up the next one in the array. Each new addition to the array requires invalidating of the active

Re: creating multiple NSTimers

2011-09-29 Thread Jens Alfke
On Sep 29, 2011, at 3:06 PM, Tom Hohensee wrote: Yes. What I have worked on is using an array of timers fired sequentially. Each firing of the timer sets up the next one in the array. Each new addition to the array requires invalidating of the active timer and reordering of the array

Re: creating multiple NSTimers

2011-09-29 Thread John Pannell
Hi Tom- Could you use a single, repeating timer with sufficient resolution for your purposes and an array or dictionary storing the needed timing state? Then update state appropriately at each fire of the single timer? Array { Timing Item 1 { currentTime: 24.2

delegate of an NWindowController's window

2011-09-29 Thread Koen van der Drift
I'm trying to get the delegate of a window that is controlled by a custom NSWindowController as follows: NSWindow *win = [self window]; id MyControllerDelegate del = [win delegate]; But get the following warning: warning: Semantic Issue: Initializing 'idMyControllerDelegate'

Re: delegate of an NWindowController's window

2011-09-29 Thread Jamie Pinkham
The NSWindow delegate's type is idNSWindowDelegate not id MyControllerDelegate. This is the compiler telling you the types don't match. Sent from my iPhone On Sep 29, 2011, at 6:22 PM, Koen van der Drift koenvanderdr...@gmail.com wrote: I'm trying to get the delegate of a window that is

Re: delegate of an NWindowController's window

2011-09-29 Thread Ken Thomases
On Sep 29, 2011, at 5:38 PM, Jamie Pinkham wrote: On Sep 29, 2011, at 6:22 PM, Koen van der Drift koenvanderdr...@gmail.com wrote: I'm trying to get the delegate of a window that is controlled by a custom NSWindowController as follows: NSWindow *win = [self window]; id

Re: Numeric Entry and Formatting With NSNumberFormatter Won't Append Zeros

2011-09-29 Thread Philip McIntosh
I suspect you're halfway to the solution. When you get a partially-entered string, you are already looking for the decimal point (which should of course be a localized comparison). You *could* try to insert the grouping separators yourself, but that would potentially involve writing a

Re: NSDocument Serialization (-performSynchronousFileAccessUsingBlock: and friends)

2011-09-29 Thread Kyle Sluder
On Thu, Sep 29, 2011 at 12:33 PM, Kevin Perry kpe...@apple.com wrote: On Sep 29, 2011, at 12:00 PM, Kyle Sluder wrote: On Thu, Sep 29, 2011 at 9:20 AM, Kevin Perry kpe...@apple.com wrote: If it were to call the fileAccessCompletionHandler any earlier then it might be possible, for example,

Re: creating multiple NSTimers

2011-09-29 Thread Tom Hohensee
Sorry, I started this out wrong. I am probably over thinking this to the point of confusion. Here is where I am. I have an application for a facility that uses a number of ip enabled set top boxes to drive TV's throughout the place. Each box is to be shutdown at certain times of the day

applicationWillFinishLaunching

2011-09-29 Thread koko
I have implemented applicationWillFinishLaunching in my app delegate but strangely (to me) it is not called but applicationDidFinishLaunching is called so I know my delegate is properly connected. Are there some conditions that must be met for applicationWillFinishLaunching to be called?

Re: Core Data + Undo + Autosave = Instability? Was: … Undo Delete : Cannot fulfill fault

2011-09-29 Thread Jerry Krinock
On 2011 Sep 29, at 11:20, Quincey Morris wrote: I'm pretty sure … that Core Data undo *doesn't* work across 'save:' boundaries. … If I'm right, you should be clearing the undo stack at a save, at least if there are deleted objects in the picture. Alternately, I'm completely wrong. I think

Re: creating multiple NSTimers

2011-09-29 Thread Jamie Pinkham
Forgot to send to list: Perhaps, instead of timers, you use objects that represent one of these set-top boxes and the time at which they should be shutdown. And instead of scheduling and managing timer, you manage the domain objects instead. Then, you have one timer, that checks all of

Re: NSDocument Serialization (-performSynchronousFileAccessUsingBlock: and friends)

2011-09-29 Thread Kyle Sluder
Of course I have another question. On Thu, Sep 29, 2011 at 12:33 PM, Kevin Perry kpe...@apple.com wrote: NSDocument's NSFilePresenter methods use performAsynchronousFileAccessUsingBlock: internally, so if something else current has file access, the NSFileCoordinator requests are indeed

Re: creating multiple NSTimers

2011-09-29 Thread Graham Cox
Timers are objects, and can be retained like any other independently of whether they are scheduled on a run loop or not. The run loop will additionally retain the timer, but that's its business. In the object that represents the set-top box, just add a 'timer' property (retained), so that you

Re: creating multiple NSTimers

2011-09-29 Thread Conrad Shultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 9/29/11 4:48 PM, Tom Hohensee wrote: Sorry, I started this out wrong. I am probably over thinking this to the point of confusion. Here is where I am. I have an application for a facility that uses a number of ip enabled set top boxes to

Re: applicationWillFinishLaunching

2011-09-29 Thread Graham Cox
I'm not sure why it isn't being called (spelled wrong?), but if you want to put up a dialog box at this time, you won't be able to. A dialog box needs a running run loop to handle its events, and the run loop isn't running at this time. What will happen is that the dialog will come up, then

Re: delegate of an NWindowController's window

2011-09-29 Thread Koen van der Drift
Thanks for the response, but, still not working. Here's in more detail what I'm trying to do. My main window is controlled by MyAppDelegate: @interface MyAppDelegate : NSObject NSApplicationDelegate In MyAppDelegate I respond to an IBAction to open a second window to generate some data

Re: Core Data + Undo + Autosave = Instability? Was: … Undo Delete : Cannot fulfill fault

2011-09-29 Thread Quincey Morris
On Sep 29, 2011, at 16:50 , Jerry Krinock wrote: The -[NSManagedObjectContext undo] method […] does not get invoked when user clicks Edit ▸ Undo in a Cocoa application. I dunno. The issue isn't whether the method gets invoked. The issue is whether the property data that's needed to undo the

Re: delegate of an NWindowController's window

2011-09-29 Thread Graham Cox
You're overthinking the problem. NSWindowController doesn't have a 'delegate' method or property, which is the cause of the warning you are receiving. Using a delegate to handle the result from a sheet is reasonable - it's what I invariably do. But you have to add that delegate property

Re: creating multiple NSTimers

2011-09-29 Thread Tom Hohensee
Bingo! Thanks. This is where I was going wrong. I saw John and Jamie's responses earlier and got me thinking in objects again. But still wasn't putting it together. I had a mental block and was not thinking of the timers as properties of the boxes. Just kept getting stuck on the NSTimer

Re: delegate of an NWindowController's window

2011-09-29 Thread Conrad Shultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 9/29/11 5:38 PM, Koen van der Drift wrote: This all goes fine, the sheet opens and I get generate the data, stored in an NSDictionary in MyDataWindowController. Now I want somehow to get the data back to MyAppDelegate. So I am trying this in

Re: Cocoa-dev Digest, Vol 8, Issue 783

2011-09-29 Thread Gordon Apple
There must already be an array for the table, so just iterate the array every minute or whatever (single repeating timer), compare the times to [NSDate date} and start or shut down whatever has not been started or shut down. Much easier than trying to manage timers. On 9/29/11 8:06 PM,

Re: creating multiple NSTimers

2011-09-29 Thread Gordon Apple
Whoops, didn¹t reset the title. Sorry. On 9/29/11 8:25 PM, Gordon Apple g...@ed4u.com wrote: There must already be an array for the table, so just iterate the array every minute or whatever (single repeating timer), compare the times to [NSDate date} and start or shut down whatever has not

Re: Cocoa-dev Digest, Vol 8, Issue 783

2011-09-29 Thread Graham Cox
On 30/09/2011, at 11:25 AM, Gordon Apple wrote: Much easier than trying to manage timers. I disagree. Timers are not rocket science, and they are optimised (one assumes) not to consume more CPU time than they truly need. Your idea is more complicated and is polling, meaning that you are

Re: Cocoa-dev Digest, Vol 8, Issue 783

2011-09-29 Thread Jamie Pinkham
Fair point, Graham. I'm always wary of timers because careless use of them can cause problems like retain cycles. Sent from my iPhone On Sep 29, 2011, at 9:35 PM, Graham Cox graham@bigpond.com wrote: On 30/09/2011, at 11:25 AM, Gordon Apple wrote: Much easier than trying to manage

Re: delegate of an NWindowController's window

2011-09-29 Thread Koen van der Drift
On Sep 29, 2011, at 9:03 PM, Conrad Shultz wrote: An alternate approach, depending on the details of your implementation, might be to make use of some of the other parameters in that lengthy -beginSheet... method; setting appropriate values for didEndSelector (and, potentially, contextInfo

Re: debugging crashes in dyld?

2011-09-29 Thread Don Quixote de la Mancha
On Tue, Sep 27, 2011 at 2:06 PM, Martin Wierschin mar...@nisus.com wrote: I have a user reporting a crash whenever they try to first save a file. It is reproducible for the user (though not be me) and I'm wondering how to best debug this problem remotely. I've included the crash stack below

iTunes problem related to free space on device (iPad, iPod ) when transferring data to device.

2011-09-29 Thread Payal Mundhada
Hi All, I am transferring audio files to iPod, iPad using iTunes programatically. We have noticed that iTunes does not transfer the file\track\book to the device (iPad / iPod), even if size of the data to transfer is less than the available free space of the device. for ex. The free space

Managed Object Model versions

2011-09-29 Thread Luke Sneeringer
Hey all, I am working on writing my first Core Data application. I made an entity, did some work to test it, and then made another (linked) entity. The problem is now I'm totally stuck, because when I try to do anything that affects Core Data, I get a completely unhelpful error message: The

Finder Integration

2011-09-29 Thread Damon Allison
Hello, I am researching options for integrating with Finder. In particular, I would like my application to provide file and directory icon overlays similar to how Dropbox.app overlays green and blue images on top of file and folder images. I noticed a few applications (svn utilities) that have

Re: creating multiple NSTimers

2011-09-29 Thread Greg Guerin
Gordon Apple wrote: There must already be an array for the table, so just iterate the array every minute or whatever (single repeating timer), compare the times to [NSDate date} and start or shut down whatever has not been started or shut down. Much easier than trying to manage

Re: Core Data : Undo Delete : Cannot fulfill a fault

2011-09-29 Thread Jim Correia
On Sep 29, 2011, at 11:20 AM, Quincey Morris wrote: I think the answer to your original question is that You're Doing It Wrong™. :) I'm pretty sure (though I never really thought about it before today) that Core Data undo *doesn't* work across 'save:' boundaries. The documentation for

Re: iTunes problem related to free space on device (iPad, iPod ) when transferring data to device.

2011-09-29 Thread Don Quixote de la Mancha
This may be a bug in either iTunes or the iOS. If you think it might be, you should file a bug report at: http://bugreport.apple.com/ -- Don Quixote de la Mancha quix...@dulcineatech.com    Custom Software Development for the iPhone and Mac OS X