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

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 to run

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

Re: Game Center Invite

2014-08-26 Thread Todd Heberlein
On Aug 26, 2014, at 4:00 PM, Todd Heberlein todd_heberl...@mac.com 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

Re: app icon for Launchpad

2014-06-17 Thread Todd Heberlein
On Jun 16, 2014, at 8:35 PM, Roland King r...@rols.org wrote: My OSX app has an icon. It shows in the dock when active, it shows on Alt-Tab, it shows in the Applications folder, however in Launchpad I get the generic OSX Application Icon. As the previous reply said, it might be a caching

CMMotionManager valid data?

2014-06-10 Thread Todd Heberlein
I’ve just started playing with CMMotionManager on my iPhone in an OpenGL program. I allocate CMMotionaManger and startDeviceMotionUpdates in -viewDidLoad. In -update I check if deviceMotionActive and print the roll value. motionManager.deviceMotion.attitude.roll For the first few

Re: OpenGL and crawling ants

2014-06-09 Thread Todd Heberlein
On Jun 8, 2014, at 7:40 PM, Seth Willits sli...@araelium.com wrote: Use mipmaps, and if that's still not high enough quality, anisotropic filtering. Thanks! That is much better. Side note: when setting GLKTextureLoaderGenerateMipmaps to YES, the texture (apparently) should be a power of 2

OpenGL and crawling ants

2014-06-08 Thread Todd Heberlein
I've just started playing with OpenGL, and I'm trying to use GLKBaseEffect and GLKTextureInfo in part to avoid writing my own shaders, but I'm getting a crawling ants effect. I have a texture that is a square with black edges. For the floor I essentially have a series of rectangles on which

Re: Help with Help

2014-05-08 Thread Todd Heberlein
For those interested, I put together a blog entry of my personal notes over the years on using Apple's Help: Help on OS X Help http://www.toddheberlein.com/blog/2014/5/8/help-on-os-x-help On May 8, 2014, at 10:50 AM, Gordon Apple g...@ed4u.com wrote: Our app is complex, years

Re: Help with Help

2014-05-07 Thread Todd Heberlein
On May 7, 2014, at 6:53 AM, Bill Cheeseman wjcheese...@gmail.com wrote: As far as I know, the only comprehensive explanation of the new post-Snow Leopard version of Help Books is Chapter 11 of my book, Cocoa Recipes for Mac OS X, Second Edition (Peachpit Press 2010). I used Cheeseman’s

Re: SQLite Question

2014-03-28 Thread Todd Heberlein
On Mar 28, 2014, at 9:19 AM, Dave d...@looktowindward.com wrote: If I need to access SQLite Directly on Mac and iOS, do I need to include my own SQLite Library or can I use the in-built SQLite? I've stuck with the built-in libraries in the past (at least for the Mac). The only caveat is

Re: Does Apple modify our submitted binaries?

2014-03-19 Thread Todd Heberlein
While investigating this crash that only happens on our AppStore binary, I noticed that the executable inside the package is different (from the one we submitted). Does Apple modify that executable? I presume they add their own signature to it. Todd signature.asc Description: Message

Re: NSSavePanel?

2014-03-06 Thread Todd Heberlein
Not sure if this is directly related, but… When a non-sandboxed application presents the Open or Save panel, the program starts opening files in the currently selected directory. Move to a different directory, and the application will start pounding on the files in that directory. This seems

Re: Adding helper app to sandboxed Cocoa app

2013-12-19 Thread Todd Heberlein
On Dec 18, 2013, at 5:49 PM, Seth Willits sli...@araelium.com wrote: I'm positive the same goes for the helpers. I can easily repeat this and setting Skip Install to YES on the tool's target works as expected. Kaching!! :) I had *two* problems. The first was that my certificates were all

Adding helper app to sandboxed Cocoa app

