Prevent application activation after dragging items to the Dock icon?

2008-03-17 Thread Peter Maurer
Cocoa applications tend to come to the foreground automatically whenever I drag files to their Dock icon. Sometimes, however, I'd prefer my application to stay in the background and just start working on the file, while giving feedback through the Dock icon. But this isn't supposed to be a

make a window not draggable in spaces

2008-03-17 Thread Cocoa Developer
Hi, How to make a window not draggable in spaces. I used to set NSBorderlessWindowMask mask while creating window, when set Full screen. But spaces neglect this mask and allow to drag around. Thank you, Bas ___ Cocoa-dev mailing list (Cocoa-dev@lists.ap

Simple question

2008-03-17 Thread Cocoa
I have studying Cocoa - objective-C by myself for a few days ( im entirely new to programming). There's a question I wanna know about. When you create a project in XCode, and add a new class, does anyone know what .h file and .m respectively for? I mean if they have their own jobs in the co

Bitmap fonts in Cocoa apps, line-height bug

2008-03-17 Thread Tobia Conforto
Hello I would like to know what are the best practices and recommended programs for preparing bitmap fonts for use in Cocoa applications. I'm also reporting what is probably a bug in either OS X or the available font editors. If there is a list better suited to this question, please poin

Re: Distributed Objects NSPortTimeoutException

2008-03-17 Thread John Pannell
Hi there- This may or may not apply to your situation, but I had an incident a few weeks ago in which I could not get DO to work with communication between machines using NSSocketPorts. I was on Leopard and using garbage collection. When I posted to the list, I received a response from

Re: Distributed Objects NSPortTimeoutException

2008-03-17 Thread Mac QA
On Mon, Mar 17, 2008 at 8:15 AM, John Pannell <[EMAIL PROTECTED]> wrote: > I was on Leopard and using garbage collection. Unfortunately this problem is occurring on Tiger. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin

RE: Simple question

2008-03-17 Thread Luca Ciciriello
Yes, you got it. .h stands for "header" and is the place where you make your declarations, .m stands for "module" and is where the definitions take place. You can encounter also .mm exetension. In these file you can mix Objective-C an C++ language. Luca. ---

Return the value to a pop up window

2008-03-17 Thread Cocoa
I am trying to sodosomething more than the tutorial - Objective-C tutorial.pdf It's a Currency Converter application the part of the code is below: float amount; converter = [[Converter alloc]init]; [converter setSourceCurrencyAmount:[dollarField floatValue]]; [convert

strange "lockFocus sent to a view whose window is deferred" error with an NSOutlineView on Tiger

2008-03-17 Thread Martin Redington
I'm seeing the following error 2008-03-17 12:42:11.916 MyApp[11155] *** Assertion failure in - [MyOutlineView lockFocus], AppKit.subproj/NSView.m:3248 2008-03-17 12:42:11.917 MyApp[11155] lockFocus sent to a view whose window is deferred and does not yet have a corresponding platform window

Re: Simple question

2008-03-17 Thread Scott Thompson
On Mar 17, 2008, at 7:53 AM, Luca Ciciriello wrote: Yes, you got it. .h stands for "header" and is the place where you make your declarations, .m stands for "module" and is where the definitions take place. You can encounter also .mm exetension. In these file you can mix Objective-C an

Re: Simple question

2008-03-17 Thread Rob Keniger
On 17/03/2008, at 11:33 PM, Scott Thompson wrote: I would recommend that you find a nice book on C. I would recommend one, but it's been a while since I've surveyed the literature. I highly recommend "Programming in Objective-C" by Stephen Kochan. IMO it is by far the best introduction to

Re: Simple question

2008-03-17 Thread Kyle Sluder
On Mon, Mar 17, 2008 at 9:33 AM, Scott Thompson <[EMAIL PROTECTED]> wrote: > I would recommend that you find a nice book on C. I would recommend > one, but it's been a while since I've surveyed the literature. Get "The C Programming Language" by Kernighan and Ritchie. It is the gold standard o

Re: Simple question

2008-03-17 Thread Rob Napier
While K&R is certainly the gold standard reference, I wouldn't recommend it as the book to learn the language. Kochan's "Programming in Objective-C" as noted by Rob Keniger is a much better introduction to what you'll need for programming on a Mac. After that one, I recommend Aaron Hillegass's "Coc

Re: Convert NSString to FSRef

2008-03-17 Thread Kevin Dixon
Thanks for all the feed back, its been most helpful. -Kevin > > On Mar 15, 2008, at 12:04 PM, Kevin Dixon wrote: > >> I'm trying to write a method that will convert a NSString containing a >> file system URL to an FSRef with the following code >> >> - (FSRef)stringToFSRef: (NSString*)filePath { >

Re: NSButtonCell doesn't visually update during trackMouse:inRect:ofView:untilMouseUp:

2008-03-17 Thread glenn andreas
On Mar 17, 2008, at 1:42 AM, Ben Lachman wrote: I have a few NSButtonCells that I'm using in a custom view. I need them to track the mouse during clicks and do this by calling NSCell's trackMouse:inRect:ofView:untilMouseUp:. This works fine except that the button cells never update their

Re: ScriptingBridgeConcepts problem

2008-03-17 Thread Christopher Nebel
On Mar 15, 2008, at 2:53 AM, Cocoa wrote: I am reading the Scripting Bridge Concepts.pdf, when I doing this in the terminal i got a error >sdef /Applications/Mail.app | sdp -fh --basename Mail ( what I type in the Terminal) >sdp: unknown type name "OLD message editor". (computer respons

Re: CA: How to wait for an animation to finish?

2008-03-17 Thread Jens Alfke
On 16 Mar '08, at 12:07 PM, John Harper wrote: Implicit animations are useful in many scenarios, but due to the simplicity of the API they don't cover everything. If there are things you'd like to see them extended to support please file bugs. Thanks for your detailed answers, John. The m

Re: Prevent application activation after dragging items to the Dock icon?

2008-03-17 Thread Ryan Poling
There should be a delegate method you can implement to prevent this from happening. Perhaps the following one, although it doesn't look quite right to me. applicationShouldHandleReopen:hasVisibleWindows: -Ryan On Mar 17, 2008, at 12:36 AM, Peter Maurer wrote:

Re: Convert NSString to FSRef

2008-03-17 Thread Sean McBride
On 3/15/08 3:04 PM, Kevin Dixon said: >I'm trying to write a method that will convert a NSString containing a >file system URL to an FSRef > > *SNIP* > >Also, is there a better way to accomplish this? Yes, use the NDAlias classes which provide all sort of useful code to convert to and from: url,

Re: Best Way To Lookup From a Huge Table

2008-03-17 Thread Thomas Davie
I don't think this is a huge table, and hence you're probably best going (as others have suggested) with a hash table of some sort. Your other alternative if it gets up to a larger size would be a decary tree. Use each digit from the number you're looking up to index the tree. Then you h

Modifying glyph storage in NSLayoutManager

2008-03-17 Thread Ross Carter
I have some text items whose glyphs cannot be determined until layout. The text string might contain a marker to draw the current page number, or to sequentially number paragraphs, etc. The glyphs can be determined only by the layout manager; different layout managers for the same text stor

In receiver application, getting file passed in from NSWorkspace openFile:withApplication:

2008-03-17 Thread Ryan Chapman
Hi all, I have an application that uses NSWorkspace openFile:withApplication: to launch another application: [[NSWorkspace sharedWorkspace] openFile:@"/tmp/test.mp3" withApplication:@"/Applications/MaxPostProcessing.app"] In MaxPostProcessing.app, how can I deter

Re: Modifying glyph storage in NSLayoutManager

2008-03-17 Thread Douglas Davidson
On Mar 17, 2008, at 9:31 AM, Ross Carter wrote: What is the correct approach to take when you need NSLayoutManager to make on-the-fly adjustments to the glyphs Usually the glyph generator is used for default glyph generation, and the typesetter is used to make adjustments to the glyphs t

Re: Prevent application activation after dragging items to the Dock icon?

2008-03-17 Thread Jens Alfke
On 17 Mar '08, at 9:26 AM, Ryan Poling wrote: applicationShouldHandleReopen:hasVisibleWindows: No, that delegate call controls what happens if your app is double- clicked when it's already running. Some apps respond to this by opening a new untitled document, for consistency in behavior.

Re: Sorting arrays with strings

2008-03-17 Thread I. Savant
> True, but obsolete. These days (read: 10.3 and later) you can use the > "NSNumericSearch" option, as Malcom suggests. I saw that - I hadn't looked at that part of the documentation in awhile (obviously). I've been thinking that I should take a few weeks to skim all the documents I haven't r

Re: Simple question

2008-03-17 Thread Gregory Weston
Rob Napier wrote: After that one, I recommend Aaron Hillegass's "Cocoa Programming for Mac OS X" which was recently discussed on this list. It assumes a background in C or Objective-C, but is the best book for learning Cocoa. Seconded, with the caveat that the 3rd edition is apparently exp

Re: In receiver application, getting file passed in from NSWorkspace openFile:withApplication:

2008-03-17 Thread Jens Alfke
On 17 Mar '08, at 9:56 AM, Ryan Chapman wrote: In MaxPostProcessing.app, how can I determine the file that was the parameter passed to openFile: ?? In your class that's the NSApplication's delegate, implement the method - (BOOL)application:(NSApplication *)sender openFile:(NSString *)fil

Re: In receiver application, getting file passed in from NSWorkspace openFile:withApplication:

2008-03-17 Thread Robert Tillyard
If you're looking fot the equivalent of argc/argv you might be looking for... NSProcessInfo *procInfo = [NSProcessInfo processInfo]; NSArray *args = [procInfo arguments]; Regards, Rob. On 17 Mar 2008, at 16:56, Ryan Chapman wrote: Hi all, I have an application that uses NSWorkspace ope

Re: strange "lockFocus sent to a view whose window is deferred" error with an NSOutlineView on Tiger

2008-03-17 Thread Michael Nickerson
On Mar 17, 2008, at 9:06 AM, Martin Redington wrote: I'm seeing the following error 2008-03-17 12:42:11.916 MyApp[11155] *** Assertion failure in - [MyOutlineView lockFocus], AppKit.subproj/NSView.m:3248 2008-03-17 12:42:11.917 MyApp[11155] lockFocus sent to a view whose window is deferred

Re: Sorting arrays with strings

2008-03-17 Thread Christopher Nebel
On Mar 15, 2008, at 6:34 AM, I. Savant wrote: is there a way to make an array with objects such as text-12. txt, text-3.txt, text6.txt, text654.txt be sorted like text-3.txt, text-12.txt, text6.txt, text654.txt If you understand what I mean. http://developer.apple.com/qa/qa2004/qa1159.html

Re: Distributed Objects NSPortTimeoutException

2008-03-17 Thread Tony Parker
Hello, If you just cut & paste the code from 'main' in the chatterd server, I would double-check that your connection and root object are being retained properly in your AppController. For example, make sure 'monitor', 'connection', 'chatterServer', and 'receivePort' are not autoreleased

Re: In receiver application, getting file passed in from NSWorkspace openFile:withApplication:

2008-03-17 Thread Jens Alfke
On 17 Mar '08, at 10:06 AM, Robert Tillyard wrote: If you're looking fot the equivalent of argc/argv you might be looking for... NSProcessInfo *procInfo = [NSProcessInfo processInfo]; NSArray *args = [procInfo arguments]; But documents to be opened are never passed through argv; they're se

NSPanel mimic menu behavior

2008-03-17 Thread cai qin
Hi All, I'm using a NSPanel to mimic menu in Tiger these days. I think most of the job has been done except one small problem. What I want to do is that implementing something just behaves like a popUpButton. OK let's get into the point. I got a popUpButton, and I override its cell @implementatio

Re: Prevent application activation after dragging items to the Dock icon?

2008-03-17 Thread Jean-Daniel Dupas
Le 17 mars 08 à 18:01, Jens Alfke a écrit : On 17 Mar '08, at 9:26 AM, Ryan Poling wrote: applicationShouldHandleReopen:hasVisibleWindows: No, that delegate call controls what happens if your app is double- clicked when it's already running. Some apps respond to this by opening a new un

Re: Simple question

2008-03-17 Thread Hamish Allan
On Mon, Mar 17, 2008 at 2:56 PM, Rob Napier <[EMAIL PROTECTED]> wrote: > While K&R is certainly the gold standard reference, I wouldn't > recommend it as the book to learn the language. I thought K&R was great for learning C, but unlike the OP, I had programmed in other languages (e.g. assembler

Re: strange "lockFocus sent to a view whose window is deferred" error with an NSOutlineView on Tiger

2008-03-17 Thread Martin Redington
On 17 Mar 2008, at 17:07, Michael Nickerson wrote: On Mar 17, 2008, at 9:06 AM, Martin Redington wrote: I'm seeing the following error 2008-03-17 12:42:11.916 MyApp[11155] *** Assertion failure in - [MyOutlineView lockFocus], AppKit.subproj/NSView.m:3248 2008-03-17 12:42:11.917 MyApp[1115

NSTreeController & NSOutlineView bindings w/ Core Data

2008-03-17 Thread Ian Kennedy
I'm hoping this is simple, but everything I read makes it seem much more complicated than I think it should be. I have this simple model: http://img.skitch.com/20080317-8wxj68njnsek652bnwaahm3t5b.png In IB I instantiated an NSTreeController bound to the application delegate with a pa

Apple Events and automatic AutoReleasePool managment

2008-03-17 Thread Andy Klepack
The Memory Management Programming Guide (http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Concepts/AutoreleasePools.html#//apple_ref/doc/uid/2047) states "The Application Kit automatically creates a pool at the beginning of an event cycle (or event-loop iteration), such a

Re: Best Way To Lookup From a Huge Table

2008-03-17 Thread James Hober
To me, "best" large table lookup comes down to a tradeoff: 1) If I can load all the data into memory, using say a hash table, then the initial load time will be somewhat significant but the lookups will be near instantaneous. 2) If I can look up the data from an ordered persistent store, th

Re: Python/Ruby for Cocoa (was: Simple question)

2008-03-17 Thread Paul Sargent
On 17 Mar 2008, at 17:46, Hamish Allan wrote: If you're cutting your programming teeth on Cocoa, you might find that Python or Ruby is gentler. I'm not sure I agree. Two problems for me. * Cocoa isn't a seamless fit with either python or ruby, so there are little corner cases around that d

Re: In receiver application, getting file passed in from NSWorkspace openFile:withApplication:

2008-03-17 Thread Ryan Chapman
Is there any way to get this information from within a command-line utility? In my case, I have a command-line utility wrapped up in an application bundle, so I really don't need any GUI stuff, but I thought I could use the Cocoa classes to get the filename sent without launching a GUI. -

Re: strange "lockFocus sent to a view whose window is deferred" error with an NSOutlineView on Tiger

2008-03-17 Thread Martin Redington
I overrode lockFocus, and stuck a breakpoint on it. #0 0x004f87ea in -[MyOutlineView lockFocus] at MyOutlineView.m:75 #1 0x93310315 in -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] #2 0x9332238f in _recursiveDisplayInRect2 #3 0x9083eac0 in CFArrayApplyFunction #4 0x

Re: Prevent application activation after dragging items to the Dock icon?

2008-03-17 Thread Jens Alfke
On 17 Mar '08, at 10:42 AM, Jean-Daniel Dupas wrote: Why no? The documentation says: «These events are sent whenever the Finder reactivates an already running application because someone double-clicked it again or used the dock to activate it.» That means "clicked on its icon in the Doc

Re: Python/Ruby for Cocoa (was: Simple question)

2008-03-17 Thread Sherm Pendley
On Mon, Mar 17, 2008 at 2:39 PM, Paul Sargent <[EMAIL PROTECTED]> wrote: > > On 17 Mar 2008, at 17:46, Hamish Allan wrote: > > > If you're cutting your programming teeth on Cocoa, you might find that > > Python or Ruby is gentler. > > I'm not sure I agree. Two problems for me. > > * Cocoa isn't a

Re: Modifying glyph storage in NSLayoutManager

2008-03-17 Thread Ross Carter
Thank you immensely, Douglas. I've now got something working if I need to insert one or two glyphs, but it crashes on three or more glyphs. You're right, I need to fix my code for invoking the actual glyph replacement. For now, let's assume that the attributedString contains only one charac

Re: Apple Events and automatic AutoReleasePool managment

2008-03-17 Thread Jens Alfke
On 17 Mar '08, at 11:38 AM, Andy Klepack wrote: Does an 'event cycle' then include anything dispatched from a run loop source? For instance, if I was to create a kqueue, create a run loop source for it, and add that to the main run loop, does an AutoReleasePool automatically get created be

Re: In receiver application, getting file passed in from NSWorkspace openFile:withApplication:

2008-03-17 Thread Jens Alfke
On 17 Mar '08, at 12:00 PM, Ryan Chapman wrote: Is there any way to get this information from within a command-line utility? In my case, I have a command-line utility wrapped up in an application bundle, so I really don't need any GUI stuff, but I thought I could use the Cocoa classes to

CoreData: Incompatible model configuration problem...

2008-03-17 Thread Martin Linklater
Hi. My Core Data Application is producing 'Incompatible model configuration' errors which don't make sense to me Anyone got any ideas ...? My Application contains 4 data models - OptDataDump, Market, Local and EVEAPI. Each of the entities in the data models are set to have the configu

Re: strange "lockFocus sent to a view whose window is deferred" error with an NSOutlineView on Tiger: SOLVED

2008-03-17 Thread Martin Redington
I overrode -[NSTableView setFrameSize:] in my outline view class, so that it only calls super if the size has really changed. This seems to fix the issue - setFrameSize: gets called a few times as I add the view - the first few times the values haven't changed. By the time they do change,

Equivalent to Carbon's TransitionWindow(); using genie when opening an NSWindow

2008-03-17 Thread Sean McBride
Hi all, I'd like to use the genie effect (or similar) when opening and closing an NSWindow. Carbon has an API named TransitionWindow() for this task, but it's 32-bit only. I've searched the archives and it seems there is no Cocoa equivalent? Is this still so, even in 10.5? Could Core Animation

Re: NSButtonCell doesn't visually update during trackMouse:inRect:ofView:untilMouseUp:

2008-03-17 Thread Ken Ferry
On Mon, Mar 17, 2008 at 8:49 AM, glenn andreas <[EMAIL PROTECTED]> wrote: > > On Mar 17, 2008, at 1:42 AM, Ben Lachman wrote: > > > I have a few NSButtonCells that I'm using in a custom view. I need > > them to track the mouse during clicks and do this by calling > > NSCell's trackMouse:inRect

Re: Return the value to a pop up window

2008-03-17 Thread Rob Napier
On Mon, Mar 17, 2008 at 9:00 AM, Cocoa <[EMAIL PROTECTED]> wrote: > I am trying to sodosomething more than the tutorial - Objective-C > tutorial.pdf > > It's a Currency Converter application > > the part of the code is below: > > float amount; > converter = [[Converter alloc]init]; >

Re: make a window not draggable in spaces

2008-03-17 Thread Michael Watson
Why do you want to do this? I would be pretty annoyed if I couldn't drag a window from space to space if it appeared in my zoomed-out spaces. -- m-s On 17 Mar, 2008, at 06:28, Cocoa Developer wrote: Hi, How to make a window not draggable in spaces. I used to set NSBorderlessWindowMask ma

NSView enterFullScreenMode:withOptions: woes; window levels

2008-03-17 Thread Sean McBride
Hi all, Is anyone using the new NSView full screen methods in 10.5? I have a window which contains a 'group view', it is basically an NSView that contains two subviews: a button, and an custom NSView that draws pretty pictures. The button displays a floating palette (NSPanel). My ultimate goal

Re: Creating Custom Views in Interface Builder

2008-03-17 Thread Sean McBride
On 3/15/08 12:48 PM, Rob Keniger said: >There's a trap for young players in the docs: watch out if you are >creating a GC-only app. Classes instantiated via IB3 plugins MUST be >compliant with the traditional retain/release mechanism, you can't >create a plugin for a class that relies on Garbage C

RE: Apple Events and automatic AutoReleasePool managment

2008-03-17 Thread Andy Klepack
Thanks Jens, that's some really useful information. In the case of C callbacks wouldn't it be the case that an autorelease pool would exist (that of the main thread) but that it would not be emptied once the callback completes? You wouldn't see any warnings if that were the case. Essentially an

NSDate from xsd:dateTime / ISO 8601

2008-03-17 Thread Nathan Vander Wilt
I'm trying to convert a date formatted as a valid xsd:dateTime format, which is a subset of ISO 8601. I though I had it when I saw that that -[NSDate dateWithString:] takes an "international string representation format". But when I feed it a string like @"2007-07-01T01:33:01Z", I get back nil. Do

Re: Apple Events and automatic AutoReleasePool managment

2008-03-17 Thread Jens Alfke
On 17 Mar '08, at 2:25 PM, Andy Klepack wrote: In the case of C callbacks wouldn't it be the case that an autorelease pool would exist (that of the main thread) but that it would not be emptied once the callback completes? You wouldn't see any warnings if that were the case. You're right

Re: make a window not draggable in spaces

2008-03-17 Thread Roy Lovejoy
On Mar 17, 2008, at 1:45 PM, Michael Watson wrote: Why do you want to do this? so that exposé & spaces doesn't get majorly confused when you're using an overlay and/or grouped window. currently, exposé & spaces will ignore the fact that you've grouped windows together.. if you do drawing

Re: NSDate from xsd:dateTime / ISO 8601

2008-03-17 Thread Jens Alfke
On 17 Mar '08, at 3:20 PM, Nathan Vander Wilt wrote: Does -dateWithString: really not support the "international [standard!] string representation" of ISO 8601?? What's the right way to convert such an xsd:dateTime to an NSDate? +[NSDate dateWithString:] is, I think, configured to recognize o

How to track all keyboard event?

2008-03-17 Thread frank.gongpengjun
Hi, I am porting a game onto Mac OS X, I need to track all keyboard event even it is not for me. How can I achieve that goal? Regards Frank Gong (Pengjun Gong) ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin r

Re: reading data from a UDP port - questions

2008-03-17 Thread Benjamin Stiglitz
(2) But in any case, NSString doesn't mind embedded null bytes. (It's not null-terminated like a C string; the string object remembers the length separately.) That doesn't mean you should store binary data in an NSString, though. NSData is better for that. NSString isn’t really too happy wi

