Cocoa Classes from C++?

2008-05-27 Thread J. Todd Slack
Hi All, 1. I wish to create an NSStatusItem. I have ObjC Code to do so, but how can I do this in C++? I dont see any examples anyplace. Must I use ObjC to use NSStatusItem? I would think not! Does anyone have an example dealing with NSStatusItem? 2. Can anyone point me to a reference of u

A little extra cash...

2008-06-02 Thread J. Todd Slack
Hi All, I am willing to pay a small sum (since I am an NPO) for someone who can create a small example all that creates as NSStatusMenu, fills it with a menu items and shows me how to call code (objective-C And AppleScript) when a menu option is selected. Who is up to do this? $100.00 so

NIB Help

2008-06-23 Thread J. Todd Slack
Hi All, Are there any examples of loading a NIB, accessing a tab view in a window of the NIB I just loaded? I was trying to accomplish via AppleScript originally, but nothing seems to be working. Does anyone have any examples? Thanks, -Jason

Disc Burns, but is unreadable

2008-07-15 Thread J. Todd Slack
Hi All, (I tried posting to the Disc-Recording List, but no replies.) I have been troubleshooting an issue where I burn a DVD and the burn process happens, but the resulting disc is unreadable once burned. I insert the disc after burning and I am told it is unreadable. This never happened

Re: Disc write speed options

2008-08-12 Thread J. Todd Slack
Hi Matt, Ask this in the Disc-Recording List. http://lists.apple.com to subscribe. I can send you how I do it. -Jason On Aug 12, 2008, at 8:04 AM, Matthew Mashyna wrote: I'm trying to figure out how I can ask a DRDevice what burn speeds it's capable of so I can offer a choice to the u

NSFileManager Help

