Re: What iOS device?

2014-01-30 Thread Gerriet M. Denkmann
On 31 Jan 2014, at 13:45, KappA wrote: > I came across this the other day. Have you already looked at this? > > http://stackoverflow.com/questions/448162/determine-device-iphone-ipod-touch-with-iphone-sdk Thanks for this link. They are using "hw.machine" instead of "hw.model" which gives less

Re: What iOS device?

2014-01-30 Thread KappA
I came across this the other day. Have you already looked at this? http://stackoverflow.com/questions/448162/determine-device-iphone-ipod-touch-with-iphone-sdk On Fri, Jan 31, 2014 at 1:19 AM, Gerriet M. Denkmann wrote: > I want (for logging purposes only) to know the kind of iOS device being >

What iOS device?

2014-01-30 Thread Gerriet M. Denkmann
I want (for logging purposes only) to know the kind of iOS device being used. UIDevice model or localizedModel returns just "iPhone", but I want something like "iPhone 4s" or "iPad Air" etc. NSProcessInfo physicalMemory can be used to distinguish between some models, but not all. Then there is

Memory issue with ALAssetLibrary

2014-01-30 Thread Peng Gu
​When I use *ALAssetLibrary:assetForURL:resultBlock:failtureBlock *to retrieve full screen images from ​camera roll, the allocated memory never release until the app enters the background. My guess is the system keeps the cache for the images somewhere. Is there anyway to force the system to relea

Re: Preserving undo actions on deleted targets

