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: 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: "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: 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: 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 using NSAtomicStore as a pers

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: "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: 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: 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: 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: 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: 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: 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: 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: 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 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: 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: 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. Fac

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

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 I was on the wr

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: 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 MagicalRecord extensively. It

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

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 d

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 solution that will work back to 10.7 >>> (or 10.8 at the latest). >> >> Then I’d gues

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 convenien

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: Root URL and URLByDeletingLastPathComponent

2016-07-18 Thread Mike Abdullah
On 17 Jul 2016, at 22:06, Charles Srstka wrote: > >> On Jul 17, 2016, at 5:30 AM, Mike Abdullah > <mailto:mabdul...@karelia.com>> wrote: >> >> It might be a mishandling of the two sorts of rot URL. If you try feeding in >> this URL manually: >> &g

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 store instead of SQLite, and just not both

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

2014-09-15 Thread Mike Abdullah
On 15 Sep 2014, at 21:42, Richard Charles wrote: > I have a binding that throws an Objective-C exception but the console > displays no output and the application does not crash but rather the > application runs fine. Enabling NSBindingDebugLogLevel 1 does not help, the > console still display

Re: dismissViewControllerAnimated bug in ios 8

2014-09-28 Thread Mike Abdullah
> On 26 Sep 2014, at 23:08, Herman Chan wrote: > > Hi all, > > My set up is this. > > 1. present a view controller by calling presentViewController > 2. in the presented view controller (modal), I create a UITextView and set > it to be first responder when view has appeared. > 3. set up th

Re: Can a 32bit only MacOS Application use 64bit-only Frameworks?

2014-09-30 Thread Mike Abdullah
On 30 Sep 2014, at 20:49, Motti Shneor wrote: > Hello everyone. This seems to be an upside-down question, but bare with me... > > Our Mac Client-side application can (sadly) only be built and run in > 32bit-only. Reason is: bit parts of it are legacy 32bit-only C++ code shared > with other pl

Re: Can a 32bit only MacOS Application use 64bit-only Frameworks?

2014-10-01 Thread Mike Abdullah
On 1 Oct 2014, at 09:53, Motti Shneor wrote: > Thank you Clark and Mike for the answer. I finally figured it out myself > getting enough link errors. > > One small question though. How is it the new ObjC runtime (ARC and all...) > works fine on 32bit iOS builds, but not on Mac? Why did apple

Re: Displaying Sheets

2014-10-07 Thread Mike Abdullah
> On 7 Oct 2014, at 13:29, Luther Baker wrote: > > I'd like to display a sheet but when I do, it isn't sliding down from the > top of my window. It is just showing up. > > I am building a default Document based application and assigning the > Document.xib window to an IBOutlet I've created - in

Re: Document style programming

2014-10-18 Thread Mike Abdullah
When using NSPersistentDocument it takes over responsibility for saving the context. You should not save the context yourself. > On 18 Oct 2014, at 17:00, Luther Baker wrote: > > Hi, > > I am creating a Desktop issue tracking app using core data and the > NSDocument framework - so yes, the Xco

Re: Saving a Document style app

2014-10-18 Thread Mike Abdullah
> On 18 Oct 2014, at 17:06, Luther Baker wrote: > > I'd like to save my Document based app in the bundle style format. IE: I'd > like to save things in a directory - like apps like OmniOutliner do. > > Out of the box, I get the option to save as sqlite, binary or XML. What I'd > like is to save

Re: Document style programming

2014-10-18 Thread Mike Abdullah
> On 18 Oct 2014, at 17:09, Luther Baker wrote: > > Thanks Mike. > > Let me ask another question ... what if I need to create a temporary, thread > specific NSManagedObjectContext? Let's say I'm interacting with a RESTful API > ala AFNetworking and I need to parse and save data on a backgroun

Re: Document style programming

2014-10-18 Thread Mike Abdullah
> On 18 Oct 2014, at 17:33, Luther Baker wrote: > > As an aside, I'm sure it is well-known, there is some funny caching going on. > > If I open the app the first time (and pre-populate the context with data) - I > cannot actually "SAVE". > > If I formally shut the app down by quitting the app

Re: One more Document app style question