Re: NSDate from xsd:dateTime / ISO 8601

2008-03-17 Thread Nathan Vander Wilt
Does -dateWithString: really not support the "international [standard!] string representation" of ISO 8601?? What's the right way to convert such an xsd:dateTime to an NSDate? +[NSDate dateWithString:] is, I think, configured to recognize one particular date format, which depends on your syste

Re: Prevent application activation after dragging items to the Dock icon?

2008-03-17 Thread Ken Thomases
On Mar 17, 2008, at 2:36 AM, Peter Maurer wrote: Cocoa applications tend to come to the foreground automatically whenever I drag files to their Dock icon. Sometimes, however, I'd prefer my application to stay in the background and just start working on the file, while giving feedback throug

Re: Apple Events and automatic AutoReleasePool managment

2008-03-17 Thread Ken Thomases
On Mar 17, 2008, at 4:25 PM, Andy Klepack wrote: I'm seeing this problem in some AE handlers installed via AEInstallEventHandler. There are no warnings about a pool not existing, but the app memory usage grows and grows. Wrapping the handler in a pool creation and release appears to solve t

Re: NSDate from xsd:dateTime / ISO 8601

2008-03-17 Thread Nathan Vander Wilt
Does -dateWithString: really not support the "international [standard!] string representation" of ISO 8601?? What's the right way to convert such an xsd:dateTime to an NSDate? +[NSDate dateWithString:] is, I think, configured to recognize one particular date format, which depends on your syste