2014-01-30 Thread Jerry Krinock
I just noticed a couple mistakes in the code I threw in yesterday. Should be… void doNothingIMP(id self, SEL _cmd, NSNotification* note) { NSLog(@"Nothing doing!"); } + (void)load { SEL aSEL = NSSelectorFromString(@"_processEndOfEventNotification:") ; class_addMethod(self, aSEL,

Re: Preserving undo actions on deleted targets

2014-01-30 Thread Jerry Krinock
On 2014 Jan 30, at 18:15, Graham Cox wrote: > I believe this usage is safe (for now), but certainly if a cleaner solution > can be found that would be great, Yesterday before I convinced myself that this was a non-issue, I tried the following code: + (void)load { SEL aSEL = NSSelectorFrom

Re: Preserving undo actions on deleted targets

2014-01-30 Thread Graham Cox
On 31 Jan 2014, at 12:57 pm, Quincey Morris wrote: > On Jan 30, 2014, at 17:42 , Graham Cox wrote: > >> - (BOOL) respondsToSelector:(SEL) aSelector >> { >> if( aSelector == @selector(_processEndOfEventNotification:)) >> return YES; >> ... [other c

Re: Preserving undo actions on deleted targets

2014-01-30 Thread Quincey Morris
On Jan 30, 2014, at 17:42 , Graham Cox wrote: > - (BOOL) respondsToSelector:(SEL) aSelector > { > if( aSelector == @selector(_processEndOfEventNotification:)) > return YES; > ... [other code] > > } Shouldn’t this return NO for that selector? The

Re: Preserving undo actions on deleted targets

2014-01-30 Thread Graham Cox
On 31 Jan 2014, at 11:59 am, Quincey Morris wrote: > On Jan 30, 2014, at 16:30 , Graham Cox wrote: > >> However, the documentation states: >> >> "If you override this method, you must call super or raise an >> NSInvalidArgumentException exception at the end of your implementation. In >> o

Re: Preserving undo actions on deleted targets

2014-01-30 Thread Quincey Morris
On Jan 30, 2014, at 16:30 , Graham Cox wrote: > However, the documentation states: > > "If you override this method, you must call super or raise an > NSInvalidArgumentException exception at the end of your implementation. In > other words, this method must not return normally; it must always

Re: Preserving undo actions on deleted targets

2014-01-30 Thread Graham Cox
On 31 Jan 2014, at 11:30 am, Graham Cox wrote: > I will file a radar however. Radar: 15953047 --Graham ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the modera

Re: Preserving undo actions on deleted targets

2014-01-30 Thread Graham Cox
On 31 Jan 2014, at 2:39 am, glenn andreas wrote: > One work around would be to implement "doesNotRecognizeSelector:" and ignore > it there, and this would also make it future safe for when new private > methods are added That sounded like a better solution. However, the documentation states:

Re: Xcode 5 & Obj-C++

2014-01-30 Thread Greg Parker
On Jan 30, 2014, at 2:14 PM, Jens Alfke wrote: > And C++ partisans would tell you that many of these things are limitations of > the usual C++ runtimes, not the language itself, but I'm not aware of any > current runtimes that avoid them. I bet those same partisans would be the first to the bar

Re: Xcode 5 & Obj-C++

2014-01-30 Thread Eric Wing
On 1/30/14, Jens Alfke wrote: > > On Jan 30, 2014, at 4:32 AM, Jean-Daniel Dupas > wrote: > >> It is barely possible to create a stable ABI in C++. This language suffers >> all possible form of fragile base class problem: >> Add a new ivar, all subclasses and stack allocated objects are broken. >

Re: Xcode 5 & Obj-C++

2014-01-30 Thread Jens Alfke
On Jan 30, 2014, at 1:35 PM, Rui Pacheco wrote: > Is this documented somewhere? These are well-known problems but I don't know if there's authoritative documentation. (And C++ partisans would tell you that many of these things are limitations of the usual C++ runtimes, not the language itself

Re: Xcode 5 & Obj-C++

2014-01-30 Thread Scott Ribe
Google Taligent. (Snicker, snicker, snicker...) They actually wrote a good book on the subject, which was very effective at convincing most sane people to JUST NOT EVEN TRY THAT ;-) Anyway, this has *nothing* to do with Cocoa, OS X, iOS or Xcode. It's just C++, and such things are covered to va

Re: Xcode 5 & Obj-C++

2014-01-30 Thread Scott Ribe
On Jan 30, 2014, at 1:38 PM, Peter Teeson wrote: > ...so just wanted to find out what has changed. Support for most of C++11 :-) :-) :-) -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice ___ Cocoa-dev m

Re: Xcode 5 & Obj-C++

2014-01-30 Thread Rui Pacheco
Is this documented somewhere? On 30 Jan 2014, at 22:26, Jens Alfke wrote: > > On Jan 30, 2014, at 4:32 AM, Jean-Daniel Dupas wrote: > >> It is barely possible to create a stable ABI in C++. This language suffers >> all possible form of fragile base class problem: >> Add a new ivar, all subc

Re: Xcode 5 & Obj-C++

2014-01-30 Thread Jens Alfke
On Jan 30, 2014, at 4:32 AM, Jean-Daniel Dupas wrote: > It is barely possible to create a stable ABI in C++. This language suffers > all possible form of fragile base class problem: > Add a new ivar, all subclasses and stack allocated objects are broken. > Add a new virtual method, you break a

Re: Xcode 5 & Obj-C++

2014-01-30 Thread Jo Meder
Hi Rui, On 31/01/2014, at 9:23 AM, Rui Pacheco wrote: > How did you factor out the application logic from the UI rendering? If you mean our application logic, it essentially comes down to abstraction. The application is C++ and sits on our application framework, similar to Qt or wxWidgets. The

Re: Xcode 5 & Obj-C++

2014-01-30 Thread Peter Teeson
On 2014-01-30, at 3:23 PM, Rui Pacheco wrote: > How did you factor out the application logic from the UI rendering? > On 30 Jan 2014, at 21:16, Jo Meder wrote: >> Hi, >> >> Language philosophy aside, our application is a largish cross platform (Mac, >> Windows, Linux) application written in C+

Re: Xcode 5 & Obj-C++

2014-01-30 Thread Peter Teeson
On 2014-01-30, at 3:16 PM, Jo Meder wrote: > Hi, > Language philosophy aside, our application is a largish cross platform (Mac, > Windows, Linux) application written in C++. The UI framework uses Cocoa for > the Mac back end, which means we're using Objective-C++ to interface with > Cocoa. I've

Re: Preserving undo actions on deleted targets

2014-01-30 Thread Peter Teeson
On 2014-01-30, at 2:20 PM, Kyle Sluder wrote: > … > Apple will do what Apple will do, whenever Apple feels like it. If you > want to avoid rejections, avoid referencing private API at all. > > --Kyle Sluder Alternatively avoid the App store (and save 30%)….. ___

Re: Xcode 5 & Obj-C++

2014-01-30 Thread Rui Pacheco
How did you factor out the application logic from the UI rendering? On 30 Jan 2014, at 21:16, Jo Meder wrote: > Hi, > > Language philosophy aside, our application is a largish cross platform (Mac, > Windows, Linux) application written in C++. The UI framework uses Cocoa for > the Mac back end

Re: Xcode 5 & Obj-C++

2014-01-30 Thread Jo Meder
Hi, Language philosophy aside, our application is a largish cross platform (Mac, Windows, Linux) application written in C++. The UI framework uses Cocoa for the Mac back end, which means we're using Objective-C++ to interface with Cocoa. I've recently, at long last, been able to upgrade from Xc

Re: Preserving undo actions on deleted targets

2014-01-30 Thread Kyle Sluder
On Thu, Jan 30, 2014, at 10:28 AM, Jerry Krinock wrote: > > On 2014 Jan 30, at 07:39, glenn andreas wrote: > > > in the mean time, file a bug asking that NSUndoManager can be fully > > replaceable with publicly declared methods only > > Thank you, Glenn, but I don’t think so. All of that stuf

Re: Preserving undo actions on deleted targets

2014-01-30 Thread Jerry Krinock
On 2014 Jan 30, at 07:39, glenn andreas wrote: > in the mean time, file a bug asking that NSUndoManager can be fully > replaceable with publicly declared methods only Thank you, Glenn, but I don’t think so. All of that stuff regarding underscores is “should”, not “must”, and it is not in the

Horizontol scroller not enabled in IB

2014-01-30 Thread McLaughlin, Michael P.
Using Xcode 5.0.2 in Mac OS 10.9.1, I created a Cocoa document app, replacing the templated text field with a textview. After making the necessary connections, everything worked as intended. I then went into Document.xib and checked Show Horizontal Scroller in the Bordered scroll view (in addi

Re: Preserving undo actions on deleted targets

2014-01-30 Thread glenn andreas
On Jan 29, 2014, at 4:44 PM, Graham Cox wrote: > > On 30 Jan 2014, at 8:03 am, Keary Suska wrote: > >> Absolutely, and I have found it invaluable to troubleshoot state issues, but >> unfortunately it is not App Store safe (read: basis for rejection), as it >> relies on a private method call

Re: Xcode 5 & Obj-C++

2014-01-30 Thread Uli Kusterer
On 30 Jan 2014, at 15:09, Uli Kusterer wrote: > On 30 Jan 2014, at 01:28, Eric Wing wrote: >> - Often when comparing Obj-C vs. C++, method dispatch is one of the >> main culprits for the performance difference. But don't forget, Obj-C >> is a pure superset of C and you can always use good old C

Re: Xcode 5 & Obj-C++

2014-01-30 Thread Uli Kusterer
On 30 Jan 2014, at 14:35, Peter Teeson wrote: > The recent flood of language philosophy is informative and interesting but > doesn't address the issues I am interested in. > > My case is one of using the C++ std lib for the containers to work with > traversing a special DAG graph. > I've not

Re: Xcode 5 & Obj-C++

2014-01-30 Thread Uli Kusterer
On 30 Jan 2014, at 12:53, Rui Pacheco wrote: > I too don’t get it. > > And isn’t all this message passing pretty much the same as calling methods in > classes, just like you’d do in Java, C# or C++? No, they're very different. If you're curious, I blogged how C++ dispatches method calls unde

Re: Xcode 5 & Obj-C++

2014-01-30 Thread Uli Kusterer
On 30 Jan 2014, at 12:49, jonat...@mugginsoft.com wrote: > On 30 Jan 2014, at 00:42, Jens Alfke wrote: >> Anyone exposing a C++ API in a dynamic library is nuts, IMHO. > > What is it that makes C++ so unsuited to code sharing? In short, method look-up depends on order of methods (so deleting

Re: Xcode 5 & Obj-C++

2014-01-30 Thread Uli Kusterer
On 30 Jan 2014, at 01:28, Eric Wing wrote: > - Often when comparing Obj-C vs. C++, method dispatch is one of the > main culprits for the performance difference. But don't forget, Obj-C > is a pure superset of C and you can always use good old C to get the > same performance benefits if you don't n

Re: Xcode 5 & Obj-C++

2014-01-30 Thread Peter Teeson
The recent flood of language philosophy is informative and interesting but doesn't address the issues I am interested in. My case is one of using the C++ std lib for the containers to work with traversing a special DAG graph. I've not found any C or Obj-C code that provides those and I see no re

Re: Xcode 5 & Obj-C++

2014-01-30 Thread Jean-Daniel Dupas
Le 30 janv. 2014 à 12:49, jonat...@mugginsoft.com a écrit : > > On 30 Jan 2014, at 00:42, Jens Alfke wrote: > >> >> Anyone exposing a C++ API in a dynamic library is nuts, IMHO. > > What is it that makes C++ so unsuited to code sharing? We're not talking about code sharing, we are talking

Re: Xcode 5 & Obj-C++

2014-01-30 Thread Rui Pacheco
When writing code you get the impression that you’re just calling methods. The type system may make the language more malleable, but when writing normal Core Data driven apps, you’re calling methods on objects. And I wonder if some of the things you highlighted couldn’t be done with well define

Re: Xcode 5 & Obj-C++

2014-01-30 Thread jonat...@mugginsoft.com
On 30 Jan 2014, at 11:53, Rui Pacheco wrote: > > And isn’t all this message passing pretty much the same as calling methods in > classes, just like you’d do in Java, C# or C++? I would say that message sending is very different indeed: https://developer.apple.com/library/ios/documentation/co

Re: Xcode 5 & Obj-C++

2014-01-30 Thread Rui Pacheco
I too don’t get it. And isn’t all this message passing pretty much the same as calling methods in classes, just like you’d do in Java, C# or C++? On 30 Jan 2014, at 12:49, jonat...@mugginsoft.com wrote: > > On 30 Jan 2014, at 00:42, Jens Alfke wrote: > >> >> Anyone exposing a C++ API in a d

Re: Xcode 5 & Obj-C++

2014-01-30 Thread jonat...@mugginsoft.com
On 30 Jan 2014, at 00:42, Jens Alfke wrote: > > Anyone exposing a C++ API in a dynamic library is nuts, IMHO. What is it that makes C++ so unsuited to code sharing? Objective-C has great clarity of purpose (send a guy a message) and openness. Perhaps this is what makes it a great base for bu

Re: Customizing a Mac Installer Package

2014-01-30 Thread SevenBits
On Thursday, January 30, 2014, Vanni Parronchi wrote: > Hi, > > I'm also planning to do a graphic installer with the app i'm working on. I > found this helper cocoa app, BSD licensed, that seem interesting. I've only > played with it a bit but i haven't started working on the installer, so i > ca

Re: Legal Opinion on GCUndoManager

2014-01-30 Thread Roland King
It's not the defining but the calling. If your code calls a method with the same name as an Apple private method you, at least in the iOS store get auto rejected. I see it in the dev forums constantly. At analysis time there's no way of knowing what object the method is called on so the signat

Re: Customizing a Mac Installer Package

2014-01-30 Thread Vanni Parronchi
Hi, I'm also planning to do a graphic installer with the app i'm working on. I found this helper cocoa app, BSD licensed, that seem interesting. I've only played with it a bit but i haven't started working on the installer, so i can't bring any experience of successfulness yet. It's called "Packa