Re: Keeping NSView square

2009-11-19 Thread Kyle Sluder
2009/11/18 Andrew Farmer : > Don't. Arbitrarily changing the size of your view in setFrame: makes AppKit > lose track of what size your view was, making it impossible to restore the > original size later. Cut the view down to square at draw time instead. This sounds like an even worse idea. If

Re: Keeping NSView square

2009-11-19 Thread Andrew Farmer
On 19 Nov 2009, at 00:10, Kyle Sluder wrote: > 2009/11/18 Andrew Farmer : >> Don't. Arbitrarily changing the size of your view in setFrame: makes AppKit >> lose track of what size your view was, making it impossible to restore the >> original size later. Cut the view down to square at draw time i

Re: Vector images on Cocoa

2009-11-19 Thread anderson oliveira
Try pdf files.:) Anderson www.anderson-oliveira.com On Nov 17, 2009, at 1:47 AM, Henri Häkkinen wrote: Hello. I would need some way of loading vectorized images from files and drawing them to my custom NSView derived class, scaled up or down according to the frame of the control. I was t

IBOutlets or property + binding

2009-11-19 Thread Christian Ziegler
Hi all, once again I got a rather general question: Say we got some view-elements which we don't wanna change in any way. We only need to read their value to compute something. Would you create IBOutlets or properties + binding in that case? Those values are not part of my model. They are not

Re: setToolTip: not working

2009-11-19 Thread Andy Lee
On Nov 18, 2009, at 8:30 PM, Gregory Weston wrote: > Ben Haller wrote: [...] >> I get the impression that others are not seeing it because it's a >> problem that specially bites apps that build their UI in code, instead >> of in IB, and that's rare. I was trying to fish for someone who would

Re: Vector images on Cocoa

2009-11-19 Thread Scott Thompson
> I would need some way of loading vectorized images from files and drawing > them to my custom NSView derived class, scaled up or down according to the > frame of the control. I was thinking of using SVG files but there seems not > to be any easy way of handling them in Cocoa and I feel that im

Re: SB won't create an element on 10.5

2009-11-19 Thread hengist.podd e-mail
Fritz Anderson wrote: > Otherwise, it looks like I'm caught in a crack between AppleScript, 10.5 > Scripting Bridge, and Entourage. I may have to fall back to textual scripts > (or, Lord help me, chains of AppleEvents and descriptors). It was nice while > it lasted (and I should credit 10.6 for

Core Data: Simply set NSMigratePersistentStoresAutomaticallyOption in a Document?

2009-11-19 Thread Jerry Krinock
Well, it's time to move my beta testers from 0.1.8 to 0.1.9 and this requires a Core Data database migration. Since the app requires 10.5, I can use Default Automatic Migration. Yippee. Up to this point, my NSPersistentDocument subclass had used the Persistence Stack which is built into NSPer

Re: CALayer Transitions

2009-11-19 Thread Joachim Deelen
> None of this makes any sense, other than the build-transitions being one > level deeper in the hierarchy than the side transitions. > You're right. As I read the documentation over and over again it didn't make any sense to me at all. First I thought it's the language, since my mother ton

Re: unable to select submenu item

2009-11-19 Thread Keary Suska
On Nov 18, 2009, at 7:27 PM, SRD wrote: >> Here your code indicates that the "Load" menu item was selected, and >> according to everything you show, "Load" does *not* have a submenu, so >> everything is working as expected, unless you aren't selecting "Load", in >> which case your problem isn't

Re: IBOutlets or property + binding

2009-11-19 Thread Karolis Ramanauskas
> > Would you create IBOutlets or properties + binding in that case? You will need to give an example of exactly what you want to accomplish. What values do you need?, etc. Then, perhaps it will be easier to answer. Peace - Hide quoted text - On Thu, Nov 19, 2009 at 5:48 AM, Christian Ziegler

Re: IBOutlets or property + binding

2009-11-19 Thread Christian Ziegler
On 19.11.2009, at 18:27, Karolis Ramanauskas wrote: >> >> Would you create IBOutlets or properties + binding in that case? > > > You will need to give an example of exactly what you want to accomplish. > What values do you need?, etc. Then, perhaps it will be easier to answer. > > Peace > - H