Re: How to track all keyboard event?

2008-03-17 Thread Ken Thomases
On Mar 17, 2008, at 6:05 PM, frank.gongpengjun wrote: I am porting a game onto Mac OS X, I need to track all keyboard event even it is not for me. How can I achieve that goal? I'm not sure what you mean by "it is not for me". If you need to see all keyboard events sent to your application,

Re: NSDate from xsd:dateTime / ISO 8601

2008-03-17 Thread Jens Alfke
On 17 Mar '08, at 4:30 PM, Nathan Vander Wilt wrote: This works, BUT...I had to edit the format a bit because my time strings (in this sample!) did not have the decimal seconds. However, I wouldn't be surprised to see input with sub-second precision. How can I specify optional format parts

interface builder 3 question

2008-03-17 Thread Jeff LaMarche
So, as I said in an earlier post, I'm getting back into Cocoa development after a little hiatus. I was working in IB today. Boy, it's changed, and for the better, but I can't figure out how to do something I used to do in Interface Builder. I want to create an instance of a custom NSObject

Confused about CFRunLoop

2008-03-17 Thread Brian Greenstone
I'm trying to convert some old Carbon code over to Cocoa, and one of the things I'm doing is converting my old run-loop timers. I used to use the following code: InstallEventLoopTimer(..); RunApplicationEventLoop(); .. QuitApplicationEventLoop(); That a