2008-08-27 Thread J. Todd Slack
Hi All, 10.5.4, XCode 3.1 I have the following: NSFileManager *manager = [NSFileManager defaultManager]; NSString *applicationSupportDirectory = @"~/Library/Application Support/Ring-Maker/tmp/"; /* temp scratch space */ applicationSupportDirectory = [applicationSupportDirectory stringByE

Re: NSFileManager Help

2008-08-27 Thread J. Todd Slack
Hi Jason, It simply does not create the directory. This is code that I had in another project that worked. What am I missing? Does the parent directory exist already (~/Application Support/Ring- Maker)? If not, this call will fail. However, since you're using 10.5 you should use this met

Re: NSFileManager Help

2008-08-27 Thread J. Todd Slack
Hi Jason -(BOOL)createDirectoryAtPath:(NSString*)path withIntermediateDirectories:(BOOL)createIntermediates attributes: (NSDictionary*)attributes error:(NSError**)error; I saw this, but if I have to deploy on 10.4, will this call fail on 10.4 since it is new in 10.5? No, it won't. You co

#import, #include, pre-compiled headers

2008-08-28 Thread J. Todd Slack
HI All, Question on #import, #include and pre-compiled headers. I have a bunch of classes that import the same #imports (like QTKit, Quicktime, Cocoa, Foundation, etc, etc) Is there a way that I can just #import them once and not have to for each class? Is that a pre-compiled header? Wo

Re: #import, #include, pre-compiled headers

2008-08-28 Thread J. Todd Slack
#Include-Operation Jon <>< On Thu, Aug 28, 2008 at 11:18 AM, J. Todd Slack <[EMAIL PROTECTED] > wrote: HI All, Question on #import, #include and pre-compiled headers. I have a bunch of classes that import the same #imports (like QTKit, Quicktime, Cocoa, Foundation, etc, etc)

NSNumberFormatter

2008-08-28 Thread J. Todd Slack
Hi All, Can anyone show me 10 seconds in the following format: "days:hours:minutes:seconds:frames/timescale" This is for creating a QTTime which QTTimeFromString. I am essentially trying to take an NSString (which say is 10) and make it a QTTime so that I can set my Selection and clip it to

Explanation

2008-08-29 Thread J. Todd Slack
Hi All, Continuing learning the Quicktime API. I am confused about QTTimeRanges, etc Consider the following: QTMovie *aQTMovie = [QTMovie movieWithFile:path error:nil]; [aQTMovie setAttribute:[NSNumber numberWithBool:YES] forKey:QTMovieEditableAttribute]; QTTime qStartTime = QTMakeTime([s

HFS Path To POSIX Path

2008-09-01 Thread J. Todd Slack
HI All, What is the proper way to convert an HFS Path to a POSIX path? So take: Husband:Users:slack:Music:iTunes:iTunes Music:Adult:Resucitation:03 - Minors at night.mp3 and convert to: /Users/slack/Music/iTunes:/Tunes Music/Adult/ Resucitation/03 - Minors at night.mp3 I thought there was

Re: HFS Path To POSIX Path

2008-09-01 Thread J. Todd Slack
Hi Gregory, What is the proper way to convert an HFS Path to a POSIX path? The proper way is to make whatever effort you can to avoid having an HFS path to worry about in the first place. So if you have any control over that end of things, I'd say avoid it. In particular, if you're stori

Re: HFS Path To POSIX Path

2008-09-01 Thread J. Todd Slack
statement, which I think should work.) Alex On Sep 1, 2008, at 6:00 PM, J. Todd Slack wrote: Hi Gregory, What is the proper way to convert an HFS Path to a POSIX path? The proper way is to make whatever effort you can to avoid having an HFS path to worry about in the first place. So if you

NSTask Question

2008-09-04 Thread J. Todd Slack
So I need to use NSTask and I am trying to run a small executable command-line app from inside my 'resources' directory in my app bundle. But what is the right path to access? The app I want to run is here: /Contents/Resources/to run> And the app I want to access from is at: /Contents/MacOs

Re: NSTask Question

2008-09-04 Thread J. Todd Slack
Hi Nick, Thanks, that seems better, than trying to build it up myself. Thanks, -Jason On Sep 4, 2008, at 2:56 PM, Nick Zitzmann wrote: On Sep 4, 2008, at 3:42 PM, J. Todd Slack wrote: So I need to use NSTask and I am trying to run a small executable command-line app from inside my

C/Obj-C API Confusion

2008-09-10 Thread J. Todd Slack
I had a conversation with an Apple Engineer a few days ago and he recommended that I switch to the Quicktime C API rather than the Objective-C api for what I needed to do. I have a few questions. 1. Currently I have a .m and I use NSTask, NSString, etc. I would need to change these for C

Re: C/Obj-C API Confusion

2008-09-10 Thread J. Todd Slack
, J. Todd Slack <[EMAIL PROTECTED]> wrote: I had a conversation with an Apple Engineer a few days ago and he recommended that I switch to the Quicktime C API rather than the Objective-C api for what I needed to do. Okay, there's probably no "Cocoa way" to do wh

Re: C/Obj-C API Confusion

2008-09-10 Thread J. Todd Slack
Hi Sherm, So if I have an objective C class, how can I call a .c class? and pass my arguments from the objective-c class? -Jason On Sep 10, 2008, at 12:56 PM, Sherm Pendley wrote: On Wed, Sep 10, 2008 at 3:44 PM, J. Todd Slack <[EMAIL PROTECTED] > wrote: I had a conversation w

Re: C/Obj-C API Confusion

2008-09-10 Thread J. Todd Slack
Hi Jason, So if I have an objective C class, how can I call a .c class? and pass my arguments from the objective-c class? What kind of ".c class"? And what kind of arguments? It might help to give the prototype of some of the functions that you want to call in the QTKit, or at least the nam

Calculate minutes and seconds

2008-09-10 Thread J. Todd Slack
Hi All, Does anyone have an example of deciding when you have more than 60 seconds you have minutes and seconds? (hh:mm:ss) Example: 65 seconds should be 00:01:05 Thanks! -Jason ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do

Re: Calculate minutes and seconds

2008-09-10 Thread J. Todd Slack
Graham, This is a good idea, I forgot about using the mod operation. -Jason On Sep 10, 2008, at 7:02 PM, Graham Cox wrote: On 11 Sep 2008, at 11:46 am, J. Todd Slack wrote: Example: 65 seconds should be 00:01:05 If your question was about how to create this (as a string, say) from a

NSTask is Weird

2008-09-10 Thread J. Todd Slack
Hi All, NSTask seems weird to me. I am trying to call a command-line app with arguments. When I execute in a Terminal it works, but from my application is fails. Here it the command I am executing: /usr/local/bin/pymp3cut --segment "/Users/slack/Library/Application Support/Ring-Maker/tmp/am

Re: NSTask is Weird

2008-09-11 Thread J. Todd Slack
Hi, I guess what I dont get is when you pass arguments that are not simple like: [task setLaunchPath: @"/bin/ls"]; [task setArguments: [NSArray arrayWithObjects: @"ls", @"-al", @"/", nil]]; What about a command that takes arguments like: --segments /Users/slack/music/iTunes/iTu

Re: NSTask is Weird

2008-09-11 Thread J. Todd Slack
Thanks everyone, Yes, over thinking about it. I was escaping and quoting, etc. Works now! -Jason On Sep 11, 2008, at 8:48 AM, Clark Cox wrote: On Thu, Sep 11, 2008 at 4:03 AM, J. Todd Slack <[EMAIL PROTECTED]> wrote: Hi, I guess what I dont get is when you pass arguments that a

MySQL?

2008-09-15 Thread J. Todd Slack
Hi All, Does anyone know what I need to connect from OS X to a MySQL DB and run a few queries? This would be from Objective-C or C++. Any examples? What should I be downloading? Thanks, -Jason ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.

Adding spaces to an NSString

2008-03-18 Thread J. Todd Slack
Hello All, I am a little stumped today, not sure why, but how would I add a space after every character in an NSString and produce a new NSString from it. So I have something like: (ignore the quotes, I just did it for containment sake..) ³/Users/slack/Music² And I want it to be: ³/ U s e r s

Re: Adding spaces to an NSString

2008-03-18 Thread J. Todd Slack
ft; you'll find it probably makes > the logic simpler. > > J. Todd Slack wrote: >> Hello All, >> >> I am a little stumped today, not sure why, but how would I add a space after >> every character in an NSString and produce a new NSString from it. >&

What is this invisible character?

2008-03-18 Thread J. Todd Slack
Hello All, I am trying to write some NSStrings to a text file. Upon looking at what the format should be in TextMate with invisibles on, it shows: http://jasonslack.biz/pic1.png What is the grey diamond character so I can reproduce this? If I don¹t use it the format is not recognized. How do I

Re: What is this invisible character?

2008-03-18 Thread J. Todd Slack
Hi Stephen, >> What is the grey diamond character so I can reproduce this? If I don¹t use >> it the format is not recognized. >> >> How do I do the grey diamond in code? > > Off the top of my head, it's probably '\0'. Tell TextMate to re-open the > file with UTF-16BE, I bet the diamonds go away.

Re: What is this invisible character?

2008-03-19 Thread J. Todd Slack
t a later date? ' -Jason On 3/18/08 10:47 PM, "Jens Alfke" <[EMAIL PROTECTED]> wrote: > > On 18 Mar '08, at 9:53 PM, J. Todd Slack wrote: > >> So how do I write out a text file in UTF16-BE encoding? Maybe this >> would >> solve my probl

NSString may not respond....

2008-03-19 Thread J. Todd Slack
Hi All, Continuing my quest to get back into Cocoa/Objective-C, I am getting the following error stating that NSString may not respond to certain calls. Here is a screenshot: http://jasonslack.biz/pic3.png Can anyone explain what I am doing wrong because as far as I can see this should be valid

Re: NSString may not respond....

2008-03-19 Thread J. Todd Slack
Hi Nick, I am using 10.4U. -Jason On 3/19/08 10:16 AM, "Nick Zitzmann" <[EMAIL PROTECTED]> wrote: > > On Mar 19, 2008, at 11:10 AM, J. Todd Slack wrote: > >> Can anyone explain what I am doing wrong because as far as I can see >> this >> s

Re: NSString may not respond....

2008-03-19 Thread J. Todd Slack
Hi Ah, Thanks Nick and Dave, for some reason the project was targeting 10.3.9 and 10.4 U. -Jason On 3/19/08 10:20 AM, "David Duncan" <[EMAIL PROTECTED]> wrote: > On Mar 19, 2008, at 10:10 AM, J. Todd Slack wrote: > >> Continuing my quest to get back into Coc

[SOLVED] - Re: NSString may not respond.... -and What is this invisible character?

2008-03-19 Thread J. Todd Slack
Hi Stephen and all, >> Can anyone explain what I am doing wrong because as far as I can see this should be valid? > There are many serious problems with that code. Ignoring the warning, I see: > 1) That is not the proper way to find the user's documents folder.

Re: [SOLVED] - Re: NSString may not respond.... -and What is this invisible character?

2008-03-19 Thread J. Todd Slack
Hi Randall, > On Mar 19, 2008, at 12:37 PM, J. Todd Slack wrote: >> But one note, you mentioned stopping coding...if I did that, I would >> not >> have dug to solve the problem...Is there not something to be said >> for those >> that ³try and try again² until the

OpenGL in a Visual iTunes Plugin

2008-04-17 Thread J. Todd Slack
Hi All, I wish to create a UI using OpenGL for use in an ITunes Visualizer Plugin. Can anyone tell me how to get started? I have the Visualizer SDK already. Is there anything OpenGL wise that I have to download? Is there a tool, like Interface Builder, that I can drag and drop the interf

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

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 J. Todd Slack
Named:owner:); IMP f = class_getMethodImplementation(mclass, s); BOOL res = f(mclass, s, @"SettingsDialog", self); On May 2, 2008, at 4:38 PM, J. Todd Slack wrote: Yeah, I am using: [NSBundle loadNibNamed:@"SettingsDialog" owner:self;] But that is Obj

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

