Re: Dragging broken symlinks

2008-08-08 Thread Ken Thomases
On Aug 8, 2008, at 11:26 PM, Gerriet M. Denkmann wrote: I have an app which can open symlinks (not the thing the symlink points to). Done via [ openPanel setResolvesAliases: NO ]; But when I drag a symlink to the icon of my app in the dock, - (BOOL)application:(NSApplication *)theApplicat

Dragging broken symlinks

2008-08-08 Thread Gerriet M. Denkmann
I have an app which can open symlinks (not the thing the symlink points to). Done via [ openPanel setResolvesAliases: NO ]; But when I drag a symlink to the icon of my app in the dock, - (BOOL) application:(NSApplication *)theApplication openFile:(NSString *) filename will have filename =

Re: Is this normal behavior ?

2008-08-08 Thread Graham Cox
Sending an empty message? Sadly, it is all too normal ;-) ___ 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 cocoa-dev-admins(at)lists.apple.com Help/Un

Re: Problem with friend function and gcc 4.2 with

2008-08-08 Thread Roni Music
I'm not a C++ expert but your code below should not compile (as I see it) You should declare the friend function inside the class: class test1 { public: friend test1* newtest1(int x); /* the function newtest1() is now a friend to test1 class and may access private member variables and functi

Re: NSMultipleTextSelectionPboardType not working

2008-08-08 Thread André Pang
On 09/08/2008, at 4:02 AM, Douglas Davidson wrote: On Aug 7, 2008, at 9:06 PM, André Pang wrote: I'm trying to read some NSMultipleTextSelectionPboardType data off the pasteboard: You should not do this without reading the AppKit release notes. Ah, thanks for the tip Douglas! I've posted

Re: How to tell whether an executable supports GC?

