Re: Strange Analyser Warning/Error

2016-02-08 Thread Michael Babin
> On Feb 8, 2016, at 7:15 AM, Dave wrote: > > Look at this code: > > myUserInfo = [self.pUserIDDict objectForKey: theUserInfo.pUserID]; > if (myUserInfo != nil) > { > LTWAssertAlways(@"myUserInfo - Dupe ID!!"); > } > > if (theUserInfo.pUserID != nil)

Re: Stopping the initial storyboard viewcontroller being created

2015-11-26 Thread Michael Babin
> On Nov 26, 2015, at 7:27 AM, Roland King wrote: > > I would like to create the main viewcontroller in my > applicationDidFinishLaunching:withOptions: method (iOS) instead of having the > storyboard one created automatically. > > I’m doing this in order to change behaviour between simulator

Re: How to remove Keyboard when UITableView gets scrolled

2015-04-18 Thread Michael Babin
> On Apr 18, 2015, at 5:32 AM, Gerriet M. Denkmann wrote: > > Anyway: how can I detect that the table did start scrolling? > Using a timer to periodically check the index of the top row seems not very > efficient. > > There should be a better way. https://developer.apple.com/library/ios/docume

Re: windowDidLoad not getting called

2015-03-19 Thread Michael Babin
> On Mar 19, 2015, at 1:24 PM, Dave wrote: > > The Window Controller is instantiated with this code: > > myWindowController = [[LTWWindowControllerX alloc] initWithWindowKind:@""]; > [myWindowController loadWindow]; > > > windowDidLoad doesn’t get called and the “window” property of > LTWWin

Re: AVCaptureInputPortFormatDescriptionDidChangeNotification confusion

2014-11-29 Thread Michael Babin
On Nov 29, 2014, at 2:31 AM, Ben wrote: > I'm trying to get the video dimensions by using > AVCaptureInputPortFormatDescriptionDidChangeNotification however the width & > height returns a number way higher than I am expecting. > Expecting 320/480 or similar but getting width = 1088784512, heigh

Re: NSButton radio buttons, automatic grouping

2014-08-29 Thread Michael Babin
On Aug 29, 2014, at 9:35 AM, Aandi Inston wrote: > I'm running the same code in 32-bit and 64-bit, and seeing a difference I > cannot currently account for. The code is an implementation of a widget > library, specifically the bit dealing with radio buttons. > > The radio buttons are created as

Re: Implemented -keyDown: in Yosemite NSViewController, but no class gets it

2014-08-27 Thread Michael Babin
On Aug 26, 2014, at 9:10 PM, Jerry Krinock wrote: > I was so excited after watching WWDC Session 212 "Storyboards and Controllers > on OS X” that I rewrote a little app I was working on to require Yosemite. > All of the new view controller and tab view controller magic works as > advertised,

Re: WebView shorting me on print jobs.

2014-08-27 Thread Michael Babin
On Aug 26, 2014, at 7:59 PM, Daryle Walker wrote: > When I put an NSOperation subclass instance into the main queue, is the task > run on the main thread? Or just the scheduler? If the latter, that may have > been my problem, running AppKit stuff on a non-main thread. https://developer.apple.c

Re: Single-item action sheet wrong size

2014-06-24 Thread Michael Babin
On Jun 23, 2014, at 7:50 PM, Rick Mann wrote: > I'm trying to implement something like the photos app delete button. I > present the action sheet to confirm deletion, but the sheet is too large for > the single button; there's a larger gap below the button than above it. Any > idea what's goin

Re: NS_DESIGNATED_INITIALIZER expected : (colon)

2014-06-09 Thread Michael Babin
On Jun 9, 2014, at 7:03 AM, Devarshi Kulshreshtha wrote: > I am trying to declare a designated initializer like this: > > - (instancetype)initWithDelegate:(id )delegate > NS_DESIGNATED_INITIALIZER; > > But it is showing me this compilation error: > > Expected ':' > > Interestingly when I try

Re: NSWindow remember whether showing on re-launch

2014-02-08 Thread Michael Babin
On Feb 8, 2014, at 9:45 AM, Michael Babin wrote: > On Feb 7, 2014, at 11:43 PM, Roland King wrote: > >> I have a window in my OSX application which shows a log of commands. It's >> not 'Visible At Launch' because you often don't need to see it. It

