Re: NSArray retaining and releasing

2008-05-02 Thread Manfred Schwind
NSArray *newArray = [NSArray arrayWithArray:oldArray]; [newArray retain]; Now I it is my responsobolity to send a release message to newArray. But am I responsible to send release messages to the contents of newArray? No, the NSArray is responsible for its items. How do I do a deep copy?

Re: NSArray retaining and releasing

2008-05-02 Thread Graham Cox
On 3 May 2008, at 4:00 pm, Hrishikesh Muruk wrote: If I make an NSArray in the following manner: NSArray *newArray = [NSArray arrayWithArray:oldArray]; [newArray retain]; Now I it is my responsobolity to send a release message to newArray. But am I responsible to send release messages to t

Saving/restoring PDFAnnotationTextWidget stringValues with PDFKit 10.5

2008-05-02 Thread Joel Norvell
If you use PDFKit 10.5 to save and then restore a pdf file, are PDFAnnotationTextWidget stringValues preserved? (These are the text fields that you enter in PDF forms.) They aren't being saved/restored in my program. This is the line that creates the pdfData which is written to my file: NSD

NSArray retaining and releasing

2008-05-02 Thread Hrishikesh Muruk
If I make an NSArray in the following manner: NSArray *newArray = [NSArray arrayWithArray:oldArray]; [newArray retain]; Now I it is my responsobolity to send a release message to newArray. But am I responsible to send release messages to the contents of newArray? If the oldArray contained

Re: Custom View initialization: where?

2008-05-02 Thread Scott Anguish
On May 2, 2008, at 10:49 PM, Graham Cox wrote: - (id)initWithFrame:(NSRect)frame; BTW: you don't need to declare methods in @interface that are inherited from the superclass. True. However, it is often useful to do that when you subclass so you can tell just by looking at the headers

Re: drawing in a separate thread

2008-05-02 Thread Graham Cox
On 3 May 2008, at 1:40 pm, Duncan wrote: On May 2, 2008, at 12:49 PM, Graham Cox <[EMAIL PROTECTED]> wrote: Subject: Re: drawing in a separate thread OK, I have managed to implement this after a lot of poring over the docs. I'm not sure if it's the most efficient way to actually ha

Re: Loading a .nib?

2008-05-02 Thread Michael Ash
On Fri, May 2, 2008 at 10:50 PM, Graham Cox <[EMAIL PROTECTED]> wrote: > OK, that's cool :) > > What's involved in setting up a Cocoa runtime environment in such a case? ObjC gets set up simply by linking to it, so that happens without any intervention. Foundation can be used with no additional s

Re: drawing in a separate thread

2008-05-02 Thread Duncan
On May 2, 2008, at 12:49 PM, Graham Cox <[EMAIL PROTECTED]> wrote: Subject: Re: drawing in a separate thread OK, I have managed to implement this after a lot of poring over the docs. I'm not sure if it's the most efficient way to actually handle the thread communication, but it does work

Re: Custom View initialization: where?

2008-05-02 Thread Markus Spoettl
On May 2, 2008, at 8:23 PM, Quincey Morris wrote: I don't know why initWithFrame: isn't being called in your case, but someone from Apple did say on this list a few weeks ago that an initializer *is* always called. If it's not initWithFrame:, it will be initWithCoder:. Presumably that is g

Re: Custom View initialization: where?

2008-05-02 Thread Andy Lee
The doc I found says there are *two* ways a custom view is initialized. One uses initWithFrame:, the other doesn't. Are you sure your case is the first case? It sounds like it, but I thought I'd double-check.

Re: Custom View initialization: where?

2008-05-02 Thread Quincey Morris
On May 2, 2008, at 19:05, Markus Spoettl wrote: Following the "View Programming Guide for Cocoa" if I use a Custom- View proxy in IB, the view's initWithFrame: method will be called when the NIB is loaded (this can be found in "Initializing View Instances Created in Interface Builder"). I

nstoken for nstextview...

2008-05-02 Thread Matthew Weinstein
Okay, but I'm looking for something related to nstextview rather than nstextfield. Anything that anyone knows out there like that. It's perfect except I need something more wordprocessorish. --Matthew Have a look at the documentation for NSTokenField, it does what you are looking for. ht

Re: Loading a .nib?

2008-05-02 Thread Graham Cox
OK, that's cool :) What's involved in setting up a Cocoa runtime environment in such a case? G. On 3 May 2008, at 12:40 pm, Michael Ash wrote: On Fri, May 2, 2008 at 9:19 PM, Graham Cox <[EMAIL PROTECTED]> wrote: One thing to clarify about Carbon vs. Cocoa - while Cocoa itself is unavai

