Re: Reading word at mouse pointer w/o Universal Access

2008-02-28 Thread Steve Christensen
I don't have specific knowledge but, yes, I would expect that the dictionary support is a trusted part of the OS, thus can be hooked into every application. As far as I know, if you want to touch another application's UI, you have to go through accessibility. From the OS's point of view

Re: Read jpeg comments from file?

2008-04-03 Thread Steve Christensen
On Apr 3, 2008, at 2:13 AM, Trygve Inda wrote: If you just need to display the image, use an NSImage (initWithContentsOfFile). If you need a greater control over metadata, use the ImageIO API (search CGImageSource in doc and sample codes). This works and retrieves the user text that was

Re: fileHFSCreatorCode fileAttributesAtPath:traverseLink on app bundles

2008-04-08 Thread Steve Christensen
On Apr 7, 2008, at 10:03 PM, Jens Alfke wrote: On 7 Apr '08, at 8:11 PM, Mike wrote: I need to get the creator code of my app's bundle without diving into the bundle and reading the plist directly. You're mixing up HFS creator codes with bundle identifiers, I think. HFS creator codes are

Re: Finding running process on disk

2008-04-09 Thread Steve Christensen
On Apr 9, 2008, at 9:03 PM, Mike wrote: Is there a way to locate the bundle of a running process on disk from within the running process? You mean something like +[NSBundle mainBundle]? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Re: Tips to deploy applications to multiple Mac OS X versions

2008-04-10 Thread Steve Christensen
On Apr 9, 2008, at 11:08 PM, Ben Lachman wrote: On Apr 9, 2008, at 3:27 PM, David Duncan wrote: On Apr 9, 2008, at 7:43 AM, Lorenzo Bevilacqua wrote: I'm trying to build a Cocoa application so that it can run on Mac OS X from version 10.3.9 to 10.5. I have 10.5 installed so the application

how to manage multiple non-document windows

2008-04-24 Thread Steve Christensen
I'm rewriting an old legacy app in Cocoa and have run into a stumbling block. The app is supposed to support having multiple windows open, but the window content is unrelated to the concept of a document - which is the normal multiple window model. Instead the windows provide a UI to

Re: how to manage multiple non-document windows

2008-04-25 Thread Steve Christensen
On Apr 24, 2008, at 5:01 PM, Ken Thomases wrote: On Apr 24, 2008, at 6:39 PM, Steve Christensen wrote: I'm rewriting an old legacy app in Cocoa and have run into a stumbling block. The app is supposed to support having multiple windows open, but the window content is unrelated

Re: how to manage multiple non-document windows

