Re: iPhone Simulator auto-rotation touches detection bug?

2009-12-19 Thread Randall Meadows
On Dec 19, 2009, at 12:53 PM, Matt Neuburg wrote: The iPhone app I'm currently writing is autorotated at startup (see my previous posts on this topic). I've noticed that there's an area about 24 pixels wide at the left end of the iPhone Simulator screen where I don't receive any touches. But

Re: Call Cocoa from C++

2009-12-17 Thread Randall Meadows
On Dec 17, 2009, at 12:16 PM, David Blanton wrote: The question: How / Can I store a pointer to an obj-c object in a C++ class and then send messages to the obj-c object from C++? Somethng like: class MyClass { public: void* objcptr; // ptr to my obj-c object void

Re: Diacritics in Thai

2009-12-17 Thread Randall Meadows
On Dec 17, 2009, at 5:30 PM, David M. Cotter wrote: When I use rangeOfString: options with NSDiacriticInsensitiveSearch not only the tone marks are ignored, but also some vowels. Same problem with NSPredicate someKey =[d] someValue. It is true that in unicode-speak both the tone

Detect links in UITextView fails on email addresses?

2009-12-13 Thread Randall Meadows
I have 2 UITextViews in a view; one contains a web address, the other an email address. The former, when touched, launches Mobile Safari and loads the web page. The latter, the email address, when touched, does nothing, even though the view has colored it blue and underlined it. If I

A list for off-topic messages (was Re: File system file renaming question...)

2009-12-08 Thread Randall Meadows
On Dec 8, 2009, at 9:26 AM, Phil Hystad wrote: This question is not specifically about Cocoa programming but I hope that some Mac OS X experts out there can give me an answer. Well, you're probably going to get spanked for doing that. A very good list for these type of Mac-related, but

Re: breakout game - openGL or quartz?

2009-12-07 Thread Randall Meadows
On Dec 6, 2009, at 11:48 PM, Patrick J. Collins wrote: I wrote a breakout style game for actionscript3: http://collinatorstudios.com/dev/super_collins_breakout and it's been on my mind to make a version for the iPhone.. But before I do that, I thought it would be good to just make a

Image gets wrong resolution value on Snow Leopard

2009-12-07 Thread Randall Meadows
In this application, I have a method that reads in an image and writes it back out with a different resolution. This resolution is specified by the user via a textfield in a sheet. On Leopard, the method works as expected; whatever value for the resolution is specified is what is actually

Re: Viewing a UIImageJPEGRepresentation image on the desktop

2009-10-23 Thread Randall Meadows
On Oct 22, 2009, at 3:38 PM, The Grand Poohbah wrote: I need to examine an image that was stored in a property list as a NSData UIImageJPEGRepresentation. The property list is a plist file that is sent to me from an iPhone as an email attachment. The image is a Data class item in the

Re: drawing in uiview

2009-10-12 Thread Randall Meadows
On Oct 10, 2009, at 11:41 AM, Jos Timanta Tarigan wrote: i got a very basic question on iphone development. so i add an uiview via IB and try to update it by making my own interface called updateInterface(). in the update interface i put this code: Why would you do that instead of using

Re: Updating application info plist

2009-10-09 Thread Randall Meadows
On Oct 9, 2009, at 3:55 AM, Zephyroth Akash wrote: I get the Info.plist of the app like this. NSMutableDictionary *infoPlist = [[NSBundle mainbundle] infoDictionary]; After the update of some resources I want to write the new version of these resources in the Info.plist. No problem.

Animate a UIImageView's animatingImages?

2009-10-08 Thread Randall Meadows
Is it possible to apply an animation effect to a UIImageView's animationImages? That is, instead of the images switching in a hard fashion, maybe a dissolve transition between them? -- randy ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Re: Suggestions for debugging “EXC_BAD _ACCESS” [SOLVED]

2009-09-25 Thread Randall Meadows
On Sep 25, 2009, at 5:46 PM, Bob Barnes wrote: Kyle/Nick/Greg, Thank you guys. Took a little digging but the combination of NSZombie instruments object allocation did the job. After years working with Java I find myself tripping over memory management issues much too often. I had

Re: Any way to tell why a window is closing?

2009-09-21 Thread Randall Meadows
On Sep 21, 2009, at 9:15 AM, Scott Ribe wrote: Within -windowWillClose, I need to know whether or not the user clicked the close button on the window. I think you can get the instance of the button, can't you? Then set a custom action on it.

Re: Capturing content programatically

2009-09-21 Thread Randall Meadows
On Sep 19, 2009, at 9:09 AM, Achint Sandhu wrote: Hi, Is there a way to programatically capture content from different applications in osx. As an example, I'd like to be able to get a webarchive of the current web page being displayed in safari. I know this can be done with

Re: [myNSWindow setDocumentEdited:dirtyB] fail ??

2009-09-17 Thread Randall Meadows
On Sep 17, 2009, at 4:39 PM, David M. Cotter wrote: i really am stuck on this, i've googled and searched the apple site but can find nothing on this. if anyone has any clue i would be most siked. bouns: free karaoke app for someone who solves this! -dave On Sep 16, 2009, at 10:54 AM,

Re: NSToolTipOwner Protocol and Xcode 3.2 build failure in Debug Build Configuration

2009-09-16 Thread Randall Meadows
On Sep 16, 2009, at 1:33 AM, Claudio Wilmanns wrote: In my application, I create ToolTipRectangles. I need to display a custom tooltip (as the object does not have an own -description: method), so I override the following method of the NSToolTipOwner Protocol declared in NSView.h: -

Re: coding NSNumber in NSArray?

2009-09-14 Thread Randall Meadows
On Sep 14, 2009, at 10:11 AM, jon wrote: I thought i had read that NSNumber knew how to code itself in an NSArray... is this not the case? or is this code below just set up all wrong? and what would the proper way be to set this up? bookMarkNode's coders are below, this object has the

Shark newbie needs help with perf-opt

2009-09-13 Thread Randall Meadows
I'm trying to optimize an iPhone app. I have dozens of objects (as many as 60 at a time) moving around the screen at once. Under certain conditions, these objects will collide, and during these collisions, the rest of the objects (the ones not involved in the collisions) slow down

Re: Scripting Bridge link error

2009-09-10 Thread Randall Meadows
On Sep 9, 2009, at 8:12 PM, Jason Foreman wrote: You don't actually instantiate ScriptingBridge objects directly like that. The interface header is generated so you can get type checking when you call methods, but the actual class is acquired dynamically at runtime. See the documentation

Re: Scripting Bridge link error

2009-09-10 Thread Randall Meadows
On Sep 9, 2009, at 8:12 PM, Jason Foreman wrote: You don't actually instantiate ScriptingBridge objects directly like that. The interface header is generated so you can get type checking when you call methods, but the actual class is acquired dynamically at runtime. See the documentation

Scripting Bridge link error

2009-09-09 Thread Randall Meadows
I am trying to use Scripting Bridge to do some minor control of Adobe Photoshop CS3 from my Cocoa app. I have followed the instructions in the Scripting Bridge Programming Guide for Cocoa, specifically: 1. Generate header files for all scriptable applications that your code is sending

Re: NSURLDownload delegate methods seperate thread

2009-09-08 Thread Randall Meadows
On Sep 8, 2009, at 1:03 PM, Colin Deasy wrote: Hey, Is anyone aware of a way to receive NSURLDownload's delegate methods on a separate thread, i.e. not the main one? Delegate messages will be sent on the thread which calls this method. So, start your NSURLDownload on whichever thread you

Re: NSBundle from an URL.

2009-09-03 Thread Randall Meadows
On Sep 3, 2009, at 4:36 PM, Erik Österlund wrote: 2009-09-04 00:33:52.657 TestClient[90551:a0f] An uncaught exception was raised 2009-09-04 00:33:52.659 TestClient[90551:a0f] *** -[NSBundle initWithURL:]: non-file URL argument 2009-09-04 00:33:52.663 TestClient[90551:a0f] *** Terminating app

Re: Beep

2009-08-26 Thread Randall Meadows
On Aug 26, 2009, at 10:47 AM, Sumanth Peddamatham wrote: NSBeep(). I've been searching though the iPhone audio API ^^ Impedance mismatch. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not

Re: need help about the touch event

2009-08-25 Thread Randall Meadows
On Aug 24, 2009, at 4:42 PM, Gill Bates wrote: Hi All, currently we have three kinds of touch event: - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { NSLog(@touchesBegan); } - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { NSLog(@touchesMoved); } -

Re: Trouble with NSColor

2009-08-13 Thread Randall Meadows
is. WindowServer? AppKit? On Thu, Aug 13, 2009 at 6:29 PM, Randall Meadows cocoa-...@not- pc.com wrote: On Aug 13, 2009, at 10:24 AM, Daniel Furrer wrote: I'm trying to get the RGB components of a system color. Here's what I've been trying: NSColor* foo = [[NSColor controlColor

Re: NSWindow reference remains null after window did load

2009-07-27 Thread Randall Meadows
On Jul 27, 2009, at 8:39 PM, Daniel Child wrote: I have a master controller loading a window controller subclass, but for some reason, I cannot get a pointer to the window loaded in the XIB file. I've looked at every connection, and I've also tested the order by of method calls. In the

Re: Core Animation rendering problem

2009-07-23 Thread Randall Meadows
On Jul 23, 2009, at 1:15 AM, David Duncan wrote: On Jul 22, 2009, at 10:05 PM, Randall Meadows wrote: Any idea why the drawing is screwing up for the 2nd animation? Are the 2 different methods of animating messing up each other somehow (even though I've removed the 1st animation

Core Animation rendering problem

2009-07-22 Thread Randall Meadows
Probably not the best subject line, but best I could come up with... I an animating a ball across the screen, using this code: CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@position]; animation.duration = duration; animation.delegate = self; animation.timingFunction =

SecRandom.h on iPhone OS 2.2.1?

2009-07-21 Thread Randall Meadows
I started working on a new project, and started out using the 3.0 SDK; I'm now far enough along to realize that I don't really need to eliminate older versions, so I switched the Base SDK to 2.2.1. I do, however, use the Security framework, specifically SecRandomCopyBytes() to generate

UIButton image disables shows touch on highlight?

2009-07-20 Thread Randall Meadows
Is it expected, normal, documented(?) that putting an image onto a UIButton turns OFF (in practice) the shows touch on highlight property? For the life of me I cannot get this to work, neither in the simulator nor on the device. Ideas/suggestions? randy

Re: Set icon for files created

2009-06-05 Thread Randall Meadows
On Jun 5, 2009, at 5:48 AM, Jerry Krinock wrote: On 2009 Jun 05, at 03:28, Nikhil Khandelwal wrote: How I can set the icon for files created from my application? The short answer is CFBundleTypeIconFile. This, and other important information you'll need to know, is stored in the

Re: Inverting a black and white NSImage

2009-05-13 Thread Randall Meadows
On May 13, 2009, at 4:59 PM, Eric Gorr wrote: I have a black and white NSImage with some pixels in the image totally transparent. I need to change the white pixels to black, the black pixels to white, and leave the transparent area in the image alone. The only solution that comes

Re: Dashboard-style window flip.

2009-05-07 Thread Randall Meadows
On May 7, 2009, at 5:55 AM, Тимофей Даньшин wrote: Hello. This might be a noob question, but I'd like my application to have it's two or three settings to be located on the back of it's window, like widgets in DashBoard do. I've been googling for it, but all i could find was a desperately

Re: How remove a clip path?

2009-05-05 Thread Randall Meadows
On May 5, 2009, at 12:47 PM, McLaughlin, Michael P. wrote: In a custom NSBezierView, I fill the view with a background color then set a clip path that will eventually be drawn as a map. I do this so that I can color-code the map (in a complicated way) without going outside the lines. If

Re: High Scores local to iPhone app

2009-05-05 Thread Randall Meadows
On May 5, 2009, at 12:50 PM, Eric E. Dolecki wrote: Probably only 10... however I understand that a plist can't store complex data... how would this work for pairs? Normally I'd only be able to store just a list of scores, not paired with names, correct? Wrong. A plist can contain an

Custom log file for NSLog

2009-05-04 Thread Randall Meadows
I want to have a custom log file for my app, so that my client can send it to me when things go different. In reading the docs for NSLog, it seems that it is just a front-end for asl. So here's what I thought should work: directories =

Re: create object from class name held in String?

2009-04-30 Thread Randall Meadows
On Apr 30, 2009, at 1:50 PM, Darren Minifie wrote: Hi everyone. I have the situation where I need to dynamically create an object based on the value held in a string at runtime. I'm pretty sure the dynamic nature of objective-c would allow this, but I cant seem to find the right method

Re: 10.4.x install for testing...

2009-04-27 Thread Randall Meadows
On Apr 27, 2009, at 12:17 PM, iseecolors wrote: Does anyone know if Apple provides a download of the full 10.4.x install DVD for developers? I need to test 10.4 on an intel machine, but my install of 10.4 only works on PPC. You should see a disk image in your ADC account, under Downloads,

Re: Dividing NSView to subviews

2009-04-23 Thread Randall Meadows
On Apr 23, 2009, at 12:11 AM, Naresh Kongara wrote: Hi All, I have a NSView which i want to divide into to required sub views. I implemented it using NSView's dataWithPDFInsideRect: (NSRect )aRect, i.e constructed a image view with the data i got . This process is taking long time if

Re: How do I find this compile error?

2009-04-23 Thread Randall Meadows
On Apr 23, 2009, at 12:09 PM, James Cicenia wrote: Undefined symbols: _kCATransactionDisableActions, referenced from: _kCATransactionDisableActions$non_lazy_ptr in AudioViewController.o _OBJC_CLASS_$_CALayer, referenced from: __objc_classrefs__d...@0 in AudioViewController.o

Re: Importing Word doc in Carbon app via Cocoa

2009-04-16 Thread Randall Meadows
On Apr 16, 2009, at 11:43 AM, Jeremy W. Sherman wrote: Foundation memory management for CoreFoundation programmers, in brief: * the Create rule becomes the you own all references returned by a method beginning with new, copy, or alloc * the Get rule becomes you do not own any references

Re: HUD-Style buttons

2009-04-09 Thread Randall Meadows
On Apr 9, 2009, at 8:57 AM, Walker Argendeli wrote: I also found this one: http://code.google.com/p/bghudappkit/ Doe anyone have experience with either one or have a preference? I've used BGHUDAppKit; I'm really satisfied with it, with the exception that it does not understand that

Re: static method to create CABasicAnimation: does this create a memory leak?

2009-04-09 Thread Randall Meadows
On Apr 9, 2009, at 6:00 PM, Miles wrote: I have created a static method creating and returning an animation that I use in various places in my application. I think this may be causing a leak. If I autorelease theAnimation in the return statement I get a crash because I the animation must

Re: Check box to indicate more than 2 states

2009-04-07 Thread Randall Meadows
On Apr 7, 2009, at 11:43 AM, Arun wrote: Hi All, I am using check box control in my application to show Enable/Disable status. Is it possible to use the same control to show more that 2 states. Like Enable/Disable/Modified. Any idea? This would be the mixed state of NSButton.

Re: Dragging around an NSImageView

2009-04-03 Thread Randall Meadows
On Apr 3, 2009, at 4:14 AM, Aaron Scott wrote: I'm trying to figure out how to be able to drag an NSImageView around. The NSImageView has been added as a subview to another NSImageView. Basically, I'm trying to drag a grey box around over the top of a picture. I can programmatically move

Re: Is there an iPhone mailing list?

2009-03-20 Thread Randall Meadows
On Mar 20, 2009, at 4:39 PM, Steve Wetzel wrote: Hey, I have a UITouch question and I am wondering if there is a mail list specifically for the iPhone. Is there? Well, there is the official developer forum, if you're a registered iPhone developer at https://devforums.apple.com/. If

Re: Notifications and timing

2009-03-12 Thread Randall Meadows
On Mar 12, 2009, at 11:46 AM, McLaughlin, Michael P. wrote: I have a global gFlags variable (unsigned long long) and several objects that need a pointer to it. I fill one such pointer, and reinit gFlags, via the following code: if (flags == nil) { flagPtr *flgH = flags; NSData

Re: NSSlider changed notification

2009-03-10 Thread Randall Meadows
On Mar 10, 2009, at 12:03 PM, David Alter wrote: Hi All, I'm sure this is something basic that I'm just missing. For some reason I can not find how to get a notification when my slider changes value. I want to be able to subscribe to receive a notification if the slider value changes. Is

Re: Why does releasing this array cause a crash?

2009-03-10 Thread Randall Meadows
On Mar 10, 2009, at 4:35 PM, James Cicenia wrote: NSMutableArray *arraySubType = [[NSMutableArray alloc]init]; OK, this array, you *should* release, yes. Then in a loop from the database I have: while (sqlite3_step(statement) == SQLITE_ROW) { if(![aDict objectForKey: [NSString

Re: Save As panel file types popup menu

2009-02-26 Thread Randall Meadows
On Feb 26, 2009, at 1:48 PM, jeff...@aol.com wrote: Hi, Is there a way to restrict what file types show up in the Save As panel popup menu? It's showing all the file types from the Info.plist file, and I want to show just some of them. NSSavePanel -setAllowedFileTypes:?

Re: Using a flip transition to a different view

2009-02-23 Thread Randall Meadows
On Feb 22, 2009, at 9:49 AM, David Hatch wrote: Hi, I'm writing an app that has a view that displays subviews to show information to the user. I would like the user to click a button and have the clicked sub view transition to a different view where the user can edit the information. I

NSTextView Undo behavior

2009-02-23 Thread Randall Meadows
In my app's window there is an NSTextView, a place in which to enter notes associated with a selected object. Currently, when the user is finished editing those notes and switches to a different view (like clicking in another text area), I capture that edit session and store the new notes

More on Undo and Redo

2009-02-19 Thread Randall Meadows
I think I must be missing something fundamental, or have a misunderstanding to begin with. Or maybe I'm just doing something wrong to begin with... I'm working on an app, implementing Undo features. Undo basics are simple: you supply the Undo manager an object, a method, and some

Re: More on Undo and Redo

2009-02-19 Thread Randall Meadows
On Feb 19, 2009, at 9:28 PM, Graham Cox wrote: Undo isn't *required* to be symmetrical. It just happens to be when setting a single property like your -setColor: example. ... Seems to me this is the sort of design you want. Yes, yes it is... On Feb 19, 2009, at 8:29 PM, Michael Ash wrote:

Re: NSCollectionView inside an NSSplitView?

2009-02-13 Thread Randall Meadows
On Feb 13, 2009, at 11:09 AM, Jean-Nicolas Jolivet wrote: I'm having weird problems with a CollectionView inside an NSSplitView... it looks fine but as soon as I re-size (either by dragging the split view's divider or by re-sizing the window) the CollectionView's animation is flickering a

NSPopupButton in NSTableView header?

2009-02-11 Thread Randall Meadows
Is it possible to put a custom view, in this case an NSPopupButton, in a specific column header of an NSTableView? I have a table with 3 columns, one of which displays a status for one of several user-selectable things that correspond to the rest of the data in that row. I currently have

Re: NSPopupButton in NSTableView header?

2009-02-11 Thread Randall Meadows
And OF COURSE I find the answer not 10 seconds after pressing Send...NSTableColumn -setHeaderCell:. Silly me, I was looking in NSTableHeaderView. What was I thinking?! ;) On Feb 11, 2009, at 1:40 PM, Randall Meadows wrote: Is it possible to put a custom view, in this case an NSPopupButton

Re: Objective-C question

2009-02-10 Thread Randall Meadows
On Feb 10, 2009, at 10:16 AM, Andy Bettis wrote: I have an id object that I'd like to test to see if it's a certain class or a subclass of that class. isKindOfClass gives a very specific test, is there an easy way to test for an object being a subclass of a class? That's exactly what

High-quality image upscaling

2009-02-10 Thread Randall Meadows
I have to upscale JPEG images from 72DPI to, say 250DPI (user- selectable). I figured Core Image would be the way to go, but... The CI docs for CILanczosScaleTransform say You typically use this filter to scale down an image; well, I will be needing to scale the image UP. What filter is

Getting *my* object out of a tree controller?

2009-02-05 Thread Randall Meadows
I have an NSOutlineView backed by an NSTreeController. selectedObject = [[treeController selectedObjects] objectAtIndex:n] gives me back an object (of the type) that I expect. However, when I then try to find where that object lives in the tree [treeView rowForItem:selectedObject] returns

Restoring selection to NSOutlineView

2009-02-05 Thread Randall Meadows
Man, I'm feeling dumb today...NSOutlineView/NSTreeController is kicking my butt... I'm trying to determine a sane new selection for when I delete the currently selected item in an NSOutlineView. I'm failing. My thought was to get the index path of the item I deleted, then try to select

Re: NSProgressIndicator not accepting updates

2009-01-22 Thread Randall Meadows
On Jan 22, 2009, at 3:31 AM, Aaron Wallis wrote: As an example, i've got a controller which has a NSProgressIndicator bound to it through IB, and on the awakeFromNib method I've got a little bit of code: double tD = 0.5; [progressBar setDoubleValue:tD];

Re: NSTextView and front/middle/back ellipses

2009-01-22 Thread Randall Meadows
On Jan 22, 2009, at 11:03 AM, Harry Plate wrote: I have a simple text view that will display its text information with an ellipses on the right (end) if the string is too long for the view. Nice, but... How can I tell NSTextView to use a front or middle ellipses for viewing purposes?

Observing edits make to a table using bindings

2009-01-20 Thread Randall Meadows
Perhaps I just can't get my head around the terminology sufficiently to search on the right thing...feel free to enlighten me. I have an NSTableView, whose content is supplied through bindings to an array controller. Column A is supplied via FieldListController.arrangedObjects.name,

Re: UTIs and type codes and extensions

2009-01-14 Thread Randall Meadows
On Jan 14, 2009, at 7:48 AM, Sean McBride wrote: On 1/14/09 2:31 AM, Julien Jalon said: I'm just making sure I'm not missing something... There's no system-defined way to go from a UTI to an old-style file type code (which the UTI docs seem to refer to as a tag) and back again, am I

UTIs and type codes and extensions

2009-01-13 Thread Randall Meadows
I'm just making sure I'm not missing something... There's no system-defined way to go from a UTI to an old-style file type code (which the UTI docs seem to refer to as a tag) and back again, am I correct? For instance, my app can export files as TIFF, JPEG, or PNG. When the user makes

Re: Disabled button looks like enabled

2009-01-12 Thread Randall Meadows
On Jan 12, 2009, at 11:20 AM, Donnie Lee wrote: As others have already asked: what are you trying to accomplish? I try to create a disabled button that looks like enabled button :))) It's so easy to understand, why do you ask more more and more???!!! Because, frankly, that doesn't make

Re: Detecting mouseover in an NSActionCell subclass

2009-01-12 Thread Randall Meadows
On Jan 12, 2009, at 12:56 PM, Jean-Nicolas Jolivet wrote: I've got it all working at this point, the 2 buttons on the right are just NSImages and I'm using startTracking, continueTracking and stopTracking, with my buttons Rect, to detect if they were clicked on... However, I was

Re: NSBezierPath

2008-12-20 Thread Randall Meadows
On Dec 20, 2008, at 11:35 AM, Amr Nashaat wrote: does anyone knows how can I use the NSBezierPath function NSBezierPath is not a function, but anyway... to create a circle? + (NSBezierPath *)bezierPathWithOvalInRect:(NSRect)aRect where aRect describes a square.

Re: Using a NSCollectionView in a table cell.

2008-12-18 Thread Randall Meadows
On Dec 18, 2008, at 9:52 AM, Corbin Dunn wrote: On Dec 18, 2008, at 7:28 AM, Eric Gorr wrote: I need to be able to use a NSCollectionView inside of a cell for a NSOutlineView. [snip] You will have more problems and trouble attempting to get an NSView inside of a cell. I suggest

Re: Using a NSCollectionView in a table cell.

2008-12-18 Thread Randall Meadows
On Dec 18, 2008, at 10:06 AM, Eric Gorr wrote: On Dec 18, 2008, at 11:52 AM, Corbin Dunn wrote: On Dec 18, 2008, at 7:28 AM, Eric Gorr wrote: You will have more problems and trouble attempting to get an NSView inside of a cell. I suggest subclassing NSTextFieldCell. Please do log a bug

NSTrackingAreas, mouse entered/exited not firing

2008-12-18 Thread Randall Meadows
Yet another simple operation I've apparently managed to miss something with... I have an NSTableView subclass (actually, a subclass of BGHUDTableView), that contains a bunch of custom cells. For a couple types of those cells, I want to switch the cursor while it's in that cell. I'm

Re: NSTimer help

2008-12-17 Thread Randall Meadows
On Dec 17, 2008, at 10:23 AM, Eric Lee wrote: I have an application, and when I exit the window, the timer doesn't stop, so the application freezes. Is there something similar to -(void)awakeFromNib but for stopping a timer when a window closes? You can register any object to listen for

Re: The Ages Old __MyCompanyName__ Question

2008-12-17 Thread Randall Meadows
On Dec 17, 2008, at 9:32 AM, Phil Hystad wrote: OK, I am fairly new to Xcode and Cocoa programming and I want to change the __MyCompanyName__ template macro definition. So, I google this question, find answers, and try it out. It did not work. So, is there something different in today's

Core Animation glitch

2008-12-17 Thread Randall Meadows
OK, not a good subject line, but I couldn't come up with anything more descriptive. I hope I can explain the issue clear enough...I'm a fair Core Animation newbie... (I know this is long, sorry, but if nothing else, watch the video linked at the end, and see if that rings any bells.) I

Consistent scroll-to-visible of text view?

2008-12-16 Thread Randall Meadows
I have a table that contains representations of various types of data. As a row is selected another view changes to show details of that data. For instance, some display images and some display text in an NSTextView. As I change from one row to the next, I populate the detail display

Double KVO notification

2008-12-15 Thread Randall Meadows
I'm trying to track down (in a project I inherited, not wrote) why a KVO notification is being sent twice. The reason I care is because, the table contains a variety of types of data, and for one particular type of data I need to do something special when it is selected, and then revert

Re: proper way to release a static NSMutableDictionary?

2008-12-15 Thread Randall Meadows
On Dec 15, 2008, at 3:54 PM, John Michael Zorko wrote: Hello, all ... Imagine this: static NSMutableDictionary *lookup = [NSMutableDictionary new]; ... now imagine a situation where I need to clear that dictionary. [lookup removeAllObjects]; is probably your best choice. If I call

Re: NSTableView Selection

2008-12-12 Thread Randall Meadows
On Dec 12, 2008, at 11:02 AM, David Blanton wrote: How do I keep the first row in a table view from being selected when the table first loads? The issue is that to get a selection did change for the first row I have to first select a different row because the first row is 'auto selected'

Loading a view XIB with different owner types?

2008-12-12 Thread Randall Meadows
I have a view XIB (basically a customized NSTextView) whose File's Owner is configured to be class Foo. I would like to reuse that same XIB in a different part of my code, but the loading owner is a completely different class, Bar. I tried adding the same outlets that Foo has to Bar, and

Funky behavior with layer-backed views

2008-12-12 Thread Randall Meadows
In this one window I have, I have 2 views and 2 buttons, all living in the same parent view (there's more than just that, but these are the relevant bits). The Notes button shows/hides the notes view, and the Info button shows/ hides the MoreInfo view. I have turned on Wants Core Animation

Arggg...overrelease in table view cell, but where?

2008-12-11 Thread Randall Meadows
Still fighting with the table view custom cell...sorry for the length of this, I'm trying to include as much info as I can to help you help me figure this out. I have subclassed NSTextFieldCell (NSTFC) so that I can do custom drawing in my table cells (basically multiple text strings

Re: Arggg...overrelease in table view cell, but where?

2008-12-11 Thread Randall Meadows
On Dec 11, 2008, at 1:24 PM, Randall Meadows wrote: Still fighting with the table view custom cell...sorry for the length of this, I'm trying to include as much info as I can to help you help me figure this out. I have subclassed NSTextFieldCell (NSTFC) so that I can do custom drawing in my

Re: Table view containing cells with both an image and text

2008-12-10 Thread Randall Meadows
On Dec 10, 2008, at 1:41 PM, Corbin Dunn wrote: On Dec 10, 2008, at 11:54 AM, Eric Gorr wrote: I need a column in my NSTableView with cells that contain both an image and some text. My first inclination is to subclass NSCell and have my subclass manage both a NSImageCell and a

Re: Table view containing cells with both an image and text

2008-12-10 Thread Randall Meadows
On Dec 10, 2008, at 2:41 PM, Corbin Dunn wrote: On Dec 10, 2008, at 1:14 PM, Randall Meadows wrote: - the cellFrame passed into -drawInteriorWithFrame:inView: is not really the interior of the frame; I've had to do No; it really is! You're this close to convincing me

Custom NSTableView cells

2008-12-09 Thread Randall Meadows
I could use a little guidance, please, on customizing cells for display in an NSTableView. (My app is Leopard-only.) I looked around the Apple docs and cocoadev, but didn't really find anything useful. Other pointers would be appreciated. My table has but one column, but each cell in

Drawing a string with a clearColor background

2008-12-08 Thread Randall Meadows
I know I've seen a discussion of this, but my search-fu is weak today, apparently. Please feel free to reply in links to the answer, if you wish... I'm trying to draw (in a view's -drawRect: method) a string over top an image background: NSDictionary *attrs = [NSDictionary

Re: Drawing a string with a clearColor background

2008-12-08 Thread Randall Meadows
On Dec 8, 2008, at 3:17 PM, Rob Keniger wrote: On 09/12/2008, at 7:31 AM, Randall Meadows wrote: If you don't set the background at all the text should draw with no background. DOH! Of course the simplest answer is the correct one. Thanks a bunch. randy

Programmatically adding an NSTableView to another view

2008-12-08 Thread Randall Meadows
I have configured a view .xib with an NSTableView; I load the nib and add the table view to another parent view. I've implemented the necessary delegate and data source methods. It's all working just peachy, except... It's placement in the parent view is wrong, and I can't figure out how

Re: How to extract individual icons from icns file?

2008-12-04 Thread Randall Meadows
On Dec 4, 2008, at 12:16 PM, David wrote: Is there a tool available to extract individual icons from an icns file? In particular the smaller ones. I've tried several tools but none of them work with the 16x16 size. I've seen Linux and Windows tools but no Mac tools. How can that be. Is there a

Re: How to extract individual icons from icns file?

2008-12-04 Thread Randall Meadows
On Dec 4, 2008, at 2:08 PM, I. Savant wrote: On Thu, Dec 4, 2008 at 3:58 PM, I. Savant [EMAIL PROTECTED] wrote: Might be what you get, certainly isn't what I got. Great. Now open the newly-created file in Photoshop (as if you were going to do something with it such as creating a branded

Re: Determining unreleased objects after Quit

2008-12-03 Thread Randall Meadows
On Dec 3, 2008, at 9:38 AM, Jon C. Munson II wrote: Namaste! In my application, when I choose File-Quit, the application appears to terminate. HOWEVER, it doesn't. SOMETHING(s) is(are) left unreleased. Is there a handy way to determine what the object(s) is(are)? When your app quits,

Re: Special Characters Edit Menu Item

2008-12-03 Thread Randall Meadows
On Dec 3, 2008, at 3:41 PM, Randy Bradley wrote: David, I think there must be a way since this menu item doesn’t show up in my Entourage compose mail window.To be honest, I never noticed this before. It seems to me that there are many cases where special characters are not

Button title irregularities

2008-12-02 Thread Randall Meadows
I am porting an iPhone app to the Mac, and the client desires the exact same look-and-feel on the Mac as they have on the iPhone. So I am doing some custom drawing to achieve that. It's mostly going OK, but I've found myself wasting far too much time on this one little detail, and it's

Re: Button title irregularities

2008-12-02 Thread Randall Meadows
On Dec 2, 2008, at 5:31 PM, Aki Inoue wrote: You're using Helveitca 12.0 as your label font. Actually, it's: (gdb) po labelFont ArialMT 12.00 pt. P [] (0x001c0e30) fobj=0x162670a0, spc=3.33 Use [NSFont systemFontOfSize:[NSFont systemFontSizeForControlSize: [yourButton controlSize]]]

Re: NSIndexSet

2008-11-21 Thread Randall Meadows
On Nov 21, 2008, at 8:44 AM, David Blanton wrote: How would one construct an NSIndexSet containing the indices 2,4,5 ? I did: NSRange two = NSMakeRange(2, 1); NSRange four = NSMakeRange(4, 1); NSRange five = NSMakeRange(5, 1); NSRange u1 =

Re: Fastest way to resize an image?

2008-11-20 Thread Randall Meadows
On Nov 19, 2008, at 11:51 PM, Ken Ferry wrote: however I found out that just using the setSize: method of NSImage was unreliable -[NSImage setSize:] doesn't change the pixels of an image, it changes the natural size that the image is drawn at. If you try to write the NSImage back out as a

Re: Code-sign Services HotKey Modifications

2008-11-18 Thread Randall Meadows
On Nov 18, 2008, at 7:44 AM, Xavier Snark wrote: I have a pure cocoa application that relies on Services as its primary method of invocation. Of course it can be opened normally, but that decreases its usability by design. I had already started down the path to allowing the user to change

Re: Interface Builder Wiring Objects

2008-11-17 Thread Randall Meadows
On Nov 17, 2008, at 11:09 AM, Greg Deward wrote: Good afternoon! I am trying to learn Cocoa and am having difficulty remembering which direction to CTRL-drag controls to wire up the controls in Interface Builder. For example, dragging from my button to my App Controller (NSObject) or

  1   2   3   >