method definition not in @implementation context

2008-05-05 Thread J. Todd Slack
Hi All, I am trying to get back into some Objective-C and I have gotten an error: fatal error: method definition not in @implementation context Can anyone tell me what this means? -Jason ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Re: method definition not in @implementation context

2008-05-05 Thread J. Todd Slack
Hi Kyle. I was forgetting to include Cocoa.h, for some reason... Sorry. -Jason On May 5, 2008, at 1:21 PM, Kyle Sluder wrote: On Mon, May 5, 2008 at 4:16 PM, J. Todd Slack <[EMAIL PROTECTED]> wrote: Can anyone tell me what this means? You put a method definition outs

I Never get 'self' in Obj-C

2008-05-05 Thread J. Todd Slack
Hi All, I have the following: statusItem = [[[NSStatusBar systemStatusBar] statusItemWithLength:NSVariableStatusItemLength] retain]; [statusItem setHighlightMode:YES]; [statusItem setTitle:[NSString stringWithFormat:@"%C",0x260F]]; [statusItem setEnabled:YES]; [statusItem

Re: I Never get 'self' in Obj-C

2008-05-05 Thread J. Todd Slack
Hi All, I have the following: statusItem = [[[NSStatusBar systemStatusBar] statusItemWithLength:NSVariableStatusItemLength] retain]; [statusItem setHighlightMode:YES]; [statusItem setTitle:[NSString stringWithFormat:@"%C",0x260F]]; [statusItem setEnabled:YES]; [statusItem setT

An Example NSStatusItem with a menu

2008-05-08 Thread J. Todd Slack
Hi All, Does anyone have an example os a NSStatusitem that programatically creates the menu and menu items below it? -Jason ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list

Cocoa and MySQL

2008-09-30 Thread J. Todd Slack
Hi All, Working with app that I use NSTask to execute some MySQL statements. I want to deploy the client to start testing, but I am not sure to deploy to them in the MySQL Sense. I dont quite recall what I did for MySQL on my machine. I want to create a package installer that puts the mysq

Which View to use?

2008-10-01 Thread J. Todd Slack
HI All, So I am working on an app where I want to use an object to display multiple things. Like first a list of users (results from a MYSQL Query) Second after they click a user they get a list of folders the user has. (again results from a MySQL query) What view can I use? I dont reall

Drawing?

2008-10-12 Thread J. Todd Slack
Hi All, I need to draw some very small rectangular boxes on screen (iphone) for a small play app that I am working on to gain some experience. I must say I have never needed to custom draw shapes, etc (except back about 5 years ago on Windows). Letters will go in each box. Do I use Open-

Controller and NIB

2008-10-28 Thread J. Todd Slack
Hi All, I have a controller.m and it has an awakeFromNib method. I have a NIB that is loaded on startup (specified in info.plist) I have code that is not getting called in awakeFromNib when the Nib is loaded. What am I forgetting to setup? I need to run some code after the nib has loaded.

Re: Controller and NIB

2008-10-28 Thread J. Todd Slack
Hi Nick, On Oct 28, 2008, at 3:09 PM, J. Todd Slack wrote: I have a controller.m and it has an awakeFromNib method. I have a NIB that is loaded on startup (specified in info.plist) I have code that is not getting called in awakeFromNib when the Nib is loaded. What am I forgetting to

NSTask and get results

2008-10-30 Thread J. Todd Slack
Hi All, Can I run an NSTask and get the results back for parsing? I looked at CocoaDev and I see that I can specify a pipe, which needs a file to write to, but can I just get the results back in an array or something? I am running a SQL query and I wish the results to be returned to me.

[OT] Install Issues

2008-10-31 Thread J. Todd Slack
Hi All, Creating an installer on Leopard 10.5.5 for 10.4 and 10.5. Everything is fine, the installer runs and my Applications folder shows modified at the time I ran the installer, but the app does not show up. I *thought* it might be the 'relocatable' issue, but nothing shows up under t