2013-12-18 Thread Todd Heberlein
I am having troubles with the Archive step for a Cocoa program containing a command line helper app. The archive keeps coming up with Generic Xcode Archive, and clicking Validate generates the message: “combo6” does not contain a single–bundle application or contains multiple products. Please

Re: Adding helper app to sandboxed Cocoa app

2013-12-18 Thread Todd Heberlein
On Dec 18, 2013, at 4:02 PM, Seth Willits sli...@araelium.com wrote: Turn on Skip Installation in the tool's build settings. I think that will do it. If you look in the archive you'll see that there's an extra copy because it stuck in the installation path (within the archive) which messes

NSTableView drag drop string

2013-11-20 Thread Todd Heberlein
Embarrassingly simple problem, but I can’t figure it out. I have an NSTableView, and when dragging and dropping I want to encode my object as strings so I can drop them right into a text document or an email message. I’m trying a very simple test (I just want the string “foo” to be dropped in

Re: NSTableView drag drop string

2013-11-20 Thread Todd Heberlein
On Nov 20, 2013, at 10:00 AM, Todd Heberlein todd_heberl...@mac.com wrote: Embarrassingly simple problem, but I can’t figure it out. ... - (void)awakeFromNib { [self.jocksTable registerForDraggedTypes: [NSArray arrayWithObjects: NSPasteboardTypeString, nil

Re: I can't use man command to find c api manuals in Mavericks GM

2013-10-22 Thread Todd Heberlein
On Oct 22, 2013, at 2:19 AM, Maxthon Chan xcvi...@me.com wrote: Well you need Xcode and maybe the Command Line Tools package. Yes, when I installed to Mavericks GM and put on the latest Xcode, a lot of my man pages for C APIs went away. There is a discussion on this about 2 weeks ago in the

dispatch queues and KVO?

2013-10-15 Thread Todd Heberlein
I have an AppDelegate with several ivars that need to be changed by code running out of dispatch queues. Should the setting of these values (because of KVO maybe?) be done by putting a block on dispatch_get_main_queue() and change the ivar there? For example, is the following

NSInputStream vs GCD's Dispatch Sources

2013-10-13 Thread Todd Heberlein
I’m building a new Cocoa client app that will asynchronously receive data over a TCP connection from a server. I was reviewing my options, and I am a little uncertain. On one hand there is the NSStream option (e.g., NSInputStream). It looks a moderately awkward setting up an initial connection

Re: preventing launch

2013-09-02 Thread Todd Heberlein
Is there a programatic way to prevent the launch of a particular application? I want to prevent certain applications under particular situations from starting up. Remove the execute bit? Just remember to reset it. Todd ___ Cocoa-dev mailing

bugreport.apple.com

2013-09-02 Thread Todd Heberlein
Off topic, but... Wow! Apple's Bug Reporter has been completely redone. Nice. My compliments to the Apple folks (who I suspect have not had the most relaxing summer) Feeling motivated to file a new report. Todd ___ Cocoa-dev mailing list

Re: dev site down time is ridiculous

2013-07-24 Thread Todd Heberlein
On Jul 24, 2013, at 10:17 AM, Bob Sabiston fl...@media.mit.edu wrote: OK I don't want to get in some flame war with people that are going to attack me and say Apple is in the right. I am just surprised it's taking so long for one of the biggest companies in the world to get this site back

Re: Non-sandboxed Cocoa app accessing current user preferences using NSTask fails when launched outside Xcode.

2013-07-23 Thread Todd Heberlein
I've a non-sandboxed Cocoa app that launches sqlite command using NSTask to read a preferences file in ~/Library/Preferences. The app works fine when launched using Xcode Build-and-Run, but when the app (after using Xcode Archive and Distribute) is launched independent of Xcode, the app

KVO, which thread?

2013-02-04 Thread Todd Heberlein
I have an NSInvocationOperation, anOp, and register to observe when its isFinished variable is set [anOp addObserver:self forKeyPath:@isFinished options:NSKeyValueObservingOptionNew context:NULL]; When my operation is done, isFinished is set, and thus my method

Re: KVO, which thread?

2013-02-04 Thread Todd Heberlein
On Feb 4, 2013, at 1:54 PM, Robert Monaghan b...@gluetools.com wrote: Set a breakpoint and see which thread it stops on. (It is probably not the main thread. But you will find out for certain with the breakpoint.) Brilliantly simple! Thanks. And your hunch is correct. It was not thread

Re: NSOperation communicating progress?

2013-02-04 Thread Todd Heberlein
Again, everything seems to work fine. The one problem is I get the following warning at the very end: CoreAnimation: warning, deleted thread with uncommitted CATransaction; set CA_DEBUG_TRANSACTIONS=1 in environment to log backtraces. To close out this discussion in case anyone

Re: NSOperation communicating progress?

2013-02-04 Thread Todd Heberlein
On Feb 4, 2013, at 3:16 PM, Graham Cox graham@bigpond.com wrote: You have heard of performSelectorOnMainThread? Might simplify your code substantially. I was following Apple's Concurrency Programming Guide, and I don't think it is in there. I've gone back and used it now to call the

NSOperation communicating progress?

2013-02-03 Thread Todd Heberlein
I've added an NSInvocationOperation object to process a large file asynchronously. Everything mostly works fine, but I am trying to add a way for this NSInvocationOperation object to communicate its progress back to the main thread (e.g., setting a percent of the file processed). I have an

Re: Symbol not found: _OBJC_CLASS_$_NSObject

2013-01-30 Thread Todd Heberlein
On Jan 29, 2013, at 6:26 PM, Greg Parker gpar...@apple.com wrote: likely your Deployment Target setting is incorrect somewhere in NetSQExtensions.framework's build. Double-check your build settings; make sure the setting is correct for all of your targets and files. Look in your build

Re: Symbol not found: _OBJC_CLASS_$_NSObject

2013-01-30 Thread Todd Heberlein
On Jan 30, 2013, at 9:52 AM, Todd Heberlein todd_heberl...@mac.com wrote: Checked the Log Navigator and searched for any references to 10.8. None. All 28 references to -mmacosx-version-min were to 10.7 Any other suggestions? I am linking to libxml2.dylib and libcurl.dylib. Could

Symbol not found: _OBJC_CLASS_$_NSObject

2013-01-29 Thread Todd Heberlein
I mentioned this in a previous Xcode, but I thought it might be different enough topic so I've given it a new subject and brought it over to Cocoa (might be a more appropriate forum) I have embedded private frameworks in a Cocoa Mac OS X application. The development environment is OS X 10.8.2

delegate method both required and deprecated?

2013-01-13 Thread Todd Heberlein
I'm looking at the documentation for NSURLConnectionDelegate (OS X 10.8) and it lists – connection:didSendBodyData:totalBytesWritten:totalBytesExpectedToWrite: as required method (available in 10.6 10.7), but when I click on it, it takes me to the page Deprecated

Re: Finder Source List Icons

2012-12-29 Thread Todd Heberlein
On Dec 29, 2012, at 8:46 PM, koko k...@highrolls.net wrote: Are the icons in the Finders Source List available to developer apps or does the developer have to capture and photoshop them? There are a lot of standard icons in this folder:

Font names

2012-12-21 Thread Todd Heberlein
Googling what must must be a common question has failed me :( Is there documentation for the font names (to be used with NSFont's fontWithName:size:) that are standard on the Mac platform? I'm looking for a list like: Times-Roman Times-Bold Times-Italic

Re: Font names

2012-12-21 Thread Todd Heberlein
On Dec 21, 2012, at 1:52 PM, Kyle Sluder k...@ksluder.com wrote: Apple publishes the list of fonts that are included with each release of OS X. Here's the list for Mountain Lion: http://support.apple.com/kb/HT5379 Thanks to everyone's replies. I've actually found the Wikipedia, KB, and Font

NSRulerView as timeline?

2012-12-19 Thread Todd Heberlein
Is there a common way to create a timeline object like an NSRulerView (or just repurpose the NSRulerView) to appear at the top of an NSScrollView? I am currently using an NSRulerView, but it really doesn't fit the bill. I am wondering if I am going to have to draw my own view and then just

NSScrollView's document view resizing?

2012-12-12 Thread Todd Heberlein
Very basic question: When I have an NSScrollView, when I resize the window (which resizes the NSScrollView), the NSScrollView's documentView (my NSView subclass) gets resized. I didn't expect that to happen. I thought the documentView's size would remain constant and the scrollbars would

Re: NSScrollView's document view resizing?

2012-12-12 Thread Todd Heberlein
On Dec 12, 2012, at 9:31 AM, Kyle Sluder k...@ksluder.com wrote: What's the autoresizing mask on your document view? Even though your document view is the subview of a scroll view, it still gets -resizeWithOldSuperviewSize: as normal. If your autoresizing mask had the width- or

Re: NSScrollView's document view resizing?

2012-12-12 Thread Todd Heberlein
On Dec 12, 2012, at 12:11 PM, Kyle Sluder k...@ksluder.com wrote: Why not just set the autoresizing mask in IB? I confess, I tried to look for it but could not find it. I don't know if it is there and I just wasn't bright enough to figure it out, or if it simply isn't there. If it's

Re: NSScrollView's document view resizing?

2012-12-12 Thread Todd Heberlein
On Dec 12, 2012, at 12:11 PM, Kyle Sluder k...@ksluder.com wrote: There is a workaround, though: instead of dragging out a Scroll View from the Object Library, drag out a Custom View and choose Editor Embed In Scroll View. Yes, I get two different results depending on how I created a

Re: The timestamp service is not available

2012-11-20 Thread Todd Heberlein
On Nov 20, 2012, at 8:15 PM, Graham Cox graham@bigpond.com wrote: I'm getting an error from codesign: The timestamp service is not available.Command /usr/bin/codesign failed with exit code 1 Huh? I rebooted and still get the problem. I can't get any work done. What gives? There is

NSText Field changes my window size

2012-11-18 Thread Todd Heberlein
I have a Text Field (not static), that is bound to some text. It has two horizontal constraints, both equals, one to the object on its left and the other to the object on its right. When I set the Text Field's Behavior to Editable, it displays as I expect: if the text it is bound to is changed

REST, SOAP, XML-RPC, ...?

2012-11-04 Thread Todd Heberlein
Is there currently a standard, Apple-recommended way of doing interoperable client-server architectures? I accidentally backed into a solution that is Apache, PHP, and libcurl, and I figured I should go with one of the many standards out there. REST is pretty close to what I am already doing,

Re: How to Identify a Phantom Write Operation

2012-09-04 Thread Todd Heberlein
On Sep 4, 2012, at 3:17 PM, douglas welton douglas_wel...@earthlink.net wrote: My question: Is there another way to check for writes to the user-selected source file? You can use Apple's BSM audit trails. It will show all attempted reads and writes and gobs of other things by your process.

Re: More sandblasting (oops, I mean sandboxing die die die)

2012-09-03 Thread Todd Heberlein
I suspect the moderator will shut this down as off topic, but I'll reiterate what I've said before. On Sep 3, 2012, at 2:58 PM, William Squires wsqui...@satx.rr.com wrote: Why should sandboxing on MacOS X even be necessary, seeing as we already have the Unix file permissions (and ACLs) to

Re: More sandblasting (oops, I mean sandboxing die die die)

2012-09-03 Thread Todd Heberlein
On Sep 3, 2012, at 2:58 PM, William Squires wsqui...@satx.rr.com wrote: I can see the benefit of taking a more security-related stance on a closed platform like iOS so as to make writing malware harder, but for a general-purpose computing platform, this'll just put unnecessary roadblocks

Security-scoped bookmark feature?

2012-09-02 Thread Todd Heberlein
I ran across an interesting behavior and potentially useful feature with security scoped bookmarks. I hadn't run across this in my reading before. Is this an official behavior? It turns out that once you've created an app-scoped bookmark for a file (after the user selected it in an OpenPanel),

Re: Arrgh IB constraints

2012-07-08 Thread Todd Heberlein
On Jul 8, 2012, at 6:12 PM, Rick Mann wrote: Is there anything that describes how I'm supposed to use IB to set layout constraints? It keeps putting stuff in there, and then not behaving properly at run time. I can't delete half the constraints until I add other ones, and even then it

NSDocument last document loading

2012-07-02 Thread Todd Heberlein
I have a document-based application, and when it starts it tries to automatically load previously opened documents (running on Lion). Is there a way to disable this behavior in the program? My problem is that the document loads/analyzes data sets, and some of the very large ones can take up

Re: NSDocument last document loading

2012-07-02 Thread Todd Heberlein
On Jul 2, 2012, at 2:13 PM, Kyle Sluder wrote: Oops, I should've said call -setRestorable:, not -setRestorationClass:. Going with -setRestorable: is the most direct way to define your explicit intent. Below is what I added to my Document class (which works with some interesting caveats

Re: NSSplitView question - how to implement my own adjustViews style method

2012-07-02 Thread Todd Heberlein
On Jul 2, 2012, at 9:46 PM, Motti Shneor wrote: Thanks Graham (Sigh…) I was beginning to think I'm stupid or something, struggling so hard with a UI element as ordinary as a Split-View. I ran into this exact same problem last week. I can't believe it is an extremely rare situation. I

opening file without an extension

2012-07-01 Thread Todd Heberlein
I have an NSDocument subclass, and I want to open a data file that has no file extension. (It is BSM audit data, and there is no standard extension). The application is sandboxed. When the open panel pops up, all the regular files are greyed out. Is there a way to let Powerbox (??) let the

Re: opening file without an extension

2012-07-01 Thread Todd Heberlein
On Jul 1, 2012, at 8:19 PM, Charles Srstka wrote: Does putting an asterisk (*) in the Extensions field for your document type not work in the sandbox? Excellent! Yes it did. Thanks. Todd ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Binding NSTextField to a number through NSArrayController

2012-06-30 Thread Todd Heberlein
I have an NSTextField that I am binding to an NSArrayController's selection (a number value in that selection). In the Model Key Path field I get an exclamation mark inside a red stop sign icon. Even more confusingly, the code still works. I get the right value! But that exclamation mark has

Re: sandbox question about copying from bundle

2012-06-24 Thread Todd Heberlein
On Jun 24, 2012, at 2:47 AM, Rick C. wrote: Ok here's my follow-up...I confirmed that everything I told you was true and finally said to myself I will just communicate with this executable inside my bundle. This works until I submit it to the Mac App Store and I get invalid binary

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

MyRecorder and 64-bit Intel

2012-06-09 Thread Todd Heberlein
Using the code from Apple's MyRecorder example, I had to switch my architecture to 32-bit Intel in order to get it to work. Why can't I get it to work for 64-bit Intel? BACKGROUND: I was following the example in Apple's QTKit Application Tutorial, but it kept crashing on me. I downloaded

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 would

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 UNIX

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

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 and

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 -[RMDocument dataOfType:error

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. Slightly

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

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

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

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

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: 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

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: 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:

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,

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 them with 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.

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 +

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

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

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

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

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

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

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 (21

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 todd_heberl...@mac.com wrote: In particular, the beginning of the OCTET_STRING_t's buffer begins with two bytes

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

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

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

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

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: 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 representation

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

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

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

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

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

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

  1   2   >