NSMatrix

2008-03-17 Thread Matthew Miller
I am a complete and total new person to coca and I need to create a horizontal Matrix of cells to house icons of applicationp URLs from a table. I totally don't know how to do this. If you would like to help me, please put what I have to do in full detailed steps. Thank you very much. -- - Matt M

Re: interface builder 3 question

2008-03-17 Thread Kyle Sluder
On Mon, Mar 17, 2008 at 10:45 PM, Jeff LaMarche <[EMAIL PROTECTED]> wrote: > So, as I said in an earlier post, I'm getting back into Cocoa > development after a little hiatus. I was working in IB today. Boy, > it's changed, and for the better, but I can't figure out how to do > something I used

Re: Confused about CFRunLoop

2008-03-17 Thread Kyle Sluder
On Mon, Mar 17, 2008 at 10:53 PM, Brian Greenstone <[EMAIL PROTECTED]> wrote: > I'm trying to convert some old Carbon code over to Cocoa, and one of > the things I'm doing is converting my old run-loop timers. I used to > use the following code: Are you sure you want to be creating your own run

Re: interface builder 3 question

2008-03-17 Thread Jeff LaMarche
On Mar 17, 2008, at 10:55 PM, Kyle Sluder wrote: I assume you mean you want to specify the class of the instance, because "specifying the NSObject's superclass" is a nonsensical statement. The field you're looking for is on the Identity pane of the Inspector LOL. Sorry, I shouldn't try and d

