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

2008-05-15 Thread Mike Abdullah
As ever, you really need to state what you are trying to achieve much more clearly. HTML is just a kind of plain text file; you can easily write out NSStrings or convert them to data to create "HTML" On 15 May 2008, at 11:56, [EMAIL PROTECTED] wrote: Hi, I'm using xcode3.0 and objective c.

Re: Basic info about outlets

2008-05-15 Thread Mike Abdullah
Furthermore, if you want to see it in action a little more: If you create an object with an outlet like so: IBOutlet NSWindow *window and also give it methods like so: - (NSWindow *)window; - (void)setWindow:(NSWindow *)aWindow; When loading the nib, rather than direct

Re: Delegates

2008-05-19 Thread Mike Abdullah
On 19 May 2008, at 21:23, I. Savant wrote: On Mon, May 19, 2008 at 2:54 PM, Michael Vannorsdel <[EMAIL PROTECTED] > wrote: There's nothing that guarantees a Cocoa delegate will act for another object and that the represented object won't act how it wants as well. Sometimes a delegate metho

Re: NSProgressIndicator and some very basic stuff ...

2008-05-19 Thread Mike Abdullah
On 19 May 2008, at 20:58, John Love wrote: I am having some basic problems getting an indeterminate NSProgressIndicator (INSPI) to spin. Since I have just recently started to learn XCODE and Cocoa, I began with "Learning Cocoa and Objective C". I have also printed out much of Apple's doc

Re: KVO Response for incomplete paths

2008-05-21 Thread Mike Abdullah
On 21 May 2008, at 19:51, Gordon Apple wrote: OK, thanks. That helps on the KVO responses. However, I have other questions about the entire KVO process. Not having access to the innards of KVO, I wonder how dymanic the process is. For example, my inspector bindings are through an ob

Re: KVO Response for incomplete paths

2008-05-21 Thread Mike Abdullah
On 21 May 2008, at 22:15, Gordon Apple wrote: So what you are saying (if I understand it correctly) is that once you try to observe the property at that path, the intercept mechanism for the property set-accessor is actually put into place, along with its before/after notifications, and

Re: Cocoa et al as HCI usability problem

2008-05-21 Thread Mike Abdullah
On 21 May 2008, at 23:58, Rua Haszard Morris wrote: I don't believe Peter Duniho's barking up the wrong tree - he sees room for improvement, and wants to discuss what to do to make it happen. I.e. he appears to care about making the platform better (probably something we all share)... Th

Re: 'Configure Sheet' fails when containing a WebView

2008-05-23 Thread Mike Abdullah
I believe there is an issue where WebViews don't work quite right under a modal panel (they rely on certain specifics of the run loop). Have a look through the archives, I know someone posted a link to a solution recently. Mike. On 23 May 2008, at 13:28, harry greenmonster wrote: Hi I hav

Re: email

2008-05-28 Thread Mike Abdullah
I would reccommend you have a look at the Address Book framework for importing e-mail addresses. On 28 May 2008, at 12:38, [EMAIL PROTECTED] wrote: Hi, I've build an email application,which doesn't using any email clients.In this application i've to extract emails and email addresses from

Re: iPhone - AddressBook Question

2008-05-28 Thread Mike Abdullah
As ever and ever and ever: iPhone SDK is under NDA. You cannot discuss it here. On 28 May 2008, at 17:42, James Cicenia wrote: Hello - I am new to iPhone and Cocoa, but, am definitely enjoying learning it. Anyway, I was wondering if it was possible for my application to have its own separat

Re: Ending Editing when Doc Saves?

2008-05-29 Thread Mike Abdullah
I would advise against that exact approach as there are lower level save methods which can be called without -saveDocument: being used. Have a look through the NSDocument for details on the over -save… methods. On 29 May 2008, at 13:41, Dave Fernandes wrote: Make the window the first respo

Re: Ending Editing when Doc Saves?

2008-05-30 Thread Mike Abdullah
On 30 May 2008, at 20:33, David Carlisle wrote: This is the approach I ended up taking: // in MyDocument.m - (void) saveDocument:(id)sender { [[self windowControllers] makeObjectsPerformSelector:@selector(myPrepareToSave:)]; [super saveDocument:sender]; } // in MyWindow.m - (void)

Re: Problem in continuing display time

2008-05-31 Thread Mike Abdullah
Keeping the clock display updated is not Cocoa's responsibility; it is yours. I would personally suggest that after each update of the display you set a timer for when the next update is due. On 31 May 2008, at 09:01, haresh vavdiya wrote: Hi Friends, I have got current system time but

