Re: Nil and nil Macro Conflict

2012-05-01 Thread Andreas Grosam
On May 1, 2012, at 7:16 PM, Greg Parker wrote: > On May 1, 2012, at 7:10 AM, Andreas Grosam wrote: >> Hm, the library is a header only template library - namely its spirit (from >> boost), so my chances to never include this library are zero ;) >> >> Basically, I need something like the follow

Re: Nil and nil Macro Conflict

2012-05-01 Thread Don Quixote de la Mancha
Are not both Objective-C and C++, as well as Objective-C++ case-sensitive? If so, Nil and nil should be different symbols. If they should be, and really are different symbols, but still conflict somehow, then you've actually got a different problem than you think you do. Do Not Let The Sun Go Do

Re: Concealing an app from DTrace

2012-05-01 Thread Don Quixote de la Mancha
On Tue, May 1, 2012 at 6:28 PM, Kyle Sluder wrote: >> I was just wondering if this is still true or true in general...that it is >> not possible to conceal an application from DTrace. > On May 1, 2012, at 6:04 PM, Eric Gorr wrote: > It is true and will be true as long as your are able to compi

Re: Concealing an app from DTrace

2012-05-01 Thread Wade Tregaskis
> Is that the only way? Or is there something easier that would bypass the flag? There are several that I know of. But my question first, to you, is why? I can tell you now that you can't reliably defend against all approaches. What you can do is make things really awkward for yourself for de

Re: No validation with a bound NSTableView and custom NSFormatter

2012-05-01 Thread Quincey Morris
On May 1, 2012, at 20:09 , Ben Kennedy wrote: > The thing about all this is that a few revs back, when I was using a dumb > array with NSTableViewDataSource and no bindings, I was getting the > validation behaviour for free. Now it's gone. I guess I should re-trace my > steps and try to figur

Re: No validation with a bound NSTableView and custom NSFormatter

2012-05-01 Thread Ben Kennedy
On 01 May 2012, at 7:42 pm, Quincey Morris wrote: > 3. That protocol has a method 'control:isValidObject:'. > >> "This method gives the delegate the opportunity to validate the contents of >> the control’s cell (or selected cell). > > That seems like what you want, if you query the formatter d

Re: No validation with a bound NSTableView and custom NSFormatter

2012-05-01 Thread Quincey Morris
On May 1, 2012, at 19:20 , Ben Kennedy wrote: > The issue I'm still having is that non-bound columns (i.e., those controlled > by the latter two NSTableViewDataSource methods) are not enforcing validity > when the attached formatter returns NO from > getObjectValue:forString:errorDescription:.

Re: No validation with a bound NSTableView and custom NSFormatter

2012-05-01 Thread Ben Kennedy
On 01 May 2012, at 5:25 pm, Quincey Morris wrote: > I'm not aware that KVC-style validation ever happens automatically *except* > for bindings that have have "Validates immediately" checked. Thanks for clarifying that -- I believe you're right. > AFAIK, the validation performed by a number for

Re: Concealing an app from DTrace

2012-05-01 Thread Eric Gorr
Thanks Kyle. Is that the only way? Or is there something easier that would bypass the flag? In my case, I am not sure i would be concerned if a custom kernel was required. On May 1, 2012, at 9:28 PM, Kyle Sluder wrote: > On May 1, 2012, at 6:04 PM, Eric Gorr wrote: > >> I found this old me

Re: Concealing an app from DTrace

2012-05-01 Thread Kyle Sluder
On May 1, 2012, at 6:04 PM, Eric Gorr wrote: > I found this old message: > >http://lists.apple.com/archives/cocoa-dev/2010/Mar/msg01042.html > > in which stated: > >If you think this is going to help you avoid piracy, it's not. OS X >has a flag (PT_DENY_ATTACH) that the kernel chec

Concealing an app from DTrace

2012-05-01 Thread Eric Gorr
I found this old message: http://lists.apple.com/archives/cocoa-dev/2010/Mar/msg01042.html in which stated: If you think this is going to help you avoid piracy, it's not. OS X has a flag (PT_DENY_ATTACH) that the kernel checks for when a debugger asks to attach to a process. If t