Re: NSButtonCell doesn't visually update during trackMouse:inRect:ofView:untilMouseUp:

2008-03-17 Thread Ben Lachman
So my view is a NSControl subclass and after playing with this some it seems you have to do one more thing. If you're going to have a control handle multiple cells (in my case button cells) you have to call setCell: for the correct cell in mouseDown: and then let super handle the mouse eve

Re: Modifying glyph storage in NSLayoutManager

2008-03-17 Thread Martin Wierschin
I have some text items whose glyphs cannot be determined until layout. The text string might contain a marker to draw the current page number, or to sequentially number paragraphs, etc. The glyphs can be determined only by the layout manager; different layout managers for the same text stor

Re: Confused about CFRunLoop

2008-03-17 Thread Brian Greenstone
I was using NSTimer originally, but I was having the exact same problem since NSTimer is really just a CFRunLoopTimerRef according to the docs. As far as I can tell, using NS calls to do this is just a more complicated way than simply calling CF directly to do it without all that Obj-C gib

Re: Confused about CFRunLoop

2008-03-17 Thread Kyle Sluder
On Mon, Mar 17, 2008 at 11:26 PM, Brian Greenstone <[EMAIL PROTECTED]> wrote: > I was using NSTimer originally, but I was having the exact same > problem since NSTimer is really just a CFRunLoopTimerRef according to > the docs. As far as I can tell, using NS calls to do this is just a > more co

