Re: How to convert path through container into standard form?

2022-12-11 Thread Mike Abdullah via Cocoa-dev
Have you tried -URLByResolvingSymlinksInPath? As far as I’m aware, the Pictures entry inside your container is a symlink to the real thing, so assuming you have appropriate entitlements, should be possible to resolve it. Mike. > On 11 Dec 2022, at 10:56, Gabriel Zachmann via Cocoa-dev >

Re: Retrieving the EXIF date/time from 250k images

2022-08-18 Thread Mike Abdullah via Cocoa-dev
It’s not a very good fit, but when you say a “GCD concurrent queue”, you’d need to be more specific. There are several configs possible. Do you mean a global queue, or one you made yourself? If you made it yourself, how did you configure it? The tricky problem is that GCD aims to optimise CPU

Re: Problem with rangeOfString and Umlauts

2022-03-12 Thread Mike Abdullah via Cocoa-dev
Perhaps worth noting that the docs for commonPrefixWithString:options: cover cases like this: > Discussion > The returned string is based on the characters of the receiver. For example, > if the receiver is “Ma¨dchen” and aString is “Mädchenschule”, the string > returned is “Ma¨dchen”, not

Re: iOS UINavigation background removal.

2022-01-28 Thread Mike Abdullah via Cocoa-dev
If I remember correctly from doing something like this in the path, the important thing in the below code is you are providing a custom image for the nav bar to draw as its background, instead of doing a blur effect. The image you supply happens to be empty so nothing is drawn in the end, and

Re: Multiple shadows in iOS on a view.

2021-06-11 Thread Mike Abdullah via Cocoa-dev
Your description seems a bit confused here. Why declare the applySketchShadow() method but never use it? The force conversion of UIBezierPath to CGPath smells, and suggests you never hit this code path. If so, I think you may have layers with no content and no path, so will not generate a

Re: Simplest way to produce "tick" system sound?

2021-06-11 Thread Mike Abdullah via Cocoa-dev
NSBeep() ? Mike. Sent from my iPhone > On 11 Jun 2021, at 13:59, Gabriel Zachmann via Cocoa-dev > wrote: > > Sorry for the stupid question: > what would be the easiest way to produce that "tick" system sound > signifying an invalid keyboard input? > I am talking about the new system sound

Re: How do you handle reading a plist if it may be an array or a dictionary?

2021-05-10 Thread Mike Abdullah via Cocoa-dev
> On 10 May 2021, at 10:52, Mark Allan via Cocoa-dev > wrote: > > Hi, > > Now that Alex has the answer to his problem, can I ask a follow-up question > based on this line in his initial email? > >> On 9 May 2021, at 1:12 am, Alex Zavatone via Cocoa-dev >> wrote: >>

Re: How do you handle reading a plist if it may be an array or a dictionary?

2021-05-10 Thread Mike Abdullah via Cocoa-dev
Further to earlier answers, it’s worth pointing out you’ve got an anti-pattern in this code. You go: 1. Check if file exists 2. Try to read file There is no point to step 1. Just do step 2 directly, and handle failure there. If you _don’t_ handle failure at step 2, you’ve got yourself a nasty

Re: Several different NSUserDefaults in the same app?

