Game Center Invite

2014-08-26 Thread Todd Heberlein
I’ve been doing some experiments to invite another player in Game Center on iOS devices, and the invite is failing immediately. I am using the Apple GKMatchmakerViewController to invite the players. If I choose “Play Now” on both devices, they eventually find each other. If I do “Invite Friend”

Re: Game Center Invite

2014-08-26 Thread Todd Heberlein
> On Aug 26, 2014, at 4:00 PM, Todd Heberlein wrote: > > Do both devices have to be on the same Wi-Fi network? My workstation, where > I am running the simulator, is *not* on Wi-Fi. My Cell phone (the second > device) is either on Wi-Fi or LTE. If I have two physical devices

Re: NSUserDefaults not sticking

2014-09-10 Thread Todd Heberlein
> in the past few years when it's happened it's been an early symptom of > filesystem corruption. Sometimes there have been a bunch of leftover > temporary lock(?) files in the Preferences directory. > > If you're getting reports of this from users of your app, it might be worth > asking them t

Re: Changing app screenshots after submission

2014-09-18 Thread Todd Heberlein
> I learned yesterday that you can't change the screenshots in the App Store > after your app is approved. Has this always been the case? It seems ludicrous > that I have to submit a new binary to change the screenshots (but that's > exactly what iTunesConnect support told me). I don’t know why

completion handlers?