Re: interface builder 3 question

2008-03-17 Thread Kyle Sluder
On Mon, Mar 17, 2008 at 11:01 PM, Jeff LaMarche <[EMAIL PROTECTED]> wrote: > LOL. Sorry, I shouldn't try and do this stuff so late at night! I > meant "specifying the new class' superclass". Oh. You don't. IB3 is a different beast. Instead, you write your code in Xcode and then switch to IB

Re: Confused about CFRunLoop

2008-03-17 Thread Brian Greenstone
Cocoa is really only necessary for GUI based apps, but I'm doing games which are almost 99.9% custom code with no Mac OS X GUI. Ergo, I really don't have any need for Cocoa other than the basic window and OpenGL initialization. After that I just use Core Foundation for everything else. L

Re: Confused about CFRunLoop

2008-03-17 Thread Rob Keniger
On 18/03/2008, at 1:26 PM, Brian Greenstone wrote: I was using NSTimer originally, but I was having the exact same problem since NSTimer is really just a CFRunLoopTimerRef according to the docs. As far as I can tell, using NS calls to do this is just a more complicated way than simply cal

Re: NSView enterFullScreenMode:withOptions: woes; window levels

2008-03-17 Thread Brian Christensen
On Mar 17, 2008, at 4:51 , Sean McBride wrote: Hi all, Is anyone using the new NSView full screen methods in 10.5? I have a window which contains a 'group view', it is basically an NSView that contains two subviews: a button, and an custom NSView that draws pretty pictures. The button disp