Re: Key-Value pairs

2008-06-02 Thread Mike Abdullah
On 2 Jun 2008, at 22:30, john darnell wrote: Hello everyone: This is a discussion on theory and not a request for any practical help. Please also be advised I am not trying to bash Cocoa or Objective-C; I am simply curious why the designers of same built the language the way they did. Unde

Re: Best Practice for Returning Immutable Objects?

2008-06-03 Thread Mike Abdullah
On 3 Jun 2008, at 16:56, Karl Moskowski wrote: I have a few methods that return NSData objects, but the objects are created and manipulated as NSMutableData, and then copied to an immutable version along these lines: NSMutableData *myData = [NSMutableData data]; : :

Re: Core Data Questions

2008-06-06 Thread Mike Abdullah
On 6 Jun 2008, at 16:12, David Wilson wrote: On Fri, Jun 6, 2008 at 6:59 PM, Gordon Apple <[EMAIL PROTECTED]> wrote: I'm currently trying to evaluate whether or not Core Data is a viable storage system in our application. Although I've been through the tutorials, Refs, and searches, I sti

Re: Simple question - Subclassing NSView

2008-06-12 Thread Mike Abdullah
On 12 Jun 2008, at 10:54, Vikas wrote: O'kay, that was helpful. I still have one doubt. The declaration of NSRectFill is as below: void NSRectFill ( NSRect aRect ); NSRectFill() is a C function, not part of any class e.g. NSView. aRect is simply a struct which specify location points (d

Re: Control USB Power

2008-06-12 Thread Mike Abdullah
On 12 Jun 2008, at 23:01, David Duncan wrote: On Jun 12, 2008, at 10:38 PM, Omar Qazi wrote: I have a Cocoa application that controls an external USB device. I want to be able to turn the device off when the user performs some action, like click a button. Is there a way in Cocoa or IOKit t

Re: Read PSD-Layers with NSImage

2008-06-14 Thread Mike Abdullah
As far as I am aware, Cocoa only supports drawing of PSD images; you can't access the individual layers. To do any more, you probably have to drop down to ImageIO. On 14 Jun 2008, at 11:38, Boris Prohaska wrote: Hi, I'm totally new to Cocoa and Objective-C, i have read "Cocoa Programming f

Re: Programatically placing panels inside a window

2008-06-17 Thread Mike Abdullah
Also, Cathy Shive has some stuff that may be of help: http://katidev.com/blog/2008/04/09/nsviewcontroller-the-new-c-in-mvc-pt-1-of-3/ On 17 Jun 2008, at 00:59, Ken Tozier wrote: Hi I'm not sure If I'm going about this the right way but I created a bunch of panels in IB and want to swap indi

Re: Getting all subclasses

2008-06-18 Thread Mike Abdullah
Another option would be to write a +load method in your abstract superclass that will be automatically called for any subclasses and register them with the superclass. Mike. On 18 Jun 2008, at 16:45, Laurent Cerveau wrote: Fantastic! Thanks to you and Omar. laurent On Jun 18, 2008, at 9:

Re: Leopard-specific functionality in non–L eopard-only project

2008-06-21 Thread Mike Abdullah
If you're desperate to stick with the 10.4 SDK, I'd suggest the best approach is just to create your own header that mimics the method. So you'd end up with something like: @interface NSWindow (LeopardOnlyMethods) - (void)setCollectionBehavior:(int)behavior; @end ... [window setCollectionBeh

Re: NSPanel should not close on command-W

2008-06-23 Thread Mike Abdullah
On 23 Jun 2008, at 08:35, Georg Seifert wrote: Now I found out how panels works in Apple apps: (I did not use them often enough to be used to this behavior. I always had the panel from Adobe apps in mind ) The panels have the "setBecomesKeyOnlyIfNeeded:YES" set and thats it. Than they ge

Re: Where can I get some examples of if() conditionals being used with string variables in Objective-C

2008-06-25 Thread Mike Abdullah
if ([theName isEqualToString:@"John Lennon"]) { theName = @"Ringo Starr"; } -- By using == you were checking to see if the strings were the same object. Sometimes this would, sometimes it would not. Instead, you want to check if the two objects have equivalent contents.

Re: Giving focus to a specific text field after pressing a button

