ScriptingBridgeConcepts problem

2008-03-15 Thread Cocoa
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 responses) Do I need to translate the information

Re: Glyph Generator & hiding glyphs -> _NSBlockNumberForIndex() errors

2008-03-15 Thread Keith Blount
Hi, Sorry to bother you with this again, but it appears that I spoke to soon when I said that this fixes the issue - it doesn't; it still crashes and throws exceptions. And unfortunately I'm now getting no reply from my DTS guy. I put *newGlyphs = NSControlGlyph at line 34 as suggested - you ca

ScriptingBridgeConcepts problem

2008-03-15 Thread Cocoa
Thanks for the answer. I got another question. Do I need to copy the file into the Mail.app package, and run that command line again? On 16/03/2008, at 12:12 AM, Jean-Daniel Dupas wrote: The sdef file in Mail has some error (like almost all Apple sdef file in fact). You can use t

Sorting arrays with strings

2008-03-15 Thread Mr. Gecko
Hello I have a NSArray with all of the files names in a directory that my user specifies with an Open panel and I am needing to sort it in numeric order like -0 to -9 and 0 to 9 each file does have other things in the name for an example the name of the files are like text-1254.txt, text657

Re: Sorting arrays with strings

2008-03-15 Thread I. Savant
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 -- I.S.

Re: NSWrapper Plus Plain text files

2008-03-15 Thread Bill Garrison
Lincoln, I'd refactor this so that you can take advantage of NSTextView's - readRTFDFromFile: method. It appears that you just want to get the NSTextView populated with some text. You don't seem to be saving the RTF data for any other purpose. Compiled in Mail.app: NSString *filePath =

Re: ScriptingBridgeConcepts problem

2008-03-15 Thread has
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 responses) Scripting Bridge behaves

Re: ScriptingBridgeConcepts problem

2008-03-15 Thread Jean-Daniel Dupas
No, you can just invoke the sdp comman dusing this file. sdp -f hm Mail.sdef It will generate Mail.h and Mail.m next to your Mail.sdef file. Le 15 mars 08 à 13:29, Cocoa a écrit : Thanks for the answer. I got another question. Do I need to copy the file into the Mail.app package, and run

usleep()

2008-03-15 Thread Cocoa
these code is from ScriptBridgeConcept.pdf. Does anyone know what the red code below mean, specifically rampVolume += orignalVolume/16) i search usleep() in Xcode documentation, it explain that suspend thread execution for an interval measured in microseconds. Does it just mean it will sto

Re: usleep()

2008-03-15 Thread Michael Watson
Yes. Code in a method executes on a thread in order from top to bottom (taking into account flow control from while/do/etc). The usleep() function pauses the thread until the specified duration of time passes, at which point the next line of code is executed. And remember that the thread sl

Re: Sorting arrays with strings

2008-03-15 Thread mmalc crawford
On Mar 15, 2008, at 6:25 AM, Mr. Gecko wrote: Hello I have a NSArray with all of the files names in a directory that my user specifies with an Open panel and I am needing to sort it in numeric order like -0 to -9 and 0 to 9 each file does have other things in the name for an example the na

Binding Tree Controller to a singleton

2008-03-15 Thread Michael Hanna
I have a MyDataModelManager that is a singleton instance. to get the pointer to it you do: MyDataModelManager* mgr = [MyDataModelManager getInstance]; To access the data model for the tree controller you call: MyTreeDataModel* treeModel = [mgr treeDataModel]; Currently treeModel con

Re: newb problem- Currency Converter app problem- Can't Add ConverterController Class to Nib

2008-03-15 Thread Jonathan Hess
Hey Edward - I'm guessing that you're reading http://developer.apple.com/documentation/Cocoa/Conceptual/ObjCTutorial/06Controller/chapter_6_section_6.html#/ /apple_ref/doc/uid/TP4863-CH8-SW16 In that document, the screenshot, figure 5-3 is in a confusing place, read the next bullet point

XCode3 & NSLog & Tiger compatibility

2008-03-15 Thread Steve Cronin
Folks; I've finally begun to use XCode3 and I know I need to learn my way around the new world. I have an existing Tiger project that I will be shipping under Tiger but I need to ensure Leopard compatibility. So I can't convert it to the new world - I just need to be able to run/debug it.

[OT?] WWDC

2008-03-15 Thread Jeff LaMarche
Hey, folks. I'm just diving back into Cocoa after about eighteen months of doing mostly non-Mac programming (I know, I know). To help me jump-start back into Cocoa, I've signed up for WWDC this year. In the past, there used to be unofficial gatherings at WWDC - I think Stepwise used to run

Convert NSString to FSRef

