CGevent and cocoa compatibility

2008-05-02 Thread Ben Lachman
Does anyone know how to get the keycode out of a NX_SYSDEFINED CGEvent? If so, is that keycode the same thing you'd get out of say (([event data1] 0x) 16)? I'm trying to support the media keys on the Apple aluminum keyboards without having iTunes also get the events. Thanks,

drawing in a separate thread

2008-05-02 Thread Graham Cox
I think I would like to try drawing my app's content in a secondary thread to see if it will improve performance and teh snappy™. Docs on this topic are a bit sketchy, and I've not been able to put my finger on any sample code that is pertinent. The docs mention bracketing all drawing

Re: drawing in a separate thread

2008-05-02 Thread Kyle Sluder
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 tasks not involving drawing, so I'm not completely

Re: Interesting NSPathControl Behavior

2008-05-02 Thread Kyle Sluder
On Thu, May 1, 2008 at 9:47 PM, Mike Rossetti [EMAIL PROTECTED] wrote: So I've discovered an interesting behavior in NSPathControl and am wondering if it warrants a Radar. Since you are overriding -setObjectValue: it's pretty much necessary for you to post your code before making any

Disabling screen turning off

2008-05-02 Thread Jere Gmail
Hi. 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? -- http://zon7blog.wordpress.com/ And again we fall.

Re: CGevent and cocoa compatibility

2008-05-02 Thread John Clayton
Probably means you'll need to use the event taps API and swallow the event - which is relatively simple to achieve as long as you can install an event tap that isnt a listener only. I presume since you're already talked about CGEvent structures, that this is indeed what you are doing -

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.

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]

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 the

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 the

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

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

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

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

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

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

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

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 )

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

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

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: 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: 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: 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

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

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.

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: 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: 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

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

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]

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

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:

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

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

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

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

[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

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

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 top

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: 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: 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: 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

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 own

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 pass

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

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

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

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

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

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 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); On

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.

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:

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 could

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

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

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

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

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: -

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.

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: 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

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

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

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: 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

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

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: 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 in

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

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

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: 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

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

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 ;-) Cocoa

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

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

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.

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 do

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: 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: 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 setup

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

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