Re: IBOutlets or property + binding

2009-11-19 Thread Keary Suska
On Nov 19, 2009, at 10:32 AM, Christian Ziegler wrote: > For instance I got a NSStepper and I only need the integerValue of that > stepper. I could either define an IBOutlet and access the integerValue with > [stepper integerValue], or I could define a property and bind the steppers > value to

Re: IBOutlets or property + binding

2009-11-19 Thread Karolis Ramanauskas
Arghh... I was beaten to an answer! :) Slow typing... Yeah, with bindings you will get a two-way connection. If you change your property's value programmatically, the stepper will update also. Instead of target-action you could set up an iboutleted property, connect stepper to it and observe that

Re: Keeping NSView square

2009-11-19 Thread Kyle Sluder
On Thu, Nov 19, 2009 at 12:22 AM, Andrew Farmer wrote: > To be more specific - I wasn't suggesting adjusting the size of the view at > draw time, or refusing to draw the entire dirty rect, but simply performing > the min(frame width, frame height) calculation at draw time and drawing the > view

Re: setToolTip: not working

2009-11-19 Thread Ben Haller
On 19-Nov-09, at 7:46 AM, Andy Lee wrote: ...I just did a quick test with an NSButton and a trivial custom view, and it worked. It also worked when I replaced TestView below with NSView. - (void)awakeFromNib { NSWindow *testWindow = [[NSWindow alloc] initWithContentRect:NSMakeRect(100

Re: firstResponder KVO snow leopard crash; bug?

2009-11-19 Thread Corbin Dunn
On Nov 18, 2009, at 5:06 PM, Sean McBride wrote: > On 11/18/09 9:00 AM, Corbin Dunn said: > >> Oh -- another thing. Does your subclass of NSCollectionView override: >> >> (void)viewWillMoveToWindow:(NSWindow *)window { >> >> but not call super? If not... call super! Your classes should always

Re: Help with Background Tasks

2009-11-19 Thread Mark Bateman
List, OK to make my request a little more detailed. In my tableview "cell for row at index path" method I make several URL requests that fill in a cell within a section. E.G section 1 - row 1 (1st url request) section 1 - row 2 (2nd URL request), etc... section 2 - row 1 (URL request Same

Re: firstResponder KVO snow leopard crash; bug?

2009-11-19 Thread Corbin Dunn
On Nov 18, 2009, at 5:28 PM, Aaron Clarke wrote: > > On Nov 18, 2009, at 12:00 , Corbin Dunn wrote: > >> >> On Nov 17, 2009, at 1:04 PM, Aaron Clarke wrote: >> >>> We have an application that runs fine on leopard (10.5) but occasionally >>> crashes on snow leopard (10.6) when closing an NSWin

Custom Tableview cell and grouped tables

2009-11-19 Thread Mark Bateman
Hi, I have created a custom tableview cell and it works great, but when I choose the grouped view in the tableview nothing happens, what have I missed. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moder

Re: Custom Tableview cell and grouped tables

2009-11-19 Thread Fritz Anderson
On 19 Nov 2009, at 12:45 PM, Mark Bateman wrote: > I have created a custom tableview cell and it works great, but when I choose > the grouped view in the tableview nothing happens, what have I missed. You've told us next to nothing, so you really haven't asked a question. I can infer that you'r

Re: Custom Tableview cell and grouped tables

2009-11-19 Thread Mark Bateman
1. this is iphone 2. after i change the UItableview style to the "grouped style" the table continues to show as before a regular table with my custom cells but the tableview is not in the grouped style. hope that makes my question much clearer. On Nov 19, 2009, at 2:10 PM, Fritz Anderson wrote

Re: Custom Tableview cell and grouped tables

2009-11-19 Thread Luke the Hiesterman
You can't change the style of a table after it's been created. Only place to set the table's style is initWithFrame:style: Luke On Nov 19, 2009, at 11:17 AM, Mark Bateman wrote: 1. this is iphone 2. after i change the UItableview style to the "grouped style" the table continues to show as

Re: Help with Background Tasks

2009-11-19 Thread Jens Alfke
On Nov 19, 2009, at 10:42 AM, Mark Bateman wrote: > All that said I would like to use URLconnection instead (as jens points out) > they are asynch but again I have the problem of allocating the responses back > to the correct index path object. Each NSURLRequest can have its own delegate. Stor

Re: Custom Tableview cell and grouped tables

2009-11-19 Thread Mark Bateman
I'm referring to changing the style in the NIB prior to compiling, not on the fly in the application, if that helps. On Nov 19, 2009, at 2:19 PM, Luke the Hiesterman wrote: > You can't change the style of a table after it's been created. Only place to > set the table's style is initWithFrame:s

Re: Custom Tableview cell and grouped tables

2009-11-19 Thread Luke the Hiesterman
You should post a sample project demonstrating your problem. Saying you're changing the style in the nib and it's not being reflected in the app isn't a whole lot to go on. Luke On Nov 19, 2009, at 11:23 AM, Mark Bateman wrote: I'm referring to changing the style in the NIB prior to compili

NSTextView, Bindings, and Display Updates

2009-11-19 Thread Andrew Shamel
Hi All, I'm having a strange behavior with an NSTextView bound through Interface Builder to a Core Data backing. The textView is part of a standard master-detail setup, and is not updating its value when the selection is changed in the master list. The value only displays after the mouse has

Trouble finding bounding rect of NSAttributedString

2009-11-19 Thread Dave DeLong
Hi everyone, I've been struggling for several hours to get the bounding rectangle of an NSAttributedString when drawn at a particular width. I have an NSTextView that I need to resize dynamically. NSTextView appears to resize itself as I add text, but I also need it to shrink itself as I delet

Re: IBOutlets or property + binding

2009-11-19 Thread Christian Ziegler
target/action is inappropriate since no action is needed at the time the value was changed. Instead, once the user clicks a button I compute something hence I read the values from the steppers and stuff. But that doesn't change much does it :) Cheers, Chris On 19.11.2009, at 18:51, Karolis Ra

Re: Core Data: Simply set NSMigratePersistentStoresAutomaticallyOption in a Document?

2009-11-19 Thread Matthew Lindfield Seager
> P.S.  Sorry if this is in the list archives but since cocoabuilder.com is > down I'm searching lists.apple.com.  Searching with >   Search for: NSMigratePersistentStoresAutomaticallyOption >   Match: All >   Find: Substring >   Located In: Whole Document >   Listname Matches: cocoa-dev > > I get

Re: Trouble finding bounding rect of NSAttributedString

2009-11-19 Thread Jens Alfke
On Nov 19, 2009, at 1:28 PM, Dave DeLong wrote: > I have an NSTextView that I need to resize dynamically. NSTextView appears > to resize itself as I add text, but I also need it to shrink itself as I > delete text. Here's what I've tried: Several of those look like reasonable calls for this

Re: Trouble finding bounding rect of NSAttributedString

2009-11-19 Thread Dave DeLong
Good point. When I print out the size or rect that these return, I invariably get either {0, 0} or something absurd like {{1.17076e-318, 2.29357e-314}, {2.30359e-314, 2.1224e-314}} (that's just running the rect through NSStringFromRect()) Dave On Nov 19, 2009, at 3:37 PM, Jens Alfke wrote: >

Authorization plugin samples

2009-11-19 Thread Alan James Caruana
Hi, I am not sure this is the right list for this question. If it is not, I aplologize, and ask which list should I address ? I am trying to wrtie a daemon for OS X that will be given user credentials and automatically login the user. I know it can be done using AppleScript, but this sometimes

ColorSyncDeprecated.h in OSX - 10.6

2009-11-19 Thread Simon ONeill
Hi, Does anyone have any idea where the new functions for ColorSyncManager (presumably 64bit focused) are documented? The only information I can find lists the new functions but does not document them. (Application Services Reference Update. dated 2009-8-28 lists the names but has no reference

NSStatusItem with agent

2009-11-19 Thread Denis Merakhovich
Hi I am developing launch agent which creates NSStatusItem. When I am launching my agent by myself using "launchctl load com.company.MyAgent.plist" then I dont have any problem, I see NSStatusItem in menu bar and I can set focus on it. If I put my agent to /System/Library/LaunchAgents and restart

Controlling cocoa windows hit test

2009-11-19 Thread Tristan Genevet
Hi, I'm looking for a way to control hit testing on a cocoa transparent window. The default behavior, as I understood it, is that if a pixel is not entirely transparent, then the click occured in the window. I would like to have more control over this, so a click in my custom drop shadow

need to find exact WiFi encryption method

2009-11-19 Thread Padmakumar T V
Hi, I have used "securityMode" method in CWNetwork class of CoreWLAN framework to find the encryption used in the current Airport WiFi connection. I am getting return value kCWSecurityModeWPA_PSK. My problem is I have 2 WiFi network, 1) WPA - PSK - TKIP 2) WPA - PSK - AES But the Mac "securityMo

How to change TCP / IP settings using Cocoa

2009-11-19 Thread Padmakumar T V
Hi, I need to know the current TCP / IP configuration setting "Configure IPv4" of current WiFi connection and change this settings from "Using DHCP" to "Manually" and configure IP settings like IPaddress and subnet using Cocoa API. If some body can share some inputs on this, I will be a great

Job Posting: Experienced Cocoa Developer (full time position, New York City

2009-11-19 Thread boxworkjobs
Boxwork is seeking an experienced Cocoa Developer to augment its software team. The developer will work mainly with the Cocoa API developing software for the Mac OS X platform.. Responsibilities: • Participate in design activities with team members • Discuss requirements with

NSRunloop + shared thread

2009-11-19 Thread Colin Deasy
Hey, I have a shared thread that is used to process multiple asynchronous tasks. But at some point, a task may need to 'pause' its execution, and cannot exit its method and wait to be re-called, how can I do this? In that method, where a 'pause' instance is brought about, can I use something li

Re: NSRunloop + shared thread

2009-11-19 Thread Jens Alfke
On Nov 19, 2009, at 2:54 PM, Colin Deasy wrote: > I have a shared thread that is used to process multiple asynchronous tasks. > But at some point, a task may need to 'pause' its execution, and cannot exit > its method and wait to be re-called, how can I do this? They're not really asynchronous

Re: How to change TCP / IP settings using Cocoa

2009-11-19 Thread Jens Alfke
On Nov 19, 2009, at 9:17 AM, Padmakumar T V wrote: > I need to know the current TCP / IP configuration setting "Configure IPv4" of > current WiFi connection and change this settings from "Using DHCP" to > "Manually" and configure IP settings like IPaddress and subnet using Cocoa > API. System

Re: Trouble finding bounding rect of NSAttributedString

2009-11-19 Thread Jens Alfke
On Nov 19, 2009, at 2:39 PM, Dave DeLong wrote: > When I print out the size or rect that these return, I invariably get either > {0, 0} or something absurd like {{1.17076e-318, 2.29357e-314}, {2.30359e-314, > 2.1224e-314}} (that's just running the rect through NSStringFromRect()) Make sure the

RE: NSRunloop + shared thread

2009-11-19 Thread Colin Deasy
I see what you mean but at the moment Im finding it hard to see another avenue. To give a bit more detail on the situation. This shared thread is actually handling potentially large numbers of concurrent url connections/downloads. The reason that I want a block in some of those at different tim

Advice about crash requested

2009-11-19 Thread Chris Idou
I've got a user getting the following crash, and I don't know what to make of it because it all happens in Apple code. Has anyone got any advice? Process: XXX [242] Path:/Applications/XXX.app/Contents/MacOS/XXX Identifier: XXX Version: 1.19 (1

Re: Advice about crash requested

2009-11-19 Thread David Duncan
On Nov 19, 2009, at 4:18 PM, Chris Idou wrote: > I've got a user getting the following crash, and I don't know what to make of > it because it all happens in Apple code. Has anyone got any advice? What are you doing on Thread 2 ([FilerExecutor main])? -- David Duncan Apple DTS Animation and Pri

Re: NSRunloop + shared thread

2009-11-19 Thread Kyle Sluder
On Thu, Nov 19, 2009 at 3:40 PM, Colin Deasy wrote: > I see what you mean but at the moment Im finding it hard to see another > avenue. To give a bit more detail on the situation. This shared thread is > actually handling potentially large numbers of concurrent url > connections/downloads. The

tiffs on pasteboard

2009-11-19 Thread Chris Idou
I'm trying to read a TIFF off the pasteboard, but it doesn't seem to work for me. What I'm doing is going into Finder, finding a TIFF file and Command-C it. Among other types I then find on the pasteboard are: NeXT TIFF v4.0 pasteboard type and public.tiff If I take either of those from the pa

Re: tiffs on pasteboard

2009-11-19 Thread Kyle Sluder
On Thu, Nov 19, 2009 at 4:33 PM, Chris Idou wrote: > I'm trying to read a TIFF off the pasteboard, but it doesn't seem to work for > me. What I'm doing is going into Finder, finding a TIFF file and Command-C it. You've copied the file icon. If you want to copy the file's data, you need to open

Re: Advice about crash requested

2009-11-19 Thread Chris Idou
Mainly stuff to do with examining files, and on the odd occasion it needs to do anything in the GUI it executes it on the main thread. From: David Duncan To: Chris Idou Cc: cocoa-dev@lists.apple.com Sent: Fri, 20 November, 2009 11:21:58 AM Subject: Re: Adv

Re: tiffs on pasteboard

2009-11-19 Thread Chris Idou
If I double click the tiff in Finder, and open it in Preview, click it in Preview, Command-A, Command-C, the same thing happens. From: Kyle Sluder To: Chris Idou Cc: cocoa-dev@lists.apple.com Sent: Fri, 20 November, 2009 11:36:54 AM Subject: Re: tiffs on pa

Re: NSRunloop + shared thread

2009-11-19 Thread Jens Alfke
On Nov 19, 2009, at 3:40 PM, Colin Deasy wrote: > This shared thread is actually handling potentially large numbers of > concurrent url connections/downloads. The reason that I want a block in some > of those at different times is a for a form of bandwidth control I am trying > to do. I don't

Re: Advice about crash requested

2009-11-19 Thread Jens Alfke
On Nov 19, 2009, at 4:18 PM, Chris Idou wrote: > Thread 0 Crashed: Dispatch queue: com.apple.main-thread > 0 libobjc.A.dylib 0x7fff85a4210a objc_msgSend + 22 > 1 com.apple.AppKit 0x7fff8169871e > -[NSImageCell(NSPrivateAnimationSupport) _stopAnimation] + 4

Re: Advice about crash requested

2009-11-19 Thread Rob Keniger
On 20/11/2009, at 10:54 AM, Jens Alfke wrote: > Turning on NSZombieEnabled might help shed some light on this. There's a "So, > You've Crashed In objc_msgsend" FAQ out there on teh interwebz somewhere that > goes into more detail on troubleshooting. I didn't think you could use NSZombieEnable

Re: Advice about crash requested

2009-11-19 Thread Sean McBride
On 11/19/09 4:54 PM, Jens Alfke said: >On Nov 19, 2009, at 4:18 PM, Chris Idou wrote: > >> Thread 0 Crashed: Dispatch queue: com.apple.main-thread >> 0 libobjc.A.dylib 0x7fff85a4210a objc_msgSend + 22 >> 1 com.apple.AppKit 0x7fff8169871e -[NSImageCell >(NSPr

Re: tiffs on pasteboard

2009-11-19 Thread Jens Alfke
On Nov 19, 2009, at 4:43 PM, Chris Idou wrote: > If I double click the tiff in Finder, and open it in Preview, click it in > Preview, Command-A, Command-C, the same thing happens. That's weird. Can you show us the code that reads the image data off the pasteboard? —Jens___

Re: tiffs on pasteboard

2009-11-19 Thread Chris Idou
I notice that at least com.apple.icns works when I copy it from Preview, but it doesn't work when just copying from Finder. But either way TextEdit seems to be able to get the right thing if I paste into it. From: Chris Idou To: Kyle Sluder Cc: cocoa-dev@

Re: tiffs on pasteboard

2009-11-19 Thread Chris Idou
OK, its working now as far as copying from Preview. Not sure what happened there. But I'm still confused about one thing: If copying from Finder actually copies the file icon, and not the actual tiff, how come it pastes ok into TextEdit? From: Jens Alfke To

Re: Advice about crash requested

2009-11-19 Thread Chris Idou
This will help if I'm ever able to repeat it. Right now its just a user report and I can't repeat it. From: Sean McBride To: Jens Alfke ; Chris Idou Cc: cocoa-dev@lists.apple.com Sent: Fri, 20 November, 2009 12:03:33 PM Subject: Re: Advice about crash reque

Re: tiffs on pasteboard

2009-11-19 Thread Jens Alfke
On Nov 19, 2009, at 5:24 PM, Chris Idou wrote: > But I'm still confused about one thing: If copying from Finder actually > copies the file icon, and not the actual tiff, how come it pastes ok into > TextEdit? The Finder also puts the location of the file on the pasteboard, and I believe TextE

Re: Core Data: Simply set NSMigratePersistentStoresAutomaticallyOption in a Document?

2009-11-19 Thread Jerry Krinock
On 2009 Nov 19, at 14:05, Matthew Lindfield Seager wrote: > I can't help with your question but Googling > "NSMigratePersistentStoresAutomaticallyOption site:lists.apple.com" > yields 36 results. There's probably several duplicates but it give you > a head start Hmmm. When I tried that this

Re: Where are the interface builder components?

2009-11-19 Thread Sandro Noël
> > OK, so you want one of these controls yourself? Well, let's imagine you're > going to sit down and write one for your app. Are you honestly telling me > that you expect to end up with highly reusable code that could be placed in a > framework like Cocoa, and you'd be happy to ship to a larg

tableView:setObjectValue:forTableColumn:row: not called when button pressed

2009-11-19 Thread Scott Ribe
Table with editable columns, user is editing a cell, user is done, user clicks "Save" button. User's last change is lost because tableView:setObjectValue:forTableColumn:row: is not called. It is only called if the cell loses focus via the user tabbing out of the cell or clicking in some other edita

Re: Where are the interface builder components?

2009-11-19 Thread Gary L. Wade
On 11/19/2009 5:45 PM, "Sandro Noël" wrote: > This thread of emails want not intended to bash Apple for not doing their > work, I just needed to understand why the components are not already available > in the toolbox when it seemed logical to me that they should of been there > with the release

Re: tiffs on pasteboard

2009-11-19 Thread Chris Idou
But what are the rules and conventions? Why would Finder put the icon in the pasteboard on the assumption that is what the user wants, but TextEdit would paste in the actual file on the assumption that is what the user wants? It seems schizophrenic. I just want a list of rules of how to use t

How to avoid text distortion

2009-11-19 Thread Padmakumar T V
Hi, I have created an Application using Wizard like design with the help of NSView. But all the text displayed in each page, even all labels also gets distorted. Like the all the font edges are not sharp and font edges are seen to be dsitorted. regards, Pappan

Re: How to avoid text distortion

2009-11-19 Thread Dave Keck
Please post a screen shot of what you're talking about; perhaps you're just seeing anti-aliased text? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at c

Re: tableView:setObjectValue:forTableColumn:row: not called when button pressed

2009-11-19 Thread Sean McBride
Scott Ribe (scott_r...@killerbytes.com) on 2009-11-19 8:53 PM said: >Table with editable columns, user is editing a cell, user is done, user >clicks "Save" button. User's last change is lost because >tableView:setObjectValue:forTableColumn:row: is not called. It is only >called if the cell loses f

Dealing with faults in CoreData / AppleScript

2009-11-19 Thread Greg Hoover
I've been working through adding scriptability to my CoreData application but ran into a snag: accessing relationships may return a fault instead of the actual set of objects. Is there an "accepted" way of solving this issue? I don't want the accessor to "always" fault the objects in, just whe

resizing PDF obtained from dataWithPDFInsideRect:

2009-11-19 Thread Chinh Nguyen
I've got an image that's generated using a large integer coordinate space. When it's drawn to the screen, its coordinates are converted to screen coordinates. Unfortunately, the screen coordinates are assumed to be integers and it's not a simple fix to use floats (the code is common to Ma

Stretching NSImage PNGs smoothly

2009-11-19 Thread John Wright
I know about how to use UIKit's -(UIImage *)stretchableImageWithLeftCapWidth:(NSInteger)leftCapWidth topCapHeight:(NSInteger)topCapHeight to stretch a PNG smoothly, e.g when inserting text in an iChat like bubble. I would like to do the same on regular AppKit/Cocoa/desktop app using CoreGra

Re: Stretching NSImage PNGs smoothly

2009-11-19 Thread Dave Keck
NSDrawThreePartImage() might help. Of course, it requires three separate images to begin with. (I find this preferable, though, because it avoids having to hard-code image sizes in your code.) In my testing several months ago, though, I found that manually drawing the three segments (using NSImage

initializer methods

2009-11-19 Thread Lynn Barton
After many years of using procedural programming languages, I am trying to learn Cocoa. Today I am reading the Apple document "The Objective-C Programming Language" dated 2009-10-19. On page 46 I read the following: This is an example of what not to do: + (Rectangle *)rectangleOfColor:(NSColor *

Re: Stretching NSImage PNGs smoothly

2009-11-19 Thread Kyle Sluder
On Thu, Nov 19, 2009 at 8:05 PM, Dave Keck wrote: > In my testing several months ago, though, I found that manually > drawing the three segments (using NSImage's -drawInRect:) to be > faster. So if performance is an issue, you might be better off rolling > your own. Did you account for resolution

Re: initializer methods

2009-11-19 Thread Roland King
Lynn Barton wrote: After many years of using procedural programming languages, I am trying to learn Cocoa. Today I am reading the Apple document "The Objective-C Programming Language" dated 2009-10-19. On page 46 I read the following: This is an example of what not to do: + (Rectangle *)rect

Re: initializer methods

2009-11-19 Thread Sean McBride
Lynn Barton (lynnbar...@mac.com) on 2009-11-19 11:15 PM said: >This is an example of what not to do: >+ (Rectangle *)rectangleOfColor:(NSColor *) color >{ > self = [[Rectangle alloc] init]; // BAD > [self setColor:color]; > return [self autorelease]; >} > >However, on page 49 I r

Re: How to avoid text distortion

2009-11-19 Thread padmakumar
Hi Dave, I think my case is some thing related with anti-aliased text. Because as per your suggestion I made a screen shot and saved In my Mac Book. I have transfered the saved png image to my Windows PC to post in llist. But interestingly the screen shot when viewed in Windows don't have that

Re: Trouble finding bounding rect of NSAttributedString

2009-11-19 Thread Dave DeLong
Your question has caused me to dig deeper... It seems that when I handle both the NSViewFrameDidChangeNotification and the NSTableViewSelectionDidChangeNotification notifications, the attributedString of the textView's layout manager is nil. This is very interesting... Here's a bit more of my

How to avoid the movie distortion ?

2009-11-19 Thread James
Hi, all I implement a simple movie player using QTMovieView. But some movies will be distorted by reason of the proportion of the Height and Width. How to avoid the movie distortion? Thanks. James___ Cocoa-dev mailing list (Cocoa-dev@lists.

Re: How to avoid text distortion

2009-11-19 Thread Rob Keniger
On 20/11/2009, at 3:23 PM, padmakumar wrote: > One more point is that I am using Xcode 3.2 in Snow Leopard (Version 10.6.2) > and in System Preference -> Appearence -> "Use LCD font smoothing when > available" option is disabled , again font and text are displayed > perfectly ie with ou

asl_log aborts the program?

2009-11-19 Thread Chris Idou
I've got a report from a user of my program crashing. In the console they are getting this: 11/19/09 3:08:46 PM[0x0-0x18a18a]Progname[8699]Progname(8699,0x1167b) malloc: *** error for object 0x100563870: pointer being freed was not allocated 11/19/09 3:08:46 PM[0x0-0x18a18a] Progname[8699]