Re: Is calling "-applicationOpenUntitledFile:" for app-open (but not app-reopen) out of fashion?

2016-03-04 Thread Daryle Walker
> On Mar 2, 2016, at 1:25 PM, Quincey Morris > wrote: > > On Mar 2, 2016, at 10:00 , Daryle Walker > wrote: >> >> If this is a policy change … > > Yes and no. > > With state restoration enabled (the default),

Re: Customizing a UISwitch?

2016-03-04 Thread Gary L. Wade
That and the text are the backing objects used to present the various states. Nice to do non-state stuff to them but don't do state stuff to them. -- Gary L. Wade (Sent from my iPhone) http://www.garywade.com/ > On Mar 4, 2016, at 4:01 PM, Carl Hoefs wrote: > >

Re: Returning a string value from a c function to a Objective-C class method. Is there an approved approach?

2016-03-04 Thread Doug Hill
Alex, I guess I tried to make the distinction between Cocoa Bindings and language bindings, but I was referring to this. https://en.wikipedia.org/wiki/Language_binding This is a general concept to bridge multiple languages. The idea is that

Re: Returning a string value from a c function to a Objective-C class method. Is there an approved approach?

2016-03-04 Thread Steve Sisak
> On Mar 4, 2016, at 4:14 PM, Alex Zavatone wrote: > > I'm working with PJSIP and PJ's docs clearly state, "we are going to crater > unless you do everything SIP related on the main thread." Ugh. And of course, doing networking on the main thread is a no-no according to Apple.

Re: Returning a string value from a c function to a Objective-C class method. Is there an approved approach?

2016-03-04 Thread John McCall
> On Mar 4, 2016, at 4:03 PM, Greg Parker wrote: > > >> On Mar 4, 2016, at 2:24 PM, Jonathan Mitchell wrote: >> >> Hi Alex >> >> Not sure if this will help at all as I am not 100% sure what you are doing. >> In my case, using Mono, I needed to track

Re: Returning a string value from a c function to a Objective-C class method. Is there an approved approach?

2016-03-04 Thread Greg Parker
> On Mar 4, 2016, at 2:24 PM, Jonathan Mitchell wrote: > > Hi Alex > > Not sure if this will help at all as I am not 100% sure what you are doing. > In my case, using Mono, I needed to track events being raised in the Mono C > runtime back into Obj-C space. > You need

Re: Customizing a UISwitch?

2016-03-04 Thread Carl Hoefs
Bingo! -setImage:forState: UIControlStateNormal works perfectly. Not sure what setImage: is doing. Thx Gary & Eric! -Carl > On Mar 4, 2016, at 4:55 PM, Gary L. Wade wrote: > > Look instead at the set…:forState: methods. > -- > Gary L. Wade (Sent from my iPhone) >

Re: Customizing a UISwitch?

2016-03-04 Thread Eric E. Dolecki
What Gary said ;) On Fri, Mar 4, 2016 at 6:56 PM Gary L. Wade wrote: > Look instead at the set…:forState: methods. > -- > Gary L. Wade (Sent from my iPhone) > http://www.garywade.com/ > > > On Mar 4, 2016, at 3:40 PM, Carl Hoefs >

Re: Customizing a UISwitch?

2016-03-04 Thread Gary L. Wade
Look instead at the set…:forState: methods. -- Gary L. Wade (Sent from my iPhone) http://www.garywade.com/ > On Mar 4, 2016, at 3:40 PM, Carl Hoefs wrote: > > I replaced the UISwitch with a UIButton. But when I set the button's new > image in the event method

Re: Customizing a UISwitch?

2016-03-04 Thread Carl Hoefs
According to docs, .imageView.image = ... performs this for the Normal state of the button. "This image is displayed when the image view is in its natural state." Is this what you mean? -Carl > On Mar 4, 2016, at 4:50 PM, Eric E. Dolecki wrote: > > Are you doing this for

Re: Customizing a UISwitch?

2016-03-04 Thread Eric E. Dolecki
Are you doing this for the proper state? I.e. Normal ? On Fri, Mar 4, 2016 at 6:41 PM Carl Hoefs wrote: > I replaced the UISwitch with a UIButton. But when I set the button's new > image in the event method (myButton.imageView.image = ...), still nothing > happens