2021-04-04 Thread Mike Abdullah via Cocoa-dev
> On 3 Apr 2021, at 16:34, Richard Charles via Cocoa-dev > wrote: > >> >> On Apr 3, 2021, at 8:59 AM, Gabriel Zachmann wrote: >> >> Thanks a lot for your response! >> >>> How about something like this? >>> >>> NSUserDefaults *monitor1 = [[NSUserDefaults alloc] init]; >>> [monitor1

Re: Exception not being caught in try statement

2021-03-26 Thread Mike Abdullah via Cocoa-dev
This does seem quite surprising. However, here’s the thing: this code is very strange approach to take. Number 1: Cocoa doesn’t support exceptions as an error-handling mechanism except where explicitly stated and supported. You’re trying to use them, which is asking for trouble. The system

Re: Throttling drawing to vertical refresh

2020-10-15 Thread Mike Abdullah via Cocoa-dev
CADisplayLink Mike. Sent from my iPhone > On 15 Oct 2020, at 20:13, Andreas Falkenhahn via Cocoa-dev > wrote: > > I'm drawing inside an NSView by simply setting its layer's contents to a > CGImage which is updated for every frame, e.g. something like this: > >dp =

Re: Invalidating UIImageView's image cache

2020-09-23 Thread Mike Abdullah via Cocoa-dev
Correct, this is your issue. Have a read of the docs on +[UIImage imageNamed:] They explicitly discuss the cache. This is not the API you want. Mike. > On 23 Sep 2020, at 02:12, Eric Lee via Cocoa-dev > wrote: > > Ah maybe it is the use of `imageNamed:`. I believe that caches the image >

Re: Thoughts on Objective-C++

2019-11-13 Thread Mike Abdullah via Cocoa-dev
> On 13 Nov 2019, at 19:31, Turtle Creek Software via Cocoa-dev > wrote: > > I made a rather bold statement about Cocoa being doomed. Here's some > background on where it came from. > > Apple and Microsoft are both working on next-generation app development > platforms, with the goal of

Re: Questions regarding release

2019-09-27 Thread Mike Abdullah via Cocoa-dev
> On 27 Sep 2019, at 00:43, James Walker via Cocoa-dev > wrote: > > On 9/26/19 4:20 PM, Gabriel Zachmann via Cocoa-dev wrote: >>> The issue in the below code to my eye is that you allocate a path with >>> CGPathCreateWithRect (+1) but then don't release it. >>> >>> In that case, I am

Re: Questions regarding release

2019-09-26 Thread Mike Abdullah via Cocoa-dev
I don’t believe that’s entirely true. “make” methods return a +0 value. The issue in the below code to my eye is that you allocate a path with CGPathCreateWithRect (+1) but then don't release it. Mike. > On 26 Sep 2019, at 17:16, Glenn L. Austin via Cocoa-dev > wrote: > > The analyzer is

Re: Cocoa-dev Digest, Vol 16, Issue 87

2019-09-17 Thread Mike Abdullah via Cocoa-dev
> On 17 Sep 2019, at 09:04, Gabriel Zachmann via Cocoa-dev > wrote: > >> >> The bounds origin is the origin of the coordinate system for sublayers of >> that layer, and thus changing the bounds origin moves sublayers around. > > Thanks a lot for the insight. > > Just out of curiosity (or

Re: Dynamically change NSCollectionView items based on view width

2019-04-07 Thread Mike Abdullah
The obvious first question to me is: is your notification actually firing? Mike. > On 6 Apr 2019, at 22:46, Demitri Muna wrote: > > Hello, > > I have a 10.11+ NSCollectionView. I have two representations (subclasses of > NSCollectionViewItem) of the data - one large and one small. When the

Re: NSManagedObject.managedObjectContext is nil???

2019-03-27 Thread Mike Abdullah
Given the number of objects Core Data is designed to juggle, managing that number of weak references might well affect performance. Besides, wouldn’t you still the same result, that your object has a nil reference to the context because the context has been deallocated? Furthermore, I think

Re: My eyes are failing me.

2019-02-24 Thread Mike Abdullah
> On 22 Feb 2019, at 23:19, Jens Alfke wrote: > > > >> On Feb 22, 2019, at 1:07 PM, Alex Zavatone wrote: >> >> It should not show the /api in the description of the URL if it is not going >> to use it in any call using that URL. > > The .baseURL property returns the original URL with the

Re: Creating NSStrings without copying memory

2017-05-02 Thread Mike Abdullah
Drop down to CFString. It has similar api to the NSData one you like. Mike. Sent from my iPhone > On 2 May 2017, at 22:11, Jens Alfke wrote: > > I’ve got a heap block containing many UTF-8 strings, and I’m looking for the > cheapest way to create NSString objects from

Re: Binding NSTextField to an array

2017-03-06 Thread Mike Abdullah
Yep, you’re very close. An array controller is required indeed, it’s the one responsible for vending out NSMultipleValuesMarker. From your earlier message, you’re now seeing an exception or similar: Cannot create number from object <_NSControllerObjectProxy: 0x600070b0> of class

Re: Binding NSTextField to an array

2017-03-06 Thread Mike Abdullah
From what I understand of your example, you’re not “binding” anything in a Cocoa sense. What you is an NSArrayController. Bind your text field to the array controller. Supply the array controller with content, and have it derive the selected value, be it single or multiple. > On 6 Mar 2017,

Re: Intercept Save when closing NSDocument

2017-02-12 Thread Mike Abdullah
___ 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 Help/Unsubscribe/Update your Subscription:

Re: Overriding the release mehod

2017-01-25 Thread Mike Abdullah
You’re inevitably going to get asked this: Why on earth are you overriding release? It’s an incredibly niche thing to do, and the answer probably depends a lot on why you’re overriding it. > On 25 Jan 2017, at 16:52, Dave wrote: > > Hi, > > Does [suoer release] need

Re: Representing an object graph

2016-12-05 Thread Mike Abdullah
> On 6 Dec 2016, at 02:17, Jens Alfke wrote: > > >> On Dec 5, 2016, at 4:18 PM, Daryle Walker wrote: >> >> I've heard that Core Data is a object graph and persistence library. What if >> you want just the first part? > > You can use the XML-based

Re: Root URL and URLByDeletingLastPathComponent

2016-07-18 Thread Mike Abdullah
. > On 17 Jul 2016, at 22:06, Charles Srstka <cocoa...@charlessoft.com> wrote: > >> On Jul 17, 2016, at 5:30 AM, Mike Abdullah <mabdul...@karelia.com >> <mailto:mabdul...@karelia.com>> wrote: >> >> It might be a mishandling of the two sorts of rot

Re: Root URL and URLByDeletingLastPathComponent

2016-07-17 Thread Mike Abdullah
> On 17 Jul 2016, at 07:48, thatsanicehatyouh...@me.com wrote: > > Hello, > > Sanity check here. I have this code: > > NSURL *rootURL = [NSURL fileURLWithPath:@"/"]; > NSLog(@"%@", rootURL, [rootURL URLByDeletingLastPathComponent]); > > Based on the NSURL documentation: > >> If the

Re: NSFileWrapper

2016-06-04 Thread Mike Abdullah
It sounds like you want your file format to be what is known as a “package”. It’s a directory, but is (mostly) presented as a single file. NSFileWrapper is an API for working with files, it does not directly control whether something is a package or not. It just happens to be the most

Re: Correct way to specify anchors with NSURL?

2016-04-21 Thread Mike Abdullah
> On 21 Apr 2016, at 09:09, Graham Cox wrote: > > >> On 21 Apr 2016, at 3:22 PM, Quincey Morris >> wrote: >> >> On Apr 20, 2016, at 22:16 , Graham Cox wrote: >>> >>> But it’s 10.9+ only. I really need a

Re: Asynchronous compatibility of NSDocument read/write methods

2016-04-17 Thread Mike Abdullah
Have you read any of the documentation? Your question sounds rather like you haven’t if I’m honest! If using the asynchronous features of the document system, the read and writing methods are still called and execute synchronously, but on a worker thread. There are various APIs built into the

Re: Implementing Find panel in WebView

2016-04-08 Thread Mike Abdullah
WebKit’s open source. Go have a peek in there and sadly you’ll discover that although the find panel API is declared, it’s never been implemented. Mike. > On 8 Apr 2016, at 05:46, Graham Cox wrote: > > Hi, > > I’m using WebView in my app, and I see it implements

Re: Safe to access the objectID property of an NSManagedObject from a different thread?

2016-03-26 Thread Mike Abdullah
That's one of the few methods which are safe. I don't think the docs ever state it, but it was mentioned in a WWDC session a few years ago Mike. Sent from my iPhone > On 26 Mar 2016, at 18:48, Ryan Meisters wrote: > > Hi! > > I've inherited a codebase which uses

Re: Third party keyboards in iOS

2016-02-13 Thread Mike Abdullah
> On 13 Feb 2016, at 19:06, nicholasacosta...@gmail.com wrote: > > > > Sent from my iPhone hi, how can I create a third-party keyboard for iOS? Do I > need to have an app already created in order to do this? What documentation > should I start reading? I am asking this because I don't know

Re: UIView underlying rects for drawRect

2015-12-06 Thread Mike Abdullah
> On 6 Dec 2015, at 01:50, Roland King wrote: > > You thought CGContext had it, I thought CALayer had it, neither of them > appear to have it! > > AFAICT UIView is clearing the entire rectangle before drawing, so that idea > doesn’t work either. That was a good way to confirm

Re: UIView underlying rects for drawRect

2015-12-05 Thread Mike Abdullah
I thought CGContext had API to tell you the rects being drawn, but can’t see that now, so I think I imagined it! I’d say your next port of call is to ascertain whether the system is smart enough to be only drawing the required area or not. There are debugging tools to show you the portions of

Re: The joys of people using valueForKey to get objects out of a dictionary.

2015-11-10 Thread Mike Abdullah
> On 10 Nov 2015, at 16:32, Alex Zavatone wrote: > > It's been about 4 or 5 years since I made this mistake but I've just seen a > massive swath of code where every access of a dictionary object is using > valueForKey instead of objectForKey. > > I've got a few examples of why

Re: runOnMainQueueWithoutDeadlocking and all its evils.

2015-11-07 Thread Mike Abdullah
In my experience, the main issue is on OS X. If you ever display a modal window, that runs the run loop in a special mode for the duration of the window. The trouble is, that mode does not include dequeuing things from GCD’s main queue, so anything you ask to be done that way doesn’t happen.

Re: Implications of disabling ATS?

2015-09-30 Thread Mike Abdullah
> On 30 Sep 2015, at 17:17, Jens Alfke wrote: > > >> On Sep 30, 2015, at 7:06 AM, Alex Hall wrote: >> >> However, before I go doing that, does anyone know of a better way? Are there >> security implications I'm overlooking? I don't know what users

Re: How to specify Volume to NSURLSession ?

2015-09-29 Thread Mike Abdullah
> On 29 Sep 2015, at 07:02, Gerriet M. Denkmann wrote: > > When I download a file using NSURLSession downloadTaskWithRequest the file > ends up in exactly the wrong volume. > Which means: I have to copy it to the right one, which, for really big files, > can take some

Re: How to specify Volume to NSURLSession ?

2015-09-29 Thread Mike Abdullah
> On 29 Sep 2015, at 10:25, dangerwillrobinsondan...@gmail.com wrote: > > That is to say use the data task delegate methods to receive data and write > it where you want it? Yep, fire up a data task (with delegate, not completion handler). Use

Re: How to get remote metadata

2015-09-27 Thread Mike Abdullah
> On 27 Sep 2015, at 18:08, Gerriet M. Denkmann wrote: > > I want to get some metadata for a remote file. > I tried: > > NSString *path = @"/Public/UNIDATA/Blocks.txt"; > NSURL *icuBlocksUrl = [ [ NSURL alloc ] initWithScheme: @"http" host: > @"unicode.org" path: path

Re: Two Array Controllers, loading from CoreData, without a contentArray...

2015-09-22 Thread Mike Abdullah
> On 22 Sep 2015, at 14:40, Jim Thomason wrote: > > First, to be clear, I'm not actually trying to do this. I'm just curious > how it could be done. I cooked it up while working on other things. > > The question is simple - is there a reasonable way to create two >

Re: Saving window and view state with NSDocument

2015-09-22 Thread Mike Abdullah
> On 22 Sep 2015, at 04:33, Kurt Sutter wrote: > > Thanks for the info > >> BTW you decided to fight against framework (as others mentioned state >> restoration is responsible for this). > > The documentation on state restoration is somewhat sparse. However, as I >

Re: Saving window and view state with NSDocument

2015-09-22 Thread Mike Abdullah
> On 22 Sep 2015, at 10:50, Marek Hrušovský wrote: > > This is somewhat true. > I've just tested it with "NSQuitAlwaysKeepsWindows" and the restore delegate > is kicked when you quit app/launch app from the dock. However, it's not > called when you perform close on window

Re: Tracking down source of [_NSControllerObjectProxy copyWithZone:]… error

2015-09-20 Thread Mike Abdullah
> On 20 Sep 2015, at 07:04, Quincey Morris > wrote: > > On Sep 19, 2015, at 20:09 , Alex Hall wrote: >> >> [_NSControllerObjectProxy copyWithZone:]: unrecognized selector sent to >> instance 0x60800ae0 >> >> failed to set

Re: Arrow Keys in NSSlider

2015-09-08 Thread Mike Abdullah
> On 8 Sep 2015, at 21:28, Raglan T. Tiger wrote: > > In a window are multiple views. One view contains an NSSlider. I would like > to move the slider with arrow keys. > > I have subclassed NSSlider, added a -keyDown: method,and > -acceptsFirstResponder that

Re: Handling close with multiple document windows

2015-09-08 Thread Mike Abdullah
> On 8 Sep 2015, at 22:40, David Durkee wrote: > > I have a document-based application where the documents have a second window, > which is used for editing a color list for the document. Originally I just > conceived this as a modeless dialog, but recently I wanted to

Re: NSAtomicStore and multi processes

2015-09-07 Thread Mike Abdullah
> On 26 Jun 2015, at 10:47, Samir wrote: > > Hi all, > > I’m working on sharing a core data database between multiple processes. > > In the "Core Data Programming Guide”, it’s mentioned that core data databases > does handle multiple processes. > > However, I’m

Re: 3rd party framework crashes with invalid code sign

2015-09-07 Thread Mike Abdullah
> On 19 Aug 2015, at 06:09, Nava ‏Carmon wrote: > > > We have a weird problem after upgrading to Yosamite: > > We use a 3rd party framework and codesign it on copying in Build Phases. > When we run the application (which is LSUIElement - agent application) > sometimes after

Re: "Computed segue" in iOS?

2015-09-07 Thread Mike Abdullah
> On 7 Sep 2015, at 20:33, Carl Hoefs <newsli...@autonomy.caltech.edu> wrote: > > >> On Sep 6, 2015, at 10:27 AM, Mike Abdullah <mabdul...@karelia.com> wrote: >> >> Ideally, you use different cells for the different data elements, and wire >&

Re: Problem with Auto Layout and drawRect

2015-09-07 Thread Mike Abdullah
> On 7 Sep 2015, at 18:34, Dave wrote: > > Hi, > > I have a View subclass called LTWDrawFrameView that has been working since > the dawn of time and would like to make it work with auto layout. > > All it does it optionally Draw a Frame Around an NSView and/or fill

Re: "Computed segue" in iOS?

2015-09-06 Thread Mike Abdullah
Ideally, you use different cells for the different data elements, and wire them up to the appropriate segue, letting the system take care of most of it for you. If you need something more complex, it’s time to trigger the segues programatically. You can wire up multiple segues from your source

Re: Unrecognized Selector Exception from IBAction's?

2015-09-03 Thread Mike Abdullah
Try running with zombies turned on. Almost certainly, the object your actions are wired up to has been deallocated, and since replaced by the hash table. > On 3 Sep 2015, at 13:09, Dave wrote: > > Hi, > > This is a Mac Project. > > I’m getting an Unrecognized

Re: Presenting VCs as Sheets — Completion Handler?

2015-08-25 Thread Mike Abdullah
On 25 Aug 2015, at 03:56, Seth Willits sli...@araelium.com wrote: Naturally we're all accustomed to the pattern: [sheet beginSheetModalForWindow:window completionHandler:^(NSInteger response){ ... }]; But with the new presentation API, there's no built-in mechanism for

Re: Will iOS app accepted on App Store if 80% of UI is rendered on UIWebView and 20% being native OCR

2015-08-20 Thread Mike Abdullah
On 20 Aug 2015, at 07:21, Devarshi Kulshreshtha devarshi.bluec...@gmail.com wrote: I have a mobile website which at high level provides these functionalities: 1. Sign-in 2. Sign-up 3. Few forms where user can fill his additional details 4. Providing some capabilities to user based on

Re: Crash help?

2015-08-20 Thread Mike Abdullah
On 20 Aug 2015, at 07:40, Shane Stanley sstan...@myriad-com.com.au wrote: I'm try to track down a crash, and I'm not sure where to begin. This is what I see: Crashed Thread:0 Dispatch queue: com.apple.main-thread Exception Type:EXC_BAD_ACCESS (SIGSEGV) Exception

Re: Private Methods

2015-08-18 Thread Mike Abdullah
On 18 Aug 2015, at 15:58, Richard Charles rcharles...@gmail.com wrote: Apple documentation states that the Names of most private methods in the Cocoa frameworks have an underscore prefix (for example, _fooData ) to mark them as private.” I just ran into a case where one of my method

Re: Help understanding Apple's approach in documentation a little better.

2015-08-16 Thread Mike Abdullah
On 16 Aug 2015, at 22:18, Alex Zavatone z...@mac.com wrote: On Aug 16, 2015, at 4:49 PM, Ken Thomases wrote: On Aug 16, 2015, at 3:09 PM, Alex Zavatone z...@mac.com wrote: So, I look at UIStoryboard.h and the docs and see that there are 3 methods. No properties. And in using it,

Re: Thread-safe atomic property for array

2015-08-15 Thread Mike Abdullah
On 15 Aug 2015, at 00:59, Trygve Inda cocoa...@xericdesign.com wrote: My main thread periodically downloads some data from a website. This is extracted into an NSArray (non-mutable) and placed in a property: @property (atomic, retain) NSArray* myArray; [self setMyArray:webArray]; Ok

Re: Thread-safe atomic property for array

2015-08-15 Thread Mike Abdullah
On 15 Aug 2015, at 13:21, Sandy McGuffog mcguff...@gmail.com wrote: What guarantees that the current autorelease cycle doesn’t end in the middle of this code? If it does end in the middle of this code, that’s something the author of the code is doing specially and must deal with the

Re: Thread-safe atomic property for array

2015-08-15 Thread Mike Abdullah
On 15 Aug 2015, at 13:07, Sandy McGuffog mcguff...@gmail.com wrote: On Aug 15, 2015, at 1:14 PM, Mike Abdullah mabdul...@karelia.com wrote: NSArray *array = [hostObject myArray]; // run your checks, etc. NSString *someString = [array objectAtIndex:2]; Just to be safe: NSArray

Re: Mavericks vs Yosemite line spacing

2015-08-13 Thread Mike Abdullah
Control of vertical alignment is something Cocoa devs have wanted for years. Usually what you end up doing is subclassing NSTextFieldCell to customise the layout/drawing, such that text appears at the desired point. On 13 Aug 2015, at 00:56, Trygve Inda cocoa...@xericdesign.com wrote: I

Re: How to implement NSSplitViewDelegate methods in an NSSplitViewController subclass

2015-08-08 Thread Mike Abdullah
On 8 Aug 2015, at 14:06, Bill Cheeseman wjcheese...@gmail.com wrote: I think you're right on both counts. I will post this weekend about my solution to the other problem I posted about -- how to make collapse and uncollapse work both from a toggle button and by double-clicking or

Re: NSPrivateQueueConcurrencyType working outside of performBlock

2015-08-01 Thread Mike Abdullah
On 29 Jul 2015, at 15:35, Trygve Inda cocoa...@xericdesign.com wrote: “Setter methods on queue-based managed object contexts are thread-safe. You can invoke these methods directly on any thread” https://developer.apple.com/library/mac/documentation/Cocoa/Reference/CoreData

Re: Timeouts in NSURLSession

2015-08-01 Thread Mike Abdullah
On 30 Jul 2015, at 01:55, Rick Mann rm...@latencyzero.com wrote: I'm starting hundreds of download tasks on a single NSURLSession. The session nicely limits the number of concurrent downloads, and everything seems to behave, until I some time has elapsed equal to the default value of

Re: Adding UIBarButtonItem to UINavigationBar in Storyboard Xcode 7b2

2015-07-21 Thread Mike Abdullah
On 21 Jul 2015, at 02:42, Rick Mann rm...@latencyzero.com wrote: I'm trying to install Xcode 7b3, but in the meantime, shouldn't I be able to drag a UIBarButtonItem to the navigation bar in the root view controller of a UINavigationController stack in IB? I don't seem to be able to. Every

Re: OsX - HTTP resource load blocked

2015-07-19 Thread Mike Abdullah
Have you tried a clean build? This kinda suggests that somehow Xcode has modified the bundle, but not then re-signed it. (I’m trusting you didn’t go an modify the build product directly yourself!) On 19 Jul 2015, at 09:47, Marc Danguy mdan...@free.fr wrote: a strange one : Code Signature

Re: OsX - HTTP resource load blocked

2015-07-19 Thread Mike Abdullah
On 19 Jul 2015, at 17:04, Marc Danguy mdan...@free.fr wrote: Yes, I do If I remove the NSExceptionDomains definition in my Info.plist, my application run without crash By a clean build, I mean telling Xcode to do a clean, and then building afterwards.

Re: Safe time to add accessory view to NSSavePanel in sandboxed app?

2015-07-16 Thread Mike Abdullah
On 16 Jul 2015, at 02:33, Graham Cox graham@bigpond.com wrote: Pertinent details below - the line marked com.myapp contains the code listed previously, which is an action method invoked by a menu command. Date/Time: 2015-07-15 10:32:36.027 -0400 OS Version:

Re: Safe time to add accessory view to NSSavePanel in sandboxed app?

2015-07-16 Thread Mike Abdullah
On 16 Jul 2015, at 20:30, Martin Wierschin mar...@nisus.com wrote: Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libobjc.A.dylib 0x7fff8b5b80dd objc_msgSend + 29 1 com.apple.AppKit0x7fff9231bb94 -[NSView _setSuperview:] + 2591 2

Re: selectText of NSTextField on focus

2015-07-06 Thread Mike Abdullah
On 6 Jul 2015, at 20:38, Richard Charles rcharles...@gmail.com wrote: On Jul 6, 2015, at 12:12 PM, Gary L. Wade wrote: You want to select the text using the associated text view of the NSTextField control. Not sure what you mean by the associated text view of the control. Do you

Re: EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x00000000bbadbeef crash on UIWebview

2015-06-22 Thread Mike Abdullah
Have you experimented with passing something bigger than CGRectZero for the web view’s initial size? Maybe it’s freaking out over that. Some googling also suggests that the bbadbeef code can mean WebKit couldn’t allocate enough memory. Maybe you’re using too much memory in your app in total?

Re: Custom NSView subclass - expressing the fact that a property affects the displayed image

2015-05-22 Thread Mike Abdullah
On 22 May 2015, at 15:03, Jonathan Taylor jonathan.tay...@glasgow.ac.uk wrote: Thanks for your reply Mike: Well you could have a single key which you observe internally, and which all the other keys feed into. Whenever it “changes”, treat that as time to mark as needing display. That

Re: Custom NSView subclass - expressing the fact that a property affects the displayed image

2015-05-22 Thread Mike Abdullah
On 22 May 2015, at 13:51, Jonathan Taylor jonathan.tay...@glasgow.ac.uk wrote: I’m trying to think if there is an elegant way of handling the situation I find in some of my display code. I have a class which inherits from NSView and which overrides drawRect. The class has a number of

Re: Follow up to DatePicker Question

2015-05-20 Thread Mike Abdullah
On 20 May 2015, at 21:07, David Grant dmgr...@infinitydigital.com wrote: So I found that what I really really wanted was not a popover controller but an inputView. When I test this in an iPhone 6 it seems to work just fine, but on testing an iPhone 5 the reaction to the date change is

Re: Fast enumeration question.

2015-05-14 Thread Mike Abdullah
You want: continue; Same as a regular for loop in C. On 14 May 2015, at 18:09, Alex Zavatone z...@mac.com wrote: I'm sure this will sound like the noobiest question ever, but with Fast Enumeration, if in an if statement within the loop, is there a way to stop loop execution and

Re: How to draw a NSView on top of a WebView and don't get overriden trying

2015-05-14 Thread Mike Abdullah
On 14 May 2015, at 03:43, Michael David Crawford mdcrawf...@gmail.com wrote: would it work render the web view in an offscreen buffer, then copy that onto an on-screen view of your own? At that point you could either have your child view, or simply draw into one big view. That works for

Re: How to draw a NSView on top of a WebView and don't get overriden trying

2015-05-12 Thread Mike Abdullah
The failsafe way is to place a child window over the WebView. I’m not 100% sure but I think popovers work that way behind the scenes, so maybe one of them would be usable for this. On 12 May 2015, at 22:44, Juanjo Conti jjco...@carouselapps.com wrote: I have a WebView and I want to show

Re: Cannot create an NSPersistentStoreCoordinator with a nil model

2015-05-11 Thread Mike Abdullah
On 11 May 2015, at 21:43, Alex Kac a...@webis.net wrote: We have an app that's out in the wild, and as always there are weird issues that sometimes show up then. This seems like it should never happen or always happen. The crash is here: http://crashes.to/s/f382ed6e4ef Obviously

Re: Weird UITableView problem

2015-04-26 Thread Mike Abdullah
On 26 Apr 2015, at 18:29, William Squires wsqui...@satx.rr.com wrote: I made a fairly simple iOS app (Single View template, iPhone, Swift) that has a UITableView. I've got it all hooked up, and running the project (in the simulator) shows the table view, but only 13 (out of 20) rows are

Re: Display a UIAlertView after dismissing an action sheet?

2015-04-25 Thread Mike Abdullah
On 25 Apr 2015, at 15:06, Michael Crawford mdcrawf...@gmail.com wrote: On 4/25/15, Roland King r...@rols.org wrote: There are delegate methods for UIActionSheet and UIAlertView which tell you when the animation has finished. xxx:didDismissWithButtonIndex: You Da Man. I am closer to

Re: Display a UIAlertView after dismissing an action sheet?

2015-04-25 Thread Mike Abdullah
On 25 Apr 2015, at 15:30, Michael Crawford mdcrawf...@gmail.com wrote: On 4/25/15, Mike Abdullah mabdul...@karelia.com wrote: Apple's APIs here are deliberately asynchronous. You need to make your code handle that properly. Don't try to force it to be synchronous. Some things need

Re: Crash at iOS App Startup - What Could Have Gone Wrong?

2015-04-22 Thread Mike Abdullah
On 21 Apr 2015, at 21:43, Michael Crawford mdcrawf...@gmail.com wrote: It's not stopping in the debugger anymore, but instead of getting my navigation controller I'm just getting a black screen. That sounds like a good time to use Xcode’s view debugger to find out what’s actually onscreen.

Re: Crash at iOS App Startup - What Could Have Gone Wrong?

2015-04-21 Thread Mike Abdullah
On 21 Apr 2015, at 19:13, Michael Crawford mdcrawf...@gmail.com wrote: OK I'll set up a git repository, but I'd like to fix this first. I think my MainWindow.xib got misconfigured or corrupted, so I made a new one. I have a UINavigationController with a custom class inside it called

Re: Crash at iOS App Startup - What Could Have Gone Wrong?

2015-04-21 Thread Mike Abdullah
On 21 Apr 2015, at 13:43, Michael Crawford mdcrawf...@gmail.com wrote: I screwed something up. If I can't fix it I can restore from backup. I'm too cheap to use git but I make regular tarballs. I spent some time monkeying around with Interface Builder. My iPhone .xibs were mostly

Re: NSURLProtocol

2015-04-13 Thread Mike Abdullah
...@rebelbase.com wrote: question has nothing to do with webkit, the NSURLProtocol is part of foundation library, the fact that it is implemented inside a plugin, and can also be instanciated inside a webview, does not make it a webkit question. On Apr 12, 2015, at 2:30 AM, Mike Abdullah

Re: Crash when move open document based app file to trash

2015-04-13 Thread Mike Abdullah
I think the document system monitors the file, and calls -setFileURL: when it detects a change. I’m not sure how careful that monitoring is, though, whether it happens continuously, or only at the moment the app or document regains focus. On 13 Apr 2015, at 14:19, Jonathan Mitchell

Re: NSURLProtocol

2015-04-12 Thread Mike Abdullah
On 12 Apr 2015, at 04:07, danchik danc...@rebelbase.com wrote: an npapi plugin on a web page, it registers a protocol handler I’d say you’re on the wrong list then. This comes down almost entirely to what has been implemented/allowed for Safari, rather than being a general Cocoa question.

Re: NSURLProtocol

2015-04-11 Thread Mike Abdullah
On 11 Apr 2015, at 02:28, Dan S danc...@rebelbase.com wrote: Is behavior of NSURLProtocol changed with Safari 5.1? I have a plugin that registeres a protocol handler xyz:// for example Could clarify what exactly you mean by “plugin” here? It succeeds and I can see all the requests to

Re: Painting standard check box/radio button mark

2015-04-09 Thread Mike Abdullah
On 9 Apr 2015, at 17:39, Aandi Inston aa...@quite.com wrote: Is there a way to paint a standard check box or radio button mark, in its various states? I am implementing a custom control which would benefit from this. Clearly one could define a textless NSButton within one's own control,

Re: Does GCD auto-limit concurrent tasks to number of cores?

2015-04-09 Thread Mike Abdullah
On 9 Apr 2015, at 20:26, Carl Hoefs newsli...@autonomy.caltech.edu wrote: Wonderful! Thank you for clearing this up for me! -Carl On Apr 9, 2015, at 12:07, Carl Hoefs newsli...@autonomy.caltech.edu wrote: OS X 10.10 I have a highly CPU-bound project that parallelizes well. A

Re: iOS 7/8 sandboxing question. Path to Documents folder changing on every app launch?

2015-04-06 Thread Mike Abdullah
On 6 Apr 2015, at 15:52, Alex Zavatone z...@mac.com wrote: I'm running into an interesting issue I'm trying to track down under iOS 7 and 8. (Xcode 6.2, Mac OS 10.10.2) Our app downloads files and saves them within the app for display later when the user wants to bring them up. It

Re: NSOpenPanel accessoryView clicks must hit pixels to work

2015-04-06 Thread Mike Abdullah
On 30 Mar 2015, at 18:00, Steve Mills sjmi...@mac.com wrote: On Mar 30, 2015, at 11:37:46, Mike Abdullah mabdul...@karelia.com wrote: Slightly less ugly idea, how about filling the background of your accessory view with something like 1% alpha? Would that be enough to direct clicks

Re: Drawing in a view with alpha 1.0 shows windows behind

2015-03-31 Thread Mike Abdullah
On 31 Mar 2015, at 15:59, Charles Jenkins cejw...@gmail.com wrote: I confused the view with the color, but in essence that’s what I was afraid you were saying: that Yosemite is blending with unrelated content instead of what is layered by your app/view/window/whatever “under” the

Re: NSOpenPanel accessoryView clicks must hit pixels to work

2015-03-30 Thread Mike Abdullah
On 30 Mar 2015, at 08:19, Steve Mills sjmi...@mac.com wrote: OK, this is really weird. I just added an accessoryView to an NSOpenPanel. The view contains only a checkbox style NSButton. When testing it, it seemed like the clicks on this button's title didn't always take. It appears that

Re: NSOpenPanel accessoryView clicks must hit pixels to work

2015-03-30 Thread Mike Abdullah
On 30 Mar 2015, at 17:34, Steve Mills sjmi...@mac.com wrote: On Mar 30, 2015, at 11:14:17, Uli Kusterer witness.of.teacht...@gmx.net wrote: Makes sense considering that sandboxed apps don't run their own open panel. Instead the accessory view appears to be hosted in a borderless window

Re: NSOpenPanel accessoryView clicks must hit pixels to work

2015-03-30 Thread Mike Abdullah
On 30 Mar 2015, at 17:24, Steve Mills sjmi...@mac.com wrote: On Mar 30, 2015, at 04:09:13, Mike Abdullah mabdul...@karelia.com wrote: I think I’ve been seeing the same thing, and not been able to quite put my figure on it. Is your app sandboxed? Yes. Great googly moogly, that's it! I

Re: Display an Alert Sheet at a Specified Screen Position

2015-03-25 Thread Mike Abdullah
Are you perhaps looking for this API? https://developer.apple.com/library/mac/documentation/Cocoa/Reference/NSWindowDelegate_Protocol/index.html#//apple_ref/occ/intfm/NSWindowDelegate/window:willPositionSheet:usingRect: On 25 Mar 2015, at 22:06, Dave d...@looktowindward.com wrote: Hi All,

Re: What is the best way to get events fired on keypress for an NSTextField?

2015-03-12 Thread Mike Abdullah
On 12 Mar 2015, at 17:46, Steve Mills sjmi...@mac.com wrote: On Mar 12, 2015, at 11:04:55, Patrick J. Collins patr...@collinatorstudios.com wrote: I hooked up an action from IB to my view controller, but I don't see an option for where to define what kind of action it is... So my

Re: Create a NSURL as a way to validate urls - not working

2015-03-03 Thread Mike Abdullah
On 3 Mar 2015, at 01:57, Jens Alfke j...@mooseyard.com wrote: On Mar 2, 2015, at 3:55 PM, Juanjo Conti jjco...@carouselapps.com mailto:jjco...@carouselapps.com wrote: Ok, I wanted to validate that the url is an absolute one. Is there something in Swift standard lib to do this? I

  1   2   3   4   5   6   7   8   9   10   >