2014-10-19 Thread Mike Abdullah
> On 18 Oct 2014, at 17:19, Luther Baker wrote: > > Coming from an iOS background, I'm used to seeing (and encapsulating) the > creation of key Core Data components (persistent store, location, > contexts). Everything is pretty explicit and consequently easy to follow. > > When I use Xcode to g

Re: iOS table views using multiple cell subclasses.

2014-10-22 Thread Mike Abdullah
On 22 Oct 2014, at 15:19, Alex Zavatone wrote: > On my past two gigs, I've spent a fair amount of time subclassing > UITableViews and UITableViewCells. > > Yesterday another programmer came to me with a question where he wants to > plop text of variable lines into a custom footer in his table

Re: When I rotate the MKMapView with transform, setCenter not working.

2014-10-31 Thread Mike Abdullah
> On 31 Oct 2014, at 11:43, sonofsky2...@gmail.com wrote: > > Hi, > I have solved this problem. > Do not change the frame of map view when it’s transform does not equal to > CGAffineTransformIdentity. This is a general rule about UIView. Once the transform is anything other than identity, .fr

Re: Text drop into other text apps

2014-11-02 Thread Mike Abdullah
> On 2 Nov 2014, at 18:43, Alexander Reichstadt wrote: > > Hi, > > I'd like to write @"test" to the pasteboard in response to a tableview drag > to end up in another app's textfield. > > I see that all my methods are called accordingly, but when I release the > mouse button, nothing is inser

Re: wits end with nsview and nsrectfill()

2014-11-30 Thread Mike Abdullah
> On 30 Nov 2014, at 17:30, Navneet Kumar wrote: > > Hi, > > I have a custom view in which I am setting the background using NSRectFill() > in drawRect:. I am also adding a text field as subview in this method. I suspect there-in you have your problem. -drawRect: is for drawing. Do not modif

Re: Proper use of representedObject in segues

2014-11-30 Thread Mike Abdullah
> On 30 Nov 2014, at 19:17, Mikael Wämundson wrote: > > Hi, > > I understand that when preparing for segue and sending information to the > ViewController of the PopUp, Sheet, etc. I should make use of the > representedObject of that ViewController. > > So far, so good. > > What, however, i

Re: Issues with applications running on background (Alarm Application)

2014-12-17 Thread Mike Abdullah
> On 17 Dec 2014, at 17:18, Fritz Anderson wrote: > >> On Dec 16, 2014, at 9:55 PM, Claudio Maximiliano Edison Bastos Iorio >> wrote: >> >> soundName property is OK, and allows to use any embedded sound. But there’s >> no way to load any custom view dispatched right from the LocalNotificatio

Re: URLByResolvingBookmarkData not case sensitive

2015-01-06 Thread Mike Abdullah
> On 6 Jan 2015, at 16:25, Trygve Inda wrote: > > What then is the best way to do what I need? > > I am saving a bookmark to a file and later on I need to display the filename > associated with that Bookmark. > > Currently I am getting the path and taking the last component, but it seems > tha

Re: ARC query

2015-01-07 Thread Mike Abdullah
> On 7 Jan 2015, at 20:55, Sean McBride wrote: > > On Wed, 7 Jan 2015 12:02:16 -0600, Ken Thomases said: > >> Short answer: yes, the alert is retained. > > Meaning that one must use the weak/strong dance pattern like this? > > NSAlert *alert = [NSAlert new]; > alert.alertStyle = NSWarningAler

Re: NSURL resourceValuesForKeys NSURLPathKey

2015-01-09 Thread Mike Abdullah
> On 9 Jan 2015, at 03:17, Sean McBride wrote: > > On Thu, 8 Jan 2015 16:31:18 -0800, Trygve Inda said: > >> I call: >> >> NSData* bookmarkData = [url >> bookmarkDataWithOptions:NSURLBookmarkCreationMinimalBookmark >> includingResourceValuesForKeys:nil >> relativeToURL:nil >> error:&inError];

Re: Debugging memory leak in NSURLSession with ARC

2015-01-13 Thread Mike Abdullah
> On 13 Jan 2015, at 01:00, Graham Cox wrote: > > I'm still having an issue with this - I think. > > I've exhaustively hunted down every leak and memory allocation in my app - > luckily it's a fairly small one, though one that can create many threads - > and have eliminated everything I have

