Re: Help with Help

2014-05-07 Thread Cosmo
As somebody who did a lot of development work on early versions of Simple Help Editor, I’d like to point out a misstatement. It does not require one to write their own HTML. It does a quite capable job of translating styled text into HTML, but does offer the ability to handle custom HTML for thi

Re: Help with Help

2014-05-07 Thread koko
On May 7, 2014, at 12:00 PM, Kirk wrote: > I further note that Apple's own iWork apps use online help pages that open in > Safari. We use HTML and open Safari when user selects help. Great for our cross platform products. -koko ___ Cocoa-dev m

Re: Document being reopened on launch during modal dialog

2014-05-07 Thread Graham Cox
On 8 May 2014, at 10:39 am, Kyle Sluder wrote: > Wait, why do you suspect this? Unless I missed something, there’s no > guarantee, ARC or not, that a receiver will survive through a method > invocation. How else could it work? -performSelector must hang on to the receiver at least until the

Re: Document being reopened on launch during modal dialog

2014-05-07 Thread Kyle Sluder
> On May 7, 2014, at 5:07 PM, Quincey Morris > wrote: > > However, it’s probably safe for a different reason. ‘performSelector’ should > retain its receiver Wait, why do you suspect this? Unless I missed something, there’s no guarantee, ARC or not, that a receiver will survive through a metho

Re: Document being reopened on launch during modal dialog

2014-05-07 Thread Graham Cox
On 8 May 2014, at 8:08 am, Mills, Steve wrote: > Is this all safe and legal, releasing self right before it returns to > whatever called it? I believe so, I've done this rarely but occasionally, and it's OK, though if you forget you've done this and later change the calling behaviour in such

Re: Document being reopened on launch during modal dialog