Re: Custom View initialization: where?

2008-05-02 Thread Graham Cox
On 3 May 2008, at 12:34 pm, Markus Spoettl wrote: The view is instantiated correctly because it draws right. When I put the debugger breakpoint in initWithFrame: it doesn't get called. Is there something wrong with this? No, not that I can see. Maybe you aren't actually running in the d

Re: Loading a .nib?

2008-05-02 Thread Michael Ash
On Fri, May 2, 2008 at 9:19 PM, Graham Cox <[EMAIL PROTECTED]> wrote: > One thing to clarify about Carbon vs. Cocoa - while Cocoa itself is > unavailable, you can of course use Core Foundation. However everything in > Carbon is lower level and generally more work than Cocoa, so be prepared ;-) Co

Re: Custom View initialization: where?

2008-05-02 Thread Markus Spoettl
On May 2, 2008, at 7:11 PM, Graham Cox wrote: Sounds OK - so post your code. The documentation is correct. Well the code is totally straight forward: @interface MyView : NSView { MyObjectData *data; } @property (readonly) MyObjectData *data; - (id)initWithFrame:(NSRect)frame; @end @i

Re: Mail type in-line objects

2008-05-02 Thread Mike Glass
Have a look at the documentation for NSTokenField, it does what you are looking for. http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSTokenField_Class/Reference/Reference.html -Mike On May 2, 2008, at 10:27 PM, Matthew Weinstein wrote: Hoping that there is so

Mail type in-line objects

2008-05-02 Thread Matthew Weinstein
Hoping that there is somewhere a class or a demo of how to code for nstextview and the like little objects like the mail addresses in the to: line of apple mail. Hope someone can help; it would help bring my app to a new level. Matthew Weinstein [EMAIL PROTECTED] _

Re: Cache Class review (low priority)

2008-05-02 Thread Chris Hanson
On May 2, 2008, at 9:32 AM, Western Botanicals wrote: http://expresslanevideo.com/transfer/code/CacheTesterh.txt http://expresslanevideo.com/transfer/code/CacheTesterm.txt You can use Xcode's unit testing functionality -- built atop Sen:te's OCUnit framework -- to write tests in a standard f

Re: Graphics seen when volume is modified.

2008-05-02 Thread Jamie Phelps
You might also check out the RoundedFloatingPanel code from Matt Gemmell: http://mattgemmell.com/source about 60% of the way down. JP On May 2, 2008, at 3:38 AM, John Clayton wrote: Hi All, Does anyone know of some code that mimics the graphics that are displayed by Apple when one modifie

Re: Custom View initialization: where?

2008-05-02 Thread Graham Cox
Sounds OK - so post your code. The documentation is correct. G. On 3 May 2008, at 12:05 pm, Markus Spoettl wrote: Following the "View Programming Guide for Cocoa" if I use a Custom- View proxy in IB, the view's initWithFrame: method will be called when the NIB is loaded (this can be found i

Custom View initialization: where?

2008-05-02 Thread Markus Spoettl
Following the "View Programming Guide for Cocoa" if I use a Custom- View proxy in IB, the view's initWithFrame: method will be called when the NIB is loaded (this can be found in "Initializing View Instances Created in Interface Builder"). I do have a custom NSView derived view and a simple

Re: Implementing fast enumeration

2008-05-02 Thread Adam R. Maxwell
On May 2, 2008, at 12:18 PM, Ben wrote: Re-sending as this did not seem to get make it to the list. I have been reading the documentation for implementing the NSFastEnumeration protocol and am having some difficulties following it. [...] Apologies if these are basic questions, but I got

Re: ANN: CDBStore, a lightweight persistent dictionary

2008-05-02 Thread Jeff LaMarche
On May 2, 2008, at 9:07 PM, Jens Alfke wrote: CDBStore is a kind of middle ground between simple property-lists or archived objects, and CoreData. There's a very large empty space there, and I kept getting annoyed by having to cobble together yet another bit of code to read and write a dict

Re: Loading a .nib?

2008-05-02 Thread Graham Cox
On 3 May 2008, at 10:45 am, J. Todd Slack wrote: I have a question. 1. Can you point me to where it puts the UI inside the iTunes Visualizer window? Not sure what you mean by "putting the UI in the iTunes visualizer window"? It doesn't - it creates a separate dialog window which seems