Re: Debugging memory leak in NSURLSession with ARC

2015-01-13 Thread Mike Abdullah
> On 13 Jan 2015, at 13:05, Graham Cox wrote: > > >> On 13 Jan 2015, at 8:11 pm, Mike Abdullah wrote: >> >> One small suggestion: I think the frameworks would prefer it if you copied >> the ephemeralSessionConfiguration, and then modified the copy. Mo

Re: NSThread

2015-01-13 Thread Mike Abdullah
> On 13 Jan 2015, at 16:07, Raglan T. Tiger wrote: > > I allocate and init an NSThread as follows: > >if ( m_mythread ) [m_mythread cancel]; >m_mythread = [[MYThread alloc] initWithTarget:m_mythread > selector:@selector(start) object:m_anobject]; >[m_mythread start]; >

Re: NSThread

2015-01-13 Thread Mike Abdullah
> On 13 Jan 2015, at 17:50, Raglan T. Tiger wrote: > >> On Jan 13, 2015, at 9:18 AM, Mike Abdullah > <mailto:mabdul...@karelia.com>> wrote: >> >> Step 1 of diagnosis: take a sample. > > How would that be accomplished ? A simple user-facing way is to

Re: NSThread

2015-01-13 Thread Mike Abdullah
> On 13 Jan 2015, at 16:18, Mike Abdullah wrote: > > >> On 13 Jan 2015, at 16:07, Raglan T. Tiger wrote: >> >> I allocate and init an NSThread as follows: >> >> if ( m_mythread ) [m_mythread cancel]; >> m_mythread = [[MYThread

Re: Detecting Managed Object Property Change From Undo Redo

2015-01-25 Thread Mike Abdullah
> On 25 Jan 2015, at 06:35, Richard Charles wrote: > > Core Data generated primitive accessors are used to get and set values from > and to the managed object's private internal store. Core Data generated > primitive accessors do not have change notification. If primitive accessors > are pres

Re: Trying to create a collection view with evenly distributed cell

2015-01-25 Thread Mike Abdullah
> On 25 Jan 2015, at 10:12, Aaron Lewis wrote: > > Hi, > > I'm trying to create a 3 cell per row collection, and I want no margin > (horizontally or vertically) between each cell. > > So in xcode I set Min Spacing For Cells / For Lines to 1, Indicator > insets (all 4 values) to 0, then I write

Re: Detecting Managed Object Property Change From Undo Redo

2015-01-26 Thread Mike Abdullah
> On 26 Jan 2015, at 15:00, Richard Charles wrote: > > >> On Jan 25, 2015, at 4:16 PM, Jerry Krinock wrote: >> >> The reason I had to run that test is because I don’t use KVO for observing >> managed object properties. Instead, I use NSNotificationCenter, which has >> these advantages… >

Re: Allow tap events outside a custom UIPresentationController on iPad(iOS 8)

2015-01-31 Thread Mike Abdullah
Since iOS 8, custom presentations we write completely block events to the presenter. I assume Apple have done this because it’s the behaviour we’d mostly like. Besides, it matches Apple’s own presentations: Alerts ignore taps outside of the alert Action sheets treat a tap on the background area

Re: Is it possible for a WebView to not share sessions with Safari on Mac OS X?

2015-02-06 Thread Mike Abdullah
> On 6 Feb 2015, at 14:15, Juanjo Conti wrote: > > As a first look it seems that no. Or, at least, the default behavior is to > share sessions but I'd like to find the way around this. Any ideas? Any > approach I can try? > > I now that in Cocoa Touch the default is the opposite. Can you clari

Re: Is it possible for a WebView to not share sessions with Safari on Mac OS X?

2015-02-06 Thread Mike Abdullah
> On 6 Feb 2015, at 14:30, Juanjo Conti wrote: > > At the moment if I open, for example, "gmail.com " in a > WebView, and I'm logged in (in that site) when I open it in Safari, the > WebView shows me logged in. I'd like the WebView to be independent from > Safaria and shows

Re: Is it possible for a WebView to not share sessions with Safari on Mac OS X?

2015-02-06 Thread Mike Abdullah
> On 6 Feb 2015, at 14:41, Juanjo Conti wrote: > > I'm using 10.9 and they do share. > > Do you know if a screen saver can be sandboxed? My understanding is screensavers get loaded as a plug-in/bundle into another app by the system, so it’s up to that system program to be sandboxed or not. I

Re: How can I set a minimal height for a UITableView?

2015-02-22 Thread Mike Abdullah
> On 22 Feb 2015, at 07:51, Aaron Lewis wrote: > > Hi, > > I have a fixed number of rows in a UITableView, now I need to set a > minimal height. > Otherwise I would see the extra "row" background. > > Is that possible? http://mikeabdullah.net/thl-diary-9-table-footers.html __

Re: Responsive scrolling control with lots of subviews

2015-03-02 Thread Mike Abdullah
> On 2 Mar 2015, at 11:44, Ben wrote: > > Hi list, > > Since NSCell is apparently on the way out, I've been trying to build a new > control I need using views. It's a cut-down spreadsheet-alike grid, similar > to MBTableGrid here: https://github.com/brendand/mbtablegrid > > Unfortunately, I

Re: Force IKImageBrowserView to regenerate a cell's image?

2015-03-02 Thread Mike Abdullah
Or you can bump up the -imageVersion > On 2 Mar 2015, at 21:54, Steve Mills wrote: > > On Mar 2, 2015, at 14:23:03, Dave Fernandes > wrote: >> >> Your IKImageBrowserItem must change its returned imageUID when the >> imageRepresentation changes so that the IKImageBrowserView knows to recache

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

2015-03-02 Thread Mike Abdullah
> On 2 Mar 2015, at 23:22, Juanjo Conti wrote: > > According the docs ( > https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSURL_Class/) > NSURL(string: aString) will return nil if aString is malformed. > > But I've tried this in the a playground and no n

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 wrote: > > >> On Mar 2, 2015, at 3:55 PM, Juanjo Conti > > wrote: >> >> Ok, I wanted to validate that the url is an absolute one. Is there >> something in Swift standard lib to do this? > > I typically check whether url.sc

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 wrote: > > On Mar 12, 2015, at 11:04:55, Patrick J. Collins > 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 problem >> is events are only being fire

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 wrote: > > Hi All, > > I’d like to be abl

Re: NSOpenPanel accessoryView clicks must hit pixels to work

2015-03-30 Thread Mike Abdullah
> On 30 Mar 2015, at 08:19, Steve Mills 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 > the only

Re: NSOpenPanel accessoryView clicks must hit pixels to work

2015-03-30 Thread Mike Abdullah
> On 30 Mar 2015, at 17:24, Steve Mills wrote: > > On Mar 30, 2015, at 04:09:13, Mike Abdullah 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,

Re: NSOpenPanel accessoryView clicks must hit pixels to work

2015-03-30 Thread Mike Abdullah
> On 30 Mar 2015, at 17:34, Steve Mills wrote: > > On Mar 30, 2015, at 11:14:17, Uli Kusterer > 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 that >> gets attached (at the Wi

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 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 rectangle you’re > t

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

Re: NSOpenPanel accessoryView clicks must hit pixels to work

2015-04-06 Thread Mike Abdullah
> On 30 Mar 2015, at 18:00, Steve Mills wrote: > > On Mar 30, 2015, at 11:37:46, Mike Abdullah 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 to

Re: Painting standard check box/radio button mark

2015-04-09 Thread Mike Abdullah
> On 9 Apr 2015, at 17:39, Aandi Inston 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, but I was wo

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 wrote: > > Wonderful! Thank you for clearing this up for me! > -Carl > >> >>> On Apr 9, 2015, at 12:07, Carl Hoefs >>> wrote: >>> >>> OS X 10.10 >>> >>> I have a highly CPU-bound project that parallelizes well. A small case >>> has >>> about 5000 tasks

Re: NSURLProtocol

2015-04-11 Thread Mike Abdullah
> On 11 Apr 2015, at 02:28, Dan S 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 files on web pa

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

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-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 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: 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-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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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 needing display. That way you’re asking

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

  1   2   3   4   5   6   7   8   9   10   >