2008-08-08 Thread André Pang
On 08/08/2008, at 3:18 PM, Chris Suter wrote: You want to look at the __image_info section in the __OBJC segment: struct objc_image_info { uint32_t version;// initially 0 uint32_t flags; }; #define OBJC_IMAGE_SUPPORTS_GC 2 #define OBJC_IMAGE_GC_ONLY 4 Thanks fo

Re: Does [NSApp setApplicationIconImage] leak memory?

2008-08-08 Thread Mark Allan
On Fri, Aug 8, 2008 at 9:02 AM, Matt Neuburg <[EMAIL PROTECTED]> wrote: On Thu, 7 Aug 2008 20:14:04 +0100, Mark Allan <[EMAIL PROTECTED]> said: Hi all, Before I file a bug report against this, I just thought I'd check I'm not being monumentally stupid first! I'm trying to animate my app's Do

Re: Does [NSApp setApplicationIconImage] leak memory?

2008-08-08 Thread Mark Allan
On Thu, 7 Aug 2008 20:14:04 +0100, Mark Allan <[EMAIL PROTECTED]> said: Hi all, Before I file a bug report against this, I just thought I'd check I'm not being monumentally stupid first! I'm trying to animate my app's Dock icon, which works fine and looks great, but unfortunately, it appears to

Re: Monospaced Simulated Braille

2008-08-08 Thread James Jennings
I want to display and edit simulated Braille. OS X has had Braille fonts since Tiger, so all I need to do is pass the correct Unicode codes to NSTextView, except the Braille fonts are proportional spaced, and I need monospaced. There is a Unicode entity called BRAILLE PATTERN BLANK which could

Is this normal behavior ?

2008-08-08 Thread Filip vdm
___ 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 cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/

Re: When the getter returns a BOOL, is "is" the preferred prefix?

2008-08-08 Thread Ken Thomases
On Aug 8, 2008, at 10:53 PM, Sumner Trammell wrote: We know that Cocoa strongly suggests using setFoo and foo for setters and getters. Sometimes I see setters and getters using the idiom setFoo and isFoo. For example, in NSToolbar, you have setVisible and isVisible. When the getter returns a B

Re: When the getter returns a BOOL, is "is" the preferred prefix?

2008-08-08 Thread I. Savant
When the getter returns a BOOL, is "is" the preferred prefix? I used to say, "typically" but it really is a matter of personal style. Side question: do KVC and KVO still work when the getter is prefixed with "is" ? Easily verified by perusing the KVC documentation: http://developer.

When the getter returns a BOOL, is "is" the preferred prefix?

2008-08-08 Thread Sumner Trammell
Hi, I have another "What's the idiom?" question. We know that Cocoa strongly suggests using setFoo and foo for setters and getters. Sometimes I see setters and getters using the idiom setFoo and isFoo. For example, in NSToolbar, you have setVisible and isVisible. When the getter returns a BOOL,

Re: Sharing NSViews

2008-08-08 Thread c. mendoza
That is a good point... my data is indeed separate from the view, all that needs synchronization is a couple of custom controls, which could perhaps be handled via notifications. thanks, c. On Aug 8, 2008, at 9:56 PM, Graham Cox wrote: On 9 Aug 2008, at 11:44 am, c. mendoza wrote: Why

Re: Sharing NSViews

2008-08-08 Thread Roland King
On Aug 9, 2008, at 9:44 AM, c. mendoza wrote: Why do you think you need to do this anyway? If you have a view class just create a new instance of it. Because the two views should be synchronized Are they views on the same model? If they are and you have your MVC working properly, ch

Re: Sharing NSViews

2008-08-08 Thread Graham Cox
On 9 Aug 2008, at 11:44 am, c. mendoza wrote: Why do you think you need to do this anyway? If you have a view class just create a new instance of it. Because the two views should be synchronized If you need to go out of your way to "synchronise" two views, maybe your design could do wi

Re: Sharing NSViews

2008-08-08 Thread c. mendoza
On Aug 8, 2008, at 9:07 PM, Graham Cox wrote: Well then, you have your answer. Yes, I assumed this was so, but I wanted to check if there was something I was missing. A view presumably maintains a back reference to its superview, and only has one of these, so if it's added to a new sup

Re: Challenge 18 in Hillegass Book

2008-08-08 Thread Graham Cox
On 9 Aug 2008, at 8:55 am, James G. wrote: My question is along the lines of the "proper" way to design the classes. I'll have a custom view class that will do the drawing, and the collection of ovals will be an iVar of the MyDocument class, so that I can support de/coding and undo. What's

Re: Problem with friend function and gcc 4.2 with objective-c++

2008-08-08 Thread Ken Worley
Hmmm, no response as of yet. I went ahead and submitted a bug against Xcode: rdar://6135771 We'll see what happens. Ken On Aug 7, 2008, at 4:09 PM, Ken Worley wrote: Hi all, I'm using Xcode 3.1 and just switched to gcc 4.2 from 4.0, but I've run into a problem with friend functions when co

Re: Challenge 18 in Hillegass Book

2008-08-08 Thread Joel Norvell
Hi James, I'd recommend looking at the AppKit Sketch example for architecture and Scott Stevenson's tutorial for using NSBezierPath: http://cocoadevcentral.com/d/intro_to_quartz_two/ HTH, Joel ___ Cocoa-dev mailing list (Cocoa-dev@lists.ap

Re: Sharing NSViews

2008-08-08 Thread Graham Cox
On 9 Aug 2008, at 10:56 am, c. mendoza wrote: Hey All, Is it possible to share an NSView across two different panels or windows? I tried adding a view I already had in one of my windows to a floating panel, but that view "disappeared" from its original placement in the window and only sh

Re: Sharing NSViews

2008-08-08 Thread Gary L. Wade
Each view has knowledge of only one superview and window. If you're wanting to coordinate the two views, you'd need to wire up a controller or use notifications to keep them in sync. c. mendoza wrote: Hey All, Is it possible to share an NSView across two different panels or windows? I tried

Re: autorelease CGImageRef?

2008-08-08 Thread Peter N Lewis
At 3:19 PM -0700 8/8/08, Chris Hanson wrote: On Aug 7, 2008, at 7:07 PM, Peter N Lewis wrote: At 8:24 AM -0700 7/8/08, Chris Hanson wrote: If you build with the Mac OS X 10.5 SDK, you should be able to use NSMakeCollectable since it's declared as an inline function. The earliest release of M

Sharing NSViews

2008-08-08 Thread c. mendoza
Hey All, Is it possible to share an NSView across two different panels or windows? I tried adding a view I already had in one of my windows to a floating panel, but that view "disappeared" from its original placement in the window and only showed up in the panel. thanks, c. On Aug 8, 2

Re: CGImageSourceCreateFromURL failed with error -11

2008-08-08 Thread Gary L. Wade
In that case, it sounds like the Image Source code is leaving the file open, which makes some sense for local files, although it's not explicitly documented anywhere that I've noticed; if I recall correctly, this also happens with the similarly-named QuickTime-based APIs. To continue using CGI

Re: Core Data and Sheets

2008-08-08 Thread mmalc crawford
On Aug 8, 2008, at 5:28 PM, Andrew Zahra wrote: I am thinking that I will need to use core data programmatically rather than by cocoa bindings to achieve this? Is this correct? Are there any examples of this technique or tips on where to start?

Re: Control-dragging from menu item in MainMenu.nib to File's Owner object in MyDocument.nib

2008-08-08 Thread Sumner Trammell
Thanks Shawn. Another case of "Oh, now I know when to use that mechanism I've heard so much about." -s On Fri, Aug 8, 2008 at 1:02 PM, Shawn Erickson <[EMAIL PROTECTED]> wrote: > On Fri, Aug 8, 2008 at 8:52 AM, Sumner Trammell > <[EMAIL PROTECTED]> wrote: >> Hi, my document-based app, created

Core Data and Sheets

2008-08-08 Thread Andrew Zahra
I am experimenting with core data and have had a look at some tutorials such as this one: http://cocoadevcentral.com/articles/85.php The problem I have is that I want to use a sheet with my UI. I have a list of tasks but I don't want the "add" button to just add an entry to my list, I want to

NSSearchField bindings almost work

2008-08-08 Thread Dustin Robert Kick
I have a program set up with core data, and I have a list of predicates to filter the data shown, which work only if you type in the entire string value of the data item being used to filter, though I'm using "somePath contains[cd] $value" for the binding, where somePath are various paths I

Challenge 18 in Hillegass Book

2008-08-08 Thread James G.
I stepped away from the book for a bit, and I'm now trying to work through the Challenge 18 of Hillegass's Cocoa book (3rd edition). The gist of the challenge is to create a document-based application allowing the user to draw ovals in arbitrary locations and size using NSBezierPath, as wel

Re: CGImageSourceCreateFromURL failed with error -11

2008-08-08 Thread James Trankelson
Indeed, for me, this is related to file descriptors. While it's still unclear to me exactly where the problem lies, some quick fiddling with opening the files as NSData and creating images from those appears to be bearing fruit. Thanks! -j On Fri, Aug 8, 2008 at 5:51 PM, Jean-Daniel Dupas <[EMAIL

Re: Does [NSApp setApplicationIconImage] leak memory?

2008-08-08 Thread Sumner Trammell
Ok, stupid question time. 1. Is the need for the autorelease pool because of the use of setApplicationIconImage, or because of the array that is being used in conjunction with setApplicationIconImage? 2. Would putting the calls to setApplicationIconImage in a class method also stop the memory lea

Re: autorelease CGImageRef?

2008-08-08 Thread Chris Hanson
On Aug 7, 2008, at 7:07 PM, Peter N Lewis wrote: At 8:24 AM -0700 7/8/08, Chris Hanson wrote: If you build with the Mac OS X 10.5 SDK, you should be able to use NSMakeCollectable since it's declared as an inline function. The earliest release of Mac OS X you're targeting is a function of t

Re: CGImageSourceCreateFromURL failed with error -11

2008-08-08 Thread Jean-Daniel Dupas
Le 8 août 08 à 20:56, Ken Ferry a écrit : Hi James, Nicholas, I still bet it's someone holding too many file descriptors open. Nicholas, when you said this, "but I have forced the thumbnail creation to have at most 10 files opened at the same time", what did you mean? You can see what files

Re: Core Data question

2008-08-08 Thread Sandro Noel
Chris, thank you! the database itself is designed as a relational database would be, it's quite large actually, I just posted here two tables to illustrate the problem. The software I am building is a personal one, to help me track my budget. the goal is to import my transactions at the end

Re: Core Data question

2008-08-08 Thread Sandro Noel
On 8-Aug-08, at 2:41 PM, Negm-Awad Amin wrote: You should name your entities in the singular, as if you were naming classes, and you should name the properties (attributes & relationships) of your entities starting with a lower-case letter as if you were naming the properties of a class. Th

Re: Key Binding action methods not declared in public headers

2008-08-08 Thread Douglas Davidson
On Aug 7, 2008, at 2:51 PM, Ross Carter wrote: I am mighty tempted to use performSelector:@selector(moveToEndOfDocumentAndModifySelection:); after all, the action method is right there in StandardKeyBinding.plist for all the world to see. On the other hand, it is not in a public header a

Re: How to obtain NSApplication from kCGWindowOwnerPID?

2008-08-08 Thread Stefan Hafeneger
Hi David, I would like to create my own low level events (since I can't attach custom data to a CGEvent struct) and pass them to the appropriate application. Since I can't access other processes I thought I could get somehow the PID of an application, send this PID via distributed objects

Re: How to obtain NSApplication from kCGWindowOwnerPID?

2008-08-08 Thread David Duncan
On Aug 8, 2008, at 11:46 AM, Stefan Hafeneger wrote: I would like to figure out the NSWindow object for a screen location. I could use CGWindowListCopyWindowInfo() to obtain a list of all visible windows and consequently the bounds of each window, the (window server's) window ID and the PID

Re: NSForm from NSFormCell

2008-08-08 Thread Negm-Awad Amin
Am Fr,08.08.2008 um 21:01 schrieb Ken Ferry: Actually, NSCell has a -controlView method that returns the control last used to draw the cell. Use of this property can be somewhat error prone, though, for the reasons Amin describes. Certainly make sure that the control responds to the message y

Re: NSForm from NSFormCell

2008-08-08 Thread Ken Ferry
Actually, NSCell has a -controlView method that returns the control last used to draw the cell. Use of this property can be somewhat error prone, though, for the reasons Amin describes. Certainly make sure that the control responds to the message you intend to send before dispatching it. -Ken Co

Re: CGImageSourceCreateFromURL failed with error -11

2008-08-08 Thread Ken Ferry
Hi James, Nicholas, I still bet it's someone holding too many file descriptors open. Nicholas, when you said this, "but I have forced the thumbnail creation to have at most 10 files opened at the same time", what did you mean? You can see what files your process has open using the lsof command

Re: NSForm from NSFormCell

2008-08-08 Thread Negm-Awad Amin
Am Fr,08.08.2008 um 20:22 schrieb Kurt Sutter: I have a series of NSFormCell objects in an NSForm. Given the NSFormCell object, is there a way to get the corresponding NSForm object? More specifically: I have added an class extension to NSFormCell, which does some operations on the form

How to obtain NSApplication from kCGWindowOwnerPID?

2008-08-08 Thread Stefan Hafeneger
Hi, I would like to figure out the NSWindow object for a screen location. I could use CGWindowListCopyWindowInfo() to obtain a list of all visible windows and consequently the bounds of each window, the (window server's) window ID and the PID. I don't want to get a pointer to the NSWindow

Re: autorelease CGImageRef?

2008-08-08 Thread Thomas Engelmeier
Am 08.08.2008 um 16:23 schrieb Jean-Daniel Dupas: In theory: - The Xcode 2.4 10.4 SDK allows deployment on ANY 10.4 version, - The Xcode 2.5 / 3.x SDKs for 10.4 and 10.5 SDKs allow deployment on recently updated 10.4 versions: < http://www.tom-e.org/2008/04/pimp-my-xcode-sdk/> Only a

Re: Core Data question

2008-08-08 Thread Negm-Awad Amin
Am Fr,08.08.2008 um 18:29 schrieb Chris Hanson: On Aug 6, 2008, at 12:31 PM, Sandro Noel wrote: I have entities like this. TransactionTypes Atributes : Name:String Relationships: Transaction Transactions Atributes: Amount:Double, Date:Date, Memo:String, Payee:String

Re: CGImageSourceCreateFromURL failed with error -11

2008-08-08 Thread James Trankelson
As I mentioned in my case, the images load fine when running through XCode, but not as a standalone binary. So, I guess the images themselves are fine. As producing an isolated test case scenario is going to be prohibitively difficult in my case, all I would like is a way to detect this happening s

NSForm from NSFormCell

2008-08-08 Thread Kurt Sutter
I have a series of NSFormCell objects in an NSForm. Given the NSFormCell object, is there a way to get the corresponding NSForm object? More specifically: I have added an class extension to NSFormCell, which does some operations on the form cell. One of the operations requires the method

Re: NSMultipleTextSelectionPboardType not working

2008-08-08 Thread Douglas Davidson
On Aug 7, 2008, at 9:06 PM, André Pang wrote: I'm trying to read some NSMultipleTextSelectionPboardType data off the pasteboard: You should not do this without reading the AppKit release notes. Douglas Davidson ___ Cocoa-dev mailing list (Cocoa-

Re: Control-dragging from menu item in MainMenu.nib to File's Owner object in MyDocument.nib

2008-08-08 Thread Shawn Erickson
On Fri, Aug 8, 2008 at 8:52 AM, Sumner Trammell <[EMAIL PROTECTED]> wrote: > Hi, my document-based app, created from the Xcode document-based app > template, now needs a new item added to its File menu. > > Menu items are, of course, in MainMenu.nib, and the rest of the app's > widgets, like the ma

Re: Separating elements in an NSView subclass

2008-08-08 Thread Paul Bruneau
On Aug 8, 2008, at 8:54 AM, Graham Cox wrote: Are you checking the view's -needsToDrawRect: when you actually iterate through your rectangles? For a view like this it will be essential to avoid drawing anything that doesn't need drawing - even checking thousands of rects for intersection wi

Re: NSImage and zooming PDFs vs. bitmaps

2008-08-08 Thread Ken Ferry
Hi Hamish, The correct answer is to call setDataRetained:YES on your image. However, there may be a bug in Leopard and previous with NSImage cache expiration that prevents that from being enough. If you seem to be hitting it, you can probably work around it by additionally turning off caching ent

Re: Framework and NSApplication

2008-08-08 Thread Ken Worley
On Aug 7, 2008, at 5:55 PM, Kiel Gillard wrote: @synthesize greeting; I'm writing a Cocoa framework that links with an old Carbon application. The Carbon application indirectly interacts with it through a wrapper framework. Within the Cocoa framework, I want to observe the NSApplicationWi

Re: xcode difficulty

2008-08-08 Thread William Squires
On Aug 8, 2008, at 11:16 AM, Albert Goldstein wrote: I'm a new imac user. I've been using xcode 3.0 to compile and run some C++ programs that were written for me. The person who wrote these programs has the same imac also with Leopard and xcode 3.0. When a parameter in the programs is incr

Re: Cocoa Dev Style: Using Class versus Object Methods

2008-08-08 Thread Jim Puls
On Aug 8, 2008, at 6:10 AM, Lee, Frederick wrote: I'm becoming overtly dependent on Cocoa Objects and am waiting for the day an ObjC/Cocoa interface to the Address Book is available http://developer.apple.com/documentation/UserExperience/Reference/AddressBook/Classes/ABAddressBook_Class/Re

Re: Core Data question

2008-08-08 Thread Chris Hanson
On Aug 6, 2008, at 12:31 PM, Sandro Noel wrote: I have entities like this. TransactionTypes Atributes : Name:String Relationships: Transaction Transactions Atributes: Amount:Double, Date:Date, Memo:String, Payee:String Relationships: TransactionType You should

NSImage and zooming PDFs vs. bitmaps

2008-08-08 Thread Hamish Sanderson
Hi all, I'm writing a Core Animation-based image viewer application for use with both bitmap (TIFF, JPEG) and vector (EPS, PDF) images but I'm rather new to this stuff and am struggling to get the zooming feature to work well with vector images. Image files are loaded via -[NSImage imageW

Re: Xcode 3.1 Debugger Problems

2008-08-08 Thread William Squires
I don't get this at all. Xcode 3.1 on 10.5.5 (Intel iMac) AppController.h #import @interface AppController : NSObject { } -(IBAction) foo:(id) sender; @end AppController.m #import "AppController.h" @implementation AppController - (void)awakeFromNib { NSString *jo = @"hi"; NSLog(@"%@", jo)

Re: How do I get those 1 pixel black lines into my app window?

2008-08-08 Thread Sumner Trammell
Thanks guys, this works beautifully. -s On Thu, Aug 7, 2008 at 4:20 PM, Ken Ferry <[EMAIL PROTECTED]> wrote: > Hi Sumner, > > Check out the discussion of -[NSWindow > setContentBorderThickness:forEdge:] in the AppKit release notes. > Here's some of it, but it's probably better to read it in con

Control-dragging from menu item in MainMenu.nib to File's Owner object in MyDocument.nib

2008-08-08 Thread Sumner Trammell
Hi, my document-based app, created from the Xcode document-based app template, now needs a new item added to its File menu. Menu items are, of course, in MainMenu.nib, and the rest of the app's widgets, like the main window, etc. are in MyDocument.nib. I can't control-drag from my new menu item i

Re: Cocoa Dev Style: Using Class versus Object Methods

2008-08-08 Thread Uli Kusterer
On 08.08.2008, at 07:28, Nick Zitzmann wrote: On Aug 7, 2008, at 11:08 AM, Lee, Frederick wrote: 1) why use instantiated objects versus classes (via class methods)? Because class methods other than +new return autoreleased objects, which makes non-GC memory management a little bit eas

Re: Application control

2008-08-08 Thread Jean-Daniel Dupas
Le 8 août 08 à 11:47, Finlay Dobbie a écrit : On Thu, Aug 7, 2008 at 8:51 PM, falcon <[EMAIL PROTECTED]> wrote: I have application written using Qt library. I have a network of about 40 mac minis. Now I have to connect to each of these macs using ARD and change one parameter on main window

[Moderator] Re: Need pointers on web service communication from the iPhone

2008-08-08 Thread Scott Anguish
iPhone SDK and developing for the iPhone can't be discussed here. It is still covered by the NDA. Scott (moderator) On 8-Aug-08, at 12:56 AM, Matt Keyes wrote: Hello, this is my first post. I am a C/C++ developer that has only recently begun to explore Obj-C and its nuances. The need a

RE: Cocoa Dev Style: Using Class versus Object Methods

2008-08-08 Thread Lee, Frederick
Thanks to all for the basic insight. Although I'm well aware of the benefits of OOP, there comes a time (for many programmers) to do some introspection. That is, when to write/use procedural and object code. I've been following ObjC examples and have programmed accordingly; making objects everywh

Re: Application control

2008-08-08 Thread Finlay Dobbie
On Thu, Aug 7, 2008 at 8:51 PM, falcon <[EMAIL PROTECTED]> wrote: > I have application written using Qt library. I have a network of about 40 > mac minis. Now I have to connect to each of these macs using ARD and change > one parameter on main window of the application. I have tried to use UI > sc

Re: Cocoa Dev Style: Using Class versus Object Methods

2008-08-08 Thread Shawn Erickson
On Thu, Aug 7, 2008 at 10:28 PM, Nick Zitzmann <[EMAIL PROTECTED]> wrote: > > Because class methods other than +new return autoreleased objects, which > makes non-GC memory management a little bit easier. This isn't very accurate statement (for a few reasons) ... IMHO it would be better left unsta

Re: CGImageSourceCreateFromURL failed with error -11

2008-08-08 Thread Gary L. Wade
I'd also try opening all the image files in some Apple-related graphics programs (e.g., Preview, QuickTime Player, etc.) in order to determine if it's system-wide or some combination in your own application; of course, there are other factors that would be involved in using these, but since Appl

Re: autorelease CGImageRef?

2008-08-08 Thread Jean-Daniel Dupas
Le 8 août 08 à 16:17, Thomas Engelmeier a écrit : Am 07.08.2008 um 17:24 schrieb Chris Hanson: This appears correct, except for the fact that, for reasons known only to Apple, although CFMakeCollectable is available in 10.4, the trivial NSMakeCollectable macro is available only in 10.5.

Re: autorelease CGImageRef?

2008-08-08 Thread Thomas Engelmeier
Am 07.08.2008 um 17:24 schrieb Chris Hanson: This appears correct, except for the fact that, for reasons known only to Apple, although CFMakeCollectable is available in 10.4, the trivial NSMakeCollectable macro is available only in 10.5. If you build with the Mac OS X 10.5 SDK, you should

Lazy Loading of images

2008-08-08 Thread Johannes Fahrenkrug
Hi, I have a short best practice question: I have a table with lots of entries loaded from the net, images and their descriptions. I'd like to display placeholder images until the table cell gets displayed and then load the actual thumbnail, replacing the placeholder image with the real thumbnail

Re: Cocoa Dev Style: Using Class versus Object Methods

2008-08-08 Thread Ian Joyner
It's not style, but a technical consideration. Class-level things are shared and common between all object instances. They are thus like globals, but obviously better organized. Class-level methods cannot access things at the object level. Objects have their own different values of attribut

Re: how to have a pop up menu from an ordinary button?

2008-08-08 Thread Michael Ash
On Thu, Aug 7, 2008 at 5:53 PM, Rua Haszard Morris <[EMAIL PROTECTED]> wrote: > I am trying to implement a mini-size, square bevel button that pops up a > menu, i.e. a popup button with a square appearance and mini size, but have > not found a way to achieve this. > > NSPopupButton does not support

Re: Does [NSApp setApplicationIconImage] leak memory?

2008-08-08 Thread Matt Neuburg
On Thu, 7 Aug 2008 20:14:04 +0100, Mark Allan <[EMAIL PROTECTED]> said: >Hi all, > >Before I file a bug report against this, I just thought I'd check I'm >not being monumentally stupid first! > >I'm trying to animate my app's Dock icon, which works fine and looks >great, but unfortunately, it appea

Re: Separating elements in an NSView subclass

2008-08-08 Thread Graham Cox
Are you checking the view's -needsToDrawRect: when you actually iterate through your rectangles? For a view like this it will be essential to avoid drawing anything that doesn't need drawing - even checking thousands of rects for intersection with the update area is much faster than actuall

Re: How to tell whether an executable supports GC?

2008-08-08 Thread Aaron Burghardt
Do you control the plug-in specification and are the plug-ins a standard bundle with an Info.plist? If so, why not specify that a GC plug-in must have a boolean key that indicates that GC is supported. If the value is false or non-existent, then you can assume it doesn't support GC. Aaro

Re: How to get array of characters from NSString

2008-08-08 Thread Phil Faber
I'm a newbie myself but this might help you: As far as I know, [ob characterAtIndex:] (replacing with the character you are after) ..will extract the single character at index . For example: NSLog(@"%c",[ob characterAtIndex:i]); Outputs to the console that character in question. P

Separating elements in an NSView subclass

2008-08-08 Thread Paul Bruneau
Hi- Some time ago I got some great advice to help me optimize the refresh rate of my NSView subclass (the answer is, just draw the minimum that you need to). So I am working to do this, but I am having some trouble with the inter-dependence of various elements that appear in my view. He

Re: packed NSTextfield and NSFormatter in IB3 plugin...

2008-08-08 Thread Cyril Kardassevitch
Jon, You're right... Formatters are implecitly encoded and decoded if attached to the text field cell. And to duplicate a text field with ibDidAddToDesignableDocument generates an assertion failure, too. I finally use - [IBPlugin document:didAddDraggedObjects:fromDraggedLibraryView:] and

Re: exporting PDF ...

2008-08-08 Thread Antonio Nunes
On 8 Aug 2008, at 09:31, Brasseur Valery wrote: I need to export PDF from a Cocoa application... what is the best way to do it : + using Print/Save AS PDF + using the PDF kit, subclassing PDFPage + using other library That depends on how much control you need. If your application can prin

Re: Application control

2008-08-08 Thread Nathan Kinsinger
On Aug 7, 2008, at 1:51 PM, falcon wrote: Hello, I am trying to repeat my question in other words. :) I have application written using Qt library. I have a network of about 40 mac minis. Now I have to connect to each of these macs using ARD and change one parameter on main window of the

Re: Strange flipping bug in Core Animation?

2008-08-08 Thread Moray Taylor
Hi, Thanks very much for the response. Good idea about the awakeFromNib, but I changed my test app to use a button instead and both problems remain (the flipping, and the disappearing sublayer. The application I am using this in is not much complicated in principle than the example app, other

Re: packed NSTextfield and NSFormatter in IB3 plugin...

2008-08-08 Thread Jonathan Hess
Hey Cyril - I'm glad my advice helped. There's a couple of things I neglected to mention. If your text field is a subclass of NSControl, you should add the formatter as a child of the NSCell, not the NSTextField. In Cocoa, it's actually the cell that conceptually owns the formatter, and

exporting PDF ...

2008-08-08 Thread Brasseur Valery
I need to export PDF from a Cocoa application... what is the best way to do it : + using Print/Save AS PDF + using the PDF kit, subclassing PDFPage + using other library thanks Ce message et les pi?ces jointes sont confidentiels et r?serv?s ? l'usage exclusif de ses destinataires. Il peut

NSButtonCell Bindings

2008-08-08 Thread Kenny Carruthers
Referring to the Cocoa Binding Reference documentation: http://developer.apple.com/documentation/Cocoa/Reference/CocoaBindingsRef/BindingsText/NSButtonCell.html NSButtonCell has a binding for 'argument' and 'target', which are accessible inside Interface Builder. However, these binding values

Re: packed NSTextfield and NSFormatter in IB3 plugin...

2008-08-08 Thread Cyril Kardassevitch
Thanks a lot Jon ! This perfectly solves the issue ! So, to verify that I do it correctly... I've overloaded the ibAddToDesignableDocument notification message into the testIBView integration category : - (void)ibDidAddToDesignableDocument:(IBDocument *)document { [document addObject:[sel

Re: Basic Obj-C Question on Memory and Strings

2008-08-08 Thread Charles Steinman
--- On Thu, 8/7/08, Matt Keyes <[EMAIL PROTECTED]> wrote: > -(void)foo { > SomeClass *cls = [[SomeClass alloc] init]; > [cls DoTheStringThing:@"Here's a fun > string."]; > > //HERE IS THE QUESTION: > //This causes a halt in the debugging and will > sometimes give a _BAD_ADDRESS