Re: Returning a string value from a c function to a Objective-C class method. Is there an approved approach?

2016-03-04 Thread Alex Zavatone
On Mar 4, 2016, at 5:24 PM, Jonathan Mitchell wrote: > Hi Alex > > Not sure if this will help at all as I am not 100% sure what you are doing. > In my case, using Mono, I needed to track events being raised in the Mono C > runtime back into Obj-C space. > You need some

Re: Customizing a UISwitch?

2016-03-04 Thread Carl Hoefs
I replaced the UISwitch with a UIButton. But when I set the button's new image in the event method (myButton.imageView.image = ...), still nothing happens (the button's image doesn't redraw). What do I have to do to cause this to happen? -Carl > On Mar 4, 2016, at 2:00 PM, Gary L. Wade

Re: Returning a string value from a c function to a Objective-C class method. Is there an approved approach?

2016-03-04 Thread Alex Zavatone
I guess I neglected to mention this was on iOS. Your words make me happy to see that I’m at least thinking along a similar line. Basically, your class is a glue layer or a translation layer between the C and Obj-C worlds. Now, I love the concept of bindings, but iOS, since bindings aren’t

Re: Returning a string value from a c function to a Objective-C class method. Is there an approved approach?

2016-03-04 Thread Jonathan Mitchell
Hi Alex Not sure if this will help at all as I am not 100% sure what you are doing. In my case, using Mono, I needed to track events being raised in the Mono C runtime back into Obj-C space. You need some method of defining a call back function in the target C Api - without that thinks would

Re: Returning a string value from a c function to a Objective-C class method. Is there an approved approach?

2016-03-04 Thread Doug Hill
The approach I took for my wrapper library was using bindings. Not the Cocoa type, but the language type. I created a series of Objective-C classes that serve as the Obj-C interface to the Cocoa developer. The Obj-C classes would make calls into the C/C++ libraries and do conversions between

Re: Returning a string value from a c function to a Objective-C class method. Is there an approved approach?

2016-03-04 Thread Alex Zavatone
Great! It certainly does… but here's where my brain breaks. The call is originating from the C lib and within the C function. I am not calling the C function from Objective-C. I'm looking at somehow passing this as a string (UTF-8, yep) back to an OC class instance, so this implies either a

Re: Customizing a UISwitch?

2016-03-04 Thread Gary L. Wade
Maybe the docs should say iOS 7 and later since that's what it means. You can't do this in 7, 8, 9, or X/10/whatever iOS is coming this fall. It shouldn't be hard to roll your own UIControl subclass or work with the current classes. -- Gary L. Wade (Sent from my iPhone) http://www.garywade.com/

Re: Returning a string value from a c function to a Objective-C class method. Is there an approved approach?

2016-03-04 Thread Doug Hill
Alex, I’ve worked on a few wrapper libraries, so I have some experience with this. In your Obj-C wrapper, you would need to create the NSString yourself. So, if you have a C function: char* MyCFunc(void); The Objective-C wrapper method would do something like: - (void) myObjcMethod {

Returning a string value from a c function to a Objective-C class method. Is there an approved approach?

2016-03-04 Thread Alex Zavatone
I'm in the middle of some fun where there is a wrapper class to a lib that's written in C and the c function has a char string that I'd like to return back to or somehow pass on to an Cbjective-C class. I'm sure there is an established practice for performing this type of task, but while I

Customizing a UISwitch?

2016-03-04 Thread Carl Hoefs
iOS 9.2 The 2016 Apple documentation shows UISwitch -onImage and -offImage properties. They're not noted as deprecated, except for iOS 7, yet they don't seem to do anything on iOS9. Xcode shows these properties to be settable. I have set them both, in Xcode and in my app code, but they seem to

Re: migrating from 32bit to 64 bit can not run project

2016-03-04 Thread Britt Durbrow
> > As for the naming of the NSDocument subclass. I pretty much rely on online > tutorials. Not sure what ARC is. > Why, it’s’ the answer to the American Dream! It’s the Greatest Thing Since Sliced Bread! It’s the Solution To All Your Retain-Release Nightmares! It’s…. Automatic Reference