2014-05-07 Thread Quincey Morris
On May 7, 2014, at 15:08 , Mills, Steve wrote: > Is this all safe and legal, releasing self right before it returns to > whatever called it? I believe it’s safe in manual RR, though you could perhaps do ‘[self autorelease]’ if you feel uncertain. I’m not sure it’d be safe under ARC (that is,

Re: NSNumberFormatter 10.0+ style exception with zero

2014-05-07 Thread Greg Parker
The implementation of old-style NSNumberFormatter has some sort of compatibility code for old archive formats. It's possible that new versions of Xcode don't write that old format correctly, or even try to do it at all. (The error occurs because the Zero field came back as an NSString instead of

Re: NSWorkspace issue

2014-05-07 Thread Varun Chandramohan
Ah yes, that was the mistake. I did not notice it. Probably its always a good idea to use fileURLWithPath as I always deal with file urls and not http://. On 7/05/2014 3:58 pm, "Ken Thomases" wrote: >On May 7, 2014, at 12:02 AM, Varun Chandramohan wrote: > >>NSURL *fileURL = [NSURL >>URLWit

Re: Serializing NSDictionary for network transfer

2014-05-07 Thread Manoah F. Adams
On May 7, 2014, at 12:30 , Carl Hoefs wrote: For the moment, I'm using only NSStrings and NSNumbers. I'm sending data back and forth between OSX and iOS devices, and NSDictionary is a very convenient container. Once I show that this will work then the pressure will ease off and I'll have ti

Re: Document being reopened on launch during modal dialog

2014-05-07 Thread Mills, Steve
On May 6, 2014, at 19:05:22, Graham Cox wrote: > The compromise we've adopted is to let all the documents open as normal > *then* show the dialog if necessary on top of them. That avoids the need to > capture the 'open' URLs, but it's only OK if you can accept the documents > being there - in

Re: Resizing last column of NSTableView when it touches window border

2014-05-07 Thread Quincey Morris
On May 7, 2014, at 14:42 , Avery Pierce wrote: > If I'm understanding Jakob's issue, the table view doesn't scroll more than > it needs to, so the rightmost column divider is exactly at the edge of the > window. It can never be scrolled inside. You’re right. He said “rightmost column” and I re

Re: NSNumberFormatter 10.0+ style exception with zero

2014-05-07 Thread Gary L. Wade
There are occasional bugs when converting from earlier formats. What I do besides reporting the bug is to look at the underlying XML in the earlier version of the XIB and the later version and try to manually make the necessary changes using a text editor. I've sometimes had to quit Xcode, edit

Re: Resizing last column of NSTableView when it touches window border

2014-05-07 Thread Avery Pierce
> > Wouldn’t a user scroll the rest of the column into the window first, > stopping only after the vertical line in the header row is clearly inside > the window? If I'm understanding Jakob's issue, the table view doesn't scroll more than it needs to, so the rightmost column divider is exactly at

Re: NSNumberFormatter 10.0+ style exception with zero

2014-05-07 Thread Howard Moon
Ok, this seems to be an IB issue. I've made my own NSNumberFormatter, set its properties, and set it as the formatter for my text fields, all in code, and that works perfectly. No idea why the same object created in Xcode fails, but I'll do whatever it takes to make it work, I guess! Regards,

Re: Resizing last column of NSTableView when it touches window border

2014-05-07 Thread Quincey Morris
On May 7, 2014, at 13:55 , Jakob Egger wrote: > The problem only occurs when you have many columns and the table view > scrolls horizontally. Then you can't make the last column wider. > Dragging the left side only makes the second-to-last column narrower, > and dragging the right side resizes th

Re: Resizing last column of NSTableView when it touches window border

2014-05-07 Thread Jakob Egger
The problem only occurs when you have many columns and the table view scrolls horizontally. Then you can't make the last column wider. Dragging the left side only makes the second-to-last column narrower, and dragging the right side resizes the window. On Wed, May 7, 2014, at 22:16, Jerry Krinock

Re: NSNumberFormatter 10.0+ style exception with zero

2014-05-07 Thread Howard Moon
Hm, it may be that something else is at play here. I did make ONE change when porting… I put my text fields inside a tab view. I wonder if maybe there's a problem accessing the number formatter from a control inside a tab view? All the connections *appear* to be there, and the call stack does

Re: Resizing last column of NSTableView when it touches window border

2014-05-07 Thread Jerry Krinock
On 2014 May 07, at 05:27, Jakob Egger wrote: > I have a NSTableView that spans the full width of the window, so it touches > the window borders on both sides. The table view has many columns (it scrolls > horizontally). > > Changing column witdth columns by dragging the separator line works

Re: Subclassing and private methods

2014-05-07 Thread Rick Aurbach
On May 7, 2014, at 2:33 PM, Charles Srstka wrote: > On May 7, 2014, at 2:24 PM, Rick Aurbach wrote: > >> I am using a CocoaPod that ALMOST does what I want it to. It appears that I >> can get the desired behaviors by subclassing it (creating a category is also >> a possibility, although doing

Re: Subclassing and private methods

2014-05-07 Thread Charles Srstka
On May 7, 2014, at 2:24 PM, Rick Aurbach wrote: > I am using a CocoaPod that ALMOST does what I want it to. It appears that I > can get the desired behaviors by subclassing it (creating a category is also > a possibility, although doing so has the same problems as subclassing). > > Obviously,

Re: Serializing NSDictionary for network transfer

2014-05-07 Thread Carl Hoefs
On May 7, 2014, at 12:06 PM, Alex Zavatone wrote: > If your dictionary has only text values, this should be no problem with the > NSJSONSerialization, but if you're sending images, you'll need to convert the > images to 16 bit encoded NSData objects. > > I guess the bigger question is, "what a

Subclassing and private methods

2014-05-07 Thread Rick Aurbach
I am using a CocoaPod that ALMOST does what I want it to. It appears that I can get the desired behaviors by subclassing it (creating a category is also a possibility, although doing so has the same problems as subclassing). Obviously, I would like to create as minimal a subclass as possible (an

Re: Serializing NSDictionary for network transfer

2014-05-07 Thread SevenBits
On Wednesday, May 7, 2014, Carl Hoefs wrote: > > On May 7, 2014, at 11:38 AM, Wim Lewis > > wrote: > > > Depending on what is *in* your NSDictionary, though, a less opaque > serialization format might be better, such as one of the property-list > formats (see NSPropertyListSerialization) or even

Re: Serializing NSDictionary for network transfer

2014-05-07 Thread Alex Zavatone
If your dictionary has only text values, this should be no problem with the NSJSONSerialization, but if you're sending images, you'll need to convert the images to 16 bit encoded NSData objects. I guess the bigger question is, "what are the data types within your dictionary"? If it's just text

Re: Help with Help

2014-05-07 Thread Alex Zavatone
On May 7, 2014, at 2:06 PM, Todd Heberlein wrote: > > On May 7, 2014, at 6:53 AM, Bill Cheeseman 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 (P

Re: Serializing NSDictionary for network transfer

2014-05-07 Thread Carl Hoefs
On May 7, 2014, at 11:38 AM, Wim Lewis wrote: > Depending on what is *in* your NSDictionary, though, a less opaque > serialization format might be better, such as one of the property-list > formats (see NSPropertyListSerialization) or even JSON. These formats can > only hold a small, non-exte

Re: Help with Help

2014-05-07 Thread Marco S Hyman
> The HTML in the app and on the website is slightly different, I use PHP to > generate the HTML. > > A more modern approach would probably be to use a static site generator like > Jekyll, which would allow you to use templates, write in Markdown, etc. You can use Markdown with PHP: https://git

Re: Serializing NSDictionary for network transfer

2014-05-07 Thread Wim Lewis
On 7 May 2014, at 11:17 AM, Carl Hoefs wrote: > Newb questions re: serializing an NSDictionary for network transfer to > another process. I've read over the Apple documentation, but it seems to > detail the methods involved but not how to use serialization, and some > methods seem to require wr

Re: Serializing NSDictionary for network transfer

2014-05-07 Thread Quincey Morris
On May 7, 2014, at 11:17 , Carl Hoefs wrote: > (1) I see that NSDictionary has an encoding method: > > - (void)encodeWithCoder:(NSCoder *)coder; > > but this returns (void), which is puzzling to me. I would expect it to return > (void *) to a malloced region containing the serialization. Where

Re: Serializing NSDictionary for network transfer

2014-05-07 Thread Carl Hoefs
On May 7, 2014, at 11:21 AM, Joseph Dixon wrote: > Consider NSJSONSerialization. Hmm, I hadn't come across NSJSONSerialization. Looks straightforward to use. Thanks! -Carl ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post adm

Re: Serializing NSDictionary for network transfer

2014-05-07 Thread Joseph Dixon
Consider NSJSONSerialization. -jwd// Joseph W. Dixon OS X 10.9 Newb questions re: serializing an NSDictionary for network transfer to another process. I've read over the Apple documentation, but it seems to detail the methods involved but not how to use serialization, and some methods seem t

Serializing NSDictionary for network transfer

2014-05-07 Thread Carl Hoefs
OS X 10.9 Newb questions re: serializing an NSDictionary for network transfer to another process. I've read over the Apple documentation, but it seems to detail the methods involved but not how to use serialization, and some methods seem to require writing archives or plist files to disk. So, I

Re: Help with Help

2014-05-07 Thread Todd Heberlein
On May 7, 2014, at 6:53 AM, Bill Cheeseman 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 book, and it did hel

Re: Help with Help

2014-05-07 Thread Kirk
Apple help is unacceptably slow. I just opened Safari's help, and it timed out, giving the "no information for that topic" message. Subsequent invocations are faster, but it is still a painful performance. And this was on an Core i7 MBP with 16gB of RAM. I further note that Apple's own iWo

Re: NSData problems and viewing buffer data in hex

2014-05-07 Thread Uli Kusterer
On 07 May 2014, at 18:21, William Squires wrote: > Quickie question: Does [NSData getBytes:range:] return .length bytes > into the buffer specified, even if some of the bytes may be '\0' (terminating > null), The concept of terminating zeroes only exists in strings. NSData will preserve the by

Re: Help with Help

2014-05-07 Thread Gordon Apple
Wow! That¹s quite an indictment of one of Apple, Inc¹s supposed developer tools. You¹d think that with $190B cash, they could fix this. One of the problems I ran into is that I couldn¹t find the indexing tool without going back to old versions. When I tried to use it, it choked, spewing a litany o

NSNumberFormatter 10.0+ style exception with zero

2014-05-07 Thread Howard Moon
Hi, is the 10.0+ style of NSNumberFormatter no longer supported? I recently moved from developing in Xcode3 under OS X 10.7 to Xcode 4 under OS X 10.8, and from having a Base SDK of 10.6 to 10.7, and from a Deployment Target of 10.5 to 10.6, and am now having problems with my xib-base

Re: NSData problems and viewing buffer data in hex

2014-05-07 Thread Jens Alfke
On May 7, 2014, at 9:21 AM, William Squires wrote: > Quickie question: Does [NSData getBytes:range:] return .length bytes > into the buffer specified, even if some of the bytes may be '\0' (terminating > null), so long as range is valid? If it’s a valid sub-range of the data it’ll copy range.

NSData problems and viewing buffer data in hex

2014-05-07 Thread William Squires
Quickie question: Does [NSData getBytes:range:] return .length bytes into the buffer specified, even if some of the bytes may be '\0' (terminating null), so long as range is valid? I'm trying to read in a specified record from a random-access file (record length is 1000 bytes = kRecSize), and I

Re: Help with Help

2014-05-07 Thread Bill Cheeseman
On May 7, 2014, at 9:44 AM, Jakob Egger wrote: > Problems with Help Books > > > First of all, they are poorly documented. I disagree with most of Mr. Egger's comments about Help Book problems, but he is certainly right that they are still poorly documented. The documentat

Re: Help with Help

2014-05-07 Thread Jakob Egger
I'd strongly recommend against using Apple's Help Book application. There are a few problems with Apple Help: Problems with Help Books First of all, they are poorly documented. It is extremely difficult to structure them in the right way. You can't use HTML5, you have to u

Resizing last column of NSTableView when it touches window border

2014-05-07 Thread Jakob Egger
I have a NSTableView that spans the full width of the window, so it touches the window borders on both sides. The table view has many columns (it scrolls horizontally). Changing column witdth columns by dragging the separator line works perfectly, except for the last column. The problem is that

Re: Help with Help

2014-05-07 Thread Uli Kusterer
On 29 Apr 2014, at 19:52, Gordon Apple wrote: > We would like to get a recommendation on the best way to generate a help > system for a fairly complex application. We started by using a simple web > view and created about 120 screens in BBEdit, mostly drill-down outlines. > Unfortunately, this has

Re: How to convert a UTF-8 byte offset into an NSString character offset?

2014-05-07 Thread Uli Kusterer
On 06 May 2014, at 20:12, Quincey Morris wrote: > FWIW, my opinion is that if your library clients are specifying UTF-8 > sequences at the API, and expect byte offsets into those sequences to be > meaningful, you might well be forced to maintain the original UTF-8 sequence > in the library’s i