2008-04-25 Thread Steve Christensen
On Apr 25, 2008, at 12:45 PM, Erik Verbruggen wrote: On 25 Apr 2008, at 20:06, Steve Christensen wrote: I put both the window and NSWindowController subclass in MainMenu.nib since some of the menu items control behavior in the window (and some of the window's current state is reflected

Re: how to manage multiple non-document windows

2008-04-25 Thread Steve Christensen
On Apr 25, 2008, at 5:51 PM, Jean-Daniel Dupas wrote: Le 26 avr. 08 à 01:44, Steve Christensen a écrit : On Apr 25, 2008, at 12:45 PM, Erik Verbruggen wrote: On 25 Apr 2008, at 20:06, Steve Christensen wrote: I put both the window and NSWindowController subclass in MainMenu.nib since

Re: FSCopyObjectASync Not Calling Callback In Cocoa

2008-04-30 Thread Steve Christensen
I noticed in some sample code (http://developer.apple.com/samplecode/ FSFileOperation/listing1.html), that after creating the FSFileOperationRef, it calls FSFileOperationScheduleWithRunLoop, specifying the current run loop. Just a guess that you're probably not making that association so

Re: List Running apps and windows

2008-05-03 Thread Steve Christensen
On May 3, 2008, at 3:52 PM, Jere Gmail wrote: I want to list all the running apps and their windows. Running apps is easy with [ws launchedApplications] but I cant find a way for listing their windows. I have tried NSWindowList(win_count,arr_win) but then [[NSApplication sharedApplication]

Re: regarding fxPlug plugins

2008-05-08 Thread Steve Christensen
On May 8, 2008, at 7:10 AM, Shashi Kumar wrote: I am new to fxplug. And I wanted to create an fxplug plugin from a cocoa application. What should be the right way to do this ? I have fxPlug SDK installed. The specification is: I have an cocoa application with UI having effects and image. And

Re: regarding fxPlug plugins

2008-05-09 Thread Steve Christensen
, at 8:39 PM, Shashi Kumar wrote: Yes this exactly what I want. And I think this is the thing which FxFactory application do, as far I understood. So, could you give me the solution for this with explanation. --- On Thu, 5/8/08, Steve Christensen [EMAIL PROTECTED] wrote: From: Steve

Re: how to create .qtz file from custom cocoa app

2008-05-12 Thread Steve Christensen
On May 12, 2008, at 6:30 AM, Shashi Kumar wrote: I am looking for an cocoa app through which I can create .qtz file. The cocoa app will be having UI in which i 'll implement some effects on image. Now, lets say I 've a button export. When I 'll click export button, it should get saved as

Re: list open application windows

2008-05-12 Thread Steve Christensen
On May 12, 2008, at 8:15 PM, Ben Lowndes wrote: I'm a cocoa newbie, so I may be missing something obvious here: I'd like to get a list of open windows for all currently running applications. I've been able to get the list of running applications from NSworkspace, but can't see a method of

Re: how to create .qtz file from custom cocoa app

2008-05-12 Thread Steve Christensen
On May 12, 2008, at 9:03 PM, Shashi Kumar wrote: Is it not possible that from UI, I will generate XML file which will be kind of PList file of .qtz file containing tree list of its properties. And from that XML file we will create .qtz file ?? And, no, there isn't a Cocoa API that will

Re: How to tell if iTunes is running.

2008-05-24 Thread Steve Christensen
in a separate message, Apple doesn't currently localize the names of its iApps so you're probably safe. On May 24, 2008, at 12:17 PM, Mr. Gecko wrote: because I do not need the path for what I am doing. On May 24, 2008, at 2:05 PM, Steve Christensen wrote: Would something like

Re: How to tell if iTunes is running.

2008-05-24 Thread Steve Christensen
On May 24, 2008, at 2:11 PM, Jens Alfke wrote: On 24 May '08, at 12:05 PM, Steve Christensen wrote: Would something like this work better? It should deal with localization or if the user renames iTunes for some reason. ... if ([[applicationD objectForKey:@NSApplicationPath

Re: drawer attached to modal window is unresponsive

2008-05-30 Thread Steve Christensen
in their own programs -- Mail.app's sidebar, for instance, is now a source list in the main window, instead of being in a drawer. Cheers, Andrew On May 30, 2008, at 12:55 PM, Steve Christensen wrote: I'm working on a plugin that needs to do some involved setup, and I'm handling

Re: Why does this https post request always return 404 Not Found

2008-06-22 Thread Steve Christensen
Hmmm... Google not working? - http://del.icio.us/help/thirdpartytools lists the APIs for a variety of programming languages at the bottom of the page. - http://www.scifihifi.com/cocoalicious/ is an open source Cocoa del.icio.us client, so you should be able to see what they did. On Jun

Re: [Moderator] List Guidelines - Must Read

2008-06-27 Thread Steve Christensen
On Jun 27, 2008, at 8:25 AM, Devon Ferns wrote: I agree. It's not like what's in the SDK is super secret. Anyone can download it. Yeah, anyone can download it, but in order to download it, you have to go through the process of accepting a license agreement that includes a NDA

Re: Trying to display a static image on my window. Any tips would be great

2008-07-01 Thread Steve Christensen
On Jul 1, 2008, at 6:41 AM, Papa-Raboon wrote: I have been trying to get a static image to display in a corner of my window and it has to literally just sit there and do nothing however I have searched and searched Apple's dodumentation but no success yet. I have dropped an Image View onto the

Re: Trying to display a static image on my window. Any tips would be great

2008-07-01 Thread Steve Christensen
now. Someone kindly pointed out that if I created my image with an Alpha chanel that it could also have transparencies too which worked beautifully. I just need to figure out how to hyperlink it so it can open a URL in a browser now. Cheers Paul 2008/7/1 Steve Christensen [EMAIL PROTECTED]: On Jul

Re: How to converting a Carbon nib to Cocoa?

2008-07-02 Thread Steve Christensen
This question was asked recently on the carbon-dev list and the answer was that there is no way to automate the process, nor even a method to get you part-way. Unfortunately this is likely to be one of those painful transitions for you... On Jul 2, 2008, at 8:31 PM, Fosse wrote: It would

Re: Does this caution need fixed? (newb)

2008-07-03 Thread Steve Christensen
On Jul 3, 2008, at 9:40 AM, Chris Paveglio wrote: Also, should my code be caution free as a sign of clean coding or can some cautions that don't affect functionality be dismissed? I'm one of those people who turns on just about every warning and then fixes the code that generates the

Re: iPhone: Implementing search and index combo, like Contacts?

2008-07-15 Thread Steve Christensen
On Jul 15, 2008, at 7:48 AM, Michael Dupuis wrote: I'm assuming the NDA has been lifted now... Nope, still under NDA, as mentioned a few days ago: From: Cocoa Dev Admins [EMAIL PROTECTED] Date: July 10, 2008 7:01:39 PM PDT To: Cocoa-Dev List cocoa-dev@lists.apple.com Subject: [Moderator]

Re: Detecting platform architecture within Cocoa app?

2008-07-29 Thread Steve Christensen
On Jul 29, 2008, at 12:56 PM, Jack Skellington wrote: Is there a way to determine if an App is running on Intel or PPC from within the App? Depending on what you're trying to do, you can go at least a couple routes at build time. If you only care about endianness: #ifdef __BIG_ENDIAN__

Re: Checking for hackintosh

2008-07-30 Thread Steve Christensen
On Jul 30, 2008, at 8:55 AM, Tim McGaughy wrote: On Jul 29, 2008, at 9:22 PM, John Joyce wrote: Does anybody have a means or a tool for checking for hackintoshes? I really don't approve of such things and would like to leave clever messages on my own software if it is run on a hackintosh.

Re: My own listbox

2008-08-02 Thread Steve Christensen
On Aug 2, 2008, at 3:52 AM, Vitaly Ovchinnikov wrote: Is it possible to get rid of blue focus border for NSTableView when I select it? In IB's inspector window, one of NSTableView's attributes is Focus Ring. Just set it to none. ___ Cocoa-dev

Re: Accessing member variables from another thread crashes

2008-08-10 Thread Steve Christensen
On Aug 9, 2008, at 5:24 PM, Dennis Harms wrote: I've created a class with some member variables of type NSString*. In the init function of the class, I write something into those strings. Now I call a function of the initialized class instance as a new thread and try to read from those

Re: Monospaced Simulated Braille

2008-08-12 Thread Steve Christensen
For the time being I suppose you could query the Braille font for its maximum character width, then draw each character in a string individually, centering it horizontally within a rectangle that has the maximum width. That would mean manually advancing each character's position on a line

Re: Preventing windows from being dragged

2008-08-21 Thread Steve Christensen
Kinda hair-trigger on the defensiveness, dontcha think, especially since Andrew didn't actually say you were wrong? The great majority of Mac applications do not run in kiosk mode so for most cases preventing window movement *is* wrong because you take control away from the user. Had you

Re: Preventing windows from being dragged

2008-08-22 Thread Steve Christensen
On Aug 21, 2008, at 8:31 PM, Kyle Sluder wrote: On Thu, Aug 21, 2008 at 11:18 PM, Steve Christensen [EMAIL PROTECTED] wrote: The great majority of Mac applications do not run in kiosk mode so for most cases preventing window movement *is* wrong because you take control away from the user

Re: Window widgets

2008-10-17 Thread Steve Christensen
One thing to point out is that there is no guarantee that those window widgets will continue to be red, yellow and green dots in a future OS release. Or that someone won't patch - standardWindowButton:forStyleMask: as part of a haxie for skinning the UI, in which case you could end up with

Re: Window widgets

2008-10-17 Thread Steve Christensen
On Oct 17, 2008, at 10:52 AM, Kyle Sluder wrote: On Fri, Oct 17, 2008 at 1:41 PM, Steve Christensen [EMAIL PROTECTED] wrote: I would suggest either tracking down a set of images you like and then include them in your app's bundle, or rolling your own. Fewer chances for surprises that way

Re: what do you use to make icons and similar?

2008-10-19 Thread Steve Christensen
On Oct 19, 2008, at 5:50 AM, Benjamin Dobson wrote: I believe png are really what I'm trying to make here, they seem to be recommended. PNGs are not resolution independent, although they are perfectly acceptable. Saving as a TIFF then converting it to PDF with Preview works well for me.

Re: Bind button title to Boolean

2008-10-27 Thread Steve Christensen
On Oct 27, 2008, at 3:32 AM, Trygve Inda wrote: How can I bind a button title to a Boolean but have a custom title for each state? For example, I have a BOOL isRunning, if YES, my button should read Stop Running else Start Running. I can't really do this with an alternate title since when

Re: Transparent image

2009-02-09 Thread Steve Christensen
Something similar to what you're asking was discussed on this list last week. To get you started: [window setOpaque:NO]; [window setBackgroundColor:[NSColor colorWithCalibratedWhite:1.0 alpha:0.5]]; On Feb 9, 2009, at 1:55 PM, Christian Graus wrote: I have a window with an image showing

Re: Transparent image

2009-02-09 Thread Steve Christensen
background ). Is there something I am missing ? Thanks for your help Christian On Tue, Feb 10, 2009 at 9:18 AM, Steve Christensen puns...@mac.com wrote: Something similar to what you're asking was discussed on this list last week. To get you started: [window setOpaque:NO]; [window

Re: How to get the white shadow effect when drawing NSStrings?

2009-02-22 Thread Steve Christensen
It seems like the best solution would be to handle both the Leopard+ and pre-Leopard cases at runtime so any changes to HID over time are non-issues since you've limited the custom code to the pre-Leopard case. You might be able to get away with as little as adding a category to NSCell

custom control's value change isn't being noticed by controller

2009-02-26 Thread Steve Christensen
I've written a custom control containing multiple NSTextFieldCells. The combined cell values result in a single integer value accessed via the control's intValue/setIntValue: and objectValue/ setObjectValue: (as a NSNumber). The control is correctly displaying the current value when it's

enabling Edit menu items in a modal window?

2009-02-27 Thread Steve Christensen
I'm working on a plugin that needs to do its configuration in a modal window. As soon as it calls [NSApp runModalForWindow:window], the items in the Edit menu are disabled. Is there some way to selectively enable some of the items? For instance, it'd be nice if I could do a Select All...

Re: enabling Edit menu items in a modal window?

2009-02-28 Thread Steve Christensen
On Feb 27, 2009, at 3:44 PM, Graham Cox wrote: On 28/02/2009, at 4:26 AM, Steve Christensen wrote: I'm working on a plugin that needs to do its configuration in a modal window. As soon as it calls [NSApp runModalForWindow:window], the items in the Edit menu are disabled. Is there some

Re: Rotate NSImage to get a new NSImage, without drawing

2009-03-01 Thread Steve Christensen
On Feb 28, 2009, at 10:20 PM, Jerry Krinock wrote: On 2009 Feb 28, at 20:10, Graham Cox wrote: Create the new image, swapping width and height, lock focus onto it, apply a transform that rotates 90 degrees, and draw the first into the second. You can't do it without drawing, but the

Re: enabling Edit menu items in a modal window?

2009-03-01 Thread Steve Christensen
On Mar 1, 2009, at 1:59 AM, Paul Sanders wrote: At the time I check the Edit menu, the focus ring is around my custom table view and a row is selected. NSTableView says that it implements selectAll: and deselectAll:, and just to be extra sure, I created my own that just call super, but that

Re: enabling Edit menu items in a modal window?

2009-03-02 Thread Steve Christensen
On Mar 1, 2009, at 11:38 PM, Paul Sanders wrote: I added a text field to my modal window, and when it is the first responder the cut, copy, paste and select all menu items are enabled. Just for grins I added a second NSTableView to the window and rebuilt. When that table has focus, the edit

Re: enabling Edit menu items in a modal window?

2009-03-02 Thread Steve Christensen
On Mar 2, 2009, at 8:47 AM, Paul Sanders wrote: nobody even calls validateMenuItem: for my modal window... Well, you're one step closer to getting to the bottom of it perhaps, knowing that. Is the target of the menu item in question set to the first responder in IB? Forgive me if you

Re: enabling Edit menu items in a modal window?

2009-03-02 Thread Steve Christensen
On Mar 2, 2009, at 9:10 AM, mmalc Crawford wrote: On Mar 2, 2009, at 8:28 AM, Steve Christensen wrote: http://developer.apple.com/DOCUMENTATION/Cocoa/Reference/ ApplicationKit/Protocols/NSMenuValidation_Protocol/Reference/ Reference.html I tried doing that, both in my NSTableView subclass

Re: enabling Edit menu items in a modal window?

2009-03-02 Thread Steve Christensen
On Mar 2, 2009, at 10:47 AM, Paul Sanders wrote: I think I mentioned in my original message that I'm writing an application plugin (for FCP, actually), so I wasn't involved in setting up the application's nib. Oh yes, so you did. So, I have now done what I should have done before and stuck

NSImage/NSBitmapImageRep color shifts when creating scaled copy

2009-03-06 Thread Steve Christensen
I'm trying to create a scaled-down copy of a large NSBitmapImageRep (i.e., 3200x2400 - 320x240). The smaller image eventually gets passed to OpenGL for drawing. What I'm finding is that the copy has color shifted. When I draw the copy, it appears to be darker and more saturated than the

Re: NSImage/NSBitmapImageRep color shifts when creating scaled copy

2009-03-06 Thread Steve Christensen
On Mar 6, 2009, at 1:15 PM, Kyle Sluder wrote: On Fri, Mar 6, 2009 at 2:21 PM, Steve Christensen puns...@mac.com wrote: I'm trying to create a scaled-down copy of a large NSBitmapImageRep (i.e., 3200x2400 - 320x240). The smaller image eventually gets passed to OpenGL for drawing. What I'm

Re: Need to use Quartz... I think?

2009-03-07 Thread Steve Christensen
I'm coming in on the middle of this so I don't know if what's already been discussed. How many -unique- images are there? If you're working with a relatively small number of images, you could just cache a single copy of each and then supply the correct image for a particular cell. If you

Re: Design question: View with hell lot of drawing

2009-03-10 Thread Steve Christensen
On Mar 10, 2009, at 1:39 AM, rajesh wrote: I need to display huge number of elements in NSView (1000-2000). These elements are generally made of high resolution image files with some fancy drawing around them. These elements may vary from size 300 X 270 to 4280 X 3500. First I made use

Re: NSSlider changed notification

2009-03-11 Thread Steve Christensen
As previous replies have mentioned, if you're looking for continuous change, you need to make sure that continuous is set to YES, either by checking continuously send action while sliding in IB or by calling [mySlider setContinuous:YES]. You could keep track of changes to the slider value

Re: ack no class

2009-03-30 Thread Steve Christensen
Maybe start up that generated app in gdb with a breakpoint set on NSLog? When it breaks you could look at the backtrace. That may at least tell you where the message is being generated, which may then tell you why. On Mar 29, 2009, at 3:26 PM, Mark Sibly wrote: I'm the author of

Re: Handling List of Hardware Devices in NSTableView w/ Asynchronous Updates

2009-04-01 Thread Steve Christensen
On Apr 1, 2009, at 7:51 AM, Grant Erickson wrote: I've a list of hardware devices in an NSTableView. The contents of the table view are updated accordingly using the device model (C++) getters in objectValueForTableColumn and using the device model setters in setObjectValue. However, the

Re: finder file size

2009-04-07 Thread Steve Christensen
Well, directories -are- a single file so it makes sense that the file size refers to exactly the directory and not its contents. Besides, for the general case of looking at files/folders in a particular directory, you could get all the attributes quickly without paying a time penalty to

Re: Storing bundle loaded main class instances in NSArray

2009-04-08 Thread Steve Christensen
If your _instances variable is initialized using either [NSMutableArray array] or [NSMutableArray arrayWithCapacity:...], it will be autoreleased and become invalid. You can fix that by doing something like [NSMutableArray array] retain] or using [NSMutableArray alloc]

Re: finder file size

2009-04-08 Thread Steve Christensen
On Apr 8, 2009, at 5:51 PM, Gerriet M. Denkmann wrote: On 9 Apr 2009, at 02:03, Sean McBride s...@rogue-research.com wrote: On 4/7/09 9:04 PM, Jo Phils said: As for not using Carbon I suppose there's no reason I can't use it. I was just thinking with Finder going away from Carbon and

Re: C: treated as a path component

2009-04-15 Thread Steve Christensen
On Apr 15, 2009, at 1:34 PM, Jean-Daniel Dupas wrote: Le 15 avr. 09 à 01:57, Dragan Milić a écrit : Hell all, Let's suppose I've got NSString @C:omponent , which represents the name of a file. Is there a way to instruct NSString class not to treat a leading single letter followed by a

Re: Problem in displaying image in NSTableView

2009-04-20 Thread Steve Christensen
On Apr 18, 2009, at 7:54 PM, cocoa learner wrote: Hello All, In my NSTableView I am using NSImageCell as one column to display images. And I have implemented my datastore method like this - - (id) tableView: (NSTableView *)aTableView objectValueForTableColumn: (NSTableColumn *)aTableColumn

Re: OpenGL

2009-04-20 Thread Steve Christensen
On Apr 20, 2009, at 4:23 PM, Andrew Farmer wrote: On 20 Apr 09, at 06:59, fawad shafi wrote: i am new on OpenGL Framework, i dnt know to that how to display the simple 3D image using OpenGL. This doesn't appear to be relevant to Cocoa development, at least until the Cocoa OpenGL views get

Re: Why is NSString-FSRef so hard?

2009-04-25 Thread Steve Christensen
You'd said in an earlier thread that the file path characters are coming from a text file and that you're then storing those in a STL string. The STL string doesn't care what the encoding is since it's just a storage construct. When you try to create a CFString or NSString from those

Re: How remove a clip path? SOLVED

2009-05-05 Thread Steve Christensen
On May 5, 2009, at 11:57 AM, McLaughlin, Michael P. wrote: Naturally, I came up with a solution two minutes after posting my query to this list :-( My solution is [[NSBezierPath bezierPathWithRect:rect] setClip]; where rect is the viewRect. This works for me. It might not be the best

Re: drawing my image in snow leopard

2009-09-02 Thread Steve Christensen
Does this not do what you want? [myImage drawInRect:NSIntegralRect(myCenteredRect) fromRect:...]; steve On Sep 2, 2009, at 9:22 AM, Rick C. wrote: thank you markus i do see that now. since my icon centers the numbers will always change. this should be obvious but what would be the

Re: Macros

2009-09-02 Thread Steve Christensen
Wouldn't this be better asked on the xcode-users mailing list (assuming you're talking about Xcode debug/release builds)? It doesn't have anything to do with Cocoa. On Sep 2, 2009, at 8:54 AM, Development wrote: Ok I cannot find an example of how to do this online so I'nm asking here. I

Re: Image Thresholding

2009-09-03 Thread Steve Christensen
On Sep 2, 2009, at 10:29 PM, fawad shafi wrote: I want to convert grayscale or RGB image to Binary Image. Please provide sample code. Requests to please provide sample code sounds like you want other people to do your work for you. There is plenty of information on how to do that if you

Re: sprintf and 64-bit integers

2009-09-13 Thread Steve Christensen
On Sep 13, 2009, at 11:10 AM, slasktrattena...@gmail.com wrote: On Sun, Sep 13, 2009 at 8:01 PM, Bill Bumgarner b...@mac.com wrote: On Sep 13, 2009, at 10:59 AM, slasktrattena...@gmail.com wrote: I'm updating my code for Snow Leopard and ran into this problem. The app crashes at this line:

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

2009-09-17 Thread Steve Christensen
On Sep 17, 2009, at 8:18 PM, Rick Mann wrote: On Sep 17, 2009, at 20:15:43, Michael Babin wrote: 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 =

Re: Problem with fontDescriptorWithFontAttributes:

2009-09-21 Thread Steve Christensen
On Sep 21, 2009, at 2:29 PM, Laurent Daudelin wrote: On Sep 21, 2009, at 14:23, Kyle Sluder wrote: Fonts really don't have colors. I don't know why NSFontColorAttribute is defined in NSFontDescriptor.h, but none of the other attributed string attributes are in there. Why are you trying to

Re: How to create a control just as RGB Sphere and Alpha bar

2009-09-25 Thread Steve Christensen
Is there some reason why you can't use the color picker to specify a color+alpha value? It would save you a bunch of work in duplicating existing system functionality. On Sep 24, 2009, at 11:20 PM, Symadept wrote: Hi Graham, Yes. But do you have any other ways to handle this. I want

Re: [iPhone] Application running for the very first time...

2009-10-07 Thread Steve Christensen
On Oct 1, 2009, at 10:57 PM, James Lin wrote: Thank you for the code snipet, but I am confused at the logic here... the following code will be executed EVERY time the program runs, right? NSMutableDictionary *dictionary = [[NSMutableDictionary alloc] initWithCapacity:10]; [dictionary

Re: [iPhone] Application running for the very first time...

2009-10-07 Thread Steve Christensen
On Oct 7, 2009, at 10:47 AM, Marco S Hyman wrote: On Oct 7, 2009, at 10:33 AM, Steve Christensen wrote: In that case if ([[NSUserDefaults standardUserDefaults] boolForKey:@PIFirstRun] == YES){ [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@PIFirstRun

Re: Are these Apple or 3rd party classes?

2009-10-09 Thread Steve Christensen
A quick Google search came up with a reference to EPIJDataManager that somehow relates to Epson printers. I couldn't find any other info than that. On Oct 9, 2009, at 6:48 AM, Philip White wrote: A customer of one of my shareware programs has reported that my program frequently crashes

Re: Opening a NSSavePanel as a Sheet, and blocking like in [panel runModal]

2009-10-15 Thread Steve Christensen
I had written this NSOpenPanel category to work in a plugin environment, and I think it should do the right thing. Just set up the NSOpenPanel as you like then call - runModalForDirectory:file:types:relativeToWindow: and it will return when the user has selected (or not) a file. steve

Re: Opening a NSSavePanel as a Sheet, and blocking like in [panel runModal]

2009-10-21 Thread Steve Christensen
of the active document, such as the menubar window, floating windows, help tags and toolbars. On 15/10/2009, at 21:40, Steve Christensen wrote: I had written this NSOpenPanel category to work in a plugin environment, and I think it should do the right thing. Just set up the NSOpenPanel as you

Re: Opening a NSSavePanel as a Sheet, and blocking like in [panel runModal]

2009-10-22 Thread Steve Christensen
I don't know what the difference would be in trying to attach to a native NSWindow vs one that wraps a Carbon window. When I've done this in the past, I always knew that I was attaching to a native NSWindow. Sorry I can't be more helpful. steve On Oct 22, 2009, at 6:44 AM, Motti Shneor

Re: How to imitiate mouse move programmatically? [NSApp postEvent:atStart:] does not work...

2009-11-03 Thread Steve Christensen
Oleg, had you thought of doing something like adding -isSelectionValid and -setSelectionValid: methods to your controller class? The view would always keep track of the mouse state, tell the controller what the current selection is when the mouse moves, but won't update itself or respond

Re: Bulletproof way to create a new CGBitmapContext from an existing image?

2009-11-03 Thread Steve Christensen
Why not alway create a CGBitmapContext of the desired size and in a supported pixel format (see http://developer.apple.com/mac/library/qa/qa2001/qa1037.html ), then call CGContextDrawImage to draw the CGImage into the context? Then you're always controlling the parameters. CGRect bounds =

Re: How can a plug-in bundle get access to its own resources?

2009-11-15 Thread Steve Christensen
As has been pointed out several times, it's a really bad idea to have the same-named class in multiple plugins. The Objective-C runtime will load the first class instance it finds (in your case, in the first- loaded plugin). For all other plugins, when the class is referenced, that first

Re: How can a plug-in bundle get access to its own resources?

2009-11-16 Thread Steve Christensen
application (or host library) load a plug-in by a specific version, and KNOW FOR SURE that the right library was loaded? Any references to how-to implement multi-version code bundles? On 16/11/2009, at 00:51, Steve Christensen wrote: As has been pointed out several times, it's a really bad

Re: Drawing an arc fill inside an image

2011-05-26 Thread Steve Christensen
Custom view that sits on top of a UIImageView? Implement -drawRect: and a progress property and you're done. On May 26, 2011, at 11:21 AM, Alex Kac wrote: I'm not sure what the best way to tackle this is... so I thought I'd ask here. I have an image with a circular button inside of it. I'd

Re: Application Design

2011-05-27 Thread Steve Christensen
A view controller controls a specific view hierarchy so it shouldn't be reaching explicitly out to other view controllers to tell them to do something. Depending on your specific situation, interested objects could register for notifications when certain things change in the world, then one

Re: Application Design

2011-05-31 Thread Steve Christensen
How about providing a singleton class method? Then you just include WebServiceInterface.h where needed. No need to have a global variable. @implementation WebServiceInterface ... + (WebServiceInterface*) sharedInterface { static WebServiceInterface* sharedInstance = nil; if

Re: Application Design

2011-06-01 Thread Steve Christensen
, Dan Hopwood d...@biasdevelopment.com wrote: Great, thanks a lot Steve - very helpful. D On 31 May 2011 18:44, Steve Christensen puns...@mac.com wrote: How about providing a singleton class method? Then you just include WebServiceInterface.h where needed. No need to have a global

Re: Application Design

2011-06-01 Thread Steve Christensen
Steve - very helpful. D On 31 May 2011 18:44, Steve Christensen puns...@mac.com wrote: How about providing a singleton class method? Then you just include WebServiceInterface.h where needed. No need to have a global variable. @implementation WebServiceInterface

Re: Scaling a NSImage not working

2011-06-01 Thread Steve Christensen
-drawInRect draws the image into the destination rectangle, stretching or shrinking as necessary to get it to fit. If you want to preserve the aspect ratio, you'll have to generate a scaled rectangle with the image's aspect ratio. That's just simple math. On Jun 1, 2011, at 9:29 PM,

Re: Malformed URL string in openURL

2011-06-07 Thread Steve Christensen
On Jun 7, 2011, at 6:32 PM, James Merkel wrote: On Jun 7, 2011, at 6:20 PM, Jens Alfke wrote: On Jun 7, 2011, at 6:17 PM, James Merkel wrote: The following works ok: NSString * mapquestURLString; mapquestURLString = [NSString

Re: iOS: encoding a custom view with a shape in it

2011-06-11 Thread Steve Christensen
How do the results differ between what you saw before and after saving the document? Is everything wrong? or just the scaling, the rotation, what? And to draw an object, are you using an affine transform just to rotate it or for scaling and/or translation as well? On Jun 9, 2011, at 4:25 PM,

Re: iOS: encoding a custom view with a shape in it

2011-06-11 Thread Steve Christensen
And also to clarify, are you freeze drying a view or the objects it draws? You should be doing the latter since that's part of your model. On Jun 11, 2011, at 6:47 PM, Steve Christensen wrote: How do the results differ between what you saw before and after saving the document? Is everything

Re: iOS: encoding a custom view with a shape in it

2011-06-15 Thread Steve Christensen
classes to hold the properties (frame, rotation, color, etc.) and to draw those shapes. On Jun 11, 2011, at 6:49 PM, Steve Christensen wrote: And also to clarify, are you freeze drying a view or the objects it draws? You should be doing the latter since that's part of your model. On Jun

Re: Animating handwriting

2011-06-23 Thread Steve Christensen
Is this a correct interpretation of what you're trying to do? You have a title string that will be drawn in a handwriting font. You wish to reveal each of the letter strokes over time as if someone were actually writing the title on a piece of paper. On Jun 23, 2011, at 9:45 AM, Gustavo

Re: How to resolve bulk warning Creating selector for nonexistent method ...?

2011-07-05 Thread Steve Christensen
For the nonexistent method warnings, your project- or target-level settings likely have Undeclared Selector checked in the GCC warnings section of the build settings. For the multiple selectors warnings, look at the Strict Selector Matching item in the same section. It says this will pop up if

Re: How to resolve bulk warning Creating selector for nonexistent method ...?

2011-07-06 Thread Steve Christensen
( XCode-app-menu Empry Caches ). Appearanly some things got corrupted and/or confused on that level. As a nice bonus, i also got about 10Gb of diskspace back. So i have no clue what the real problem was, but it's fixed. thanks, arri On Tue, Jul 5, 2011 at 9:17 PM, Steve Christensen

Re: iOS: AVFoundation, AVAssetWriter and caching

2011-07-06 Thread Steve Christensen
With the caveat that I haven't actually tried it, would it make more sense to be streaming the movie data to a local file, then specifying the URL/path to the file in the initializer method of one of the movie player classes? If the player can handle the case where not all the movie data is

Re: IOS graphics

2011-07-11 Thread Steve Christensen
The first thing I notice is that none of the CGContext* calls after UIGraphicsBeginImageContext is referring to that image context so they are having no effect on it. You should move the UIGraphicsGetCurrentContext down after the [drawImage...] call. If you are still not able to get the

Re: Strange NSFileManager file replacement issue

2011-08-19 Thread Steve Christensen
On Aug 19, 2011, at 7:17 AM, Sixten Otto wrote: On Thu, Aug 18, 2011 at 10:38 PM, Ken Thomases k...@codeweavers.com wrote: Those functions, and the general operation that they perform, require that the files to be exchanged be on the same file system. If true, that certainly makes that

Re: Account validation in CocoaTouch for the purchased app

2011-12-21 Thread Steve Christensen
On Dec 20, 2011, at 2:26 PM, Alexander Reichstadt wrote: given an app is sold on iTunes, is there a way for that app to find out which email address was used for the iTunes account when it was purchased? I don't believe so. As far as I know, the only way to find that out is to ask the user.

Re: NSString looses Umlaute

2011-12-22 Thread Steve Christensen
And just to add in one more bit about why it's important to separate the text from the binary header, -initWithData:encoding: [r]eturns nil if the initialization fails for some reason (for example if data does not represent valid data for encoding). (That is from the NSString docs.) On Dec

Re: Storyboard SplitViewController example

2011-12-25 Thread Steve Christensen
On Dec 24, 2011, at 7:13 PM, Jamie Daniel wrote: I am very new to Xcode and iPad development. I am trying to do the following: I have an initial NavigationController and ViewController. I am trying to go from a button on the ViewController to a SplitViewController using Storyboards but I

  1   2   3   >