Re: 10.9 Bug in Core Data : Entity Description methods

2013-10-31 Thread Mike Abdullah
Sounds to me like the dictionary is somehow internally set up to use pointer equality. For the literal syntax, perhaps that happens to work out as Core Data is using the same underlying string objects? An interesting test would be to first make a copy of the dictionary (both using -copy and +di

Re: UIDocument's fileType reports wrong UTI.

2013-10-23 Thread Mike Abdullah
On 23 Oct 2013, at 13:08, Half Activist wrote: > Hello, > > In an iOS project, that is supposed to handle different kind of files, > I declared in Info.plist the types handled, with two UTI types, say > com.mycompany.typeA and com.mycompany.typeB. I also added the expected > filename e

Re: NSTreeController: how do I select a model object?

2013-10-15 Thread Mike Abdullah
On 14 Oct 2013, at 22:18, Jens Alfke wrote: > With an NSOutlineView driven by an NSTreeController, I’m having trouble > figuring out how to programmatically select an item: given one of my model > objects, how do I tell the controller or view to select it? > > NSTreeController has a .selected

Re: This document’s file has been changed by another application since you opened or saved it.

2013-10-14 Thread Mike Abdullah
On 14 Oct 2013, at 19:27, Rick Mann wrote: > > On Oct 14, 2013, at 02:46 , Mike Abdullah wrote: > >> So you're using the document architecture? Are you modifying the document >> outside of the -writeToURL:… methods? If so, there's your problem. > > It&#

Re: This document’s file has been changed by another application since you opened or saved it.

2013-10-14 Thread Mike Abdullah
On 14 Oct 2013, at 10:37, Rick Mann wrote: > In my complex Core Data-based app, I get this behavior: > > 1. I launch the app with no prior state. It creates a .sqlite Core Data DB > with some default data. > 2. Quit and re-launch > 3. App opens that default file. > 4. I modify the file then sa

Re: NSOutlineView cell size 8 pixels too narrow

2013-10-04 Thread Mike Abdullah
I wonder if this is a side-effect of -[NSOutlineView autoresizesOutlineColumn]. I had to set it to NO for our app. On 2 Oct 2013, at 11:57, Jakob Egger wrote: > I had a similar issue with NSOutlineView in 10.8. I had an outline view that > could be hidden by the user, and every time it was sho

Re: Can I create a thread with a runloop and a dispatch queue?

2013-10-03 Thread Mike Abdullah
On 3 Oct 2013, at 22:37, Jens Alfke wrote: > > On Oct 3, 2013, at 2:09 PM, Mike Abdullah wrote: > >> You can actually target a custom queue at any other queue you like, to >> create a whole chain of them. Work submitted to such queues ends up >> executing wit

Re: Can I create a thread with a runloop and a dispatch queue?

2013-10-03 Thread Mike Abdullah
On 3 Oct 2013, at 20:14, Jens Alfke wrote: > > On Oct 3, 2013, at 12:07 PM, Kyle Sluder wrote: > >> They're fundamentally different ways of doing multiprocessing. > > So to use GCD I have to rip apart all of my code that uses threads/runloops > at once and rewrite it? (As I’ve said, I don’t

Re: Can I create a thread with a runloop and a dispatch queue?

2013-10-03 Thread Mike Abdullah
On 3 Oct 2013, at 20:00, Jens Alfke wrote: > > On Oct 3, 2013, at 11:46 AM, Kyle Sluder wrote: > >> There is magic sauce in CFRunLoop that runs the main queue as part of >> processing the runloop. All other queues are managed by code running on >> a thread managed by libdispatch. The main que

Re: iOS Calendar Question

2013-10-02 Thread Mike Abdullah
On 2 Oct 2013, at 19:03, Dave wrote: > > On 2 Oct 2013, at 18:56, Alex Kac wrote: > >> To Safari - probably not. You’d have to bring up the document interaction >> controller, which would bring up any app that supports ICS - which would >> bring up the Calendar app. That would do what you w

Re: iOS Calendar Question

2013-10-01 Thread Mike Abdullah
On 1 Oct 2013, at 14:09, Dave wrote: > > On 1 Oct 2013, at 12:16, Mike Abdullah wrote: > >> >> On 1 Oct 2013, at 12:02, Dave wrote: >> >>> Hi All, >>> >>> This had reared it's ugly head again! I have been asked to add an event

Re: iOS Calendar Question

2013-10-01 Thread Mike Abdullah
On 1 Oct 2013, at 14:04, Mike Abdullah wrote: > > On 1 Oct 2013, at 14:00, Dave wrote: > >> >> On 1 Oct 2013, at 12:27, Roland King wrote: >> >>> >>> On 1 Oct, 2013, at 7:02 pm, Dave wrote: >>> >>>> Hi All, >>&g

Re: iOS Calendar Question

2013-10-01 Thread Mike Abdullah
On 1 Oct 2013, at 14:00, Dave wrote: > > On 1 Oct 2013, at 12:27, Roland King wrote: > >> >> On 1 Oct, 2013, at 7:02 pm, Dave wrote: >> >>> Hi All, >>> >>> This had reared it's ugly head again! I have been asked to add an event to >>> the Calendar WITHOUT asking the user for permission a

Re: iOS Calendar Question

2013-10-01 Thread Mike Abdullah
On 1 Oct 2013, at 12:02, Dave wrote: > Hi All, > > This had reared it's ugly head again! I have been asked to add an event to > the Calendar WITHOUT asking the user for permission as the Standard Manner. I > basically said it couldn't be done based on feedback from here. However, I've > was

Re: Efficient UITableViewCell usage

2013-09-30 Thread Mike Abdullah
On 30 Sep 2013, at 15:47, Koen van der Drift wrote: > Hi, > > I have a custom UITableViewCell with several labels of which the size needs > to be calculated based on the content. Some of the content is also > constructed on the fly, since I am generating an attributed string, and don't > wa

Re: iOS Calendar Question

2013-09-19 Thread Mike Abdullah
On 19 Sep 2013, at 15:00, Dave wrote: > Hi, > > I've had a request for the following functionality and I'm not sure from the > docs if it is possible, this App is for iOS 5+. > > The App has presented a number of events in a table view. > > The request is to add a button to an item that sa

Re: Core Data: Primitive Accessors & Ivar-Backed Properties

2013-09-18 Thread Mike Abdullah
On 18 Sep 2013, at 16:45, Keary Suska wrote: > On Sep 17, 2013, at 4:30 PM, Keary Suska wrote: > >> I hadn't considered the undo issue--I guess I just thought undo support was >> "automagical". If not, are you aware of whether it is implemented at the >> public or primitive accessor level? No

Re: Unwanted presentedItemDidMoveToURL: for old file after using setFileURL: to specify a new file

2013-09-16 Thread Mike Abdullah
On 14 Sep 2013, at 21:14, Brian Clark wrote: > I'm hoping someone can suggest the correct way to deal with the following > problem. > > For an image viewing app i display a file in the usual way in an NSDocument. > setFileURL: is properly called by NSDocument's > _initWithContentsOfURL:ofTyp

Re: NSTabView

2013-09-12 Thread Mike Abdullah
On 12 Sep 2013, at 14:22, Joseph Ayers wrote: > When you click on a tab in a NSTabView, what action gets sent to what target? > Where can I find this information? NSTabView is not a subclass of NSControl so it has no target or action. Instead, its delegate is informed of changes in tab.

Re: Document scope security bookmark, catch 22?

2013-08-14 Thread Mike Abdullah
This is a problem that's been discussed on the dev forums since the early days of security-scoped bookmarks. How about implement -writeToURL:… so that if the document doesn't have a URL yet, you first create a placeholder file, before overwriting it with the real data? As I understand it, the im

Re: Crash on nib loading

2013-08-08 Thread Mike Abdullah
On 8 Aug 2013, at 11:05, "Gerriet M. Denkmann" wrote: > By deleting all textFields from my nib one by one I found out that some label > (const string) had a binding. > This certainly was not my intention. Don't know how this did happen. > > Were there any hints to this being the problem in the

Re: Initializing a NSMutableString an odd way

2013-07-31 Thread Mike Abdullah
On 31 Jul 2013, at 19:09, Vincent Habchi wrote: > Folks, > > I apologize if this question looks stupid or contrived. Here it is: is it > permissible to use [@“” mutableCopy] to initialize (or reset) a > NSMutableString instead of the more classical [[NSMutableString alloc] init]? Yes.

Re: WebView & Silverlight

2013-07-24 Thread Mike Abdullah
On 24 Jul 2013, at 09:46, Folami Nguyen wrote: > Dear Mr.Abdullah, > I have tried to implement many like: > webView:decidePolicyForNewWindowAction:request:newFrameName:decisionListener:

Re: WebView & Silverlight

2013-07-24 Thread Mike Abdullah
Have a look at WebUIDelegate, there's a wealth of applicable methods in there. On 24 Jul 2013, at 08:42, Folami Nguyen wrote: > I have application, I use WebView to display an silverlight page which > isnot mine. > The silverlight application has a button, when I click on it a new window > is op

Re: Recomputing non-standard Core Data attributes when child MOC is saved?

2013-07-23 Thread Mike Abdullah
On 19 Jun 2013, at 15:45, Noah Desch wrote: > I have had really weird issues with NSManagedObjects KVOing themselves. I > would recommend you instead override the dynamic setters for all the > attributes whose value affects your computed property and clear your pre > computed value there. T

Re: type of NSNotFound

2013-07-20 Thread Mike Abdullah
On 20 Jul 2013, at 23:06, Matt Neuburg wrote: > On iOS, NSNotFound is defined as NSIntegerMax. However, the index of an > NSArray, which is a case where you'd often want to use NSNotFound (e.g. > indexOfObject:), is of type NSUInteger. > > Isn't there a type mismatch here? It seems to me that

Re: seamlessly saving to a different file

2013-07-15 Thread Mike Abdullah
On 15 Jul 2013, at 15:38, Steve Mills wrote: > We have a particular non-standard feature that will cause a document of an > old format and extension to automatically save to a new format and extension > when the user simply hits Save. The old file is moved to a backup folder > after the save

Re: How to tell if file wrapper represents package

2013-07-14 Thread Mike Abdullah
On 14 Jul 2013, at 17:59, Kyle Sluder wrote: > On Jul 14, 2013, at 9:33 AM, Mike Abdullah wrote: > >> >> On 14 Jul 2013, at 08:40, Shane Stanley wrote: >> >>> On 14/07/2013, at 1:30 PM, Lee Ann Rucker wrote: >>> >>>> Haven't

Re: How to tell if file wrapper represents package

2013-07-14 Thread Mike Abdullah
On 14 Jul 2013, at 08:40, Shane Stanley wrote: > On 14/07/2013, at 1:30 PM, Lee Ann Rucker wrote: > >> Haven't tried it, but [NSWorkspace isFilePackageAtPath:] looks like what you >> want. If that's not sufficient, there are other things in NSWorkspace that >> test files. > > The problem, t

Re: Bundle Identifiers - and application support directory

2013-07-10 Thread Mike Abdullah
On 10 Jul 2013, at 15:43, Scott Ribe wrote: > On Jul 10, 2013, at 8:27 AM, Mike Abdullah wrote: > >> On 10 Jul 2013, at 15:01, Peter Hudson wrote: >> >>> Now I can set an ID, the docs suggest the format >>> com.companyDomainName.appName f

Re: Bundle Identifiers - and application support directory

2013-07-10 Thread Mike Abdullah
On 10 Jul 2013, at 15:01, Peter Hudson wrote: > Thanks Mike. I have now set an ID for my bundle and it is feeding through > happily. > > Now I can set an ID, the docs suggest the format > com.companyDomainName.appName for the directory name in Application Support. > I notice that very

Re: Bundle Identifiers - and application support directory

2013-07-10 Thread Mike Abdullah
On 10 Jul 2013, at 11:25, Peter Hudson wrote: > I am trying to create an application support directory for my app ( on 10.8.3 > ) > > I am using this piece of example code ( from the docs ) :- > > > > NSString* bundleID = [[NSBundle mainBundle] bundleIdentifier]; >NSFileManager*fm = [NS

Re: The cost of using objects rather than plain C variables

2013-07-08 Thread Mike Abdullah
On 8 Jul 2013, at 18:14, Andy Lee wrote: > On Jul 8, 2013, at 1:08 PM, Boyd Collier wrote: >> Your suggestion sounded worth learning about, but it appears that there's no >> such creature as NSPointerValue. > > I'm guessing Jens meant +[NSValue valueWithPointer:]. > >> Did you perhaps mea

Re: NSTextField / NSSecureTextField toggl

2013-07-07 Thread Mike Abdullah
I reckon this code of mine is what you want: https://github.com/karelia/SecurityInterface/blob/master/README.md Mike. Sent from my iPhone On 7 Jul 2013, at 13:46, Michael Starke wrote: > Hello List, > > I'm somewhat heading down a road of pain with this. Maybe I approach the > problem from

Re: Getting the location of the Library

2013-06-24 Thread Mike Abdullah
On 23 Jun 2013, at 23:09, Kyle Sluder wrote: > On Jun 23, 2013, at 1:49 PM, Pax <45rpmli...@googlemail.com> wrote: > >> Just a quickie, I hope! I'm writing a sandboxed application that uses >> plugins. The plugin directories that I want to load from are >> '/Library/Application Support/MyAp

Re: NSDocument and Large File Import?

2013-06-21 Thread Mike Abdullah
On 20 Jun 2013, at 23:50, Quincey Morris wrote: > On Jun 20, 2013, at 15:12 , Mike Abdullah wrote: > >> There should be no need to do this. If you need a location on disk for the >> document, just trigger an autosave so that the system effectively creates a >> temp

Re: NSDocument and Large File Import?

2013-06-20 Thread Mike Abdullah
On 20 Jun 2013, at 20:52, Karl Moskowski wrote: > > On Jun 20, 2013, at 3:44 PM, Jens Alfke wrote: > >> Yup, it’s an untitled document so it doesn’t have a persistent manifestation >> yet. >> >> A typical solution for your problem is to create a temporary directory >> somewhere (using the

Re: popup menus and toolbar buttons

2013-06-16 Thread Mike Abdullah
On 16 Jun 2013, at 18:39, Lee Ann Rucker wrote: > If you have an NSSegmentedControl with only one segment and a menu, the menu > only pops up if you press and hold the button, otherwise it acts like a > normal button. That sounds like what you want. Ooh, that's a good one to know, thanks! _

Re: popup menus and toolbar buttons

2013-06-16 Thread Mike Abdullah
On 15 Jun 2013, at 19:33, Eric Smith wrote: > Anyone know how to attach a popup menu to a toolbar button, as with the 'run' > button in Xcode? I want to give users a choice of action via a popup menu if > they hold down one of my toobar buttons. I have code for doing this here: https://bitb

Re: Account framework

2013-06-15 Thread Mike Abdullah
On 15 Jun 2013, at 20:52, Kévin Vavelin wrote: > Ouch.. Looks like we have many bug report to fill ... I hope it will be > resolve soon ‘cause this framework have a good potential for using API from > other services . 1) Yes, please do file a radar. It helps Apple know what sort of things thi

Re: Asynchronously mounting a remote file server?

2013-06-14 Thread Mike Abdullah
On 14 Jun 2013, at 18:06, Jens Alfke wrote: > > On Jun 14, 2013, at 12:22 AM, Mike Abdullah wrote: > >> There's no async API. I filed a radar asking for this relatively recently >> and was recommended to shove such tasks onto the low priority GCD queue &g

Re: -[NSManagedObjectContext performBlock:] concurrent or serial?

2013-06-14 Thread Mike Abdullah
On 14 Jun 2013, at 00:03, davel...@mac.com wrote: > > On May 31, 2013, at 7:40 PM, Rick Mann wrote: > >> Hi. If I issue a bunch of -performBlock: calls on a particular Managed >> Object Context, will they execute serially or concurrently? >> >> Thanks, >> >> -- >> Rick > > I'm assuming se

Re: Asynchronously mounting a remote file server?

2013-06-14 Thread Mike Abdullah
On 14 Jun 2013, at 06:40, Jens Alfke wrote: > > On Jun 13, 2013, at 2:17 PM, Rick Mann wrote: > >> I'd like to be smarter about this in my own apps. Is there a test I can >> perform before accessing aliases I've stored, or an async way to open/read >> from files that won't block the main th

Re: NSDocument initWithContentsOfURL vs readFromURL

2013-05-20 Thread Mike Abdullah
On 20 May 2013, at 11:29, Trygve Inda wrote: > When I open a document from a file (double clicking or via File-Open), my > Document object gets > > -(id)initWithContentsOfURL:(NSURL *)absoluteURL ofType:(NSString *)typeName > error:(NSError **)outError > > It seems like I could just read the f

Re: way to update Apple Menu's Recents Items

2013-05-14 Thread Mike Abdullah
Read up on NSDocumentController; it's in charge of that menu. On 14 May 2013, at 04:50, Nick Rogers wrote: > Hi, > > I can remove the recent items from the plist where they are stored. > > But when I try and update the Recent Items submenu, it doesn't. > > I'm getting Apple Menu by using [[NS

Re: Validate core data sqlite file

2013-05-13 Thread Mike Abdullah
On 12 May 2013, at 22:15, Peng Gu wrote: > Hi > > I am building an core data app that allows me to backup and restore the > data. > For backup, I simply copy the sqlite file to selected directory with a name > 'app.backup'. > For restore, I also simply copy the selected file to the application

Re: Allow access to Documents folder in a sandbox app

2013-05-08 Thread Mike Abdullah
On 8 May 2013, at 20:02, Peng Gu wrote: > Hi, > > Is there any way to access the documents folder without letting user select > it explicitly in a sandbox app? Yes, a temporary entitlement, but Apple are highly unlikely to allow you it. > > If I want to submit the app to the App Store, does t

Re: Does initWithHTML:dataUsingEncoding:documentAttributes: run an event loop?

2013-05-07 Thread Mike Abdullah
On 7 May 2013, at 23:37, Jean Suisse wrote: > Dear all, > > I am wondering: > By any chance, could a call to [[NSAttributedString alloc] > initWithHTML:dataUsingEncoding:documentAttributes:] lead to the event loop > being run before the call returns? I believe so, yes. It's currently implem

Re: Overlapping sibling views

2013-04-30 Thread Mike Abdullah
On 30 Apr 2013, at 16:53, Gideon King wrote: > So it sounds as if as long as I have all my views in the entire hierarchy > layer backed, my sibling views should always draw in order. Yup. Bear in mind WebViews don't support being layer-backed (still!), which can throw a spanner in the works.

Re: Overlapping sibling views

2013-04-30 Thread Mike Abdullah
On 30 Apr 2013, at 09:38, Robert Vojta wrote: >> I've never seen any evidence that sibling *NSView*s draw in the wrong order >> since 10.5. I believe that 'drawRect:' is correctly called in the >> back-to-front order of the sibling arrangement in the parent view. >> >> However, I *have* seen

Re: Overlapping sibling views

2013-04-30 Thread Mike Abdullah
The docs are out of date. Overlapping views work properly as of 10.5 (albeit you might run into performance problems if you push it too far). Please use the feedback thing on the bottom of the docs to let Apple know it's wrong! On 30 Apr 2013, at 08:39, Gideon King wrote: > Hi, I had to design

Re: Multiple untitled docs are saving to same file

2013-04-29 Thread Mike Abdullah
On 29 Apr 2013, at 19:08, Steve Mills wrote: > We just noticed something that is wrong. When our > saveToURL:ofType:forSaveOperation:completionHandler override gets called for > NSAutosaveElsewhereOperation on two different untitled docs, the url is > exactly the same, so the 2nd one overwrit

Re: Temporarily disabling autosave

2013-04-24 Thread Mike Abdullah
On 24 Apr 2013, at 19:00, Steve Mills wrote: > On Apr 24, 2013, at 12:34:41, Mike Abdullah > wrote: > >> It doesn't surprise me, so much as it confuses me! I thought you'd turned on >> +autosavesInPlace and were trying to get it not to autosave at certain

Re: Temporarily disabling autosave

2013-04-24 Thread Mike Abdullah
On 24 Apr 2013, at 16:12, Steve Mills wrote: > On Apr 24, 2013, at 10:00:13, Mike Abdullah wrote: > >> On 24 Apr 2013, at 15:58, Steve Mills wrote: >> >>> Could it be because we're not using Cocoa's undo manager or because I have >>> pre

Re: Temporarily disabling autosave

2013-04-24 Thread Mike Abdullah
On 24 Apr 2013, at 15:58, Steve Mills wrote: > Could it be because we're not using Cocoa's undo manager or because I have > preservesVersions and autosavesInPlace turned off? You do?! That takes us back to an earlier point then, surely – you're using a custom autosave system? __

Re: Temporarily disabling autosave

2013-04-24 Thread Mike Abdullah
On 24 Apr 2013, at 04:16, Steve Mills wrote: > On Apr 23, 2013, at 17:39:17, Mike Abdullah > wrote: > >> -hasUnautosavedChanges continues to be applicable to all (auto)saving models. >> >> I caution against overriding it since: >> >> A) Your override

Re: Temporarily disabling autosave

2013-04-23 Thread Mike Abdullah
On 23 Apr 2013, at 15:19, Jerry Krinock wrote: > > On 2013 Apr 22, at 21:42, Steve Mills wrote: > >> [-setAutosavingDelay:0.0] didn't work. > > OK, then. I retract my surprise. > >> The pause mechanism is something in our own code - a bool that says it's >> paused (it's actually an integer

Re: Temporarily disabling autosave

2013-04-23 Thread Mike Abdullah
On 22 Apr 2013, at 23:57, Jerry Krinock wrote: > > On 2013 Apr 22, at 09:43, Steve Mills wrote: > >> So to sum up, upon pausing autosave > > which, per previous messages in this thread, I presume you do by sending the > shared document controller -setAutosavingDelay:0.0. I'm surprised that

Re: Temporarily disabling autosave

2013-04-20 Thread Mike Abdullah
On 20 Apr 2013, at 04:17, Steve Mills wrote: > On Apr 19, 2013, at 16:51:20, Jerry Krinock > wrote: > >> Maybe you Steve and Alex Zavatone may be on to something there. You're >> suggesting that, rather than handling the autosave when it is requested >> during a long-winded operation, you t

Re: Temporarily disabling autosave

2013-04-20 Thread Mike Abdullah
On 19 Apr 2013, at 21:42, Jerry Krinock wrote: > > On 2013 Apr 19, at 12:37, Mike Abdullah wrote: > >> Why, what's wrong with cancelling a [auto]save? > > That's a damned good question, Mike. You're probably thinking that, hey, we > lived without a

Re: Temporarily disabling autosave

2013-04-20 Thread Mike Abdullah
On 19 Apr 2013, at 21:22, Quincey Morris wrote: > On Apr 19, 2013, at 13:04 , Steve Mills wrote: > > c. If the autosave is asynchronous, you can just not return from it until > playback finishes. Note, however, this does not prevent another autosave from > arriving after some time interval,

Re: Temporarily disabling autosave

2013-04-20 Thread Mike Abdullah
On 19 Apr 2013, at 21:04, Steve Mills wrote: > On Apr 19, 2013, at 14:37:11, Mike Abdullah wrote: > >> Why, what's wrong with cancelling a save? > > It just seems icky. Who knows what behavior this will cause in the future? I > just tried this approach, and it work

Re: Temporarily disabling autosave

2013-04-19 Thread Mike Abdullah
On 19 Apr 2013, at 21:42, Jerry Krinock wrote: > > On 2013 Apr 19, at 12:37, Mike Abdullah wrote: > >> Why, what's wrong with cancelling a [auto]save? > > That's a damned good question, Mike. You're probably thinking that, hey, we > lived without a

Re: Temporarily disabling autosave

2013-04-19 Thread Mike Abdullah
On 19 Apr 2013, at 20:17, Steve Mills wrote: > On Apr 19, 2013, at 13:40:12, Mike Abdullah wrote: > >> Why is it causing an interruption? That sounds suspicious to me. > > Just because. This isn't simply ol' audio playback. This is a lot more > complex. Go wit

Re: Temporarily disabling autosave

2013-04-19 Thread Mike Abdullah
On 19 Apr 2013, at 19:25, Steve Mills wrote: > What's the best way to temporarily disable autosave (autosavesInPlace and > preservesVersions are both off), like if I don't want to interrupt our audio > playback? Simply override hasUnautosavedChanges and return NO if I want it > disabled, othe

Re: Preventing edits in Versions browser

2013-04-19 Thread Mike Abdullah
On 19 Apr 2013, at 16:13, Jerry Krinock wrote: > > On 2013 Apr 17, at 09:23, Steve Mills wrote: > >> But TextEdit doesn't seem to prevent any actual edits from happening, but >> instantly undoes each edit. So you see the change for a split second. That's >> not a very good user experience.

Re: Accessing members from NSDictionary

2013-04-05 Thread Mike Abdullah
On 5 Apr 2013, at 13:38, Pax wrote: > I have a situation where a user might have a great many information windows > open at the same time (like the situation in Finder where you can click on a > file and select 'Get Info' ad infinitum.) > > In order handle this situation, and so that I can sti

Re: Defaults not stored

2013-04-04 Thread Mike Abdullah
On 4 Apr 2013, at 09:18, Stephane Sudre wrote: > On Thu, Apr 4, 2013 at 5:56 AM, Steve Mills wrote: >> My screensaver follows examples I've seen as far as creating its defaults in >> its initWithFrame method: >> >>ScreenSaverDefaults*defaults = [ScreenSaverDefaults >> default

Re: WebView find panel/bar implementation

2013-04-02 Thread Mike Abdullah
On 2 Apr 2013, at 12:43, jonat...@mugginsoft.com wrote: > I provide some app documentation in both RTF and MarkDown and switch in an > NSTextView or WebView for display as required. > Text view searching works well using the NSTextFinder find bar. > However, implementing a WebView find panel/bar

Re: iOS 6 EKEvent calendar access process

2013-03-21 Thread Mike Abdullah
On 21 Mar 2013, at 18:02, Alex Zavatone wrote: > So, iOS 6 grants you access to all calendars or none of them and that's it? > > In reading the documentation and in the request message on iOS 6, what I'd > read implied that you could be granted access to the one calendar you wish to > acces

Re: Objective-C Question

2013-03-11 Thread Mike Abdullah
On 11 Mar 2013, at 20:55, Dave wrote: > > On 11 Mar 2013, at 20:50, Jens Alfke wrote: > >> >> On Mar 11, 2013, at 1:33 PM, Dave wrote: >> >>> There isn't a >>> -newDict >>> method defined, so how come I didn't get a complier error? >> >> Because the receiver is a Class, so the method is +n

Re: Objective-C Question

2013-03-11 Thread Mike Abdullah
On 11 Mar 2013, at 20:49, Dave wrote: > On 11 Mar 2013, at 20:45, Mike Abdullah wrote: > > Confused now, I thought you meant +. > > There is no instance of the class to call [super newDict] on? > > There is no: > > -NewDict method, just +newDict. > > So, su

Re: Objective-C Question

2013-03-11 Thread Mike Abdullah
On 11 Mar 2013, at 20:33, Dave wrote: > > On 11 Mar 2013, at 20:26, Mike Abdullah wrote: >>> >>> I had assumed (and I thought I'd done something like this before) that the: >>> >>> myDict = [[super class] newDict]; >>> >>> s

Re: Objective-C Question

2013-03-11 Thread Mike Abdullah
On 11 Mar 2013, at 20:21, Dave wrote: > Hi, > > Take the following example: > > @interface BaseClass > > +(NSMutableDictionary*) newDict; > > @end > > @implementation BaseClass > > +(NSMutableDictionary*) newDict > { > > > return [[NSMutableDictionary alloc] init]; > } > > > @class New

Re: NSImage TIFFRepresentation crashes

2013-03-10 Thread Mike Abdullah
On 10 Mar 2013, at 13:04, Markus Spoettl wrote: > On 3/10/13 1:09 PM, Mike Abdullah wrote: >>> NSData *tiff = [image TIFFRepresentation]; >>> NSBitmapImageRep *bmprep = [NSBitmapImageRep imageRepWithData:tiff]; >>> NSDictionary *props = [NSDictionary dictiona

Re: NSImage TIFFRepresentation crashes

2013-03-10 Thread Mike Abdullah
On 10 Mar 2013, at 08:05, Markus Spoettl wrote: > On 3/10/13 1:55 AM, Mike Abdullah wrote: > > Well that exception suggests you have a truly giant image on your hands. > > Perhaps there's enough memory to do some work with it, but not all. > > I was trying to say tha

Re: NSImage TIFFRepresentation crashes

2013-03-09 Thread Mike Abdullah
Well that exception suggests you have a truly giant image on your hands. Perhaps there's enough memory to do some work with it, but not all. The most important question: what are you actually calling -TIFFRepresentation for? In practice it's often a rather inefficient method to accomplish your e

Re: [OT] Sync vs ASync Server Comms

2013-02-24 Thread Mike Abdullah
On 24 Feb 2013, at 12:26, Dave wrote: > Hi All, > > On 22 Feb 2013, at 22:23, Jens Alfke wrote: > >> >> On Feb 22, 2013, at 8:32 AM, Dave wrote: >> >>> Of course there are threading "issues" Having delegates doesn't stop >>> that >> >> There are no threading issues if you don’t create

Re: A plugin for a sandboxed app - where to can I successfully store a temp file?

2013-02-22 Thread Mike Abdullah
On 22 Feb 2013, at 01:34, Nick wrote: > Hello. > I am working on a plugin for Mail.app for Mountain Lion. The problem is > whenever I try to save a file, I am getting an error. Which can be > explained by the fact that Mail.app is sandboxed and I am not allowed to > modify files anywhere on the s

Re: What is the meaning of id?

2013-02-18 Thread Mike Abdullah
http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/WorkingwithProtocols/WorkingwithProtocols.html#//apple_ref/doc/uid/TP40011210-CH11-SW1 On 18 Feb 2013, at 09:20, Christ Levesque wrote: > > ___ > > Cocoa

Re: cocoa bindings performance

2013-02-17 Thread Mike Abdullah
Sent from my iPad On 15 Feb 2013, at 19:42, Maximilian Marcoll wrote: > > Hi everyone! > > I have a problem with bindings, or so it seems. > > In my application, I need to programmatically create lots of small views > embedded in a big view. > Think of them as draggable items on a plane.

Re: Problem with NSPersistentStore

2013-02-17 Thread Mike Abdullah
> AIM/iChat/Skype:LaurentDaudelin > http://www.nemesys-soft.com/ > Logiciels Nemesys Software > laur...@nemesys-soft.com > > On Feb 16, 2013, at 02:00, Mike Abdullah wrote: > >> >> On 16 Feb 2013, a

Re: Problem with NSPersistentStore

2013-02-16 Thread Mike Abdullah
On 16 Feb 2013, at 00:37, Laurent Daudelin wrote: > I got a few crash reports from users that have a problem with my CoreData app. > > Given the following code: > > /* > Returns the persistent store coordinator for the application. > If the coordinator doesn't already exist, it is created and

Re: Recursive file copy with good progress data?

2013-02-15 Thread Mike Abdullah
On 15 Feb 2013, at 05:22, Graham Cox wrote: > > On 15/02/2013, at 1:55 PM, Jim Zajkowski wrote: > >> s there anything that provides the level of progress that FSCopyObjectAsync >> does but gives the callback more control like copyfile() does? > > > You could look into NSFileManager's -copy

Re: managedObjectIDForURIRepresentation returning wrong NSManagedObjectID

2013-02-08 Thread Mike Abdullah
On 8 Feb 2013, at 09:06, Ben wrote: > I'm confused by the following code. What I'm trying to do is store a > reference in a DogManagedObject transformable property, to a > CatManagedObject, then retrieve the Cat from the Dog at a later date. > However, when I log the output I get a class of 'D

Re: NSDocument packages and incremental writing using NSFileWrapper

2013-02-05 Thread Mike Abdullah
On 5 Feb 2013, at 10:38, Thomas Zoechling wrote: > > Thanks for your response, >> Given the right conditions, NSFileWrapper can make writing vastly more >> efficient by writing hard links for unchanged files, rather than recreating >> them afresh. Have you determined whether this is happening

Re: NSOperation communicating progress?

2013-02-04 Thread Mike Abdullah
On 4 Feb 2013, at 22:35, Todd Heberlein wrote: > >> Again, everything seems to work fine. The one problem is I get the following >> warning at the very end: >> >> CoreAnimation: warning, deleted thread with uncommitted CATransaction; >> set CA_DEBUG_TRANSACTIONS=1 in environment to log

Re: KVO, which thread?

2013-02-04 Thread Mike Abdullah
On 4 Feb 2013, at 21:44, Todd Heberlein wrote: > I have an NSInvocationOperation, anOp, and register to observe when its > isFinished variable is set > > [anOp addObserver:self forKeyPath:@"isFinished" > options:NSKeyValueObservingOptionNew context:NULL]; > > When my operation is done, isFin

Re: NSDocument packages and incremental writing using NSFileWrapper

2013-02-04 Thread Mike Abdullah
On 30 Jan 2013, at 15:53, Thomas Zoechling wrote: > Hello, > > My NSDocument based app uses packages with the following structure: > > - document.package > +- metadata.plist (small, mutable) > +- large0.file (large, immutable) > +- large1.file (large, immutable) > +- large2.file (large, immuta

Re: What's the difference between [NSOperationQueue currentQueue] and performSelectorOnMainThread (iOS platform)

2013-02-03 Thread Mike Abdullah
On 3 Feb 2013, at 07:41, 尹佳冀 wrote: > Hi All > > Does anyone can know what the difference between [NSOperationQueue > currentQueue] and > performSelectorOnMainThread, If I do some work use operation > on [NSOperationQueue mainQueue], the UI will not hang up, but if i > use performSelectorOnMain

Re: Core Data & NSPersistentDocument & Concurrency

2013-02-03 Thread Mike Abdullah
On 3 Feb 2013, at 01:04, Eric Gorr wrote: > > On Feb 1, 2013, at 6:59 PM, Mike Abdullah wrote: > >> On 1 Feb 2013, at 20:13, mail...@ericgorr.net wrote: >> >>> I've got a NSPersistentDocument. I have read the Concurrency with Core Data >>&g

Re: Core Data & NSPersistentDocument & Concurrency

2013-02-01 Thread Mike Abdullah
On 1 Feb 2013, at 22:11, Felix Franz wrote: > > On 01.02.2013, at 21:13, mail...@ericgorr.net wrote: > >> >> The problem then is that my NSPersistentDocument generates an error which >> says: >> >>"The document "xxx" could not be saved. The file has been changed by >> another applicati

Re: Core Data & NSPersistentDocument & Concurrency

2013-02-01 Thread Mike Abdullah
On 1 Feb 2013, at 20:13, mail...@ericgorr.net wrote: > I've got a NSPersistentDocument. I have read the Concurrency with Core Data > in the Core Data Programming Guide and am following the typically recommended > approach which is to create separate managed object context (MOC) for each > thre

Re: NSDocument's Open File Panel unresponsive when opening large file from disc

2013-01-31 Thread Mike Abdullah
On 31 Jan 2013, at 15:06, Gilles Celli wrote: > Hmm well Mike you were right! > > I was too enthusiastic yesterday by claiming that I fixed my Open Panel > problem… I tried it here on my old Mac Mini with OS X 10.7 and the Open Panel > still stays open even with my newer code with windowDidLoa

Re: NSDocument's Open File Panel unresponsive when opening large file from disc

2013-01-30 Thread Mike Abdullah
On 30 Jan 2013, at 21:29, Gilles Celli wrote: > Well I think I found it: now the Open Panel disappears when opening large > files in my document-based app. > Now the process of the data file is done in the subclassed NSWindowController > windowDidLoad method. > > I've found something here on

Re: Sandbox Clarification

2013-01-30 Thread Mike Abdullah
On 30 Jan 2013, at 21:59, Sean McBride wrote: > On Wed, 30 Jan 2013 14:51:41 -0700, koko said: > >> I have apps that need to browse the local file system and are therefore >> not Mac App store / Sandboxable. >> >> However, if I understand correctly, any file or folder that the user >> gives to

Re: Sandbox Clarification

2013-01-30 Thread Mike Abdullah
On 30 Jan 2013, at 23:54, Graham Cox wrote: > > On 31/01/2013, at 8:59 AM, Sean McBride wrote: > >> - allow specific paths >> (com.apple.security.temporary-exception.files.absolute-path.read-write) >> - allow full access >> (com.apple.security.temporary-exception.files.absolute-path.read-wr

Re: verify input parameter of init method and return nil before invoke [super init]

2013-01-30 Thread Mike Abdullah
On 30 Jan 2013, at 17:03, Quincey Morris wrote: > On Jan 30, 2013, at 00:42 , Charles Srstka wrote: > >> I *think* Xcode 4.2 was the one that introduced it, but my memory's not 100% >> on that. > > Weirdly, though, in Xcode 4.6 'instancetype' is not auto completing for me. > Is that a prob

Re: NSDocument's Open File Panel unresponsive when opening large file from disc

2013-01-30 Thread Mike Abdullah
On 29 Jan 2013, at 16:18, Gilles Celli wrote: > I looked a little bit today here with my application, and the term > unresponsive for the Open Panel is not appropriate: > it should be "stays open" when reading /processing the big data file and then > the panel closes. > > The main processing

Re: NSDocument's Open File Panel unresponsive when opening large file from disc

2013-01-28 Thread Mike Abdullah
On 28 Jan 2013, at 16:46, Gilles Celli wrote: > Please don't be scared ;-) > Well I'm little bit in a hurry … will look more closely tonight, but: > > What I've done til now is inside readFromURL:ofType:error: > 1. Open the file and store it NSString currentFileContents > 2. Process currentFile

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