Re: Confused about CFRunLoop

2008-03-17 Thread Rob Keniger
On 18/03/2008, at 2:04 PM, Rob Keniger wrote: Works great and it sounds like it will do what you want. The trick is to set the run loop mode correctly, you can probably do something equivalent with the CF calls if you like. I like my Obj-C gibberish so I avoid CF if possible ;-) I check

Re: Confused about CFRunLoop

2008-03-17 Thread Kyle Sluder
On Tue, Mar 18, 2008 at 12:01 AM, Brian Greenstone <[EMAIL PROTECTED]> wrote: > Cocoa is really only necessary for GUI based apps We seem to have not made any progress. Until you change that misconception, this is going to be rather difficult. Back when this OS was known as NEXTSTEP and Core Fou

Re: Confused about CFRunLoop

2008-03-17 Thread Eric Schlegel
On Mar 17, 2008, at 7:53 PM, Brian Greenstone wrote: [[NSApplication sharedApplication] run]; That actually works! My timer fires off like it should, yet everything else works too. I can still access the menus, and window still receive click events. Unfortunately, there's no way

Re: interface builder 3 question

2008-03-17 Thread varun
> > On Mar 17, 2008, at 10:55 PM, Kyle Sluder wrote: > >> I assume you mean you want to specify the class of the instance, >> because "specifying the NSObject's superclass" is a nonsensical >> statement. The field you're looking for is on the Identity pane of >> the Inspector > > LOL. Sorry, I sho

Re: make a window not draggable in spaces

2008-03-17 Thread Cocoa Developer
Thank you to all. My application is a full screen video application, if we move in spaces, it does not fit completely on that space. If we come out of space, it takes fullscreen again. We cannot do any modification to window properties in spaces. Is there a way ? Regards, Basavaraj On Tue, Ma

Re: How to track all keyboard event?

2008-03-17 Thread Andrew Farmer
On 17 Mar 08, at 16:05, frank.gongpengjun wrote: I am porting a game onto Mac OS X, I need to track all keyboard event even it is not for me. How can I achieve that goal? By "game", do you mean "keyboard logger"? This is intentionally not made easy in OS X; keyboard input to certain sources