2008-06-25 Thread Mike Abdullah
-[NSWindow makeFirstResponder:someTextField] On 25 Jun 2008, at 15:04, Papa-Raboon wrote: Hi Guys. I was wondering it it is possible to pass cursor focus back to a specific NSText UI element after pressing a button. I have been looking at NSControl and NSText field but can't seem to find a s

Re: creating 2D graphs

2008-06-26 Thread Mike Abdullah
The iPhone SDK is under NDA; you cannot discuss it here On 26 Jun 2008, at 11:56, ªtîf ÇhåµÐh®¥ wrote: Hello, I want to include a graph in my iPhone application. How should I create and display one similar to that shown in 'Stocks' application of iPhone. Is there some API available or will I

Re: NSArchiver question?

2008-06-26 Thread Mike Abdullah
Yes, it is your responsibility to implement the NSCoding protocol in your own classes. On 27 Jun 2008, at 00:09, Damien Cooke wrote: I am getting the following error from this line NSData *data = [NSArchiver archivedDataWithRootObject:viewItem]; -[DCOViewItem encodeWithCoder:]: unrecognized

Re: description and proxy objects

2008-06-27 Thread Mike Abdullah
On 27 Jun 2008, at 00:36, Torsten Curdt wrote: I am getting the selected object from a controller (that is using bindings) NSDictionary *accountSettings = [accountsController selection]; The returned object is a proxy object. But why isn't the [accountSettings description] passed on? Inst

Re: Using isMemberOfClass with a tree of subclass of NSManagedObject

2008-06-28 Thread Mike Abdullah
Post some code. Mike. On 28 Jun 2008, at 18:25, Yoann GINI wrote: Ho sorry, of cours it's isKindOfClass, I've this problem since 2 days and I've try all similar method by despair ! With isKindOfClass I've always a NO in return... Le 28 juin 08 à 19:15, Owen Yamauchi a écrit : On Sat, Jun

Re: newb- Overwriting a file or folder

2008-07-01 Thread Mike Abdullah
On 1 Jul 2008, at 13:57, Chris Paveglio wrote: Newb alert. I'm trying to copy some files and folders from one location to another. I would like to overwrite them at the destination. Is this possible yet? [theManager copyPath:theSettings toPath:theDestinationFile handler:nil]; I've re

Re: Date and Time Conversion with TimeZone

2008-07-02 Thread Mike Abdullah
On 1 Jul 2008, at 18:20, [EMAIL PROTECTED] wrote: Hello, I have a date event returned as a date time string from a feed in the following format, "Tue 01 Jul 2008 15:00:00 +0100" I'm assuming this is GMT plus one hour, I'd like to convert this string to the to a more user friendly date ti

Re: performSelector: withObject: afterDelay help for noob please

2008-07-02 Thread Mike Abdullah
On 2 Jul 2008, at 15:09, Papa-Raboon wrote: Hi There, I have been scratching my head and trying everything to get this to work and as a noob I find the docs a bit sparse of real world examples. I am trying to get performSelector: withObject: afterDelay to work but not sure what to stick where

Re: Binding an NSTextField

2008-07-04 Thread Mike Abdullah
On 4 Jul 2008, at 06:15, Alex Wait wrote: I have two methods setTheString and theString. They return the value of another NSTextField on my window. In IB I binded the value of the textField to App Controller and the Model Key Path to "theString". theString() is only called when the app fir

Re: NSURLConnection how to handle 502 error

2008-07-07 Thread Mike Abdullah
I don't know the full solution, but for a start, is there a particular reason you are using a synchronous request? Use the asynchronous API and the main thread won't be locked. On 7 Jul 2008, at 16:27, Kanny wrote: I am still trying to find a solution to quickly resolve the web server 502

Re: controlling system muting ?

2008-07-08 Thread Mike Abdullah
Search the archives, someone fairy recently open sourced a nice NSSound category that allows volume control, just to make your life easier. Mike. On 8 Jul 2008, at 04:25, Jason Bobier wrote: Hey folks, Has anyone figured out how to control a machine's volume level (specifically muting)

Re: How to create to-many accessor methods at runtime

2008-07-08 Thread Mike Abdullah
On 8 Jul 2008, at 07:10, Steve Weller wrote: Just to follow up on my own question... What I am attempting to do is not working. -valueForKey: does not look for methods with -respondsToSelector: to figure out if methods exist sufficient to have KVC. So overriding this has no effect. My

Re: How to create to-many accessor methods at runtime