Re: Loading a .nib?

2008-05-02 Thread Jens Alfke
On 2 May '08, at 5:41 PM, J. Todd Slack wrote: I actually want to try to stay as cross-platform as possible since this will need to work on Windows down the road. Well, then you can't use Objective-C, or nibs, at all, as neither of those are available on Windows. You'd be better off usin

Re: Implementing fast enumeration

2008-05-02 Thread Jens Alfke
On 2 May '08, at 12:18 PM, Ben wrote: I have a C array where the elements within it can be converted into multiple objects. Say I have 5 objects. Do I provide them all in one go and return the total number? Or just one per call and return the number remaining? Return as many as you can a

ANN: CDBStore, a lightweight persistent dictionary

2008-05-02 Thread Jens Alfke
http://mooseyard.com/projects/CDBStore/ CDBStore is a file-backed persistent dictionary. You can store and retrieve values using keys; only the values you ask for get read from the file, and only modified values get written back to the file. The values can be arbitrary archivable NSObjects

Re: NSKeyedUnarchiver memory management ?

2008-05-02 Thread Jens Alfke
On 2 May '08, at 3:29 PM, Angel Todorov wrote: I want to serialize in an archive a set of objects (big ones) that are instances of a class which implements NSCoding. On deserialization, I don't want the whole archive to be loaded in memory, but only the object for the *key* that I am reque

Re: Loading a .nib?

2008-05-02 Thread J. Todd Slack
Hi Brian, [NSBundle loadNibNamed:@"SettingsDialog" owner:self]; // the nib name is SettingsDialog.nib Xcode complains that this is the first time that self is used. Isn't there some sample code for building Cocoa iTunes plugins available somewhere that will answer these questions for you

Re: Loading a .nib?

2008-05-02 Thread Brian Stern
On May 2, 2008, at 7:33 PM, J. Todd Slack wrote: Hi, One question though. When I use: [NSBundle loadNibNamed:@"SettingsDialog" owner:self]; // the nib name is SettingsDialog.nib Xcode complains that this is the first time that self is used. You probably want to create an instance of a

Re: Loading a .nib?

2008-05-02 Thread Graham Cox
iTunes is a Carbon app, so there is no Cocoa runtime available. You can use a nib, but it has to be a Carbon one, so the functions you need to look at are in the HIView family of Carbon functions. There may be a way to set up a Cocoa runtime in an iTunes plugin but I'm not sure about that.

Implementing fast enumeration