2009-09-06 Thread Todd Heberlein
It seems that the way I previously used an NSSavePanel has been deprecated. :( The new approach seems to use an approach (a function definition embedded in the message) that I am not familiar with (I hear ghosts of lambda notation whispering into my ear). I assume this is an Objective C 2

Re: completion handlers?

2009-09-06 Thread Todd Heberlein
Thanks for the information. OK, now a scoping rule question, in the sample code below, does "self" refer to my object (i.e., the "self" when the block is declared) or the NSSavePanel (i.e., the "self" when the code is executed)? Todd [savePanel beginSheetModalForWindow:window completionHan

Re: authorization services

2009-09-14 Thread Todd Heberlein
On Sep 14, 2009, at 12:57 PM, Mark Thomas wrote: I was wondering if anybody could tell me if it's correct to use authorizationExecuteWithPrivileges and wait() calls together, so the parent process wait's until that new child process finishes. Googling seems to imply this from the examples

NSNumber bound to NSTextField

2009-09-14 Thread Todd Heberlein
I am trying to understand the behavior of an NSNumber bound to an NSTextField. It seems that an NSNumber isn't always and NSNumber. -- SET UP I have a class with an NSNumber* bound to an NSTextField via an Object Controller NSNumber* <---> NSObjectController <-

Re: Binding a model's ivar array to the contents of an NSArrayController

2009-09-16 Thread Todd Heberlein
So in short, my need is pretty simple: Bind an array to an NSArrayController. That being said, it seems that no combination of exposeBindings:, bind:toObject:withKeypath:options:, observeValueForKey:ofObject:change:context:, etc. is working as I expect it to. Admittedly, I have done most

Re: Creator Codes in Snow Leopard

2009-09-23 Thread Todd Heberlein
Some may find the following Apple Insider article on the the topic useful: Inside Snow Leopard's UTI: Apple fixes the Creator Code http://www.appleinsider.com/articles/09/09/22/inside_snow_leopards_uti_apple_fixes_the_creator_code.html On Sep 23, 2009, at 9:11 AM, Jens Alfke wrote: On Sep 23

Re: Creator Codes in Snow Leopard

2009-09-23 Thread Todd Heberlein
As a result, most of their conclusions are incorrect as well. If you can't set the UTI differently on two files with the same type code and extension, it can't serve as a creator code. I've been wondering about this. Daring Fireball carried some links with some strong criticisms on this, a

NSTableView Drag & Drop as a string

2009-09-24 Thread Todd Heberlein
I have an NSTableView and I have Drag & Drop working between table views for my application where I encode the object to an NSData and write it to the NSPasteboard. But now I want to create a string representation of the object, add it to the pasteboard as well, and then when the object is

Re: NSTableView Drag & Drop as a string

2009-09-25 Thread Todd Heberlein
Solved it! ... But now I want to create a string representation of the object, add it to the pasteboard as well, and then when the object is dragged to something like an email, the string representation of the object is written in. The problem was that I was trying to do a cross-applicati

Re: Efficient searching of an NSArray of NSDictionary

2009-09-29 Thread Todd Heberlein
By the way, a quick google search of, "nspredicateeditor example" yields a very helpful first result ... Don't forget, Google yields different results for different people based on a variety of factors. Todd ___ Cocoa-dev mailing list (Cocoa-de

Re: [iPhone] Application running for the very first time...

2009-09-30 Thread Todd Heberlein
I am wondering if there is a simple way to find out when my application is running for the VERY FIRST TIME on an iPhone? So that I can set an integer variable once only at this moment... What's the best way to do this? One approach is to test if a file exists on the file system, and if it d

Re: [iPhone] Application running for the very first time...

2009-10-01 Thread Todd Heberlein
I am wondering if there is a simple way to find out when my application is running for the VERY FIRST TIME on an iPhone? So that I can set an integer variable once only at this moment... What's the best way to do this? Also, NSUserDefaults supports this basic capability. I'm just wondering

Re: Auto Install Login Item

2009-10-03 Thread Todd Heberlein
On Oct 3, 2009, at 12:30 PM, David Blanton wrote: Should my cocoa app write an entry to com.apple.loginitems.plist so it launches at login or is there a better way? Look at the documentation for launchd. ___ Cocoa-dev mailing list (Cocoa-dev@list

Re: Probs with "BetterAuthorizationSample"-code

2009-10-03 Thread Todd Heberlein
1. How can I debug my HelperTool? Obviously any breakpoints set in XCode won't work because the HelperTool is launched outside by the launchd. 2. My idea is to use asl to debug "barefoot". But for that I have to install aeach time when I have compiled a modified version of the HelperTool to

Re: Bundle is not using icon or CFBundleIdentifier

2009-10-03 Thread Todd Heberlein
Anyone want to point out what I'm doing wrong? Any help appreciated. I think I had to do a Project->Add To Project... and then select the icon file in order to get the icon to be used. Dragging the icons into my project didn't do the trick. Todd __

Alert prompts for BetterAuthorizationService

2009-10-07 Thread Todd Heberlein
In Apple's BetterAuthorizationSample application pressing the "LowNumberedPorts" button brings up a window to authorize yourself. It includes the following text to explain why you are authorizing yourself: "You must be authorized to open low-numbered TCP ports. Type your password to allow B

Re: Alert prompts for BetterAuthorizationService

2009-10-07 Thread Todd Heberlein
On Oct 7, 2009, at 12:05 PM, Olivier Palliere wrote: If you already installed your tool once and didn't change the kind of rights that it is using, then it is most likely in the /etc/ authorization file. If you remove your rights from there, re-installing your helper will recreate the rig

Re: Alert prompts for BetterAuthorizationSample

2009-10-08 Thread Todd Heberlein
I've had trouble with this too, even though my /etc/authorization has *my* strings in it. (I just checked again). I gave up and moved it to my "fix someday" list. Haven't checked in Snow Leopard yet. Here's my story: I found the following bug: In my Snow Leopard created project the p

Re: Alert prompts for BetterAuthorizationSample

2009-10-08 Thread Todd Heberlein
On Oct 8, 2009, at 4:01 PM, Todd Heberlein wrote: Of course, I can't expect my users to go into /etc/authorization to change the entry themselves, and I'm not going to much around with it from my code, so I guess I'll wait for Apple to fix this. I'm not even sure wh

NSString of selected text in NSTextView

2009-11-07 Thread Todd Heberlein
This seems like a simple task, but it has become a series of steps. Am I missing a simple method that will do this? I have a Text View and want to get the selected text in an NSString form. I can get an NSString for the entire NSTextView (-string), but to get the string for just the selecte

Re: NSString of selected text in NSTextView

2009-11-08 Thread Todd Heberlein
[[myTextView string] substringWithRange:[myTextView selectedRange]; (Warning, composed in Mail. Potential thorny issues with text attachment characters, surrogate pairs, composed characters, marked text… "the selected text" isn't as simple of a concept as it may seem.) Yeah, one of the concern

Re: Help needed in Writing network usage monitor application

2009-11-18 Thread Todd Heberlein
> What APIs/library/Technology we should use that notifies us about network > usages and also provides us with the data being transmitted. > > I have look in libpcap that pretty much gives the packets but i dont know > how much it helps in notification kind of things. I don't think there are any

Re: self = [super init], nil?

2010-05-10 Thread Todd Heberlein
On May 10, 2010, at 1:24 PM, David Duncan wrote: >> By the way, I concur with Thomas Davie: treating a pointer as a Boolean >> makes me nervous. > > I don't see any reason not to make the comparison explicit if you desire. I > do it all the time :). This has been part of C since the beginning

Re: Bypass Network System Preferences for DNS lookup

2010-07-02 Thread Todd Heberlein
> Afaik, no. Why would you do that? I don't know about the original sender's reason, but DNS servers are often the initial target of attacks. Then when you go to, say www.nike.com, the DNS server sends you the IP address of a malicious site. That site infects your browser, then redirects you to

Re: Submitting Mac App to the App Store

2011-09-10 Thread Todd Heberlein
On Sep 10, 2011, at 1:28 PM, R wrote: > including the Validating Mac App Store > Receipts process. I've removed validating Mac App Store receipts from my code. In general, for at least your first release, I would not worry about DRM. If you think your first release is going to be so popular th

"diskutil info -plist" via Cocoa object?

2011-10-11 Thread Todd Heberlein
I was looking at the rich information provided by diskutil: $ diskutil info -plist /Volumes/blah NSWorkspace has some of this information, but I was wondering if there is a Cocoa object that provides more of the information provided by diskutil. If not, does anyone know how is diskutil

New/Update Cocoa Book

2011-11-14 Thread Todd Heberlein
I haven't read it yet, so I can't give you a review. I'm sure many of us have at least one of the previous editions, so I thought I'd give everyone a heads up. Cocoa Programming for Mac OS X (4th Edition) By Aaron Hillegass, Adam Preble http://www.amazon.com/gp/product/0321774086/ Todd ___

RaiseMan Exception

2011-12-29 Thread Todd Heberlein
I'm getting an exception thrown that I am trying to figure out. I'm working through "Cocoa Programming for Mac OS X" fourth edition, and added the first undo code in chapter 151 -- the Undo code for adding and removing Person objects. Testing seems to work fine, except when I do repeated Undo an

Re: RaiseMan Exception

2011-12-29 Thread Todd Heberlein
haven't added any code to save the data yet. Todd On Dec 29, 2011, at 12:52 PM, Todd Heberlein wrote: > I'm getting an exception thrown that I am trying to figure out. > ... > The frames stack is: > 0 __pthread_kill > 9 _objc_exception_destructor > 10 -

Re: RaiseMan Exception

2011-12-29 Thread Todd Heberlein
On Dec 29, 2011, at 12:57 PM, Todd Heberlein wrote: > Ah... I figured out an even easier way to repeat the issue. Even simpler! (sorry for all the spam) (1) Add one Person object (2) wait 30-60 seconds. crash. No clicking on the Edit menu. No clicking away to another application. Sligh

Re: RaiseMan Exception

2011-12-29 Thread Todd Heberlein
On Dec 29, 2011, at 1:27 PM, Jens Alfke wrote: > Well, show us some code. (I don't have that book you're working from.) > What is the line that raises the exception? What are the values of variables > at that point? It is the default code from the Document-based application. It is the @throw

Re: RaiseMan Exception

2011-12-29 Thread Todd Heberlein
On Dec 29, 2011, at 1:50 PM, Conrad Shultz wrote: > This sounds like Lion auto saving. Are you on Lion? If so, do you return YES > from -autosavesInPlace in your NSDocument subclass? Yes. I just created a new document-based app to test it, and sure enough, the template code that is created has

Re: Xcode - An Apple Embarrassment

2012-03-01 Thread Todd Heberlein
On Mar 1, 2012, at 3:27 PM, Gene Crucean wrote: > Man I don't know why there is soo much hate towards v4... I did find the switch from 3.x to 4.x jarring, but I have adjusted. I am still using Version 4.1, and for me it has been fairly stable. Are the instability issues everyone is complaining

Re: text orientation/positioning with layout manager

2011-01-31 Thread Todd Heberlein
On Jan 31, 2011, at 3:23 PM, Aki Inoue wrote: > The precise definition of the point specified by the argument is the top left > corner of the text container containing the glyph range in the focused view > coordinate system. This flipped view for fonts confuses me a bit because the fonts are or

Re: text orientation/positioning with layout manager

2011-02-02 Thread Todd Heberlein
Thanks everyone! I've learned a lot. I also found working in a flipped view easier for just getting a grasp of things like the NSRect returned by -usedRectForTextContainer:. Just for fun, I played with an NSView that is flipped, *except* just before the call to -drawGlyphsForGlyphRange:atPoint

origin: lower left vs lower right

2011-02-02 Thread Todd Heberlein
During the recent text orientation/position thread a couple of things caught my attention: (1) the text system seemed designed to have a flipped view (origin in the upper left), and (2) the iOS version of an NSView, the UIView, also has an origin in the upper left. If starting some new graphica

Re: origin: lower left vs lower right (lower left vs upper left)

2011-02-02 Thread Todd Heberlein
Bad subject line. My bad. ___ 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 Subscripti

NSUnicodeStringEncoding

2011-02-11 Thread Todd Heberlein
Looking at the NSString class there is the method initWithBytes:length:encoding: I have a unicode string (in C++ object) that I can extract in a number of different byte stream formats (UTF-8, UTF-16 (w or w/o BOM)) that I need to encode into an NSString. Does the NSUnicodeStringEncodin

Re: NSUnicodeStringEncoding

2011-02-13 Thread Todd Heberlein
On Feb 11, 2011, at 11:10 AM, Kyle Sluder wrote: > NSUnicodeStringEncoding is an alias for NSUTF16StringEncoding. You're > best off getting UTF16 from your C++ string and explicitly using the > NSUTF16StringEncoding constant when creating your NSString. Since > UTF16 is the canonical representatio

Re: Help with Apple Helpbooks

2011-02-23 Thread Todd Heberlein
On Feb 23, 2011, at 4:37 AM, Bruce Cresanta wrote: > They may be no big deal, but the more I read and try the more confused I get. I spent most of yesterday on this myself, and I too found it very frustrating. Part of my confusion comes from the fact that "Apple Help Programming Guide" is a bl

Re: Help with Apple Helpbooks

2011-02-23 Thread Todd Heberlein
On Feb 23, 2011, at 9:46 AM, Martin Hewitson wrote: > I'm not sure if this is the new or the old way, but this worked perfectly for > me: It is the old way, but it is still very useful (and apparently still works). I especially liked some of the extra features he adds. Todd _

Re: Book "Cocoa programming for Mac OS X" Third Edition

2011-03-11 Thread Todd Heberlein
I concur: "Cocoa Programming for Mac OS X" (3rd edition) and "Programming in Objective-C 2.0" (2nd edition) are the two books I go to the most and recommend for people getting started. Once you've have some experience, then the Apple online documentation is pretty good. In particular, when you

Quartz Debug: UI Resolution

2011-03-16 Thread Todd Heberlein
I am trying to use the Quartz Debug app to scale up my app (for a screenshot for MAS). My content looks great in the scaled up windows, but the window frames themselves look terrible. For example the title bar and title in it are all screwed up. Is there a setting I can use to make the title ba

OCTET_STRING_t -> NSString?

2011-03-29 Thread Todd Heberlein
I'm working my way through Apple's "Validating App Store Receipts", and I can extract all the data, compute the digest and compare it against the hash. But now I am stuck converting the OCTET_STRING_t for the bundle_id in the Receipt to an NSString so I can compare it against my applications Bun

Re: OCTET_STRING_t -> NSString?

2011-03-29 Thread Todd Heberlein
> In particular, the beginning of the OCTET_STRING_t's buffer begins with two > bytes (decimal values 12 and 21). Am I supposed to skip these? For example, > the following code where I skip these first two bytes seems to work, but it > seems like a big hack: OK, it seems that the second byte (2

Re: OCTET_STRING_t -> NSString?

2011-03-29 Thread Todd Heberlein
Ka ching! Yes, this answer is what I am looking for. Thanks!!! Todd On Mar 29, 2011, at 10:50 AM, Stephen J. Butler wrote: > On Tue, Mar 29, 2011 at 12:24 PM, Todd Heberlein > wrote: >> In particular, the beginning of the OCTET_STRING_t's buffer begins with two >> b

Re: OCTET_STRING_t -> NSString?

2011-03-29 Thread Todd Heberlein
On Mar 29, 2011, at 12:54 PM, Wim Lewis wrote: > If the security data is in DER, then lber's restricted subset of BER might > still suffice. (I haven't looked.) > > But yes, linking openssl and using d2i_ASN1_type_bytes() and either > ASN1_STRING_to_UTF8() or mapping the ASN.1 string types to

Re: OCTET_STRING_t -> NSString?

2011-03-29 Thread Todd Heberlein
On Mar 29, 2011, at 1:24 PM, Quincey Morris wrote: > FWIW, my understanding of the reason it doesn't work that way is this: > ... That is pretty much what the Apple documentation says. I felt that they were saying, "This is left as an exercise for the reader." :) The hacker community has had

Re: Mac App Store requirements

2011-04-10 Thread Todd Heberlein
On Apr 10, 2011, at 4:32 PM, davel...@mac.com wrote: > And you also have add code to verify a valid receipt. There's a few samples > of how to do this on github (you should modify them to make the app more > difficult to crack unless you're giving the app away for free). Apple has > more about

icon radio buttons, NSToolbar?

2011-04-18 Thread Todd Heberlein
I'm trying to get a row of buttons to look and behave like the buttons across the Preview app's preference window. It seems like a nicer way to do a tabbed view. Is that just an NSToolbar with custom graphics/icons, or is that NSMatrix with icon radio buttons? Or is it something else entirely?

NSArrayController & image in column

2011-04-19 Thread Todd Heberlein
I want to have an NSTableView controlled by an NSArrayController using an NSArray data source. In one of the columns I want to display one of several images. The choice of image will be based on an integer value in one of the fields of the array. What is the best or most recommended way to do t

Re: NSArrayController & image in column

2011-04-19 Thread Todd Heberlein
On Apr 19, 2011, at 3:09 PM, Dave DeLong wrote: > Or just add a method on your data object that vends the appropriate image > based on its own properties, and then just bind to that method name as the > Model Key Path. (this is much simpler than the value transformer) For an experiment I have

Re: NSArrayController & image in column

2011-04-20 Thread Todd Heberlein
On Apr 19, 2011, at 10:08 PM, Quincey Morris wrote: >> Any idea why a column with a transformer has duller images? > > If it's significantly duller, that probably means it's being shown as > disabled. I figured it out. If the transformer is *not* reversible + (BOOL)allowsReverseTransf

setting table view's cell size?

2011-04-20 Thread Todd Heberlein
I am able to draw an image in an NSTableView's cell using the NSImageCell, but I want a larger cell. What is the best way to do this? In my first attempt, I subclassed NSImageCell and assign it to the column with -setDataCell in -awakeFromNib. I have verified that my custom cell is being used,

Re: setting table view's cell size?

2011-04-20 Thread Todd Heberlein
> I am able to draw an image in an NSTableView's cell using the NSImageCell, > but I want a larger cell. What is the best way to do this? OK, I found a solution. I have a delegate for the table that implements - (CGFloat)tableView:(NSTableView *)tableView heightOfRow:(NSInteger)row The

Re: setting table view's cell size?

2011-04-21 Thread Todd Heberlein
> Just set the desired row height in IB. > > Programatically, it's -setRowHeight: Oops! How embarrassing. Thanks guys. Todd ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list.

Window fringe, automatic guides

2011-04-27 Thread Todd Heberlein
The HIG talks about the removal of window-frame surface on the sides of windows starting in Mac OS X 10.5. But when using IB (I'm still back in 3.2.6) some objects show an automatic guide when positioning near the edge of a window (e.g., NSView (custom view), NSSplitView, NSPopupButton, NSTextvi

Layout vs. Frame: X position of objects

2011-04-27 Thread Todd Heberlein
When using the "Size & Position" information for an object to position it in a view, what is the difference between the "Layout" and "Frame" values in the pop-up button? When should I use "Layout", and when should I use "Frame"? When trying to layout objects, especially when trying to align the

Re: Seeding random() randomly

2011-05-27 Thread Todd Heberlein
Regarding format specifiers, there is the "String Format Specifiers" section of the "String Programming Guide" in Apple's Developer Documentation. Here is a link to the web version: http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Strings/Articles/formatSpecifiers.html%23//

Cocoa-preferred licensing key style?

2011-05-29 Thread Todd Heberlein
For Cocoa apps not distributed through the Mac App Store, is there a common/recommended design pattern for license keys? A little googling around I found common locations were: /Library/Application Support/YourApp/ /Library/Preferences/YourAppBundleID.plist I'm leaning towards a

Re: Cocoa-preferred licensing key style?

2011-05-31 Thread Todd Heberlein
Thanks everyone! This has definitely helped. Todd ___ 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/Unsubscr

Re: Does anyone else dislike Xcode 4?

2011-07-24 Thread Todd Heberlein
On Jul 24, 2011, at 10:57 AM, Julie Seif wrote: > I really do not like Xcode 4. I feel like I'm a beginner all over again in > Xcode 4... I was just so comfortable to the Xcode 3 and previous releases of > Xcode interface. I've been a light user of the development environment since NeXTStep 2.1,

Re: Finding process path from Cocoa?

2009-12-09 Thread Todd Heberlein
On Dec 9, 2009, at 4:23 AM, Alastair Houghton wrote: > Specifically, a potential attacker will deliberately not follow this > convention. The Security Server used to get the information for the program > name in this manner, which created quite an interesting vulnerability since > you could g

Menu items unexpectedly disabled

2009-12-18 Thread Todd Heberlein
I have a document-based app. For each document there can be a couple of satellite windows brought up for specific views of some of the data. Each of these satellite windows is controlled by an NSWindowController subclass loaded by MyDocument and added via addWindowController:. A menu item's tar

Re: Menu items unexpectedly disabled

2009-12-18 Thread Todd Heberlein
> That's correct, and that's how it should work. It works here in a test app. > Are you doing anything "unusual" in your NSWindowController? What methods are > you overriding? My bad. After getting your email I kept dug around a bit more, and I discovered I had not connected the NSWindowControl

Re: Encrypting Binary Strings

2009-12-30 Thread Todd Heberlein
On Dec 30, 2009, at 9:17 AM, Mr. Gecko wrote: > Is it possible for me to encrypt the strings in my binary so hackers can't > easily figure out what my application has in it? Reason I'm asking is I have > some private keys that encodes data that I/parents don't want kids or > teenagers to find.

Re: drawatpoint

2010-01-02 Thread Todd Heberlein
> I'm fairly new to programming for the iPhone (still getting up to speed!), ... > but I can't figure out from the docs, nor from online code examples, how to > do this. I liked the book "Beginning iPhone 3 Development: Exploring the iPhone SDK". It is a good way to get up to speed on iPhone de

Resolution Independence

2010-01-05 Thread Todd Heberlein
A friend of mine loves her new 27" iMac but has complained at how small everything is. Searching around on the net I found that it has about a 109 dpi pixel density. I also saw today that the new Nexus phone has a pixel size of 800x480 (as opposed to my iPhone's 480x320 pixel size), and the two

Re: Allow only root/admin users to execute the cocoa app

2010-01-24 Thread Todd Heberlein
> I want to allow my cocoa app to be only launched by root/admin users. > How can i achieve this? As I think has already been mentioned, the UNIX approach is to set the application's owner as root and then make it only executable by the owner. However, Apple largely discourages programmers from

Re: How to resume an XCode Download

2010-02-10 Thread Todd Heberlein
My problem is that my ISPs use long-haul WiFi links that seem to go down fairly regularly (which is why I keep redundant ISPs). This make multi-hour downloads occasionally frustrating. Todd On Feb 10, 2010, at 9:00 AM, Philip Ershler wrote: > > On Feb 10, 2010, at 9:45 AM, Richard Somers wrot

Re: Several Questions

2009-05-30 Thread Todd Heberlein
Sorry about the confusion, yes I meant it will run normally but unattended. I need to make sure it recovers from any errors. in the worst case if it crashes, I need it to launch again automatically, even if there's 1 minute or whatever delay, it's absolutely fine. So it is a GUI app that w

Re: Several Questions

2009-05-31 Thread Todd Heberlein
You can use launchd to keep your app alive. That way you, don't have to worry about adding code to your application to do it, you just have to ensure the launchd property list is in the right place. So if in your launchd module you have the key-value pair: KeepAlive will l

Re: Several Questions

2009-06-01 Thread Todd Heberlein
why should your app stops responding? Do you want to detect time-outs (network-times, IO-timeouts, ...) or will your app be crap and full with bugs? I wish my code never had infinite loops (Apple's address:) or multithreaded deadlocks or other types of bugs... but sometimes sh*t happens.

Re: Several Questions

2009-06-01 Thread Todd Heberlein
FYI: I was looking through some Darwin mailing lists archives, and I ran across this posting about launchd at WWDC that may be of interest to this thread: Hello all, If you're attending WWDC and are interested in the BSD-level technologies in Mac OS X, I'm giving a talk on launchd this ye

Re: Several Questions

2009-06-01 Thread Todd Heberlein
Great, so I understand from what you're saying that I can launch a GUI app using launchd? Out of curiosity, I just tried this. I created a basic Cocoa app (I made no changes to it, I just built the default skeleton application that Xcode creates for you). The project is in the directory:

Re: launchd detecting when an application is running

2009-06-04 Thread Todd Heberlein
I have written an application that I would like to launch whenever a certain app is launched. I have used LaunchAgents in the past to detect events such as USB insertion and volume mounting to perform certain actions. I was wondering if there was a launchd.plist key that allowed for launc

State of the Union videos?

2009-06-12 Thread Todd Heberlein
Does anyone know if/when Apple will post the "State of the Union" presentations from WWDC 09? Todd ___ 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

Re: Discussion to splinter off cocoa-dev list

2009-06-12 Thread Todd Heberlein
so grueling and satisfying at the same time, we may never know. With all the new functionality (APIs) to be provided in 10.6 and for the iPhone 3.0, I wonder if it would be worth having some frank discussion on if now is a good time to split off from this list some more focused discussion l

Re: Securely limit the running an application by serial number

2009-07-03 Thread Todd Heberlein
This is for limited use, and isn't a product for the masses. There has already been some pretty good stuff posted, but just keep in mind that once you've released your code, if someone is really interested in modifying your code, they probably will. I doubt there will ever be a 100% guaran

Using private APIs

2009-07-09 Thread Todd Heberlein
From time to time someone posts a question about using non-public Apple APIs -- you know, the ones that let you do something really cool or fast but causes your app to break on a future OS release. :) Anyways, I saw this purported private API for OS X, and I thought I'd share it. Pretty fu

Re: testing your app on a virtual machine?

2009-07-15 Thread Todd Heberlein
Is there anyway one can install an OSX system on a virtual machine for testing purposes? Check the EULA for Mac OS X Server. I think you can run that under a VM, and I think VMWare has support for it in either the current or future version. Todd __

Re: Finding an available port for chat

2009-07-17 Thread Todd Heberlein
but there will be persons like myself with draconian isp who block gobs of ports and make it hard to for chat apps to work. There are a lot of very good reasons for a Draconian policy like that. :) how can I, in a reasonably economic way, find an open port to talk on? Are you trying to s

Avoiding KVO in dealloc?

2009-08-03 Thread Todd Heberlein
While working through "Beginning iPhone 3 Development" I've seen the following a lot, and it seems like a general Cocoa issue. In -viewDidUnload methods the code has the form: self.foo = nil; Whereas in -dealloc methods the code has the form: [foo release]; Both methods seem t

Re: Notification for launch of root daemon process?

2009-08-17 Thread Todd Heberlein
Is there some notification that's posted by the OS when a root daemon process is launched? Here's what I've tried: Off the Cocoa topic, but I track processes using the BSM audit trail. Todd ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) P

Re: devil of a time with an NSImageView

2009-08-19 Thread Todd Heberlein
The standard practice is to start any nib-dependent startup stuff on -awakeFromNib ... forcing it to load seems dirty. :-) or -viewDidLoad on the iPhone (?). Todd ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post

Re: Authorization Question (Possibly a simple POSIX question?)

2009-08-21 Thread Todd Heberlein
I don't understand how the app allowed to use that file descriptor to read the file's contents. Its a general UNIX thing. If you have a book on UNIX interprocess communications, you can probably find some details in it. And as others have pointed out, permissions are checked at the time of

virtual ivars

2009-08-29 Thread Todd Heberlein
I've been playing with KVC and KVO with my own setters and getters (along with Controllers) to create virtual ivars. That is, there never is any storage created for the variable and its value is calculated on the fly when the getter is called. This seems to have some cool potential, but it

Re: virtual ivars

2009-08-29 Thread Todd Heberlein
If you can't set a value, don't provide a setter. I see from another post I was conflating "ivars" with "properties". With regards to the setters, I have some C++ libraries, and I was thinking about having "property" wrappers in an Objective C object doing setting and getting into values i

Re: virtual ivars

2009-08-29 Thread Todd Heberlein
I see from another post I was conflating "ivars" with "properties". With regards to the setters, I have some C++ libraries, and I was thinking about having "property" wrappers in an Objective C object doing setting and getting into values in the C++ object. So here is a slightly more detail

Re: Wow! Just installed OPENSTEP ENTERPRISE 4.2

2010-08-06 Thread Todd Heberlein
> I had a shrinkwraped OPENSTEP Enterprise 4.2 CD from March 1997 in my file > cabinet, so I just installed it on a crap 1.83GHz Core 2 (not-duo) running > Windows XP SP3. I wonder how much value it lost when you removed the shrink wrap? I've kept only two old computers with me over the years -

Cocoa Drawing vs. Quartz Drawing

2011-01-22 Thread Todd Heberlein
In a Cocoa app is there a preference for using the Cocoa or the Quartz drawing routines? ___ 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-adm

NSScrollView, centering document view?

2011-01-29 Thread Todd Heberlein
When working with an NSScrollView, sometimes my document view is smaller than my content/clip view. (the document view's size is dynamically generated depending on the data that needs to be rendered; or the user may make the window much larger than the document view.) In these cases I would lik

text orientation/positioning with layout manager

2011-01-31 Thread Todd Heberlein
I'm doing a simple experiment using NSTextStorage, NSLayoutManager, NSTextContainer to draw some text (I am basing this on the CircleView example because I want some of that orientation power later). I have found that when rendering the text using drawGlyphsForGlyphRange:atPoint:, I don't get t

Sandboxing and "helper apps"

2012-05-29 Thread Todd Heberlein
In the past you could include a full UNIX application inside a Mac application bundle. For example, in the directory MyApp.app/Contents/MacOS could be the Cocoa executable "MyApp" and the UNIX executable "my_helper_app". In addition to running this helper app from the Cocoa app, this U

Re: Sandboxing and "helper apps"

2012-05-30 Thread Todd Heberlein
On May 30, 2012, at 4:53 AM, Stephane Sudre wrote: > It's allowed. IIRC, when the helper app is launched from the main > application, it inherits the entitlements/restrictions of its parent. I thought (and I'm barely getting up to speed on this) if the program was launched as an NSTask, it woul

QTKit from UNIX app?

2012-06-09 Thread Todd Heberlein
Probably a naive question, but can I use QTKit (or is there a better library?) to capture images (or videos) inside a UNIX helper application? I've never tried using Cocoa (and related) objects outside a regular Cocoa application with a GUI, NSApplicationMain(), etc. Is this generally prohibite

  1   2   >