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-

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

2022-08-18 Thread Mike Abdullah via Cocoa-dev
you’re asking for, there’s a very good chance that Spotlight has the info you want indexed and on-hand. You can look into whether that is available via an API as a fast path to take when possible. Mike. > On 17 Aug 2022, at 20:32, James Crate via Cocoa-dev > wrote: > > I have an a

Re: Lock screen ?

2022-03-27 Thread Mike Bellerby via Cocoa-dev
> >> On Mar 27, 2022, at 1:18 PM, Mike Bellerby via Cocoa-dev >> wrote: >> >> Yes it’s possible. >> >> Sent from my iPhone >> >>>> On 26 Mar 2022, at 12:44 pm, Gabriel Zachmann via Cocoa-dev >>>> wrote: >>> >>

Re: Lock screen ?

2022-03-27 Thread Mike Bellerby via Cocoa-dev
> > 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: > https://lists.apple.com/mailman/options/cocoa-dev/m

Re: Problem with rangeOfString and Umlauts

2022-03-12 Thread Mike Abdullah via Cocoa-dev
ile_basename rangeOfString:@“ “ options:… range:spaceSearchRange]; Mike. > On 11 Mar 2022, at 17:17, Gabriel Zachmann via Cocoa-dev > wrote: > > > Well, SSIA. > In more detail, I've got two strings: > > file_basename = @"Morgendämmerung (1)" > info_ite

Re: iOS UINavigation background removal.

2022-01-28 Thread Mike Abdullah via Cocoa-dev
you get the effect you want. Mike. P.S. 2 minute builds sound insane though. The entirety of Sketch does incremental builds considerably faster than that. Go look at your build log, try to figure out what’s swallowing time. > On 28 Jan 2022, at 21:13, Alex Zavatone via Cocoa-dev >

Re: Multiple shadows in iOS on a view.

2021-06-11 Thread Mike Abdullah via Cocoa-dev
shadow. Can you post a sample project instead? Much easier to understand. Mike. > On 10 Jun 2021, at 23:36, Alex Zavatone via Cocoa-dev > wrote: > > Does anyone have any tips for adding multiple shadows to a view or a view’s > CGLayer on iOS in either Objectice-C or Swift?

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 tal

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
reads most conveniently to them and hasn’t considered changing it. It would be better to do: 1. Use NSData to read data from disk, handling failure 2. Use NSPropertyListSerialization to parse the data, handling failure. An option can be passed to ask for the whole plis

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
. +dataWithContentsOfURL:options:error: +propertyListWithData:options:format:error: Mike. > On 9 May 2021, at 01:12, Alex Zavatone via Cocoa-dev > wrote: > > I’m reading a configuration plist like so. > > NSFileManager *fileManager = [NSFileManager defaultManager]; >BOOL s

Re: Several different NSUserDefaults in the same app?

2021-04-04 Thread Mike Abdullah via Cocoa-dev
tead of using the shared one. > > So it appears that using alloc int does not return the shared instance. Where in the docs do you read that? The current NSUserDefaults docs say contrary: > Creates a user defaults object initialized with the defaults for the app and

Re: Exception not being caught in try statement

2021-03-26 Thread Mike Abdullah via Cocoa-dev
file and can load it as data. Mike. > On 26 Mar 2021, at 11:11, Mark Allan via Cocoa-dev > wrote: > > Hi folks, > > Some users are reporting a crash that I can't reproduce, and in an attempt to > gain additional diagnostics from a user, I wrapped the affected line in

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. someth

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 cach

Re: Thoughts on Objective-C++

2019-11-13 Thread Mike Abdullah via Cocoa-dev
ple that rely on it. Sure, Cocoa will see less in the way of updates, but don’t expect it to actually disappear in that 5 year time frame. Mike. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or mode

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 wonderi

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: > >

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

2019-09-17 Thread Mike Abdullah via Cocoa-dev
Normally, the graph paper is placed so that 0,0 on it is in the corner of the view, but it doesn’t have to be. Sometimes it might be useful to move that piece of paper (and thus everything else on it) around inside the “window”. This is has scrolling tends to be implemented for example. Mik

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 o

Re: NSManagedObject.managedObjectContext is nil???

2019-03-27 Thread Mike Abdullah
you can also observe this affect on deleted objects once the context has been saved, if you’re still holding a reference to any such objects. Mike. Sent from my iPhone > On 26 Mar 2019, at 21:57, Rick Mann wrote: > > The implication there is that an object has a weak reference to th

