Re: iOS Storyboard - on boarding - skip

2013-10-18 Thread Richard Heard
Seems like a case where it would make more sense to push the controllers explicitly. ie: YNYourNextStepViewController *vc = [self.storyboard instantiateViewControllerWithIdentifier:YNYourNextStepViewControllerIdentifier]; [self.navigationController presentViewController:vc animated:YES complet

Re: NSDocument and KVO compliance

2013-10-18 Thread Jerry Krinock
In Core Data documents, I ignore -[NSDocument isDocumentEdited] and instead use -[NSManagedObjectContext hasChanges]. "In OS X v10.6 and later, this property is key-value observing compliant." In earlier Mac OS X versions, -hasChanges also more reliably gave the correct answer, although that mi

Re: NSPopUpButton binding value/selected problem

2013-10-18 Thread Jerry Krinock
On 2013 Oct 17, at 11:35, Trygve Inda wrote: > I bind the popup: > > Content (myArray.arrangedObjects) > Content Objects (myArray.arrangedObjects.Identifier) > Content Values (myArray.arrangedObjects.Name) I didn't have time today to really understand what you are doing. I'll just say that u

Re: modal window and quit menu item

2013-10-18 Thread Ken Thomases
On Oct 18, 2013, at 6:35 PM, trid...@ihug.co.nz wrote: > Problem : quit menu stays active > when a window is presented using [NSApp runModal:window]. What is the target of the Quit menu item? What is its action method? A typical setup is that its action method is -terminate: and its target is

iOS Storyboard - on boarding - skip

2013-10-18 Thread Alex Kac
Howdy guys. I am looking for some advice. I have an on boarding process that asks for permissions from the user for things like contacts, location, etc…where each page describes why we’re asking and then asks the user to enable access. It works wonderfully and really makes everything far simpler

Re: C functions

2013-10-18 Thread Charles Srstka
On Oct 18, 2013, at 7:30 PM, ChanMaxthon wrote: > I think I know why it did not work: strip command can remove debug symbols, > or unused functions as well. Yep. Charles ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post adm

Re: C functions

2013-10-18 Thread ChanMaxthon
I think I know why it did not work: strip command can remove debug symbols, or unused functions as well. Sent from my iPhone > On 2013年10月19日, at 7:53, Charles Srstka wrote: > >> On Oct 18, 2013, at 6:42 PM, ChanMaxthon wrote: >> >> Try add this line: >> >> extern void foo(void); > > Alrea

Re: modal window and quit menu item

2013-10-18 Thread Mikael Hakman
Is it an error message that you display at the time your user quits the application? /Mikael On Oct 19, 2013, at 1:35 AM, trid...@ihug.co.nz wrote: > > > I have done a net search concerning the problem and I have found > discussions on it, but no solution. > > Problem : quit menu stays acti

Re: C functions

2013-10-18 Thread Charles Srstka
On Oct 18, 2013, at 6:42 PM, ChanMaxthon wrote: > Try add this line: > > extern void foo(void); Already did; it doesn't work. See my follow-up post. Charles ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests o

Re: C functions

2013-10-18 Thread ChanMaxthon
Try add this line: extern void foo(void); Sent from my iPhone > On 2013年10月19日, at 1:21, Charles Srstka wrote: > >> On Oct 18, 2013, at 6:15 AM, Dmitry Markman wrote: >> >> I don't thinks strip remove info used by dynamic linker >> Thus dlsym should work >> As long as symbol is external (not

modal window and quit menu item

2013-10-18 Thread tridiak
I have done a net search concerning the problem and I have found discussions on it, but no solution. Problem : quit menu stays active when a window is presented using [NSApp runModal:window]. Quitting causes the menu item to be permanently disabled. [window setPreventsApplicationTerminati

Re: C functions

2013-10-18 Thread Shane Stanley
On 19 Oct 2013, at 3:15 AM, Uli Kusterer wrote: > this is what you'd do if you wanted to make e.g. CoreFoundation APIs > accessible to a scripting language That's along the lines of what I had in mind, although in this case for basic things like the trig functions in Math.h. -- Shane Stanley

Re: Core Data with ODBC databases?

2013-10-18 Thread Mikael Hakman
Good thinking Noah, very good indeed. I was blinded by how I currently do things in my Persistent Store for ODBC. You are quite right, when using optimistic transaction control there is no need to commit after fetch request. Committing after save request is enough. Now I know what have to do

Re: NSDocument and KVO compliance

2013-10-18 Thread Kevin Perry
If you wanted to try this, you should also override -updateChangeCountWithToken:forSaveOperation:, which is used to decrement change counts after saving. I expect this would get you 99% of the way, but as Seth said, don't expect it to be bulletproof. On Oct 18, 2013, at 11:49 AM, Seth Willits

Re: NSDocument and KVO compliance

2013-10-18 Thread jonat...@mugginsoft.com
On 18 Oct 2013, at 19:49, Seth Willits wrote: > > That said, it would probably mostly work, but it's not always guaranteed to > be bulletproof because those keys could also be influenced by private > methods. My instincts agree. I will suck it and see. I don't really want to have to re-im

Re: NSDocument and KVO compliance

2013-10-18 Thread Seth Willits
On Oct 18, 2013, at 11:41 AM, jonat...@mugginsoft.com wrote: > Twice recently I have found myself tinkering with NSDocument et al to support > observing of certain values. > For example, NSDocument -isDocumentEdited is not seemingly KVO compliant. > -isDocumentEdited status is driven by -updateCh

NSDocument and KVO compliance

2013-10-18 Thread jonat...@mugginsoft.com
Twice recently I have found myself tinkering with NSDocument et al to support observing of certain values. For example, NSDocument -isDocumentEdited is not seemingly KVO compliant. -isDocumentEdited status is driven by -updateChangeCount: so in MYDocument : NSDocument the override is:: - (void)

Re: C functions

2013-10-18 Thread Kyle Sluder
On Fri, Oct 18, 2013, at 10:39 AM, Uli Kusterer wrote: > Oh, one more thing: Instead of dlsym(), you can also use > CFBundleGetFunctionPointerForName() and its cohorts might also be useful > for this if you want to go a bit more high-level. But even then, it needs > to be an exported symbol in a dy

Re: C functions

2013-10-18 Thread Uli Kusterer
On Oct 18, 2013, at 6:15 PM, Uli Kusterer wrote: > On Oct 18, 2013, at 4:48 AM, Shane Stanley wrote: >> is there any way to build a call to a C function on the fly? I mean >> something like pass a string to a method, and have it call the function of >> that name? > > > Short: No. Long: Maybe.

Re: C functions

2013-10-18 Thread Charles Srstka
On Oct 18, 2013, at 6:15 AM, Dmitry Markman wrote: > I don't thinks strip remove info used by dynamic linker > Thus dlsym should work > As long as symbol is external (not with hidden visibility) dlsym is able to > find the symbol > (stripped or not) Trying to set the symbol to external doesn't

Re: C functions

2013-10-18 Thread Charles Srstka
On Oct 18, 2013, at 6:15 AM, Dmitry Markman wrote: > I don't thinks strip remove info used by dynamic linker > Thus dlsym should work > As long as symbol is external (not with hidden visibility) dlsym is able to > find the symbol > (stripped or not) Not in my testing: #import #include void

Re: Core Data with ODBC databases?

2013-10-18 Thread Noah Desch
I'm not sure why you need access to the NSSaveChangesRequest "transactions" at the application layer? In your optimistic locking example, your NSIncrementalStore gets a save request at step 5. It tries to commit the changes to the server, but the server comes back and says "transaction back ou

Re: C functions

2013-10-18 Thread Jeffrey Oleander
On 2013 Oct 18,, at 04:48, Shane Stanley wrote: is there any way to build a call to a C function on the fly? I mean something like pass a string to a method, and have it call the function of that name? This at least used to be shown in the "Objective-C 2.0 Runtime Programming Guide". __

Re: C functions

2013-10-18 Thread Uli Kusterer
On Oct 18, 2013, at 4:48 AM, Shane Stanley wrote: > is there any way to build a call to a C function on the fly? I mean something > like pass a string to a method, and have it call the function of that name? Short: No. Long: Maybe. 1) You can put a function in a dynamic library and export it

Re: C functions

2013-10-18 Thread Jens Alfke
On Oct 17, 2013, at 8:49 PM, Charles Srstka wrote: > You shouldn't rely on dlsym() working in production code. If the binary is > stripped (as it is by default for release builds, I believe), it won't work. You could work around that by exporting the symbol, e.g. by adding it to a “.exp” file

Re: Core Data with ODBC databases?

2013-10-18 Thread Mikael Hakman
Both of you, Jens and Chris, are right. Core Data uses transactions internally for each NSFetchRequest and NSSaveChanges request. However, the transactions are not available in the user application. Let's consider the above mentioned banking application - a clerk making a withdrawal or deposit o

Re: NSPopUpButton binding value/selected problem

2013-10-18 Thread jonat...@mugginsoft.com
On 17 Oct 2013, at 19:35, Trygve Inda wrote: > > How can I tie the selected index to the Identifier (67897 instead of > "Hello") since the Identifier will not change? > > I don't want to bind the Selected Index to a selection in the NSArray > Controller, but do want to be able to change the Nam