WKWebView and cookies

2016-04-12 Thread Torsten Curdt
I am starting a request in a WKWebView on the iOS 9.3 simulator let url = NSURL(string:"http://localhost:8000/";) let req = NSMutableURLRequest(URL:url!) webView.loadRequest(req) and intercept the response where I try to print out the cookies func webView(webView: WKWebView, deci

Re: WKWebView and cookies

2016-04-12 Thread Torsten Curdt
> > Cookie headers are added later. I haven’t used WKWebView, but when using > an NSURLSession the cookies aren’t part of the NSURLRequest, but get added > when the request is sent. > Hm - but shouldn't they be available in the response at least? I also tried to find it in the cookie storage >

Xcode user defined settings from pre-action

2016-05-10 Thread Torsten Curdt
Is there any way of passing values from a build pre-action into the user defined settings of the project? The only good way I found so far is to pass them to the xcodebuild command line - that doesn't really help much when not building from the command line though. As a work around it seem like o

UINavigationController back gesture animation

2016-06-14 Thread Torsten Curdt
Since iOS7 we have the back gesture to go up the navigation stack. The gesture basically controls the push/pop animation. We can basically pick the controller and go back and forth in the animation phases. Does anyone see a good way to piggyback onto that? I would like to have another animation th

Re: UINavigationController back gesture animation

2016-06-15 Thread Torsten Curdt
Since I am getting nowhere with this I thought maybe at least I could know when the animation finishes. So I was trying it like this: extension UINavigationController { func pushViewController(viewController: UIViewController, animated: Bool, completion: (Void -> Void)) { pushViewContr

edgesForExtendedLayout outside of loadView/viewDidLoad

2016-06-17 Thread Torsten Curdt
For debugging purposes I am trying to toggle "edgesForExtendedLayout" outside of loadView/viewDidLoad - but it seems like the change goes unnoticed. I tried "setNeedsLayout" and "setNeedsUpdateConstraints" on the vc view - but that does not work. Now I am a bit stumped - how can I trigger a re-l

Re: edgesForExtendedLayout outside of loadView/viewDidLoad

2016-06-17 Thread Torsten Curdt
This is odd. This seems to eventually work self.edgesForExtendedLayout = UIRectEdge.None self.view.superview?.setNeedsUpdateConstraints() self.view.superview?.updateConstraintsIfNeeded() but only after the 2nd call. So as a work around I am calling it like this: self.edgesForExtendedLay

WKWebView and Mobile Safari and cookie sharing

2016-07-08 Thread Torsten Curdt
I am finding conflicting information on this on the interwebs - and nothing in the docs. Is the WKWebView sharing cookies with Safari or not? My tests resulted in a "not sharing" but people e.g. on StackOverflow claim the opposite. What is it? cheers, Torsten

Re: WKWebView and Mobile Safari and cookie sharing

2016-07-09 Thread Torsten Curdt
Hm - noone? Any idea where else to ask or read up on? cheers, Torsten On Fri, Jul 8, 2016 at 11:19 AM, Torsten Curdt wrote: > I am finding conflicting information on this on the interwebs - and > nothing in the docs. > > Is the WKWebView sharing cookies with Safari or not? My tests

UINavigationBar transition

2016-07-13 Thread Torsten Curdt
I am pushing a new UINavigationController onto the navigation stack. But instead of having the default transition migrating to new UIBarButtonItems I want to animate the layout of the existing items. (at least that's how it should look like) Trying to explain this more visually: Animating from [

gesture-based and interruptible animations

2016-07-13 Thread Torsten Curdt
I have a few UIViews that I want to animate either by telling the animation to just run or by using a gesture. Very similar to UIViewController transitions that can be both. It seems like iOS10 has the new UIViewPropertyAnimator for exactly doing this now. Since iOS10 is still a few months out, qu

uitabbar translucency and hiding

2016-08-20 Thread Torsten Curdt
I have an app with UITabBar und UINavigationBar(s). All are non-translucent. So the content area of the view controllers is in between the two. Now I would like to hide the UITabBar (on action). One would think this would be enough: if let tabBar = self.tabBarController?.tabBar { tabBar.hid

Re: uitabbar translucency and hiding

2016-08-21 Thread Torsten Curdt
> > I’m no expert in iOS view controller behavior, but since no one has jumped > in, I’ll contribute how I understand it. > Thanks for jumping in here, Quincey. Hiding the tab does NOT seem like a reasonable way to approach this. > According to the UITabBarController documentation, “You should n

Re: uitabbar translucency and hiding

2016-08-21 Thread Torsten Curdt
On Sun, Aug 21, 2016 at 9:56 PM, Quincey Morris < quinceymor...@rivergatesoftware.com> wrote: > On Aug 21, 2016, at 12:47 , Torsten Curdt wrote: > > > Ideally I would present a modal controller > > > Is there a solution where you segue from the tab view controller to

Re: uitabbar translucency and hiding

2016-08-21 Thread Torsten Curdt
> > > Well, you can use a plain UIViewController as the root controller, and > make the UITabBarController a child of that. But I don’t think that helps > if there’s a sub-hierarchy of controllers under the tab bar controllers > that isn’t easy to recreate when you do a segue. > Yeah - I don't thi

Re: uitabbar translucency and hiding

2016-08-22 Thread Torsten Curdt
Hey Scott > Can you elaborate further on your use case and what problem you are trying > to solve? > > I would suggest you have found this difficult because a UITabBarController > does not sound like an appropriate UI element for your use case. Specially, > what you're describing is using a tab a

CALayer kCAGravityResizeAspectFill and kCAGravityTop

2016-09-21 Thread Torsten Curdt
On iOS I want to fill a layer with an image. The width should be filled and the image should retain its aspect ratio. This layer.contents = image.cgImage layer.contentsGravity = kCAGravityResizeAspectFill almost does the right thing - but it positions the image at the centers. I w

Re: CALayer kCAGravityResizeAspectFill and kCAGravityTop

2016-09-21 Thread Torsten Curdt
> > There isn’t an option to fill width and align top. The more general > recommendation in this space however would be to use a UIImageView, which > has all the same options but participates in higher level layout (including > the content of autoResizingMasks, and also auto layout). > I am using

Re: CALayer kCAGravityResizeAspectFill and kCAGravityTop

2016-09-23 Thread Torsten Curdt
> > > Its still an option, especially if you are otherwise using UIViews – > UIView.maskView would do the trick. > Wow - I wasn't even aware that exists. Nice! Thanks! ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin req

ITMS-90171 libswiftRemoteMirror.dylib

2016-09-24 Thread Torsten Curdt
I was just trying to upload an IPA to Testflight I am getting: ERROR ITMS-90171: "Invalid Bundle Structure - The binary file 'Foo.app/libswiftRemoteMirror.dylib' is not permitted. Your app can’t contain standalone executables or libraries, other than the CFBundleExecutable of supported bundles. Re

Re: ITMS-90171 libswiftRemoteMirror.dylib

2016-09-25 Thread Torsten Curdt
d/Objects-normal/armv7/Foo.swiftdoc -rw-r--r-- 1 tcurdt staff 521816 Sep 25 11:48 [...]/Foo.build/Objects-normal/armv7/Foo.swiftmodule -rw-r--r-- 1 tcurdt staff 68757 Sep 25 11:48 [...]/Foo.build/Objects-normal/armv7/Foo_dependency_info.dat Any idea? cheers, Torsten On Sun, Se

Re: ITMS-90171 libswiftRemoteMirror.dylib

2016-09-25 Thread Torsten Curdt
Applications/Foo.app --resource-library libswiftRemoteMirror.dylib Besides the weird toolchain parameter (twice the default and Swift 2.3 while I am using Swift 3.0) there is "--resource-library libswiftRemoteMirror.dylib" Not that this makes me any wiser. On Sun, Sep 25, 2016 at

Re: ITMS-90171 libswiftRemoteMirror.dylib

2016-09-25 Thread Torsten Curdt
ot; though. On Sun, Sep 25, 2016 at 12:07 PM, Torsten Curdt wrote: > Current reading suggests that (whatever ibswiftRemoteMirror.dylib is) > this is a difference between xcodebuild archive vs build (for whatever > reasons). Since I can't find any further information

function signature specialization crashlog

2016-10-31 Thread Torsten Curdt
I have a real hard time understanding this iOS/Swift3 crashlog. For one the closure #s do not help that very much (I just assume they numbered from the beginning of the file?) and the closure line numbers are all 0. Any ideas what could be going on? cheers, Torsten 0 Foo

Re: function signature specialization crashlog

2016-10-31 Thread Torsten Curdt
> > > I have a real hard time understanding this iOS/Swift3 crashlog. > > This is an odd list to be posting this to. Crash logs are there for the > developers > of the crashing software. If you're interested in helping fix the > compiler, that's great, > but you should be bringing this up on swif

Re: function signature specialization crashlog

2016-10-31 Thread Torsten Curdt
> > If it helps, it looks like: > > - you're calling a function with the signature ([Foo.Store], CLLocation?, > CLLocation?, Bool) throws -> [Foo.Store] > - that function is calling another closure > Correct. - that closure is crashing > That I got as well. After a lot of staring at my code

Finalizing CVPixelBuffer while lock count is 1

2017-01-03 Thread Torsten Curdt
While doing some image processing I am also trying to detect QR codes from an image buffer. The following code works just fine func captureOutput(_ captureOutput: AVCaptureOutput, didOutputSampleBuffer sampleBuffer: CMSampleBuffer, from connection: AVCaptureConnection) { if !CMSampleB

loading NSWindowController nib from bundle

2014-10-27 Thread Torsten Curdt
I am a little confused on how to load NSWindowController from a bundle other than the mainbundle. While this code works just fine controller = [[self alloc] initWithWindowNibName:@"TCAboutWindow"]; I now moved the the nib into it's own bundle inside the main bundle. Since I could not figure

Re: loading NSWindowController nib from bundle

2014-10-27 Thread Torsten Curdt
> > My first thought was that passing in "nil" as the owner would actually > default to "self" I really want - but that does not seem to be the case. > > > It’s documented as “cannot be nil”. > Yup - and it also barfs if it is :) Still it was my first thought and expectation. > On the next thoug

Re: Can an use introspection to determine if its a production app from the App Store?

2014-10-30 Thread Torsten Curdt
You could also inspect the provisioning profile: https://github.com/tcurdt/TCMobileProvision cheers, Torsten On Thu, Oct 30, 2014 at 6:44 PM, David Brittain wrote: > The following seems to work from experimentation... > > For an application installed through TestFlight Beta the receipt file >

Re: Can an use introspection to determine if its a production app from the App Store?

2014-10-31 Thread Torsten Curdt
oks great, but I cannot read Objective C anymore - where is the Swift > version??? > > On 10/30/14, 2:28 PM, Torsten Curdt wrote: > >> You could also inspect the provisioning profile: >> >> https://github.com/tcurdt/TCMobileProvision >> >> cheers, >> T

hueComponent not valid for the NSColor

2014-11-01 Thread Torsten Curdt
I am struggling to understand why this causes an exception NSColor *base = [NSColor whiteColor]; NSColor *stroke = [NSColor colorWithCalibratedHue:base.hueComponent saturation:base.saturationComponent brightness:0.4

Re: hueComponent not valid for the NSColor

2014-11-01 Thread Torsten Curdt
> It's a color space that only contains a white and alpha component. Hue doesn't make sense in an all white space. It's like if we were talking about a train that only goes between NYC and DC, and you asked "How long does it take for that train to reach London?" You can't ask that question because

movableByWindowBackground

2014-11-04 Thread Torsten Curdt
I have a NSWindow that has movableByWindowBackground set. Now I want to add a NSImageView but have the window be draggable also at the area covered by the view. My first though was to override hitTest: - but that didn't seem to work. Any pointers? cheers, Torsten

checking for app store receipts

2015-02-20 Thread Torsten Curdt
Let's say I have a Mac app store app but for intermediate releases and/or support of trial version I would like to also have version that is distributed from my own site. So besides the app store build I would have another build (distributed by me) that needs to know whether there is a valid app st

disabling Apple Crash Reporter

2015-03-07 Thread Torsten Curdt
Is there a way to disabled the Apple crash reporter dialog? I want to use PLCrashReporter and show my UI instead. I don't want to confuse the user by having to fill out two crash reports. So far I only found a ways to turn if off completely: sudo launchctl unload -w /System/Library/LaunchDaemo

Re: disabling Apple Crash Reporter

2015-03-09 Thread Torsten Curdt
I could not find the prefs app https://developer.apple.com/library/mac/technotes/tn2004/tn2123.html#FIGCRASHREPORTERPREFS but seems like it's just a fancy way of switching the global state. http://cocoadev.com/HowToAvoidSendToAppleWindow has some further suggestions. Apparently Adium works

Re: disabling Apple Crash Reporter

2015-03-09 Thread Torsten Curdt
> > If you read the man page for abort() it says use exit() to avoid the > ReportCrash daemon. > Ah, nice. Need to try that. Adium does this after launching their crash report helper app. > > How do they get there? > Simple. > Unix signals handling. > Right there in the really nice Adium code yo

Re: disabling Apple Crash Reporter

2015-03-09 Thread Torsten Curdt
> > I guess it might be worth opening bug reports for the crash reporters to > use "exit" if they don't. > > > Or just find the exit point to PLCrashReporter’s signal handler, add an > “exit” there, and send a patch to the developers. I can’t imagine it’d be > much work. > Touché :) Actually it s

Re: disabling Apple Crash Reporter

2015-03-09 Thread Torsten Curdt
; callbacks.context = NULL; callbacks.handleSignal = exitCallback; [crashReporter setCrashCallbacks:&callbacks]; Yay! On Mon, Mar 9, 2015 at 9:45 PM, Torsten Curdt wrote: > I guess it might be worth opening bug reports for the crash reporters to >> use "exit" if they

Re: disabling Apple Crash Reporter

2015-03-10 Thread Torsten Curdt
> > However the user experience is rather barren. > The app simply dies. > As well as posting the report ReportCrash(8) also allows informs the user > of termination and allows restart. > I know that prompting users twice for reporting is inelegant and confusing > but crashing with no UI feedback

Re: disabling Apple Crash Reporter

2015-03-10 Thread Torsten Curdt
I wasn't aware that this is OK to do from a signal handler. Is it really? On Tue, Mar 10, 2015 at 10:22 AM, wrote: > Again Unix to the rescue. > > http://stackoverflow.com/questions/19147386/system-call-fork-and-execv-function > > > Sent from my iPhone > > On 2015/0

time of the build

2015-04-29 Thread Torsten Curdt
I would like to embed the timestamp of the build into my executable. I know there is __DATE__ and __TIME__ but converting those into a timestamp at runtime isn't ideal. So I guess I somehow need to make the output of date +%s available to the preprocessor. But user defines allow only static value

Re: time of the build

2015-04-29 Thread Torsten Curdt
g: dateStr]; > return date; > } > > David > > > On Apr 29, 2015, at 6:39 AM, Torsten Curdt wrote: > > > > I would like to embed the timestamp of the build into my executable. > > > > I know there is __DATE__ and __TIME__ but converting those into

orderFront: 10.10 vs 10.9

2015-05-08 Thread Torsten Curdt
I am staring at this code and don't get why it works fine under 10.10 while under 10.9 it does not. NSScreen *screen = self.window.screen; NSWindow *overlay = [[NSWindow alloc] initWithContentRect:screen.frame styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered

Re: orderFront: 10.10 vs 10.9

2015-05-08 Thread Torsten Curdt
Seems like I found the culprit. The drawing code was throwing an exception for a font that couldn't be found. cheers, Torsten On Fri, May 8, 2015 at 4:40 PM, sqwarqDev wrote: > > > > On 10.9 I am seeing > > > > "unlockFocus called too many times. > > > > Can't help with the "why", but try put

Re: Scary Stuff!

2015-06-17 Thread Torsten Curdt
Wow - and not fixed in those 6 months. That does not sound good. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com H

stringWithCString:length deprecation

2009-10-07 Thread Torsten Curdt
Hey folks, I am in the middle of cleaning up code and moving it to 10.5+ 64bit. For most things it's quite straight forward, but one of the deprecations to get rid of is: stringWithCString:length cString must not be NULL. cString should contain characters in the default C-string encoding. This

Re: A good Obc-C framework for sending email?

2009-10-16 Thread Torsten Curdt
>> The ED code looks like interesting and I will give it a try as well. >> Does anybody know of a good primer on creating / sending  email ( possibly >> in a Cocoa / Objective-C environment ) > > I don't think there is one, given how hard it is to even find code for doing > it at all. Maybe this c

layout subviews

2009-11-25 Thread Torsten Curdt
I have a flipped custom view (within a scroll view) which layouts it's subviews as follows: WORKS: - (void) layoutSubviews { NSLog(@"layout"); NSRect frame = [self frame]; CGFloat width = frame.size.width; CGFloat height = 0; for(NSView *itemView in itemViews) {

Re: Mail Frameworks

2010-06-02 Thread Torsten Curdt
On Wed, Jun 2, 2010 at 22:12, Simon Wolf wrote: > On 2 Jun 2010, at 19:57, Jeremy Matthews wrote: > >> So...I'm working on an app that needs an email framework to send >> messages...right now I'm using MailCore, and I hear good things about >> EDMessage as well...where I am at now I need to send

Re: Add button to Finder

2010-06-17 Thread Torsten Curdt
You can drag any application into the toolbar. Not sure there is any official way to do this automatically. You certainly could hack something together modifying com.apple.finder.plist but I would advice against. Better show your users how to get that application into the finder toolbar and let the

clipping and scrolling

2011-08-12 Thread Torsten Curdt
Hey folks, On the Mac we have NSClipView (and NSScrollView). On iOS we have UIScrollView and yet sometimes I wondering why. Let me explain: For an iOS project I have an image that does not fit on the screen. I need to be able to show a portion of it to the user. There are couple of ways to approa

Re: clipping and scrolling

2011-08-16 Thread Torsten Curdt
> There's no reason (though someone will probably chime in with a perverse > case) not to use a UIScrollView. It gives you scrolling and zooming for very > little trouble, has almost no side effects on the content you're displaying, > and works the way the user expects it. Well, quoting the doc

Re: clipping and scrolling

2011-08-16 Thread Torsten Curdt
>> 1) I could just create an UIImageView and just move the origin into the >> negative. The clipping happens naturally through the parent view. > > This is basically re-inventing the wheel, except that users won't fully > understand what your re-invention has to offer. I would not go so far to c

Re: clipping and scrolling

2011-08-16 Thread Torsten Curdt
>> So if one does not care about zooming and all other things UIScrollView >> helps with... this is not a terribly wrong thing to do? It's just that there >> is something in UIKit that does this, too? After all -in a very simple >> setup, think user interaction disabled- changing the frame of a

Re: compiling app for 10.6 and 10.7

2011-08-17 Thread Torsten Curdt
>> It's probably a bit early to require a 7 week old OS (10.6.8) as a minimum.   >> Anyone running anything older will see a crash, and quite possibly toss your >> app out. > > You can specify your minimum system in your Info.plist, and on earlier > versions the user will get an alert indicating

Calendar Groups in CalCalendarStore

2011-09-01 Thread Torsten Curdt
In iCal you can organize your Calendars in a hierarchical fashion. But it seems like these relationships are not exposed via CalCalendarStore http://developer.apple.com/library/mac/#documentation/AppleApplications/Reference/CalendarStoreFramework/Classes/CalCalendarStore_Class/Reference/Reference.

Re: Calendar Groups in CalCalendarStore

2011-09-01 Thread Torsten Curdt
Actually ... there is a _group ivar but that's only in the headers - not in the documentation. I assume using that that would also be a rejection reason for the Mac App Store? cheers, Torsten ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Pleas

Re: Calendar Groups in CalCalendarStore

2011-09-01 Thread Torsten Curdt
>> Actually ... there is a _group ivar but that's only in the headers - >> not in the documentation. >> I assume using that that would also be a rejection reason for the Mac App >> Store? > > Yes, direct ivar access will cause your app to get rejected. We > tripped on this with historical use of i

Re: Calendar Groups in CalCalendarStore

2011-09-01 Thread Torsten Curdt
> http://openradar.appspot.com/radar?id=1325406 > > The problem here is that you have no knowledge of what the "_group" ivar > represents, if anything. There are plenty of framework ivars that have been > abandoned but left in place so as not to change the layout of the rest of > the ivars. There a

nonatomic vs atomic assign/retain

2011-09-06 Thread Torsten Curdt
On iOS properties are usually (unless required otherwise) defined as nonatomic @property (nonatomic, assign) On the Mac I have seen quite often just an "assign" or "retain" which AFAIK defaults to "atomic" @property (assign) So what should one use e.g. for normal IBOutlets with AppKit? I woul

Re: nonatomic vs atomic assign/retain

2011-09-06 Thread Torsten Curdt
Thanks for all the input so far. What's left for me to understand is why access to outlets could possibly need synchronization. After all it's just the loading of the NIB that is writing to the outlets. Given that access to the outlets is only valid after a certain safe point (awakeFromNib) one co

Re: nonatomic vs atomic assign/retain

2011-09-07 Thread Torsten Curdt
>> Given that access to the outlets >> is only valid after a certain safe point (awakeFromNib) one could >> consider outlets final/immutable and therefor synchronization should >> not be required. > > You can change outlets at any time after that. Consider changing the delegate > for some reason,

Re: nonatomic vs atomic assign/retain

2011-09-07 Thread Torsten Curdt
>> At the time ObjC-2 was in development there was a debate within Apple about >> whether to make ‘nonatomic’ be the default, with an ‘atomic’ keyword to >> enable the safety features. I really wish it had gone that way. +1 > Based on discussion on the dev forums, atomic properties are the reco

Re: nonatomic vs atomic assign/retain

2011-09-07 Thread Torsten Curdt
>> So far I have never had to set an outlet itself in code myself. Do >> people really do this? > > It's not common, but the point remains, outlets are not at all immutable. AFAIK AppKit only writes to the outlets once. You may only access outlets only after a documented safe point. If one assumes

Re: nonatomic vs atomic assign/retain

2011-09-07 Thread Torsten Curdt
> So? It's still your outlet. Nobody else is going to touch it. You get > to define what's safe and unsafe on it, and how tightly-coupled the > class is to its nib. +1 Kyle got my point :) ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please

Re: nonatomic vs atomic assign/retain

2011-09-08 Thread Torsten Curdt
I see. I should have not argued with immutability. >                [[NSBundle mainBundle] loadNibNamed:@"ComplexTableViewCell" > owner:self options:nil]; >                cell = [[self.loadedCell retain] autorelease]; >                self.loadedCell = nil; Here you assume that loadNibNamed:own

Re: nonatomic vs atomic assign/retain

2011-09-08 Thread Torsten Curdt
>> Anyway. But I am curious - can you provide an example where you >> modified an outlet? > > In Cocoa apps I've done setTarget: on table views where I didn't want an > action but I did want to do setDoubleAction:. I don't know if that's still > necessary. That's changing properties on the targe

NSWindow title bar view height

2011-09-09 Thread Torsten Curdt
I am wondering what could be the best way of creating a NSWindow that has a bigger title bar - similar to the AppStore app or iCal (to add some other NSViews). A project I found doing just that feels a little hack'ish https://github.com/indragiek/INAppStoreWindow Is there a better way? cheers,

Re: NSWindow title bar view height

2011-09-09 Thread Torsten Curdt
> I have never seen a non-hackish way to tweak the title bar in such a way, > unfortunately. There are some methods to access and adjust the standard > buttons, but the layout and drawing of the title bar are done by > undocumented internal classes. > (If you want to see real hackish, you should lo

sheet not receiving all events?

2011-09-16 Thread Torsten Curdt
On a button click I open a NSPanel custom sheet - just like described in the docs - (void) buttonTest:(id)sender { [NSApp beginSheet:self.panel modalForWindow:self.window modalDelegate:self didEndSelector:nil contextInfo:nil]; [NSApp runModalForWindow:s

Re: sheet not receiving all events?

2011-09-17 Thread Torsten Curdt
> You’re trying to run a sheet as a modal panel; that’s not how it’s done. > Instead you open the sheet and return to the main event loop (i.e. delete > the last three lines). It runs asynchronously. But that's straight from the docs. http://developer.apple.com/library/mac/#documentation/Cocoa/Co

Re: sheet not receiving all events?

2011-09-17 Thread Torsten Curdt
>> Any ideas why that is the case? A bug? > > From the NSWindow docs: > >> canBecomeKeyWindow >> Indicates whether the window can become the key window. >> >> - (BOOL)canBecomeKeyWindow >> Return Value >> YES if the window can become the key window, otherwise, NO. >> >> Discussion >> Attempts to ma

Re: sheet not receiving all events?

2011-09-17 Thread Torsten Curdt
>> But that's straight from the docs. > > You run it either as a sheet or modal, not both. Not sure I understand that comment, Scott. cheers, Torsten ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator

Re: sheet not receiving all events?

2011-09-17 Thread Torsten Curdt
On Sat, Sep 17, 2011 at 6:15 PM, Scott Ribe wrote: > On Sep 17, 2011, at 10:01 AM, Torsten Curdt wrote: > >> Not sure I understand that comment, Scott. > > You run it as a sheet, using beginSheetModal..., or you run it as a modal > dialog using runModal. You can't do bo

bindings confusion

2011-09-20 Thread Torsten Curdt
Before I was following the docs and wrote the bindings clue code myself http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CocoaBindings/Concepts/HowDoBindingsWork.html#//apple_ref/doc/uid/20002373 - (void)bind:(NSString *)binding toObject:(id)theObservedObject withKeyPa

Re: Sandboxing and file references

2011-09-20 Thread Torsten Curdt
> I don't think that the access rights are permanent, the only way to enable > sandboxing for this kind of app would be to use a temporary exception > entitlement giving your app access to the whole file system (not sure if > Apple will like that for the Mac App Store, though). That would suck

Re: bindings confusion

2011-09-21 Thread Torsten Curdt
> Define "doesn't work" - if you mean observeValue:forKeyPath:... doesn't get > called, Indeed that's what I meant. > it's because that's a different relationship from bindings. Just assumptions (I know) but I would think the default implementation does something similar to the code shown in th

Re: Gestalt

2011-09-21 Thread Torsten Curdt
Maybe this is of help https://github.com/tcurdt/feedbackreporter/blob/master/Sources/Main/FRSystemProfile.m cheers, Torsten ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Con

NSToolbarItem target action and view

2011-09-21 Thread Torsten Curdt
Just like Xcode's scheme management I have some display in the toolbar and would like to popup a menu on click. So I create a NSToolbarItem and set a custom view. But now the view also receives the clicks and so the action set on the item is not getting triggered on a click. NSToolbarItem

Re: Gestalt

2011-09-21 Thread Torsten Curdt
On Wed, Sep 21, 2011 at 10:59 PM, koko wrote: > FRSystemProfile is very nice ... I am unfamiliar, is it free? As Conrad already said: It's under Apache license - so feel free to use it. No strings attached. cheers, Torsten ___ Cocoa-dev mailing list (

Re: Sandboxing and file references

2011-09-22 Thread Torsten Curdt
>>The explicit entitlement to read a file following an open/drag exists >>only until the application quits (a fragile exception exists in using >>URLs stored into the restorable state archive, but even that won't work >>long term).  Thus keeping references to files is essentially impossible >>(long

Re: Receiving Crash Reports

2011-09-29 Thread Torsten Curdt
And another one... https://github.com/tcurdt/feedbackreporter cheers, Torsten ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lis

printing and the responder chain

2011-10-04 Thread Torsten Curdt
I have a non-document based app. It's a master detail layout with a NSOutlineView and a custom NSView (in a NSScrollView in a NSSplitView) on the right. Now when I initiate a "Print" from the menu all that shows up in the print preview is the outline view. Reading the documentation from http://dev

Re: printing and the responder chain

2011-10-04 Thread Torsten Curdt
:23 PM, Torsten Curdt wrote: > I have a non-document based app. It's a master detail layout with a > NSOutlineView and a custom NSView (in a NSScrollView in a NSSplitView) > on the right. Now when I initiate a "Print" from the menu all that > shows up in the print

Re: printing and the responder chain

2011-10-04 Thread Torsten Curdt
> In order for your custom view to become first responder, it must also return > YES from -acceptsFirstResponder head ... desk Off course! I bet that was it ...but as you said: to avoid surprises I better move the action off the first responder. Thanks, Graham! cheers, Torten > but mouse event

adding something to a setter

2011-10-06 Thread Torsten Curdt
The property syntax is great until you need one more thing. Think of a NSView and that view displays a value. @synthesize value; Now you also want to setNeedsDisplay: when a new value is set. So one can override the setter. - (void)setValue:(NSString*)theValue { ... [self setNeedsDispl

Re: adding something to a setter

2011-10-06 Thread Torsten Curdt
Hm... using KVO for an object to observe it's own properties? That's feels wrong to me. Is that just me? cheers, Torsten ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact

NSPrintInfo and NSPageLayout

2011-10-06 Thread Torsten Curdt
So I have a custom view and I am adding printing support. I've set it up like this: https://gist.github.com/919d845b2e1b5becbaac where I create a custom instance of my view, setup the NSPrintInfo and then run the NSPrintOperation. Now there are a couple of things I couldn't quite figure out yet

Re: adding something to a setter

2011-10-06 Thread Torsten Curdt
5:23 schrieb Thomas Davie: > >> >> On 6 Oct 2011, at 14:16, Torsten Curdt wrote: >> >>> Hm... using KVO for an object to observe it's own properties? >>> That's feels wrong to me. >>> Is that just me? >> >> No, definitely not j

Re: adding something to a setter

2011-10-06 Thread Torsten Curdt
> I think it really doesn't suck. You've just been lucky enough so far to be > able to ride around on synthesized setters, so an override feels bad. Get > over it already! Just because I can now synthesize setters doesn't make it suck less. Over it or under it ;) The intend of this mail was not t

Re: adding something to a setter

2011-10-06 Thread Torsten Curdt
The superclass approach is sneaky ...didn't think about that. > Again, though, I remain unconvinced that going to all this trouble is worth > it, just to eliminate a lingering sense of unease. Perhaps a short course of > therapy instead? LOL - maybe :) Well, TBH this is less of "I want to use th

Re: NSPrintInfo and NSPageLayout

2011-10-07 Thread Torsten Curdt
>> 1) Currently I set the width of the view to the page size width minus >> the left and right margin. Frankly speaking I have no clue if that is >> the right thing to do. Or is imageablePageBounds the one to use? > > I'm not sure.  I know that you can get the PMPageFormat object from the > NSPrin

Re: NSPrintInfo and NSPageLayout

2011-10-07 Thread Torsten Curdt
Another question that came up... So I have the panel and the preview is correct. Now I click to change the orientation from portrait to landscape. Of course at a scaling factor of 100% it should fill the page, but instead it's just sticks to the previous size and centers it on the page. What am I

Re: adding something to a setter

2011-10-07 Thread Torsten Curdt
> Isn't this the same as the discussion we had here? > > > > If so, let's pretend I just repeat my answer. :) m. Wow - a black cat! (http://www.imdb.com/title/tt0133093/quotes) Somehow I didn't s

Re: NSPrintInfo and NSPageLayout

2011-10-08 Thread Torsten Curdt
>> So I have the panel and the preview is correct. Now I click to change >> the orientation from portrait to landscape. Of course at a scaling >> factor of 100% it should fill the page, but instead it's just sticks >> to the previous size and centers it on the page. >> >> What am I missing there? >

Re: About iVars declaration and property

2011-11-15 Thread Torsten Curdt
>>If you’re 64-bit only (or if you require Lion or better), there’s no real >>reason to explicitly declare the ivars these days. > > As others have pointed out, this is not true. There are practical differences > between declaring and not declaring the ivar explicitly. I almost never > declare t

Re: About iVars declaration and property

2011-11-15 Thread Torsten Curdt
> In four words: Fragile Base Class Problem. > > The problem is that a subclass (in 32 bit OS X) needs to know the size of the > superclass so it know how to lay out its ivars.  If there is no explicit > ivars, there is no way for the compiler to know the size (since when it is > compiling the s

Re: About iVars declaration and property

2011-11-15 Thread Torsten Curdt
>> Think of it like the compiler generates the ivars from the property >> definitions. So the ivar would be indeed explicit ivars - just not >> defined as such in the classic way. > > Doesn't matter. The subclass still needs to know the size of its superclass > so that it generate the proper ivar

  1   2   3   4   >