Re: NSWindow remember whether showing on re-launch

2014-02-08 Thread Michael Babin
On Feb 7, 2014, at 11:43 PM, Roland King wrote: > I have a window in my OSX application which shows a log of commands. It's not > 'Visible At Launch' because you often don't need to see it. It's also > excluded from the windows menu, instead it has its own permanent menu item on > that menu wh

Re: PDFView not rendering pages on scroll

2013-11-15 Thread Michael Babin
On Nov 14, 2013, at 7:09 AM, Martin Hewitson wrote: > Continuing the discussion with only myself, so far…. > > I had the idea to make a trivial test app which just has a PDFView and a > “Load” button. > > So I created the app on 10.9 with Xcode 5.0.2. It’s just a vanilla NSDocument > app wit

Re: Setting key equivalent for menus depending on window

2013-10-19 Thread Michael Babin
On Oct 19, 2013, at 1:32 PM, Martin Hewitson wrote: > I guess I didn’t understand correctly since my app delegate does not get > asked to validate the Close menu item. So far the only thing that get’s asked > to validate this is the tabbed window object. Even the window’s delegate is > not ask

Re: Crash in datasource method when closing document

2013-10-15 Thread Michael Babin
On Oct 10, 2013, at 12:06 AM, Shane Stanley wrote: > The problem I'm having is that if I open a file, then add an item, say a > folder, then click the close button and choose Revert Changes, I (nearly > always) get an exception thrown on the outline view's datasource method > -outlineView:obje

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

2013-10-14 Thread Michael Babin
On Oct 14, 2013, at 4:18 PM, 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 .select

Re: Crash in datasource method when closing document

2013-10-10 Thread Michael Babin
On Oct 10, 2013, at 6:45 AM, Shane Stanley wrote: > > On 10 Oct 2013, at 9:39 PM, Michael Babin wrote: > >> Given the use of the data source protocol to provide the data to the outline >> view and the "Revert Changes" option, my first suspect would be the d

Re: Crash in datasource method when closing document

2013-10-10 Thread Michael Babin
On Oct 10, 2013, at 12:06 AM, Shane Stanley wrote: > I have a document-based app, and it saves as a package. The document's window > contains an outline view, where the user can drag items from the Finder or > create new folders, and these will be saved to the package. I'm creating file > wrap

Re: CTLineGetTypographicBounds crash