2008-05-02 Thread Ben
Re-sending as this did not seem to get make it to the list. I have been reading the documentation for implementing the NSFastEnumeration protocol and am having some difficulties following it. For completeness, here is the protocol method: - (NSUInteger)countByEnumeratingWithState:(NSFastEnume

Re: Putting an Icon in the MenuBar

2008-05-02 Thread Nick Zitzmann
On May 2, 2008, at 6:18 PM, J. Todd Slack wrote: Does anyone have an example on how to put an icon in the menu bar for my app. I want something like the airport menu, volume menu, spaces menu (on Leopard), etc if this helps explain what I want to do. I am not even sure what to call this...

Putting an Icon in the MenuBar

2008-05-02 Thread J. Todd Slack
Hi Everyone, Does anyone have an example on how to put an icon in the menu bar for my app. I want something like the airport menu, volume menu, spaces menu (on Leopard), etc if this helps explain what I want to do. I am not even sure what to call this Any thoughts? Thanks, -Jason __

Re: Rotating an NSTableView.

2008-05-02 Thread Michael Nickerson
On May 1, 2008, at 8:27 AM, Peter Hudson wrote: I have an NSTable View inside an NSSplitView. I rotate the table view by sending rotateByAngle:270 to the enclosing scroll view. The table lands up exactly as I want it with vertical rows. The problem is that when I resize the split view

Re: Read XML from the web

2008-05-02 Thread Mr. Gecko
Thanks I will look into it On May 2, 2008, at 6:40 PM, Nick Zitzmann wrote: On May 2, 2008, at 5:36 PM, Mr. Gecko wrote: Hello how would you get xml data from the web and read it in cocoa. [[NSXMLDocument alloc] initWithData:[NSData dataWithContentsOfURL:@"http://somewhere.com/something.xm

Re: Read XML from the web

2008-05-02 Thread Nick Zitzmann
On May 2, 2008, at 5:36 PM, Mr. Gecko wrote: Hello how would you get xml data from the web and read it in cocoa. [[NSXMLDocument alloc] initWithData:[NSData dataWithContentsOfURL:@"http://somewhere.com/something.xml "] options:0 error:NULL]; You might want to set options and an error obje

Re: Loading a .nib?

2008-05-02 Thread Nick Zitzmann
On May 2, 2008, at 5:33 PM, J. Todd Slack wrote: When I use: [NSBundle loadNibNamed:@"SettingsDialog" owner:self]; // the nib name is SettingsDialog.nib Xcode complains that this is the first time that self is used. I am a bit rusty right now, can anyone explain why? I thought self coul

Re: Loading a .nib?

2008-05-02 Thread Michael Vannorsdel
I should have mentioned, if you're calling from C there probably is no 'self' since you're not calling from inside an object's method. You'll have to pass a pointer to the object you want to be the owner. On May 2, 2008, at 5:33 PM, J. Todd Slack wrote: One question though. When I use:

Read XML from the web

2008-05-02 Thread Mr. Gecko
Hello how would you get xml data from the web and read it in cocoa. My xml file is like this http://www.example.com/file1"; size="522656" name="File Number 1"/> http://www.example.com/file2"; size="4533" name="File Number 2"/> I am using the same one that I am using for flash.

Re: Loading a .nib?

2008-05-02 Thread J. Todd Slack
Hi, One question though. When I use: [NSBundle loadNibNamed:@"SettingsDialog" owner:self]; // the nib name is SettingsDialog.nib Xcode complains that this is the first time that self is used. I am a bit rusty right now, can anyone explain why? I thought self could be used like this. Wh

Re: Loading a .nib?

2008-05-02 Thread Michael Vannorsdel
You can convert this to the C equivalent if you absolutely must use C (off the top of my head): Class mclass = objc_getMetaClass("NSBundle"); SEL s = @selector(loadNibNamed:owner:); IMP f = class_getMethodImplementation(mclass, s); BOOL res = f(mclass, s, @"SettingsDialog", self); O

Re: Loading a .nib?

2008-05-02 Thread Uli Kusterer
Am 03.05.2008 um 00:38 schrieb J. Todd Slack: But that is Objective-C, I need to do it from a .c file. No you don't. Objective C is a superset of C, so if you want to us Objective C, just change the file into a .m file. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere...

Re: Loading a .nib?

2008-05-02 Thread Nick Zitzmann
On May 2, 2008, at 4:38 PM, J. Todd Slack wrote: Yeah, I am using: [NSBundle loadNibNamed:@"SettingsDialog" owner:self;] But that is Objective-C, I need to do it from a .c file. Change the file's extension from .c to .m and then it becomes an ObjC file. ObjC is a true superset of C, so t

Re: Graphics seen when volume is modified.

2008-05-02 Thread Jean-Daniel Dupas
Le 2 mai 08 à 23:00, Kyle Sluder a écrit : On Fri, May 2, 2008 at 4:51 PM, Shawn Erickson <[EMAIL PROTECTED]> wrote: You can get rounded corners, etc. by setting the background color for the window to be an image of the color and shape you want or by having the content view define the shap

Re: Loading a .nib?

2008-05-02 Thread J. Todd Slack
Hi Jon, Thank you for the reply. I don't know the specifics of iTunes plug-ins, but normally you load a NIB with -[NSBundle loadNibFile:externalNameTable:withZone:] method. That method, and some more convenient form of it are available in AppKit and declared in NSNibLoading.h. Yeah, I am

Re: Loading a .nib?

2008-05-02 Thread Jonathan Hess
Hey Jason - I don't know the specifics of iTunes plug-ins, but normally you load a NIB with -[NSBundle loadNibFile:externalNameTable:withZone:] method. That method, and some more convenient form of it are available in AppKit and declared in NSNibLoading.h. Good Luck - Jon Hess On May 2,

Re: Loading a .nib?

2008-05-02 Thread J. Todd Slack
Hi Guys, Just to clarify, I might do this in Obj-C [NSBundle loadNibNamed:@"SettingsDialog" owner:self;] But not sure how to do it from a .c file. Thoughts? -Jason On May 2, 2008, at 3:29 PM, J. Todd Slack wrote: Hello Guys, So I am creating an iTunes PLugin, can anyone show me how to

NSKeyedUnarchiver memory management ?

2008-05-02 Thread Angel Todorov
Hi all, I want to serialize in an archive a set of objects (big ones) that are instances of a class which implements NSCoding. On deserialization, I don't want the whole archive to be loaded in memory, but only the object for the *key* that I am requesting. Does NSKeyedUnarchiver (I mean, the arch

Loading a .nib?

2008-05-02 Thread J. Todd Slack
Hello Guys, So I am creating an iTunes PLugin, can anyone show me how to load ..nib file? I have looked for examples and I am just not finding what I need. Thanks, -Jason ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not pos

Re: Making my own menubar

2008-05-02 Thread Andy Lee
On May 2, 2008, at 3:54 PM, Jens Alfke wrote: Probably the best start is to make a row of NSPopUpButton controls in 'drop-down' mode. It won't be exactly like the real menu-bar, though (dragging from one menu to another won't work, nor will the accessibility keyboard shortcuts.) And on Tig

Re: Making my own menubar

2008-05-02 Thread Kyle Sluder
On Fri, May 2, 2008 at 4:44 PM, Mike <[EMAIL PROTECTED]> wrote: > I mean that I need a menubar in a fullscreen window that my app owns, but > it can't be the standard system menubar because one of the things my app has > to do is prevent the user from accessing anything outside my app. Have you t

Re: Graphics seen when volume is modified.

2008-05-02 Thread Kyle Sluder
On Fri, May 2, 2008 at 4:51 PM, Shawn Erickson <[EMAIL PROTECTED]> wrote: > You can get rounded corners, etc. by setting the background color for > the window to be an image of the color and shape you want or by having > the content view define the shape. Well yes, of course you can have arbitr

Re: Graphics seen when volume is modified.

2008-05-02 Thread Shawn Erickson
On Fri, May 2, 2008 at 1:09 PM, Kyle Sluder <[EMAIL PROTECTED]> wrote: > On Fri, May 2, 2008 at 2:41 PM, Christopher Nebel <[EMAIL PROTECTED]> wrote: > > Alternatively, you could mimic the effect using a transparent panel [1] -- > > I expect that's what Growl is doing. > > Unfortunately if you

Re: Making my own menubar

2008-05-02 Thread Mike
Shawn Erickson wrote: On Fri, May 2, 2008 at 12:06 PM, Mike <[EMAIL PROTECTED]> wrote: I need to make a fullscreen app in which my window takes over the main display. I need to be able to prevent the user from accessing the main system menu bar. Hiding it is no problem but I need to create my ow

Re: Unit Test error XCode 3.1 (Beta)

2008-05-02 Thread Shawn Erickson
On Fri, May 2, 2008 at 9:26 AM, Sean frazier <[EMAIL PROTECTED]> wrote: > is there an Xcode 3.1/iPhone list? No. Check the release notes for information on how to submit feedback / ask for assistance. -Shawn ___ Cocoa-dev mailing list (Cocoa-dev@lists.

Re: Cache Class review (low priority)

2008-05-02 Thread Uli Kusterer
Am 02.05.2008 um 20:03 schrieb Jens Alfke: You're probably running this as a GUI-less tool process, i.e. directly calling your code from main(). If you do this, you need to create a top-level autorelease pool before calling into your code. In general, main() looks like: int main(

Re: Graphics seen when volume is modified.

2008-05-02 Thread Kyle Sluder
On Fri, May 2, 2008 at 2:41 PM, Christopher Nebel <[EMAIL PROTECTED]> wrote: > Alternatively, you could mimic the effect using a transparent panel [1] -- > I expect that's what Growl is doing. Unfortunately if you pass NSBorderlessWindowMask to a HUD window you lose the rounded corners. I'm sure

Re: Making my own menubar

2008-05-02 Thread Jens Alfke
On 2 May '08, at 12:06 PM, Mike wrote: Is there an easy way to do this or do I have to do all my own drawing in order to create my own custom menubar at the top of my fullscreen window? You're pretty much on your own. Probably the best start is to make a row of NSPopUpButton controls in

Re: Making my own menubar

2008-05-02 Thread Shawn Erickson
On Fri, May 2, 2008 at 12:06 PM, Mike <[EMAIL PROTECTED]> wrote: > I need to make a fullscreen app in which my window takes over the main > display. I need to be able to prevent the user from accessing the main > system menu bar. Hiding it is no problem but I need to create my own menubar > at the

Making my own menubar

2008-05-02 Thread Mike
I need to make a fullscreen app in which my window takes over the main display. I need to be able to prevent the user from accessing the main system menu bar. Hiding it is no problem but I need to create my own menubar at the top of the fullscreen window that I create. Is there an easy way to

[ANN] New version of AMRollOverButton with IB3 plugin

2008-05-02 Thread Andreas Mayer
Rollover buttons highlight when you move the mouse pointer over them. The appearance is widely configurable. Now comes with an Interface Builder 3.x plugin. http://www.harmless.de/cocoa-code.php#rollover This source code is available under the BSD License. Andreas

Re: Displaying one NSTextStorage with two sets of temporary attributes

2008-05-02 Thread Adam C.M. Solove
First, Ross, thank you for your comments. I was going about this somewhat wrong and you took the time to think it through. I think you are right that it would be easiest to separate the different note series into their own TextStorage. Then I could add custom attributes to each text that determine

Re: Graphics seen when volume is modified.

2008-05-02 Thread Christopher Nebel
On May 2, 2008, at 4:00 AM, I. Savant wrote: Any info about the box or code that emulates this would be useful, There's no public API, but there's this: http://growl.info/documentation/developer/ Alternatively, you could mimic the effect using a transparent panel [1] -- I expect that's w

Re: Interesting NSPathControl Behavior

2008-05-02 Thread Corbin Dunn
On May 1, 2008, at 6:47 PM, Mike Rossetti wrote: So I've discovered an interesting behavior in NSPathControl and am wondering if it warrants a Radar. I'm building up my own presentation of the file path to be shown in the NSPathControl. Specifically, if the file for which the path is bei

Re: Image reflection in IKImageBrowserView

2008-05-02 Thread Jens Alfke
On 1 May '08, at 11:57 PM, Aby wrote: How to implement Image reflection for all the images in IKImageBrowserView. You can't make the view draw reflections; it's not very customizable at all. The best you can do is give it images that already have reflections in them. Take each o

Re: Cache Class review (low priority)

2008-05-02 Thread Jens Alfke
On 2 May '08, at 9:32 AM, Western Botanicals wrote: The reason I put the AutoReleasePools in there is because I am getting these errors in the output. So if you can help me find what is wrong that would be great. Every time I create a Date or Timer object, I get one or both of these: You

Re: Displaying one NSTextStorage with two sets of temporary attributes

2008-05-02 Thread Ross Carter
Hi Adam, I guess that the approach you will take depends on how the textStorage string is set up. Sorry, I don't know anything about TEI, so I can only offer general comments. If the textStorage series are sequential and the number and sequence of series are known in advance, and the text

Very strange Xcode debugger issue.

2008-05-02 Thread David Springer
Folks, Xcode 2.5 on Leopard, app and all libs built with 10.4u SDK. If I debug my app using Xcode 2.5 (in the GUI), I get these errors while calling the destructor of an object created on the stack: MyApp(26961,0xa02e3fa0) malloc: *** error for object 0x28001660: pointer being freed was not allo

Re: CGevent and cocoa compatibility

2008-05-02 Thread Ben Lachman
Yup, this is true as far as I can tell. I've got the event tap installed, the issue is that I'm not able to pull any useful data out of NX_SYSDEFINED typed events. Any thoughts on that? ->Ben -- Ben Lachman Acacia Tree Software http://acaciatreesoftware.com email: [EMAIL PROTECTED] twitter

Re: Displaying one NSTextStorage with two sets of temporary attributes

2008-05-02 Thread Adam C.M. Solove
Actually, you're right that merely suppressing display is all I need. I was assuming this would have to be done with temporary attributes, but is there an easier way? THank you, Adam Solove On Fri, May 2, 2008 at 7:57 AM, Ross Carter <[EMAIL PROTECTED]> wrote: > I'm not sure whether you need to

Re: Cache Class review (low priority)

2008-05-02 Thread Western Botanicals
Thanks for more input. I have revised it yet again... and it seems to be working just fine. The reason I put the AutoReleasePools in there is because I am getting these errors in the output. So if you can help me find what is wrong that would be great. Every time I create a Date or Timer ob

Re: Unit Test error XCode 3.1 (Beta)

2008-05-02 Thread Sean frazier
is there an Xcode 3.1/iPhone list? thx. sean On May 2, 2008, at 12:16 PM, Kyle Sluder wrote: Xcode 3.1 is in beta and is therefore subject to NDA. The iPhone SDK is subject to NDA. This question has nothing to do with Cocoa. Perhaps you've posted to the wrong list? --Kyle Sluder

Re: Unit Test error XCode 3.1 (Beta)

2008-05-02 Thread Kyle Sluder
Xcode 3.1 is in beta and is therefore subject to NDA. The iPhone SDK is subject to NDA. This question has nothing to do with Cocoa. Perhaps you've posted to the wrong list? --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please

Re: drawing in a separate thread

2008-05-02 Thread Jean-Daniel Dupas
Le 2 mai 08 à 17:27, Jens Alfke a écrit : On 2 May '08, at 4:20 AM, Jean-Daniel Dupas wrote: You can have a look at DistributedObject. I think you can publish a drawer object in your drawing thread and then, just call draw fro your main thread. DO might be overkill for this scenario. Th

Re: drawing in a separate thread

2008-05-02 Thread Graham Cox
OK, I have managed to implement this after a lot of poring over the docs. I'm not sure if it's the most efficient way to actually handle the thread communication, but it does work (using NSMachPort). As I hoped, there isn't a big problem with drawing the graphics as they should be, apart fr

Re: drawing in a separate thread

2008-05-02 Thread Jens Alfke
On 2 May '08, at 4:20 AM, Jean-Daniel Dupas wrote: You can have a look at DistributedObject. I think you can publish a drawer object in your drawing thread and then, just call draw fro your main thread. DO might be overkill for this scenario. The background thread really just needs to ru

Re: Cache Class review (low priority)

2008-05-02 Thread Jens Alfke
On 2 May '08, at 4:37 AM, Gregory Weston wrote: Not unless the docs are lying (and based on heavy timer usage in some of my apps, I'm going to claim they're not). From the NSTimer overview: "Note in particular that run loops retain their timers, so you can release a timer after you have

Re: Forwarding messages from an application delegate

2008-05-02 Thread Graham Cox
On 3 May 2008, at 12:56 am, Matthew Gertner wrote: Seems like you can "pretend" you implement them using respondsToSelector (see Graham's reply). Exactly - the delegate is sent the message if it says it implements it, even if it really doesn't. Then NSObject says "wait a minute, I don't

Re: Forwarding messages from an application delegate

2008-05-02 Thread Bill Cheeseman
on 2008-05-02 10:44 AM, Graham Cox at [EMAIL PROTECTED] wrote: > You also need to override -respondsToSelector: and return a logical OR > of your delegate plus the old delegate's response, something like: I use this techhnique in my PreFab Event Taps Testbench utility. I call this the "delegate

Re: Displaying one NSTextStorage with two sets of temporary attributes

2008-05-02 Thread Ross Carter
I'm not sure whether you need to change a particular set of attributes (font, line spacing, tabs, etc) in each layout manager or merely suppress the display of text in other series. If the former, I would think that the layout manager is not best place to handle the attribute fixing. I'd th

Re: Forwarding messages from an application delegate

2008-05-02 Thread Matthew Gertner
Seems like you can "pretend" you implement them using respondsToSelector (see Graham's reply). On Fri, May 2, 2008 at 4:53 PM, Andy Lee <[EMAIL PROTECTED]> wrote: > Delegate methods aren't sent at all unless the delegate implements them. I > think your delegate is going to have to implement all p

Re: Forwarding messages from an application delegate

2008-05-02 Thread Matthew Gertner
Thanks, Graham. It seems like the superclass deals with rejecting the message, but I was missing respondsToSelector. Added that and now it works perfectly! Matt On Fri, May 2, 2008 at 4:44 PM, Graham Cox <[EMAIL PROTECTED]> wrote: > You also need to override -respondsToSelector: and return a logi

Re: Forwarding messages from an application delegate

2008-05-02 Thread Andy Lee
This is smarter than my suggestion. --Andy On May 2, 2008, at 10:44 AM, Graham Cox wrote: You also need to override -respondsToSelector: and return a logical OR of your delegate plus the old delegate's response, something like: - (BOOL)respondsToSelector:(SEL) aSelector { BOO

Re: Forwarding messages from an application delegate

2008-05-02 Thread Andy Lee
Delegate methods aren't sent at all unless the delegate implements them. I think your delegate is going to have to implement all possible delegate methods and then forward them *if* the old delegate implements them, and otherwise return an appropriate default value if there is a return val

Re: Forwarding messages from an application delegate

2008-05-02 Thread Graham Cox
You also need to override -respondsToSelector: and return a logical OR of your delegate plus the old delegate's response, something like: - (BOOL)respondsToSelector:(SEL) aSelector { BOOL responds = [super respondsToSelector:aSelector]; if( !responds )

Forwarding messages from an application delegate

2008-05-02 Thread Matthew Gertner
Hi, I am implementing an application delegate for a framework (Mozilla) that already registers its own delegate internally. Ideally I would like to be able to handle specific delegate messages in my class (in this case adding items to the dock tile menu) and forward all other invocations to the ol

CALayer backgroundFilters can't cope with animated backgrounds?

2008-05-02 Thread Jonathan del Strother
Hi, I have a CALayer covering my view, with a blur background filter. Works fine for static cases - everything behind the blur layer is blurred. However, for layers that update themselves continuously - eg QTMovieLayer or QCCompositionLayer - or even just plain layers that move, I get ugly trails a

Re: NSFormatter, NSTextfield and bindings

2008-05-02 Thread Yann Disser
Ok, I found my problem myself. In -(BOOL)getObjectValue:(id*)obj forString:(NSString*)string errorDescription:(NSString**)error { if(obj) *obj = string; return YES; } the line *obj = string; needs to be replaced with *obj = [NSString stringWithString:string]; I alway

Re: Disabling screen turning off

2008-05-02 Thread Jeff Nouwen
On May-2-2008, at 2:26 AM, Jere Gmail wrote: I know I can stop the machine from going to sleep through calling the function UpdateSystemActivity ( UInt8 activity ); But I also want to stop it from turning off the screen, as quicktime or vlc do. How can I do this? Pass in UsrActivity as you

Unit Test error XCode 3.1 (Beta)

2008-05-02 Thread Rakesh Vidyadharan
I am a beginner with Cocoa and XCode. I am trying to develop a simple game for iPhone/iPod Touch and OS X. To get started I created a simple framework that represents (code only for iPhone) the data model and logic engine for the game. I am now writing some simple unit tests for the core

Re: Cache Class review (low priority)

2008-05-02 Thread Gregory Weston
Jens Alfke wrote: On 1 May '08, at 4:49 PM, Western Botanicals wrote: [NSTimer scheduledTimerWithTimeInterval: defaultSleepTime target: self selector: @selector(run:) userInfo: nil repeats: YES]; That timer is autoreleased, so you have to retain it or it'll go away after your init method ret

Re: drawing in a separate thread

2008-05-02 Thread Jean-Daniel Dupas
You can have a look at DistributedObject. I think you can publish a drawer object in your drawing thread and then, just call draw fro your main thread. To be more generic, a worker thread may do this: - start and setup thread. - create IPC objects. (publish an object using Distributed object

Re: drawing in a separate thread

2008-05-02 Thread Graham Cox
On 2 May 2008, at 6:13 pm, Kyle Sluder wrote: On Fri, May 2, 2008 at 3:13 AM, Graham Cox <[EMAIL PROTECTED]> wrote: I realise these questions must sound rather fundamental, but nothing in the Cocoa Drawing Guide or Thread Guide really addresses them. I have used threads before to perform t

Re: Graphics seen when volume is modified.

2008-05-02 Thread I. Savant
Any info about the box or code that emulates this would be useful, There's no public API, but there's this: http://growl.info/documentation/developer/ -- I.S. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requ

Re: CGevent and cocoa compatibility

2008-05-02 Thread Bill Cheeseman
on 2008-05-02 4:34 AM, John Clayton at [EMAIL PROTECTED] wrote: > Installing an event tap that modifies the event chain won't require > special privs (from memory), so long as you don't install it at the > window server level. Working with the key down and key up events via event taps requires th

Re: class_addMethod and type encodings.

2008-05-02 Thread Keith Duncan
3) The only doco I can find for type encodings in ObjC is the "Runtime System > Type Encodings" page. Is there any other doco I should be reading? You can use the @encode() helper. This is also useful when using NS(U)Integer as it will encode the correct type for 32/64 bit depending on th

Re: Xcode debugger quality

2008-05-02 Thread Jean-Daniel Dupas
No, but it remain the "Load symbols lazily" preference that should be disabled. It may solve some "debugger does not break" issues. Le 2 mai 08 à 06:36, Scott Ribe a écrit : This may not apply anymore It doesn't even exist in Xcode 3. -- Scott Ribe [EMAIL PROTECTED] http://www.killerbytes

Graphics seen when volume is modified.

2008-05-02 Thread John Clayton
Hi All, Does anyone know of some code that mimics the graphics that are displayed by Apple when one modifies the system volume? Specifically the grey box + white shadowed text that pops up briefly. I want to do something similar in my app, so any kind of guiding code would be useful.

  1   2   >