2008-07-08 Thread Mike Abdullah
On 8 Jul 2008, at 15:45, Steve Weller wrote: On Jul 8, 2008, at 2:28 AM, Mike Abdullah wrote: On 8 Jul 2008, at 07:10, Steve Weller wrote: What I am attempting to do is not working. -valueForKey: does not look for methods with -respondsToSelector: to figure out if methods exist

Re: controlling system muting ?

2008-07-09 Thread Mike Abdullah
On 9 Jul 2008, at 04:21, Jason Bobier wrote: I also need to determine the user's current mute and volume settings and restore them after my alert plays, which is the other reason that I was looking for something other than AppleScript. Well it's still possible to do that with AppleScript,

Re: top most window question when it is launched by another app

2008-07-09 Thread Mike Abdullah
On 9 Jul 2008, at 15:10, xiaobin wrote: Hello, I have these question for several days. 1. How to make the modal window become the top most when the modal window is launched from another application by using NSTask? 2. And I also want to know the types of window in cocoa application. Is there

Re: Deploying application with Growl support

2008-07-09 Thread Mike Abdullah
Adium does exactly this and is open source. I imagine a perusal of their code would be quite handy. Mike. On 9 Jul 2008, at 17:27, Matthew Gertner wrote: Hi, Perhaps this isn't the right place to ask this, but I have a Cocoa application that uses Growl for notifications. I'm looking for inf

Re: How do I copy a view?

2008-07-11 Thread Mike Abdullah
Well assuming this so-called "UIButton" is a view class of your own creation, why are you using NSArchiver but then NSKeyedUnarchiver (keyed is recommended for all modern apps). The more common Cocoa approach is not to "copy" the view, but instead have it in its own dedicated nib where you

Re: NSImage Crash

2008-07-11 Thread Mike Abdullah
Core Foundation is crashing trying to read in a bundle's info.plist. I've seen this happen with our own app a few times but am yet to track it down. Presumably, some bundle somewhere has a corrupted info.plist file. Even so, if you can find the culprit, it should not be crashing Core Founda

Re: Search NSString for a word and get a boolean value

2008-07-11 Thread Mike Abdullah
You want the -rangeOfString: family of methods. On 11 Jul 2008, at 22:12, Moritz Siller wrote: Hello! I am an absolute newbie to Cocoa and I am trying to teach myself a little bit. I already have had a whole bunch of problems with my little applications I write, but have been able to solve

Re: UITextView for the iphone that will auto-detect URLs

2008-07-16 Thread Mike Abdullah
Well I know nothing of this phone of which you speak, but with a WebView object, I would use one of its many delegate methods to intercept the NSURLRequest from the user clicking a link and instead redirect it to open in the user's browser. Mike. On 16 Jul 2008, at 18:43, Andrew Arrow wrot

Re: Controlling Preferences on iPhone

2008-07-18 Thread Mike Abdullah
As a very simple search of the archives would have told you, the SDK is still under NDA. Please don't discuss it here. On 18 Jul 2008, at 15:07, Aaron L'Heureux wrote: I have done some preliminary searching, but as I am still relatively new to the platform, I've not come up with an answer to

Re: WebKit, programmatic form input, form submits

2008-07-20 Thread Mike Abdullah
You'll need to use the DOM API. Either from the ObjC API, or another language such as javascript. On 20 Jul 2008, at 17:39, Diop Mercer wrote: Hi, I've been playing with WebKit, and I've written a Cocoa app that brings up a site in a WebView. That was easy, but now I'd like to go to a site wi

Re: Text Editor

2008-07-28 Thread Mike Abdullah
3 options: * NSAttributedString * Create a parser using NSScanner that strips out all non-text. * WebKit, in particular the DOM API. On 28 Jul 2008, at 12:10, mahaboob pa wrote: Hi, I'm new to cocoa. I'm developing an application that converts the text into HTML and vice versa. I can convert

Re: How to get music list?

2008-08-04 Thread Mike Abdullah
You can also check out our iMedia Browser at http://code.google.com/p/imedia/ On 4 Aug 2008, at 01:41, Eric Lee wrote: I have a problem getting the iTunes list, and then making the tableview display the iTunes list. The problem, is actually getting started. Which class should I use?

Re: autorelease CGImageRef?

2008-08-06 Thread Mike Abdullah
Since CGImage is derived from CFType you can just do: [(id)aCGImageRef autorelease] The reason being that CFType knows how to handle a -release message, and autorelease is just a way of deferring that message. On 6 Aug 2008, at 09:29, Peter N Lewis wrote: Given a CGImageRef, how can I auto

<    3   4   5   6   7   8   9   10   11   >