2013-05-22 Thread Michael Babin
On May 22, 2013, at 8:05 AM, Koen van der Drift wrote: > I'm looking to add some highlighting to my Core Text View, and implemented > the following which comes straight from Apple's SimpleTextInput code example > (https://developer.apple.com/library/iOs/#samplecode/SimpleTextInput/Introduction

Re: NSTableView and performClickOnCellAtColumn - cannot make it work

2013-02-03 Thread Michael Babin
On Jan 26, 2013, at 4:08 AM, Ivan Ostres wrote: > I am trying to use performClickOnCellAtColumn on NSTableView to put cell in > editing mode (like when you create a new folder in Finder). If I click on the > cell I can change it content but using performClickOnCellAtColumn nothing > happens. T

Re: MIDIClientCreate fail

2013-02-03 Thread Michael Babin
On Feb 2, 2013, at 11:20 PM, Ben wrote: > (Sorry for the repost, I forgot to change the title) > > Hi, I'm mighty confused by the following code. When I run this in one project > it works fine, when I run it in another one it crashes. > Both projects appear identical in terms of frameworks Core

Re: DisplayReconfigurationCallBack with nil cgDisplayID

2012-08-23 Thread Michael Babin
On Aug 23, 2012, at 8:55 AM, Trygve Inda wrote: > Very occasionally when my MyDisplayReconfigurationCallBack is called: > > void DisplayReconfigurationCallBack (CGDirectDisplayID cgDisplayID, > CGDisplayChangeSummaryFlags flags, void *userInfo) > > The system sends me a nil value for cgDisplayI

Re: Catching app-wide (system-wide) modifier keypress

2012-08-21 Thread Michael Babin
On Aug 21, 2012, at 6:33 AM, Jean Suisse wrote: > In short : > Is there a way to be notified of any change in the status of control keys > (option, control, command, etc.) in a given NSWindowController, when another > window of the app has the focus ? > > Long version (what I am trying to achi

Re: Sorting NSArray -- advice on how to accomplish a "simple" alpha ordering?

2012-08-01 Thread Michael Babin
On Aug 1, 2012, at 8:00 AM, Erik Stainsby wrote: > So I have a dictionary like so: > > NSDictionary * countries = [NSDictionary dictionaryWithObjects:[NSArray > arrayWithObjects:@"Australia",@"Canada",@"United Kingdom",@"United > States",nil] forKeys:[NSArray arrayWithObjects:@"au",@"c

Re: NSUndoManager setActionName: oddity

2012-07-02 Thread Michael Babin
On Jul 2, 2012, at 4:35 AM, Conrad Shultz wrote: > -My model contains an NSMutableArray > -An NSArrayController has its content bound to said NSMutableArray and is > configured to prepare content (which takes the form of another custom model > object) > -Said NSMutableArray is mutated only throu

Re: Color Panel oddity

2012-06-09 Thread Michael Babin
On Jun 8, 2012, at 7:55 PM, Graham Cox wrote: > A user is reporting this strange state of the Color Panel: > > http://ftp.apptree.net/images/colourpanel.png > > > Anyone any idea how this can happen? I've never seen it. I can reproduce that state as a user by: 1. Showing the Colors panel 2. Se

Re: NSRunningApplication isTerminated bug

2012-06-07 Thread Michael Babin
On Jun 7, 2012, at 4:51 AM, Patrick Robertson wrote: > I seem to be having a problem with terminating apps and observing the > 'terminated' property of NSRunningApplications. If you run my sample code > (attached, and below), you will notice that even though Safari has quit > (its icon has disappe

Re: NSProcessInfo setAutomaticTerminationSupportEnabled:

2012-03-15 Thread Michael Babin
On Mar 15, 2012, at 10:58 AM, Alex Zavatone wrote: > If I make the build myself from the TextEdit source code, and add that pList > value to the Info.plist, the built copy of TextEdit still auto quits if I > close the last doc and click in the Finder. If you're building from source, perhaps you

Re: NSProcessInfo setAutomaticTerminationSupportEnabled:

2012-03-15 Thread Michael Babin
On Mar 15, 2012, at 10:40 AM, Fritz Anderson wrote: > On 15 Mar 2012, at 10:01 AM, Alex Zavatone wrote: > >> Then I came across the text below from the read me file in the TextEdit >> source: >> >> • TextEdit opts into Automatic Termination. However, this opt-in is done >> automatically by the

Re: Problem with refreshing NSMenuItems

2012-03-08 Thread Michael Babin
On Mar 7, 2012, at 2:40 AM, Prime Coderama wrote: > I have an NSMenu with the following static NSMenuItems > > 1. NSMenuItem "Count of people" (hidden) > 2. NSMenuItem (hidden) > 3. NSMenuItem > 4. NSMenuItem "Refresh List" > 5. NSMenuItem > 6. NSMenuItem "Quit" > > I then dynamically add n-a

Re: text field question

2012-02-23 Thread Michael Babin
On Feb 23, 2012, at 7:24 AM, Michael Babin wrote: > On Feb 22, 2012, at 6:59 PM, Rick C. wrote: > >> I have a panel with a number of text fields where a user should enter >> numeric values. These text fields are setup with Sent on End Editing so >> that if the user

Re: text field question

2012-02-23 Thread Michael Babin
On Feb 22, 2012, at 6:59 PM, Rick C. wrote: > I have a panel with a number of text fields where a user should enter numeric > values. These text fields are setup with Sent on End Editing so that if the > user presses enter or tabs or changes text fields the value will be entered. > The proble

Re: Odd display of percent character

2012-02-13 Thread Michael Babin
On Feb 13, 2012, at 11:04 AM, Chris Paveglio wrote: > I'm having an issue with the percent character being displayed as random > numbers in an NSAlertPanel (modal). My app has an ivar, "fullString", > including the usual property/synthesize getters and setters, there is nothing > special about

Re: Modal Window for NSTextField

2012-01-02 Thread Michael Babin
On Jan 2, 2012, at 9:22 AM, Dany Golubitsky wrote: > Thank you! > > As for field editor - can it appear and disappear during runtime? Indeed, I > do not familiar with this approach. "The field editor is a single NSTextView object that is shared among all the controls in a single window, includ

Re: Modal Window for NSTextField

2012-01-02 Thread Michael Babin
On Jan 2, 2012, at 6:02 AM, Dany Golubitsky wrote: > I need to implement the following thing: > There is a control displaying numeric value. When you Double-Click on a > control small white window appears where you can enter the value, and when > you press enter the value will be updated. > You

Re: Calling a Cocoa library from C

2011-11-12 Thread Michael Babin
On Nov 11, 2011, at 8:34 PM, Charles Srstka wrote: > On Nov 11, 2011, at 8:22 PM, Wim Lewis wrote: > >> On Nov 11, 2011, at 5:49 PM, Nathan Sims wrote: >>> (OSX 10.6.8, Xcode 3.2.6) >> >> int get_float_data(float *result1, float *result2) >> { >> NSAutoreleasePool *pool = [[NSAutoreleasePool all

Re: QTKit: surely this should be trivial?

2011-11-08 Thread Michael Babin
On Nov 8, 2011, at 7:27 AM, Graham Cox wrote: > I want to run a movie in a window, and get notified when it has finished. > > I'm using QTMovieView, and it plays fine. But I can't see how I can get > called when it finishes. I expected to see some sort of delegate protocol, or > failing that a

Re: Blocks vs. life, the universe and everything

2011-10-18 Thread Michael Babin
On Oct 18, 2011, at 8:42 AM, Jean-Daniel Dupas wrote: > > Le 18 oct. 2011 à 14:00, Michael Babin a écrit : > >> What are the minimum requirements for using @autoreleasepool? The same as >> ARC, even when not used with ARC (Xcode 4.2 for Mac OS X v10.6 and v10.7 >>

Re: Blocks vs. life, the universe and everything

2011-10-18 Thread Michael Babin
On Oct 17, 2011, at 2:49 PM, Greg Parker wrote: > On Oct 15, 2011, at 12:28 PM, Jean-Daniel Dupas wrote: >> Le 15 oct. 2011 à 21:10, Seth Willits a écrit : >>> >>> Unrelated, when did @autoreleasepool pop in? I don't remember if I knew >>> about that or not. It's _used_ once in the Obj-C Program

Re: 'Customize Toolbar...' menu item disabled

2011-10-16 Thread Michael Babin
On Oct 15, 2011, at 3:47 PM, mark wrote: > I have a nib based toolbar in a window. > I have set the customise toolbar flag to YES (in IB and programmatically). > I have set the View menu items 'Customise Toolbar...' and 'Hide/Show Toolbar' > to the first responder as directed in the documentatio

Re: Open panel/window with button click in Print Dialog Extension (PDE)

2011-09-22 Thread Michael Babin
On Sep 20, 2011, at 2:47 AM, Bartosz Białecki wrote: > I have a OutputBinsPDE sample and I added a button and a panel to it. I'd > like now to open that panel when I click on the button. The problem is that > every time the panel appears under the print dialog and I have no focus on > it and I can

Re: why does print block in Lion?

2011-09-17 Thread Michael Babin
On Sep 17, 2011, at 8:02 AM, Gerriet M. Denkmann wrote: > > See comments below: > >> >> In my TestDocument (subclass of NSDocument) I added the following code (see >> comments inside, which explain what's happening when I do File â∫‚ Print...): >> >> >> - (NSPrintOperation *)printOperationWi

Re: NSOutlineView - Items only displays when user scrolls in outline view

2011-09-02 Thread Michael Babin
On Sep 2, 2011, at 7:15 AM, Gilles Celli wrote: > I've setup a Document based application with an NSOutlineView which displays > Parent-Item along with its children…with XCode 4 on OS X Lion. > > When launching the application, the outline view shows the Root title…only if > I refresh the outl

Re: Fastest high-quality thumbnail display

2011-07-31 Thread Michael Babin
On Jul 30, 2011, at 9:10 PM, James Merkel wrote: > I tried ImageKit and it works great. Excellent quality. Thanks for the > suggestion, Scott. > I didn't have to do much more than change an NSImageView to an IKImageView in > InterfaceBuilder and the code. > > However, there doesn't appear to b

Re: QTMovie not playing in new window

2011-07-06 Thread Michael Babin
On Jul 4, 2011, at 4:21 AM, Paolo Franzetti wrote: > - (IBAction) playButtonClicked: (id) sender > { > MoviePlayerController *moviePlayerWindow = [[MoviePlayerController alloc] > initWithWindowNibName:@"MoviePlayer"]; > [moviePlayerWindow showWindow:self]; > > NSError *error; > NSString *mov

Re: Delegate & Notification

2011-05-16 Thread Michael Babin
On May 16, 2011, at 8:31 AM, Bing Li wrote: > You are right. There is no RunLoop in the code. Actually, although I have got > to know the term, RunLoop, when starting to learn Cocoa for two months, until > now I have not seen a sample code about RunLoop in any resources. So I don't > know how t

Re: Delegate & Notification

2011-05-16 Thread Michael Babin
On May 16, 2011, at 3:49 AM, Bing Li wrote: > - (void) Print > { > NSLog(@"I am doing a tough job!"); > // [[[NSNotificationQueue alloc] > initWithNotificationCenter:[NSNotificationCenter defaultCenter]] > enqueueNotification: [NSNotification notificationWithName:@"Done" >

Re: Delegate & Notification

2011-05-15 Thread Michael Babin
On May 15, 2011, at 5:31 PM, Bing Li wrote: > An object, WorkingApp, prints a line and posts a notification as follows. > >import "WorkingApp.h" > >@implementation WorkingApp > >- (void) Print >{ >NSLog(@"I am doing a tough job!"); >[[NSNotificationCenter default

Re: setting table view's cell size?

2011-04-20 Thread Michael Babin
On Apr 20, 2011, at 8:31 PM, Todd Heberlein wrote: >> I am able to draw an image in an NSTableView's cell using the NSImageCell, >> but I want a larger cell. What is the best way to do this? > > OK, I found a solution. I have a delegate for the table that implements > > - (CGFloat)tableVi

Re: Does not allow to Uninstall the application when it is running.

2011-04-19 Thread Michael Babin
On Apr 19, 2011, at 7:09 AM, kirankumar wrote: > I have one application for this i developed uninstall application when i run > uninstall utility it completely uninstalling successfull upto here it is fine. > > But when i open the application also the uninstall utility is running > completely s

Re: inter-process locks

2011-02-19 Thread Michael Babin
On Feb 19, 2011, at 12:29 PM, Alexander Cohen wrote: > Is there anyway to do interprocess locks using cocoa ( like a Mutex in Win32 > )? The best i've found is not cocoa and uses flock but the man pages say its > advisory only which is kindof scary. NSDistributedLock:

Re: NSURLDownload mysteriously pausing

2011-02-18 Thread Michael Babin
On Feb 16, 2011, at 1:00 PM, Sidney San Martín wrote: > Greetings! > I ran into an issue recently where file downloads seemed to take a ridiculous > amount of time to finish, or never finished at all. I could reproduce it, > even in a stripped-down test application. > > The NSURLDownload appear

Re: How to set tab order in a window that has view swapping

2011-01-25 Thread Michael Babin
On Jan 25, 2011, at 1:21 AM, Abhijeet Singh wrote: > Hi,I have a single window with a toolbar and a custom view in my application. > Toolbar has Back and Next button on it. This is my MainMenu.xib. I have 5 > more xibs other than the MainMenu.xib in my application. Each xib contains > one view

Re: How did gcc handle synthesized atomic vs custom nonatomic setter/getter?

2010-10-10 Thread Michael Babin
On Oct 10, 2010, at 7:10 AM, Jerry Krinock wrote: > I switched a project from gcc to LLVM compiler. I got a bunch of warnings > indicating that writable atomic property cannot pair synthesized > setter/getter user defined setter/getter. I understand that the answer is > given in this thread:

Re: managing split view iPad

2010-07-20 Thread Michael Babin
On Jul 20, 2010, at 9:24 AM, Andrea Mattiuz wrote: > with -[UINavigationController setViewControllers:animated:] I can "reset" > the navigation controller on the right side, passing to this method an array > with the only ViewController of the new view I have to represent. > Why I can do it on

Re: managing split view iPad

2010-07-20 Thread Michael Babin
On Jul 20, 2010, at 3:08 AM, Andrea Mattiuz wrote: > thank you mmalc for the tip, > but I don't have a navigation controller in the view xib file that I will > charge, because I have an only navigation controller on the right side, > declarated on the MainView xib file, an I work changing it. >

Re: Core data and NSTextView: get the attributed string?

2010-06-21 Thread Michael Babin
On Jun 20, 2010, at 8:11 AM, Bernard Knaepen wrote: > The trouble I have is to access the attributed string within my code to later > draw in a custom view. I am trying something like this: > > NSManagedObjectContext *context = [self managedObjectContext]; > NSManagedObjectModel *model= [

Re: NSAllocateCollectable memory allocation problem

2010-06-21 Thread Michael Babin
On Jun 21, 2010, at 7:06 AM, julius wrote: > Inside MyControl define three pointers of type CGFloat , e.g CGFloat * mem1, > mem2, mem3; > and declare them as @property GFloat * mem1; etc with corresponding > @synthesize statements. > Declare a MyControl method that allocates memory to mem1 etc

Re: NSTreeController and insertObject:atArrangedObjectIndexPath:

2010-06-19 Thread Michael Babin
On Jun 18, 2010, at 5:53 PM, Tony Romano wrote: > Scenario: Adding a new node to a NSOutlineView backed by a NSTreeController. > > 1. Create a new internal object add add it to the data store(file system). > This will be my representedObject in the treecontroller > 2. Compute the path and call

Re: int* array going astray

2009-11-24 Thread Michael Babin
On Nov 24, 2009, at 6:20 PM, James Maxwell wrote: > I have a couple of int* arrays I'm using as instance variables - they're > declared in my @interface section, and inited using malloc when I init the > object (and free()'d in the dealloc). I can set them, using standard array > notation (i.e.

Re: [iPhone] weird crash (aren't they all?): ivar seems to be dynamically changing its type

2009-11-20 Thread Michael Babin
On Nov 20, 2009, at 5:55 PM, Paul Archibald wrote: > So, why does setParentViewController get called twice, and why is the > parameter type different the second time, and why don't I get an exception > when the wrong type is gets passed into setParentViewController that second > time? Probab

Re: Screensaver won't run on 10.6 even after porting to 64-bit

2009-10-11 Thread Michael Babin
On Oct 11, 2009, at 2:44 PM, Ben Haller wrote: My only question: what's the best way to switch at compile time based on whether GC is enabled for the build? I.e. what do I #if or #ifdef? I could do it based on the arch or the SDK, but if there's a flag specifically for GC I'd rather use

Re: How to prevent the user from clicking 'Test' in Screen Savers (Was: ScreenSaverView gets instantiated several times)

2009-10-05 Thread Michael Babin
On Oct 5, 2009, at 10:45 AM, Gabriel Zachmann wrote: The problem I'm having is the following: is there an elegant way to prevent the user from clicking the 'Test' button in the Screen Savers panel in System Preferences? The reason why I'm asking: when the user changes the configuration in

Re: ScreenSaverView gets instantiated several times

2009-10-05 Thread Michael Babin
On Oct 5, 2009, at 3:39 AM, Gabriel Zachmann wrote: When the user clicks 'Test' in System Preferences, it "just" creates a new instance of your subclass of ScreenSaverView! Do you really find that fact to be "shocking"? Yes, I do. [snip] If only Apple would have said so in big letters a

Re: ScreenSaverView gets instantiated several times

2009-10-04 Thread Michael Babin
On Oct 4, 2009, at 7:14 PM, Gabriel Zachmann wrote: I've been hunting a bug in my screen saver for several hours, until I've found out the following shocking fact (I think). When the user clicks 'Test' in System Preferences, it "just" creates a new instance of your subclass of ScreenSaverVi

Re: Finding user's Music folder (and others)?

2009-09-17 Thread Michael Babin
On Sep 17, 2009, at 10:03 PM, Rick Mann wrote: Hmm. I take it back. I can't get code calling NSSearchPathForDirectoriesInDomains() to compile. NSArray* paths = NSSearchPathForDirectoriesInDomains (NSMusicDirectory, NSUserDomainMask, false); error: 'NSMusicDirectory' was not declared in t

Re: [iPhone] Strange behavior with modal view controllers

2009-06-17 Thread Michael Babin
On Jun 17, 2009, at 5:43 AM, WT wrote: Is there any known reason whatsoever why presentModalViewController would do absolutely nothing? Possibly, depending on the meaning of "known". In any case, let's investigate further using the sample project you put together (referenced in a follow-u

Re: How to make NSURLConnection send delegate messages during runModalForWindow

2008-12-16 Thread Michael Babin
On Dec 16, 2008, at 8:30 AM, an0...@gmail.com wrote: I want to handle the connection events during runModalForWindow, so I use [connection scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode: [[NSRunLoop currentRunLoop] currentMode]]; in the modal window's windowDidBecomeKey delegate method.

Re: Notification Sent When Window Is Ordered Back?

2008-12-14 Thread Michael Babin
On Dec 14, 2008, at 8:50 AM, Chunk 1978 wrote: is this possible? what method do i override when the window is ordered back, or has resigned as key window... i'm attempting to set some actions into play when a window is ordered back or no longer key: -=-=-=- - (void)orderBack {

Re: Programatically creating windows

2008-12-13 Thread Michael Babin
On Dec 13, 2008, at 10:40 PM, Development wrote: I am creating a window more or less from scratch in my main controller. The following is the code and all referred to objects are defined in the xib file save mainWindow which i am obviously creating. mainWindow = [[NSWindow alloc]initWithCo

Re: NSTableView confusion

2008-10-05 Thread Michael Babin
On Oct 4, 2008, at 2:32 PM, James Maxwell wrote: But I've got an even more mysterious problem now... My preferences window (the window I was working on) will only open once!... I'm totally baffled. I can open it once per run of the app, but if I close it, then it's gone for good. Totally fr

Re: Conceptual MVC Help

2008-05-20 Thread Michael Babin
On May 20, 2008, at 9:41 AM, Johnny Lundy wrote: QUESTION: How would you implement the binding to the model objects "popUpArray" and "selectedGame" so that the popup loads from "popUpArray" and its selection is kept in sync with the property "selectedGame?" Specifically, is there a way to

Re: bindings tutorial doesn't work

2008-05-20 Thread Michael Babin
On May 19, 2008, at 11:41 PM, Daniel Child wrote: After reading a host of theoretical explanations on bindings, I tried the bindings-based currency converter tutorial to try to get some basic feel for bindings in practice. The example is written for an earlier version of OSX, but I think I

Re: validateMenuItem() not always being called

2008-05-19 Thread Michael Babin
On May 19, 2008, at 7:08 PM, [EMAIL PROTECTED] wrote: Any object's validateMenuItem method is only called for menu items that would message that object if they were invoked. That means: * Menu items whose target directly points to that object * Menu items whose target is "first responder", a

Re: Delegates

2008-05-19 Thread Michael Babin
On May 19, 2008, at 11:22 AM, john darnell wrote: I've been trying to get my head wrapped around the concept of "delegates" and I thought I would run it by the list to see if I am approaching the correct idea behind a delegate. As far as I can tell, it is kind of like a virtual function (vi

Re: PlotIconRefInContext doesn't work

2008-05-17 Thread Michael Babin
On May 17, 2008, at 10:06 AM, Michael Vannorsdel wrote: I'm thinking the window might be redrawing itself right after your own drawing and erasing it. You could try disabling the window's auto displaying and flush the window buffer after your draw to determine if this is the case. I don

Re: Setting NSObjectController's to file's owner

2008-05-15 Thread Michael Babin
On May 15, 2008, at 9:53 AM, André Pang wrote: Hmm, I just created a small test application to try to reproduce this problem and couldn't get the retain cycle to happen. It's a dead-simple document-based Cocoa application with a single NSObjectController in the nib file, with a single tex

Re: CILinearGradient on Leopard

2008-03-21 Thread Michael Babin
On Mar 20, 2008, at 10:52 AM, Chris Meyer wrote: I read the tech note for 10.5 describing changes to CILinearGradient and how "for applications compiled on Mac OS X v10.4, these filters continue to behave on Mac OS X v10.5 as they did previously." Trying to interpret this imprecise statemen