Re: No validation with a bound NSTableView and custom NSFormatter

2012-05-01 Thread Quincey Morris
On May 1, 2012, at 16:23 , Ben Kennedy wrote: > I confess to have mis-described my situation somewhat: while most columns > were bound, several instead used the classical NSTableViewDataSource style, > including the one for which I'm having the validation trouble. Sure enough, > when I connect

NSTableview tooltip bug?

2012-05-01 Thread Donald Hall
I have an NSTableview column where each cell contains a file name. I use tooltips (addToolTipRect and NSToolTipOwner protocol) to show the complete path to the file when the user hovers the mouse over the cell. This works fine unless the name of the file exceeds the column width - 3 pixels. i.e

Re: No validation with a bound NSTableView and custom NSFormatter

2012-05-01 Thread Ben Kennedy
On 01 May 2012, at 2:47 pm, Quincey Morris wrote: > Double-check that "Validates immediately" is checked for the binding. Thanks for the reply Quincey. I confess to have mis-described my situation somewhat: while most columns were bound, several instead used the classical NSTableViewDataSource

Re: No validation with a bound NSTableView and custom NSFormatter

2012-05-01 Thread Quincey Morris
On May 1, 2012, at 14:55 , Kyle Sluder wrote: > That seems to be at odds with the Bindings documentation: > https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CocoaBindings/Concepts/MessageFlow.html > > The validation should be triggered as soon as the text field tries to co

Re: No validation with a bound NSTableView and custom NSFormatter

2012-05-01 Thread Kyle Sluder
On May 1, 2012, at 2:47 PM, Quincey Morris wrote: > On May 1, 2012, at 14:23 , Ben Kennedy wrote: > >> I have an NSTableView whose data source is bound to an NSArrayController. >> To one of its columns (displaying a custom type) I have attached a custom >> NSFormatter subclass. The NSFormatt

Re: No validation with a bound NSTableView and custom NSFormatter

2012-05-01 Thread Quincey Morris
On May 1, 2012, at 14:23 , Ben Kennedy wrote: > I have an NSTableView whose data source is bound to an NSArrayController. To > one of its columns (displaying a custom type) I have attached a custom > NSFormatter subclass. The NSFormatter correctly returns NO from > getObjectValue:forString:er

Re: Minimal document-based app

2012-05-01 Thread Jens Alfke
On May 1, 2012, at 12:46 PM, Wade Tregaskis wrote: > Actually, there are a lot of commercial developers who hard-code their entire > UIs. I'm at something of a loss to see why myself, but they do it, and they > swear it's the best way. Ironically, one of the reasons often given is > "easier

Re: Modal-loop Event-handling question

2012-05-01 Thread Jens Alfke
On May 1, 2012, at 12:30 PM, Motti Shneor wrote: > To avoid the crash, we tried to defer the "endSheet" via > "performSelecor:@selector(closeAnyOpenSheet) afterDelay:0.0". This prevents > the releasing of the dialog before the "mouseUp" event is received. However, > when "mouseUp" event comes

No validation with a bound NSTableView and custom NSFormatter

2012-05-01 Thread Ben Kennedy
Hi all, I have an NSTableView whose data source is bound to an NSArrayController. To one of its columns (displaying a custom type) I have attached a custom NSFormatter subclass. The NSFormatter correctly returns NO from getObjectValue:forString:error: if the supplied string is not acceptable.

Re: Minimal document-based app

2012-05-01 Thread Wade Tregaskis
> Unlike other graphical UI layout tools, Interface Builder is central to Cocoa > development, not simply a shortcut for newbies or a way to get started > quickly. Anyone who thinks developing without Interface Builder is a purer > path to understanding Cocoa has already missed the point. Actua

Re: Modal-loop Event-handling question