Re: My eyes are failing me.

2019-02-24 Thread Mike Abdullah
nt. For whatever reason, Apple have chosen to implement NSURL/CFURL to represent that scenario, rather than storing everything as absolute URLs. Mike. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests

Re: Carbon -> Cocoa

2018-08-21 Thread Mike Crawford
e Portable Runtime, The Electric Magic Company's ZooLib is C++ and MIT Licensed: http://www.em.net/portfolio/2000/12/zoolib.html I expect there are many others. Mike Crawford -- Mike Crawford mdcrawf...@gmail.com The Global Computer Industry Index: http://soggy.jobs/computer (It&

Re: Carbon -> Cocoa

2018-08-18 Thread Mike Crawford
vers had Deployment Targets of 10.12, the third 10.11. I had some manner of good reason for doing it this way, but I've just been up all night nosediving deeply into Wikipedia and all manner of Epic Talk Page Flame Wars so just now I'm too thrashed to actually remember what it was. Mike Crawf

Re: Carbon -> Cocoa

2018-08-18 Thread Mike Crawford
both sides agreeing to the acceptance tests which are SPECIFIED IN THE CONTRACT. Don't even get me started. Just Don't. -- Mike Crawford mdcrawf...@gmail.com The Global Computer Employer Index: http://soggy.jobs/computer (It's actually starting to get global now.) On Fri, Aug 1

Re: Deleting files extremely slow since OSX High sierra

2018-04-23 Thread Mike Throckmorton
ntact the moderators at cocoa-dev-admins(at)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > https://lists.apple.com/mailman/options/cocoa-dev/mike1throckmorton%40gmail.com > > This email sent to mike1throckmor...@gmail.com -

Re: Ignore Spelling not persistent?

2017-08-23 Thread Mike Crawford
I suggest filing a feature request to recommend Apple create a standardized way to share that ignore list among all applications. Mike Crawford mdcrawf...@gmail.com Seeking Beta Testers for Warp Life for iOS http://www.warplife.com/beta-testing On Wed, Aug 23, 2017 at 11:55 AM, Alan

Re: How To Install El Capitan From Sierra?

2017-07-24 Thread Mike Crawford
> What about VMware Fusion? It’s 50 bucks. My understanding is that VMware virtualizes the firewire ports, so you can use the two-machine debugger with just one Macintosh. Mike Mike Crawford, Baritone mdcrawf...@gmail.com One Must Not Trifle With Wizards For It Makes Us Soggy And H

Re: Why is XCode suddenly doing this?

2017-06-23 Thread Mike Crawford
Gremlins. ___ 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: https://lists

Re: How To Install El Capitan From Sierra?

2017-05-30 Thread Mike Crawford
cting "Install Mac OS X" from the Recovery volume menu. Mike Crawford, Baritone mdcrawf...@gmail.com One Must Not Trifle With Wizards For It Makes Us Soggy And Hard To Light. On Tue, May 30, 2017 at 1:25 PM, Quincey Morris wrote: > On May 30, 2017, at 12:32 , Richard Charles wr

Re: How To Install El Capitan From Sierra?

2017-05-30 Thread Mike Crawford
ort to archive proprietary software because vendors often delete old versions after they ship new versions. Mike Crawford, Baritone mdcrawf...@gmail.com One Must Not Trifle With Wizards For It Makes Us Soggy And Hard To Light. On Tue, May 30, 2017 at 12:07 PM, Richard Charles wrote: > &g

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 them,

Re: Binding NSTextField to an array

2017-03-06 Thread Mike Abdullah
When binding your array controller to its content, there’s also an option to have it automatically select all (or something to that effect). You want to have this turned on too so that the array controller has a selection to generate values from. Mike. > On 6 Mar 2017, at 17:44, Jeremy Hugh

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, at

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: https://lists.apple.co

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 to be called if you overrid

Re: Representing an object graph

2016-12-05 Thread Mike Abdullah
-based store instead of SQLite, and just not bother to > write the XML anywhere… There’s also the in-memory store type. Just use that! Mike. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator commen

Re: Root URL and URLByDeletingLastPathComponent

2016-07-18 Thread Mike Abdullah
Fair enough, thanks! I would say then yes, it’s a mismatch between the docs and the implementation. File a radar, but don’t expect the real-world behaviour to change, especially any time soon! It’s far more likely they will declare it to be a mistake in the docs and correct those. Mike. >

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 receiver’s