2008-03-15 Thread Kevin Dixon
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 { FSRef output; CFStringRef cfFilePath = CFStringCreateWithCString(NULL, [filePath cString], (CFStringEncoding)8);

Re: XCode3 & NSLog & Tiger compatibility

2008-03-15 Thread Jean-Daniel Dupas
Le 15 mars 08 à 19:08, Steve Cronin a écrit : Folks; I've finally begun to use XCode3 and I know I need to learn my way around the new world. I have an existing Tiger project that I will be shipping under Tiger but I need to ensure Leopard compatibility. So I can't convert it to the new w

Re: Convert NSString to FSRef

2008-03-15 Thread Adam R. Maxwell
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 { FSRef output; CFStringRef cfFilePath = CFStringCreateWithCS

Re: Convert NSString to FSRef

2008-03-15 Thread Jean-Daniel Dupas
Le 15 mars 08 à 20:04, Kevin Dixon a écrit : 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 { FSRef output; CFStringRef cfFilePath = CFStringCreateWithCString

Re: Convert NSString to FSRef

2008-03-15 Thread Keith Duncan
-cString has been deprecated for a very long time; it's better to use UTF8String. Not all file systems support UTF8, you should use - fileSystemRepresentation instead for compatability. Keith ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Re: Convert NSString to FSRef

2008-03-15 Thread Adam R. Maxwell
On Mar 15, 2008, at 12:34 PM, Keith Duncan wrote: -cString has been deprecated for a very long time; it's better to use UTF8String. Not all file systems support UTF8, you should use - fileSystemRepresentation instead for compatability. For some APIs, but not in this case. The OP is creat

AW: [OT?] WWDC

2008-03-15 Thread Thomas Bartelmess
I doesn't know about something like that. But maybe i'm not indie enough to know about it. Can you tell what was those meetings about See you at WWDC Thomas - Ursprüngliche Mail Von: Jeff LaMarche <[EMAIL PROTECTED]> An: Cocoa List Gesendet: Samstag, den 15. März 2008, 19:37:03 Uhr

Disable Exposé / Spaces / Dashboard

2008-03-15 Thread Thomas Bartelmess
Hello everyone! Does somebody know, if there is a way do disable Exposé / Spaces etc. I'm working on a presentation mode... and I want so disable the keys for Them. I found already: http://developer.apple.com/documentation/Cocoa/Conceptual/EventOverview/TextDefaultsBindings/chapter_9_section_2.

Re: Disable Exposé / Spaces / Dashboard

2008-03-15 Thread Jens Alfke
On 15 Mar '08, at 3:37 PM, Thomas Bartelmess wrote: Does somebody know, if there is a way do disable Exposé / Spaces etc. I'm working on a presentation mode... and I want so disable the keys for Them. System Preferences > Keyboard > Keyboard Shortcuts Scroll through the outline and look fo

Re: Disable Exposé / Spaces / Dashboard

2008-03-15 Thread Mike Abdullah
I'd suggest a readup on the SetSystemUIMode() function. Should do what you want I think. Mike. On 15 Mar 2008, at 22:37, Thomas Bartelmess wrote: Hello everyone! Does somebody know, if there is a way do disable Exposé / Spaces etc. I'm working on a presentation mode... and I want so disabl

Re: Disable Exposé / Spaces / Dashboard

2008-03-15 Thread Uli Kusterer
On 16.03.2008, at 01:21, Jens Alfke wrote: On 15 Mar '08, at 3:37 PM, Thomas Bartelmess wrote: Does somebody know, if there is a way do disable Exposé / Spaces etc. I'm working on a presentation mode... and I want so disable the keys for Them. System Preferences > Keyboard > Keyboard Shortc

Re: Disable Exposé / Spaces / Dashboard

2008-03-15 Thread Ricky Sharp
On Mar 15, 2008, at 7:21 PM, Mike Abdullah wrote: I'd suggest a readup on the SetSystemUIMode() function. Should do what you want I think. That function works very well to disable Expose. I've used it in my app for a few years now. It will also disable things like Command-Tab (to swit

CFMakeCollectable

2008-03-15 Thread Quincey Morris
OK, I admit I'm too stupid to understand CFMakeCollectable/ NSMakeCollectable -- in a mostly-Cocoa GC-only app -- without help. 1. In a GC-only app, does CFMakeCollectable mean exactly the same thing as CFRelease? If not, what does it mean? 2. In a GC-only app, do I *ever* need to use CFReta

Re: CFMakeCollectable

2008-03-15 Thread Quincey Morris
On Mar 15, 2008, at 18:55, Quincey Morris wrote: OK, I admit I'm too stupid to understand CFMakeCollectable/ NSMakeCollectable -- in a mostly-Cocoa GC-only app -- without help. I guess I'm stupider than I thought. I skipped over an entire chapter about this in the Garbage Collection Program

Re: CFMakeCollectable

2008-03-15 Thread mmalc crawford
On Mar 15, 2008, at 6:55 PM, Quincey Morris wrote: 1. In a GC-only app, does CFMakeCollectable mean exactly the same thing as CFRelease? If not, what does it mean?

cursor problem in the webview

2008-03-15 Thread Dmitry Markman
Hi I have a java application that embeds WebView via Apple's Cocoa Component but in my window cursor doesn't change when I move mouse over "interesting places" it used to work (about 2 years ago) in the old code I added webuidelegate method (ugly but it worked) - (void)webView:(WebView

Re: cursor problem in the webview

2008-03-15 Thread Jens Alfke
On 15 Mar '08, at 9:39 PM, Dmitry Markman wrote: I remember, previously (10.3.X) responder wasn't the same: it could be NSTextView or NSTextField or something different but now it is always WebHTMLView (something undocumented I suppose) The textfields and textareas in WebViews used to be im

Re: cursor problem in the webview

2008-03-15 Thread Dmitry Markman
Hi, Jens thank you very much for your answer. I added that method (few years ago) because we had exactly the same problem: cursor didn' work, so implementing that method helped then today, I commented that method and sure enough :-( I have the same problem: cursor doesn't change, but keyboa

Re: CGContext Drawn Squished

2008-03-15 Thread Bridger Maxwell
Hey, Got it solved. I was right when I guessed the resolutions were different, even though I didn't know what I was talking about. When I created the bitmap cgcontext, I made it take up the whole screen and then drew it to a view that was smaller, thus the squishing. I thought for sure it would b

Re: Convert NSString to FSRef

2008-03-15 Thread Stuart Malin
Kevin, Here's two variants that you can start to work with. Use the first one if it works. The second one is a more roundabout way of getting the NSString to bytes. Two disclaimers: 1: I have never worked with CF functions before, but have been doing a bit of string-data-bytes manipulati