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: 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: 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: 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: 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: 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: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: 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: 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: 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-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: 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: 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: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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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
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: 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: 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: 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: 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: 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: Getting Segue from TableView

2014-08-07 Thread Mike Abdullah
On 7 Aug 2014, at 15:06, Gerriet M. Denkmann wrote: > iOS app, Master - Detail. > Master has TableView, when one tabs a table row, a segue to the Detail View > is performed. > > The problem: > Sometimes when the app starts, there is only one item in the TableView. In > this case I want to seg

Re: [NSMutableData resetDataRangeTo:(NSRange)range];

2014-07-15 Thread Mike Abdullah
On 15 Jul 2014, at 00:32, Jens Alfke wrote: > > On Jul 14, 2014, at 1:07 PM, Carl Hoefs > wrote: > >>modifiableData = [ NSMutableData dataWithData: [ external call that gives >> me an NSData ] ]; > > It’s shorter and more idiomatic to just say > modifiableData = [external mutable

Re: [NSMutableData resetDataRangeTo:(NSRange)range];

2014-07-14 Thread Mike Abdullah
On 14 Jul 2014, at 19:12, Carl Hoefs wrote: > Okay, now if I want to insert 1024 bytes of new data at the beginning of a > populated NSMutableArray, is there a better way than this: Yes. [bigMData replaceBytesInRange:NSMakeRange(0,0) withBytes:newBytesPtr

Re: NSCoding vs NSSecureCoding

2014-06-17 Thread Mike Abdullah
On 17 Jun 2014, at 15:50, Sean McBride wrote: > On Tue, 17 Jun 2014 09:17:46 +0100, Mike Abdullah said: > >> I suspect the rationale might be “NSColor and NSImage live in AppKit, >> not Foundation, and the AppKit engineers aren’t so bothered about secure >> coding&qu

Re: NSCoding vs NSSecureCoding

2014-06-17 Thread Mike Abdullah
On 17 Jun 2014, at 00:33, Sean McBride wrote: > Hi all, > > I was modernizing some of my code to support NSSecureCoding instead of just > NSCoding and stumbled upon that fact that NSColor and NSImage support only > NSCoding and not NSSecureCoding. Whereas NSURL, NSData, NSArray and > countl

Re: How to write a .icns file

2014-06-01 Thread Mike Abdullah
On 1 Jun 2014, at 17:04, Uli Kusterer wrote: > On 01 Jun 2014, at 04:25, Mike Abdullah wrote: >> On 29 May 2014, at 23:38, John Brownie wrote: >> >>> Simplified from the previous question, which didn't get any responses: >>> >>> How can I wri

Re: How to write a .icns file

2014-06-01 Thread Mike Abdullah
On 29 May 2014, at 23:38, John Brownie wrote: > Simplified from the previous question, which didn't get any responses: > > How can I write a .icns file when there are 15 images, which is too many for > ImageIO to handle? I can get it as an NSImage, but can't see how to write it > to a file (o

Re: NSURL from non-url NSString

2014-05-25 Thread Mike Abdullah
On 25 May 2014, at 16:05, Koen van der Drift wrote: > Hi, > > At one point in my code I need to recognize an URL to show in a different > color. Pretty standard: > >NSURL *url = [NSURL URLWithString: aString]; > >if (url) // if url is created change color >{ >NSAttribute

Re: Creating Url with Fragment

2014-05-22 Thread Mike Abdullah
On 22 May 2014, at 11:07, Gerriet M. Denkmann wrote: > > This works: > NSString *fragment = > NSString *absString = [ @"https://translate.google.com/#"; > stringByAppendingString: fragment ]; > NSURL *url = [ [ NSURL alloc ] initWithString: absString ]; > > But I would

Re: Core Data migration and non-optional transient relationships

2014-05-20 Thread Mike Abdullah
On 20 May 2014, at 15:21, Sean McBride wrote: > Hi all, > > Doing a Core Data migration (not the lightweight kind) I hit an error at the > end: > > "foo is a required value." > > the 'foo' relationship it complains about is transient and so not present in > the store. Normally, I recreate

Re: DNS Lookup

2014-05-15 Thread Mike Abdullah
On 15 May 2014, at 14:15, Appa Rao Mulpuri wrote: > Hi List, > > In Webkit, do we have any provision to provide application level DNS lookup > map to route the particular URLs to a IP address? > > Similar like /private/etc/hosts file, trying to maintain a map at application > level with DNS

Re: Advice for error "NSBundle was released too many times"

2014-04-22 Thread Mike Abdullah
On 22 Apr 2014, at 09:10, Colas wrote: > Dear cocoa-dev, > > I have the following error in my application. > Warning: NSBundle NSBundle > (loaded) was released > too many times. For compatibility, it will not be deallocated, but this may > change in the future. Set a breakpoint on __NSBundl

Re: canAsynchronouslyWriteToURL:ofType:forSaveOperation: Prevent Quit?

2014-04-20 Thread Mike Abdullah
On 20 Apr 2014, at 19:58, Trygve Inda wrote: > I return YES from > > canAsynchronouslyWriteToURL:ofType:forSaveOperation: > > Which works fine, but the user is able to quit the app while the save is in > progress. Is there way way to know when the save is complete so that I can > prevent quit

Re: NSArrayController arrangedObjects KVO

2014-04-12 Thread Mike Abdullah
On 12 Apr 2014, at 21:37, Richard Charles wrote: > It is well known in some circles that NSArrayController does not correctly > populate the KVO change dictionary. > > If you manually observe an array controller’s arranged objects key path with > the old and new observation options, the chang

Re: Removing a file via NSFileWrapper

2014-03-29 Thread Mike Abdullah
On 29 Mar 2014, at 16:43, Colas B wrote: > Dear cocoa-dev, > > There is a problem when I try to remove a file from a folder via > NSFileWrapper. I don't know if this is an important info, but the folder is > inside a "package" (a folder with an extension). > > I have a folder "(...)/attached

Re: Write with NSFileWrapper vs. copy with NSFileManager

2014-03-26 Thread Mike Abdullah
On 26 Mar 2014, at 10:19, Colas B wrote: > > What is the difference between writing a hard link and just ignore this > particular file that has not changed ? If the file is already there, where > the hard link will be created? > > Envoyé depuis Yahoo Mail pour iPad NSFileWrapper doesn’t sup

Re: Write with NSFileWrapper vs. copy with NSFileManager

2014-03-26 Thread Mike Abdullah
On 26 Mar 2014, at 10:13, Colas B wrote: > > Yes indeed, > > I'm using this method to manage additional data in a document. > Want you say Mike frightens me a little bit, I would not want all my memory > used my extra files when I save the document. > > Which options should I use if I want

Re: Write with NSFileWrapper vs. copy with NSFileManager

2014-03-25 Thread Mike Abdullah
On 25 Mar 2014, at 12:52, Colas B wrote: > Hi, I am having troubles using NSFileWrapper. In order to have a better > understanding of it, I would like to ask you the following question. > > Is there a difference between > > NSURL *referenceURL, *destinationURL ; > > [[[NSFileMana

Re: WebView drawRect

2014-03-21 Thread Mike Abdullah
On 21 Mar 2014, at 18:50, Jens Alfke wrote: > > On Mar 21, 2014, at 9:01 AM, Leonardo wrote: > >> Anyway, how can I flip horizontally the webView? > > Assign it a CALayer, and apply a transform to the layer. It’ll even do the > animation for you. WebViews don’t officially support being lay

Re: Accessing security scoped URLs from multiple threads

2014-03-20 Thread Mike Abdullah
On 20 Mar 2014, at 01:50, Charles Srstka wrote: > On Mar 19, 2014, at 7:29 PM, patrick machielse wrote: > >> We are working on a sandboxed application that keeps track of a large number >> of files through security scoped URLs. To access the files we carfully >> balance our calls to startAcc

Re: NSFetchedResultsController sort on synthesized property?

2014-03-16 Thread Mike Abdullah
On 27 Feb 2014, at 21:20, Rick Mann wrote: > Thanks, Sixten. I had hoped that if it couldn't translate a sort descriptor > in to SQL, that it would apply it after fetching. The problem with doing that is it would require faulting all the objects into memory at once, which I guess Apple is kee

Re: Cocoa custom text field backspace handling

2014-03-06 Thread Mike Abdullah
On 6 Mar 2014, at 18:30, Daniel Luis dos Santos wrote: > I am developing a custom textfield in Cocoa. To handle the backspace > character I should be defining : When you say custom, do you mean you’re trying to customise NSTextField? Or that you’re actually trying to write a completely custom

Re: Inherited Protocols

2014-03-06 Thread Mike Abdullah
On 6 Mar 2014, at 16:29, jonat...@mugginsoft.com wrote: > > On 6 Mar 2014, at 15:34, Mike Abdullah wrote: > >> >> On 6 Mar 2014, at 15:30, William Squires wrote: >> >>> Can an ObjC protocol be inherited by another protocol? I know the syntax >>

Re: Inherited Protocols

2014-03-06 Thread Mike Abdullah
On 6 Mar 2014, at 15:30, William Squires wrote: > Can an ObjC protocol be inherited by another protocol? I know the syntax for > regular (class) inheritance, and for specifying that a class implements a > protocol, but what's the syntax (if there is one) for one protocol inheriting > from ano

Re: NSDocument save incremental file package in-place

2014-03-03 Thread Mike Abdullah
If you do end up writing your own safe-saving logic, that's achieved by overriding -writeSafelyToURL:… Sent from my iPad On 2 Mar 2014, at 15:23, Trygve Inda wrote: >> 7,500 file operations of any kind are going to take some time, even just >> creating hard links. Does it require 40 seconds? W

Re: NSDocument save incremental file package in-place

2014-03-02 Thread Mike Abdullah
On 2 Mar 2014, at 00:40, Trygve Inda wrote: >> >> On 1 Mar 2014, at 23:26, Trygve Inda wrote: >> >>> I have a top level FileWrapper which contains the wrappers for all my files. >>> Is there any sample code that would help me figure out the right way to do >>> this? >>> >>> [NSFileWrapper wr

Re: NSDocument save incremental file package in-place

2014-03-01 Thread Mike Abdullah
On 1 Mar 2014, at 23:26, Trygve Inda wrote: > I have a top level FileWrapper which contains the wrappers for all my files. > Is there any sample code that would help me figure out the right way to do > this? > > [NSFileWrapper writeToURL:options:originalContentsURL:error:] > > Seems to call my

Re: NSDocument save incremental file package in-place

2014-03-01 Thread Mike Abdullah
On 1 Mar 2014, at 19:11, Trygve Inda wrote: >> On Mar 1, 2014, at 07:23 , Trygve Inda wrote: >> >>> The problem is that when there is a very small change (just adding or >>> removing one of the files in the package), the system does not save in >>> place. >>> >>> Rather it reads the previous

Re: exporting image files to disk using CGImageDestination

2014-02-24 Thread Mike Abdullah
On 24 Feb 2014, at 17:00, Kevin Meaney wrote: > I've written a command line tool that takes an image file (when testing I'm > using JPEG files) and applies a custom CIFilter (a naive chroma key filter > I've written) and saves a file to disk. Sampling the command line tool when > processing f

Re: Prevent autoloading of last opened document

2014-02-13 Thread Mike Abdullah
On 13 Feb 2014, at 23:39, Eric Gorr wrote: > > >> On Feb 13, 2014, at 6:22 PM, Mike Abdullah wrote: >> >> >>> On 13 Feb 2014, at 21:12, Eric Gorr wrote: >>> >>> What I want to do seems like it should be fairly straightforward, but

Re: Prevent autoloading of last opened document

2014-02-13 Thread Mike Abdullah
On 13 Feb 2014, at 21:12, Eric Gorr wrote: > What I want to do seems like it should be fairly straightforward, but doesn't > seem to be. All I want to do is with a standard NSDocument Based (with Core > Data) is prevent the last document opened from opening automatically the next > time the a

Re: Can I Hide / Show an NSTextField / NSSecureTextField in Cocoa?

2014-02-10 Thread Mike Abdullah
On 9 Feb 2014, at 15:43, David Delmonte wrote: > > > Begin forwarded message: > > From: David Delmonte > Subject: Re: Can I Hide / Show an NSTextField / NSSecureTextField in Cocoa? > Date: February 9, 2014 at 9:52:41 AM EST > To: SevenBits > > Maybe I'm misunderstanding what I need to do.

Re: Can I Hide / Show an NSTextField / NSSecureTextField in Cocoa?

2014-02-08 Thread Mike Abdullah
http://www.mikeabdullah.net/kspasswordfield.html On 8 Feb 2014, at 00:27, David Delmonte wrote: > Hi, Is there a way to turn secureTextField on and off in Cocoa? I'd like > users to have the option to see their passwords. > In iOS, I can do something like [textField setSecureTextEntry:YES]; >

Re: Core Data : Opt Out of SQLite WAL is nullified after File > Duplicate ?

2014-01-25 Thread Mike Abdullah
On 21 Jan 2014, at 21:24, Jerry Krinock wrote: > > On 2014 Jan 21, at 09:02, Mike Abdullah wrote: > >> If it helps, I maintain https://github.com/karelia/BSManagedDocument as a >> nice way to have a package-based document using Core Data. > > Thank you, Mike.

Re: Non-breaking hyphen in UILabel?

2014-01-24 Thread Mike Abdullah
On 24 Jan 2014, at 16:56, Jens Alfke wrote: > > On Jan 23, 2014, at 11:59 PM, Rick Mann wrote: > >> I have a UILabel that breaks lines if the text gets too long. Traditionally, >> on the Mac, you could type an option-hyphen to get a non-breaking hyphen, >> but this still breaks (when I type

Re: Priority MOC operations?

2014-01-23 Thread Mike Abdullah
On 22 Jan 2014, at 23:08, Rick Mann wrote: > There's no way to get prioritized -performBlock: calls on an > NSManagedObjectContext, is there? I have some operations enqueued with > -performBlock: that must be serialized, and others that would be best carried > out as soon as the current block

Re: [MORE} startAccessingSecurityScopedResource

2014-01-22 Thread Mike Abdullah
On 22 Jan 2014, at 02:46, koko wrote: > I believe I should use contentsOfDirectoryAtURL and then create a > security-scoped bookmark for each file I am interested in and in this manner > I will be able to read the files across launches of the app. > > On Jan 21, 2014, at 7:26 PM, koko wrote:

Re: Core Data : Opt Out of SQLite WAL is nullified after File > Duplicate ?

2014-01-21 Thread Mike Abdullah
On 21 Jan 2014, at 16:11, Sean McBride wrote: > On Tue, 21 Jan 2014 07:06:16 -0800, Jerry Krinock said: > >> On 2014 Jan 20, at 09:50, Sean McBride wrote: >> >> The trouble occurs if a developer of an older Core Data app begins to >> link against the 10.9 SDK, and allows the *new* default jou

Re: What are the conditions for NSManagedObjectContextObjectsDidChangeNotification to get posted?

2014-01-16 Thread Mike Abdullah
On 15 Jan 2014, at 21:04, Jerry Krinock wrote: > Hello Jim, > > The fact that no one has replied to your post yet confirms my feeling that > you’re at the bleeding edge of > NSManagedObjectContextObjectsDidChangeNotification usage. Here are a couple > of thoughts… > > • You can generally s

Re: NSMutableDictionary of NSMutableDictionary copy

2014-01-16 Thread Mike Abdullah
On 16 Jan 2014, at 08:03, Tamas Nagy wrote: > Thanks! So, better to build a new dictionary with copy on each inner > dictionary to achive a real non-mutable dictionary then. Even better to step back, look at all these dictionaries and think “Maybe I should create some model objects/classes in

Re: Mixing UIDocument's NSUndoManager and -updateChangeCount:

2014-01-13 Thread Mike Abdullah
On 13 Jan 2014, at 16:29, Kyle Sluder wrote: > On Mon, Jan 13, 2014, at 07:21 AM, Markus Spoettl wrote: >> Hi, >> >> I have an app that uses UIDocument and NSUndoManager. That way the >> system >> picks up changes to the data and knows when to auto-save. >> >> Some parts of the model are

Re: Mixing UIDocument's NSUndoManager and -updateChangeCount:

2014-01-13 Thread Mike Abdullah
On 13 Jan 2014, at 15:21, Markus Spoettl wrote: > Hi, > > I have an app that uses UIDocument and NSUndoManager. That way the system > picks up changes to the data and knows when to auto-save. > > Some parts of the model are not using the undo manager (mostly settings where > undo makes no s

Re: Sandboxing: Can't bookmark enclosing folder of user-selected file

2013-12-23 Thread Mike Abdullah
n my case, the extension in most cases remains the same, while the file name > changes. > > So, unless I misunderstand Apple's description, it won't help me. > > Or am I missing something here? > > > Leo > > >> On 12/22/13, 5:45 PM, Mike Abd

Re: Sandboxing: Can't bookmark enclosing folder of user-selected file

2013-12-22 Thread Mike Abdullah
Sounds to me you like you want to read up on the "Related Items" feature of the sandbox. On 22 Dec 2013, at 09:38, Leo wrote: > I'm sandboxing an app for the first time. The app has been out for a few > years by now, non-sandboxed. > > The app receives batches of PDF files and exports them wi

Re: HTML emails from Objective C

2013-12-22 Thread Mike Abdullah
On 26 Nov 2013, at 20:16, Bryan Schmiedeler wrote: > I am trying to write an HTML email using Objective C. > > I have the HTML all done, now I am just putting it into mutable string line > by line. I am using / to escape when I need a quote in the HTML. > > This I think will work but sure se

Re: CALayer's delegate prevents implicit animation?

2013-12-19 Thread Mike Abdullah
On 18 Dec 2013, at 20:46, Sean McBride wrote: > Wait, what? You're saying a CALayer's delegate can't be its parent NSView? > Why? Where does it say that? I've been doing that for years without > apparent problem. I'd be interested to hear more… Layer-backed views operate by the view bein

Re: iPad keyboards

2013-12-12 Thread Mike Abdullah
On 12 Dec 2013, at 15:39, Luther Baker wrote: > > > On Dec 12, 2013, at 3:38 AM, Rick Mann wrote: > >> I thought you had to use Xcode 5 to submit now, > > Xcode 5 can build with the 6 SDK. Not without modifying the Xcode package, or other monkeying about with settings. Perhaps you’re thin

Re: Threaded drawing - JPEG

2013-12-12 Thread Mike Abdullah
On 12 Dec 2013, at 11:55, Uli Kusterer wrote: > On 11 Dec 2013, at 18:53, Steve Sisak wrote: >> At 10:25 AM -0800 12/10/13, Seth Willits wrote: >>> On Dec 10, 2013, at 1:32 AM, Graham Cox wrote: But my situation is that I need to draw VECTOR objects up to 25,000% zoom with no pixeli

Re: help with logic error

2013-12-12 Thread Mike Abdullah
On 12 Dec 2013, at 11:52, 2551 <2551p...@gmail.com> wrote: > Hi folks > > I need some help with a logic error the Static Analyzer is throwing up. I > didn’t write this code (in fact, its a piece of Apple sample code I’m resuing > in my project), and I’m not quite sure how to correct it. It goe

Re: Threaded drawing

2013-12-11 Thread Mike Abdullah
On 11 Dec 2013, at 13:10, Graham Cox wrote: > > On 11 Dec 2013, at 1:39 pm, 2551 <2551p...@gmail.com> wrote: > >> The commonality of this experience makes me wonder almost with everything I >> try to do in Cocoa whether it really IS true as advertised that the >> pre-written APIs make it eas

Re: Threaded drawing

2013-12-10 Thread Mike Abdullah
On 10 Dec 2013, at 09:32, Graham Cox wrote: > > On 9 Dec 2013, at 11:12 pm, Kyle Sluder wrote: > >> Which is another reason to seriously consider CATiledLayer > > > I”ll consider it, and revisit it… > > But my situation is that I need to draw VECTOR objects up to 25,000% zoom > with no pi

Re: Please stay awake!

2013-12-09 Thread Mike Abdullah
On 9 Dec 2013, at 23:32, Jens Alfke wrote: > There are also APIs to disable the new “app nap” power-saving feature in OS X > 10.9 — look at NSProcessInfo. My understanding is this is basically a wrapper around the lower level Power Assertion APIs, which have been extended to give App Nap a li

Re: Threaded drawing

2013-12-09 Thread Mike Abdullah
On 9 Dec 2013, at 15:47, Graham Cox wrote: > > On 6 Dec 2013, at 5:46 pm, Graham Cox wrote: > >> OK, I’ve now tried this approach, and it’s much cleaner in that it works >> with scrollers, with and without “responsive” scrolling (which appears to >> buffer its contents) and also zooming. Co

Re: rangeOfString behaves wierd

2013-12-09 Thread Mike Abdullah
On 9 Dec 2013, at 10:38, Gerriet M. Denkmann wrote: > > On 9 Dec 2013, at 16:53, Stephen J. Butler wrote: > >> Would converting each string to NFD (decomposedStringWithCanonicalMapping) >> be an acceptable work around in this case? > No, it would not. I am changing all my rangeOfString calls

Re: Fast hash of NSData?

2013-11-30 Thread Mike Abdullah
On 30 Nov 2013, at 10:37, Graham Cox wrote: > > On 30 Nov 2013, at 12:41 am, Kyle Sluder wrote: > >> That’s not a good idea. If the file on disk changes out from under you, the >> cache no longer reflects the data. > > That can’t happen - the image data is embedded in the file stream at the

Re: Normalizing a path containing a symlink

2013-11-16 Thread Mike Abdullah
How about using -fileReferenceURL on everything? That won't give you a normalized *path* as such, but should give you consistent URLs for identifying individual files Mike. Sent from my iPhone > On 14 Nov 2013, at 03:27 am, Rick Mann wrote: > > In my iOS app, I create a directory in the user

Re: Value of self changes

2013-11-15 Thread Mike Abdullah
On 15 Nov 2013, at 07:41, Jerry Krinock wrote: > Several years ago, I subclassed NSPopUpButtonCell and am using it as a table > header cell, so the user can select which attribute is displayed in the > column. Maybe this was not a good idea, but anyhow… > > A few years ago, I noticed a rare,

Re: How to tell if a file is writable in sandboxed mode?

2013-11-13 Thread Mike Abdullah
On 13 Nov 2013, at 11:46, Oleg Krupnov wrote: > Thanks for new info, but no, unfortunately, this NSURLIsWritableKey > cannot discriminate between "not writable due to file permissions” and > “not writable due to sandbox” cases. The both cases are "not writable" > for the NSURLIsWritableKey. > >

Re: How to tell if a file is writable in sandboxed mode?

2013-11-09 Thread Mike Abdullah
Does querying for NSURLIsWritableKey give you any more info? On 8 Nov 2013, at 16:31, Oleg Krupnov wrote: > I’m trying to use -[NSFileManager isWritableFileAtPath:], but when it > returns NO, I’d like to know if it’s “no” because the app simply > doesn’t have access to this path due to sandboxin

Re: URLByResolvingBookmarkData: crashes on 10.8

2013-11-07 Thread Mike Abdullah
On 7 Nov 2013, at 16:18, Andrew Madsen wrote: > Thanks for the reply Mike. I'm one of Patrick's colleagues. > > On Nov 6, 2013, at 5:28 AM, Mike Abdullah wrote: > >> This line of code jumps out at me as slightly suspicious for the isStale and >> resolveErro

Re: SKIndexAddDocument crashing

2013-11-06 Thread Mike Abdullah
On 6 Nov 2013, at 02:18, Eric Gorr wrote: > I've got a functioning sample project at > https://github.com/ericgorr/searchtest.git > > The relevant code is self contained in the applicationDidFinishLaunching > method in ELIZAppDelegate.m... > >NSBundle* mainBundle = [NSBundle mainBundle];

Re: URLByResolvingBookmarkData: crashes on 10.8

2013-11-06 Thread Mike Abdullah
On 5 Nov 2013, at 20:01, patrick machielse wrote: > We're developing an application that needs to track a lot of files (say 10k). > > As recommended, we use url / bookmarks to store references to file system > objects. > > > We regularly see crashes that originate here: > > return [NSURL UR

Re: Disabling Core Data WAL journal_mode with NSPersistentDocument

2013-11-01 Thread Mike Abdullah
On 1 Nov 2013, at 18:28, Sean McBride wrote: > Hi all, > > The 10.9 Core Data release notes say: > > > > -- > The Core Data SQLite persistent store will default to using WAL

Re: 10.9: Some Async Saving is ON even if you say NO?

2013-11-01 Thread Mike Abdullah
On 1 Nov 2013, at 04:29, Jerry Krinock wrote: > > On 2013 Oct 31, at 15:08, Mike Abdullah wrote: > >> Indeed. Brief self-promotion, BSManagedDocument does both of these: >> https://github.com/karelia/BSManagedDocument > > Mike, I see you derived that from Sasmito

Re: 10.9: Some Async Saving is ON even if you say NO?

2013-10-31 Thread Mike Abdullah
On 31 Oct 2013, at 19:18, Sean McBride wrote: > (NSPersistentDocument is infuriating. No support for async save, no support > for packages/bundles, and no love at all in recent OSes.) Indeed. Brief self-promotion, BSManagedDocument does both of these: https://github.com/karelia/BSManagedDocu

<    1   2   3   4   5   6   7   8   9   10   >