Re: NSFileWrapper

2016-06-04 Thread Mike Abdullah
convenient API in Cocoa for working with packages and documents, and so NSDocument has built in support for that. Mike. > On 4 Jun 2016, at 12:01, Peter Hudson wrote: > > Hi All > > Our users have now decided to push the bounds of the system - resulting in > file sizes that are ge

Re: Correct way to specify anchors with NSURL?

2016-04-21 Thread Mike Abdullah
o what the OP wants on 10.7 is probably: NSURL *pathURL = [myURL URLByAppendingPathComponent:@“page”]; NSURL *url = [NSURL URLWithString:@“#fragment” relativeToURL:pathURL]; Don’t forget to properly escape the fragment string if it’s coming in from outside. Alternatively, grab my KSURLCompon

Re: Asynchronous compatibility of NSDocument read/write methods

2016-04-17 Thread Mike Abdullah
doc system to coordinate everything around that. Mike. > On 17 Apr 2016, at 04:23, Daryle Walker wrote: > > The NSDocument class has some core methods for you to override to read and > write data from/to disk. Are those called from the main thread? If so, can > you defer 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 -perform

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

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 wh

Re: UIView underlying rects for drawRect

2015-12-06 Thread Mike Abdullah
ther CATiledLayer would better suit your drawing needs, or if you could split your custom view up into a series of sub-views, so you only need invalidate slices of one or two of them. Mike. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do n

Re: UIView underlying rects for drawRect

2015-12-05 Thread Mike Abdullah
the screen being updated — does that suggest the entire view is being redrawn, or just the ends? Mike. > On 5 Dec 2015, at 03:02, Roland King wrote: > > NSView has a method getRectsBeingDrawn:count: which gives you the actual > rects being drawn in a drawRect: call. Is the

Re: ARC and IBOutlet - strong vs weak......

2015-12-04 Thread Mike Throckmorton
Quincey Morris Friday, December 4, 2015 10:04 AM That sounds like a definitive answer. So you’re asking us because … why? Definitive for the leading question, but not the secondary: If strong, do I need to set the outlets to nil in the corresponding dealloc method? I had tested this and i

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 this is a "real

Re: runOnMainQueueWithoutDeadlocking and all its evils.

2015-11-07 Thread Mike Abdullah
. Faced with this myself, I’ve had to use performBlockOnMainThread:… instead to get the work done. Mike. > On 6 Nov 2015, at 18:23, David Duncan wrote: > >> >> On Nov 6, 2015, at 8:36 AM, Alex Zavatone > <mailto:z...@mac.com>> wrote: >> >> Bearing in m

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 will do with >> this web view, and yes, som

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 -URLSession:dataTask:didReceiveResponse:completion

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 non-trivial time. > > Is

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 ]; > NSArray *keys = @[

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 > NSArrayControllers, have them

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 (hit the red cross).

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 > understood, it only kicks

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 (contentViewController) user defined inspected property on >> (N

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 make the > document abl

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 returns YES. > > -keyDown is no

Re: "Computed segue" in iOS?

2015-09-07 Thread Mike Abdullah
> On 7 Sep 2015, at 20:33, Carl Hoefs wrote: > > >> On Sep 6, 2015, at 10:27 AM, Mike Abdullah wrote: >> >> Ideally, you use different cells for the different data elements, and wire >> them up to the appropriate segue, letting the system take care of mos

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 the view > with a solid c

Re: NSAtomicStore and multi processes

2015-09-07 Thread Mike Abdullah
ss modifies the store. Something like NSFileCoordinator again is handy for that. In my experience, Core Data’s built in atomic stores handle the change poorly though, as they’ve cached the previous store version in-memory. It seems you have to remove and re-add the store from the Core Data stack in or

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 it crashes with th

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 V

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 Selector Exceptions when clicking

Re: Presenting VCs as Sheets — Completion Handler?

2015-08-25 Thread Mike Abdullah
> On 25 Aug 2015, at 03:56, Seth Willits 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 > handli

Re: Crash help?

2015-08-20 Thread Mike Abdullah
> On 20 Aug 2015, at 07:40, Shane Stanley 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 Codes: KERN_INVA

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 > 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 information provide

Re: Private Methods

2015-08-18 Thread Mike Abdullah
> On 18 Aug 2015, at 15:58, Richard Charles 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 names in a subcl

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 wrote: > > > On Aug 16, 2015, at 4:49 PM, Ken Thomases wrote: > >> On Aug 16, 2015, at 3:09 PM, Alex Zavatone wrote: >> >>> So, I look at UIStoryboard.h and the docs and see that there are 3 methods. >>> No properties. >> >>> And in using it, I fi

Re: Thread-safe atomic property for array

2015-08-15 Thread Mike Abdullah
> On 15 Aug 2015, at 13:21, Sandy McGuffog 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 consequences by thems

Re: Thread-safe atomic property for array

2015-08-15 Thread Mike Abdullah
> On 15 Aug 2015, at 13:07, Sandy McGuffog wrote: > > >> On Aug 15, 2015, at 1:14 PM, Mike Abdullah wrote: >> >> NSArray *array = [hostObject myArray]; >> // run your checks, etc. >> NSString *someString = [array objectAtIndex:2]; > > Just t

Re: Thread-safe atomic property for array

2015-08-15 Thread Mike Abdullah
> On 15 Aug 2015, at 00:59, Trygve Inda 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 so far... The

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 wrote: > > I have an NSTextField that

Re: How to implement NSSplitViewDelegate methods in an NSSplitViewController subclass

2015-08-08 Thread Mike Abdullah
ked up by default. I overrode delegate methods and they weren’t being called. So I manually made the controller be the split view’s delegate, and all works. Mike. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or m

Re: NSPrivateQueueConcurrencyType working outside of performBlock

2015-08-01 Thread Mike Abdullah
> On 29 Jul 2015, at 15:35, Trygve Inda 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 >> Framework/Classes/NSMan

Re: Timeouts in NSURLSession

2015-08-01 Thread Mike Abdullah
aviour you’re seeing is a bug, and worth complaining about. The trouble is it’s shipping now, so we’re probably just stuck with it, sadly. One possibility that comes to mind is the behaviour between regular and background sessions might be different — have you experimented with that at all?

Re: Adding UIBarButtonItem to UINavigationBar in Storyboard Xcode 7b2

2015-07-21 Thread Mike Abdullah
> On 21 Jul 2015, at 02:42, Rick Mann 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 time I > do, it

Re: OsX - HTTP resource load blocked

2015-07-19 Thread Mike Abdullah
> On 19 Jul 2015, at 17:04, Marc Danguy 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: 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 wrote: > > a strange one : Code Signature Invalid > > Pr

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 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: 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 wrote: > > > Pertinent details below - the line marked 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:Mac OS X 10.10.4 (14E

Re: selectText of NSTextField on focus

2015-07-06 Thread Mike Abdullah
> On 6 Jul 2015, at 20:38, Richard Charles 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 > mean the f

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 > 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 needin

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 > 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 properties, and if > they

Re: Follow up to DatePicker Question

2015-05-20 Thread Mike Abdullah
> On 20 May 2015, at 21:07, David Grant 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 kind of slow. > > Al

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 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 essentially do a

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 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 much web cont

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 wrote: > > I have a WebView and I want to show some messages over it. Fo

Re: Cannot create an NSPersistentStoreCoordinator with a nil model

2015-05-11 Thread Mike Abdullah
> On 11 May 2015, at 21:43, Alex Kac 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 we ha

Re: Weird UITableView problem

2015-04-26 Thread Mike Abdullah
> On 26 Apr 2015, at 18:29, William Squires 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 ever shown. > >

Re: Display a UIAlertView after dismissing an action sheet?

2015-04-25 Thread Mike Abdullah
> On 25 Apr 2015, at 15:30, Michael Crawford wrote: > > On 4/25/15, Mike Abdullah 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 n

Re: Display a UIAlertView after dismissing an action sheet?

2015-04-25 Thread Mike Abdullah
> On 25 Apr 2015, at 15:06, Michael Crawford wrote: > > On 4/25/15, Roland King 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 understanding why

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 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. I’m going to haz

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 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 > LifeIPhoneViewC

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 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 complete but my iPa

Re: NSURLProtocol

2015-04-13 Thread Mike Abdullah
hik 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

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 wrote: >

Re: NSURLProtocol

2015-04-12 Thread Mike Abdullah
> On 12 Apr 2015, at 04:07, danchik 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. Possibly the Webki

  1   2   3   4   5   6   7   8   9   10   >