2012-05-01 Thread Motti Shneor
Thanks Jens, for your enlightening comments. On 30/04/2012, at 20:55, Jens Alfke wrote: > > On Apr 30, 2012, at 1:24 AM, Motti Shneor wrote: > >> In our client-server app we sometimes present modal sheets on our main >> window. Following server notifications we sometimes have to dismiss these

Re: Minimal document-based app

2012-05-01 Thread Richard Somers
On May 1, 2012, at 8:50 AM, Fritz Anderson wrote: > NIBs _are_ how it works. They don't contain or generate code. They don't > contain or generate scripts. They don't exercise much of the API you're > trying to use. They contain archived objects and their connections. True, but the beginner may

Re: Nil and nil Macro Conflict

2012-05-01 Thread Greg Parker
On May 1, 2012, at 7:10 AM, Andreas Grosam wrote: > Hm, the library is a header only template library - namely its spirit (from > boost), so my chances to never include this library are zero ;) > > Basically, I need something like the following to compile: > > // file foo.m: > > #include > >

Re: Minimal document-based app

2012-05-01 Thread mlist0...@gmail.com
What Fritz said. Unlike other graphical UI layout tools, Interface Builder is central to Cocoa development, not simply a shortcut for newbies or a way to get started quickly. Anyone who thinks developing without Interface Builder is a purer path to understanding Cocoa has already missed the poi

Re: Nil and nil Macro Conflict

2012-05-01 Thread Scott Ribe
On May 1, 2012, at 8:10 AM, Andreas Grosam wrote: > Hm, the library is a header only template library - namely its spirit (from > boost), so my chances to never include this library are zero ;) I didn't say never include it; I said never include it from Objective-C++. The fact that it is a head

Re: Minimal document-based app

2012-05-01 Thread Fritz Anderson
On 1 May 2012, at 2:28 AM, ecir hana wrote: > If nothing else, it would explain to me how things works, 20 lines of > code would help me better than 20 documentation pages. There tutorials > above certainly did the explaining very well. Every few months, a beginner comes who wants to skip NIBs to

Re: Minimal document-based app

2012-05-01 Thread Kyle Sluder
On May 1, 2012, at 12:28 AM, ecir hana wrote: > If nothing else, it would explain to me how things works, 20 lines of > code would help me better than 20 documentation pages. There tutorials > above certainly did the explaining very well. But it won't teach you how document-based Cocoa apps are a

Re: Nil and nil Macro Conflict

2012-05-01 Thread Andreas Grosam
On May 1, 2012, at 3:56 PM, Scott Ribe wrote: > On May 1, 2012, at 5:44 AM, Andreas Grosam wrote: > >> What are my options? > > You might have to wrap that sucker, so that you can compile that class as > straight C++ and never include its header from Objective-C++, but instead use > your wrap

Re: Nil and nil Macro Conflict

2012-05-01 Thread Scott Ribe
On May 1, 2012, at 5:44 AM, Andreas Grosam wrote: > What are my options? You might have to wrap that sucker, so that you can compile that class as straight C++ and never include its header from Objective-C++, but instead use your wrapper class from Objective-C++. Assuming you don't want to cha

Nil and nil Macro Conflict

2012-05-01 Thread Andreas Grosam
I want to use a C++ software library which uses class names "nil" and "Nil" for a Cocoa application. Including the headers will fail due to name conflicts with the macros "Nil" and "nil". What are my options? Regards Andreas ___ Cocoa-dev mailing l

Re: Minimal document-based app

2012-05-01 Thread jonat...@mugginsoft.com
On 29 Apr 2012, at 22:47, ecir hana wrote: > Dear list, > > I'm trying to understand how the things in Cocoa works but I'm > struggling with one thing. I saw > http://cocoawithlove.com/2010/09/minimalist-cocoa-programming.html and > http://casperbhansen.wordpress.com/2010/08/15/dev-tip-nibless-

Re: Minimal document-based app

2012-05-01 Thread ecir hana
If nothing else, it would explain to me how things works, 20 lines of code would help me better than 20 documentation pages. There tutorials above certainly did the explaining very well. Also, I don't really want to argue whether there is merit or not - I would be more thankful for the eventual tu