Re: lock Keyboard for Kisok-Mode

2008-03-04 Thread Andrew Farmer
On 04 Mar 08, at 09:02, Herr Thomas Bartelmess wrote: I would like to add an Kiosk mode to my Application. Does somebody know how I can lock the Computer for every kind of Keyboard Inputs (Just not for one Compo to leave the Kisok) Best would be if the mouse wouldn't be there too. If you

Re: get currently logging in users

2008-03-13 Thread Andrew Farmer
On 13 Mar 08, at 17:49, lazuardi wrote: Does anybody know how to get the full username of the currently logging in user at Tiger? Foundation Functions Reference suggests NSUserName(). There are a bunch of related functions (home directories, full username, etc) available in there as well.

Re: How to track all keyboard event?

2008-03-18 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

Re: Network communication with NSFileHandle NSSocketPort

2008-03-19 Thread Andrew Farmer
On 19 Mar 08, at 02:58, Valentin Dan wrote: unsigned short serverPort = 9000; NSString * serverAddress = @“192.1.2.1”; NSSocketPort * socketPort = [[NSSocketPort alloc] initRemoteWithTCPPort:serverPort host:serverAddress]; NSSocketPort is part of the Distributed Objects API - despite the

Re: Where's the buffer overrun?

2008-03-19 Thread Andrew Farmer
On 19 Mar 08, at 16:50, Chris Suter wrote: On 20/03/2008, at 10:38 AM, Nick Zitzmann wrote: char **returnArray = NSZoneMalloc([self zone], length); should be: char **returnArray = NSZoneMalloc([self zone], length * sizeof (char *)); Actually, that's correct. Read up a bit -

Re: XML to RTF transformation via XSL

2008-03-22 Thread Andrew Farmer
On 22 Mar 08, at 01:46, Ian Jackson wrote: I'd like to have my XML file read by my app, and save the file, or display it in a NSTextView, as RTF (with the appropriate formatting etc). So I have been trying to use: - (id)objectByApplyingXSLTAtURL:(NSURL *)xsltURL arguments: (NSDictionary

Re: @class

2008-03-23 Thread Andrew Farmer
On 23 Mar 08, at 03:28, Audun Frøysaa wrote: Hello. I need some help with different controllers. You seem confused. Is this your first Cocoa project? If so, have you run through the CurrencyConverter tutorial? I have mainController.h .m iTunesMainController.h .m I then tries to access

Re: Writing a preference pane that configures hotkeys?

2008-03-23 Thread Andrew Farmer
On 23 Mar 08, at 19:26, Brian Kendall wrote: I'm trying to write a preference pane that allows the user to specify a hotkey. Ordinarily I would override sendEvent in NSApplication, but since it's a preference pane that's not possible in this case since the System Preferences application is

Re: How do I disable this warning: local declaration of 'varname' hides instance variable

2008-03-23 Thread Andrew Farmer
On 23 Mar 08, at 19:29, charlie wrote: How do I disable this warning?... local declaration of 'varname' hides instance variable Use a different name for either the local variable or the instance variable. This is a serious enough warning that I really wouldn't recommend disabling it.

Re: Adding CalendarStore.framework changes managed object model version?

2008-03-25 Thread Andrew Farmer
On 25 Mar 08, at 17:56, Brad Willoughby wrote: When I add /System/Library/Frameworks/CalendarStore.framework to my Leopard Core Data application in XCode 3.0 and click Build Run, I get the following error: The managed object model version used to open the persistent store is incompatible

Re: Streaming Images between Cocoa Touch and Pure Java

2008-03-26 Thread Andrew Farmer
On 26 Mar 08, at 20:51, Liviu Constantinescu wrote: I'm a bit new to Cocoa Touch programming, and I haven't done any work with Cocoa for a while, so I would like some advice regarding the right API objects, etc. to use, if anyone is able to help: If I want to transmit a JPEG between a Java

Re: Key icons?

2008-03-27 Thread Andrew Farmer
On 27 Mar 08, at 01:11, Rick Mann wrote: I'd like to implement something like Xcode's accelerator key- assignment prefs pane. Are there standard icons representing all the special keys on the keyboard? If so, how do I get at them? They're all Unicode characters. ⌘ is one of them; the rest

Re: App Crashing when remove an Object

2008-03-28 Thread Andrew Farmer
On 28 Mar 08, at 18:37, Mario Gajardo Tassara wrote: In a portion of code of my app (collision detection part) i need to remove an object from an array of objects, when two distinct objects crashed i decrement a life counter, and if this is equal to zero the object must be destroyed, but

Re: linked list problem

2008-03-31 Thread Andrew Farmer
On 31 Mar 08, at 14:39, stephen joseph butler wrote: On Mon, Mar 31, 2008 at 4:31 PM, Nick Rogers [EMAIL PROTECTED] wrote: In my code: DIR *temp = parentDir; //parentDir is allocated initially but its next is not allocated at this point while (temp) { temp = (DIR*)temp-next;

Re: Need for a creator code?

2008-04-01 Thread Andrew Farmer
On 01 Apr 08, at 12:59, Marc Respass wrote: I haven't registered for a creator code since System 7.5. Apple has information and registration page (http://developer.apple.com/datatype/index.html ) about it but no indication if it's actually still required. Can anyone tell me if it is still

Re: Can we write Mac Servies like We write for Windows services

2008-04-04 Thread Andrew Farmer
On 03 Apr 08, at 22:50, Ghufran Ahamad wrote: I need to write a service in Mac (like we write a Windows services for PC). This will automatically run as soon as start the Mac machine. I would appreciate if any one knows how to write a Service for Mac OS X. Mac OS X Services are something

Re: activate my application while dragging on other application window

2008-04-04 Thread Andrew Farmer
On 04 Apr 08, at 10:12, Hamish Allan wrote: On Thu, Apr 3, 2008 at 3:47 PM, Jens Alfke [EMAIL PROTECTED] wrote: By any other application window, do you mean a window belonging to a _different_ application other than your own? There's no way to do that. As I said, applications aren't allowed

Re: After Unarchive Object Exists, After First GUI Action, gone...

2008-04-21 Thread Andrew Farmer
On 20 Apr 08, at 18:55, John Joyce wrote: Looks like I found a solution... anyone please let me know if my solution stinks. (or any of the rest of this thing!) In the method - (void)windowControllerDidLoadNib:(NSWindowController *) aController I added this: [textView setString:[[stickitNotes

Re: Real time video analysis app under Cocoa

2008-05-03 Thread Andrew Farmer
On 03 May 08, at 10:49, Yreaction JP wrote: I have a few questions about what way should I choose for develop an real time video analysis app. I already have a solid knowledge of image analysis and objetive c aswell. The basic idea to start with this is an app that get a real time video

Re: NSURL urlWithString return nil

2008-05-12 Thread Andrew Farmer
On 12 May 08, at 15:16, Dex Morgan wrote: Hello, I've tried to create an NSURL with this URL: http://forum.scmf.it/index.php?showtopic449st However it returns nil. So I've tried to open it via Safari and the URL become http://forum.scmf.it/index.php?showtopic%11449st %11? There is indeed a

Re: Anybody using Pantomime or mail-core framework?

2008-05-15 Thread Andrew Farmer
On 13 May 08, at 17:40, Matt Burnett wrote: Now your talking about hackers instead of spammers. It is hard to sniff a HTTP session, you have to penetrate your victim's network enough to be able to do so. You're assuming that the application is only ever used in a trusted environment,

Re: Create NSStrings from a mapped NSData object - safe?

2008-05-15 Thread Andrew Farmer
On 15 May 08, at 09:42, Dennis Munsie wrote: It doesn't move the file -- it removes the entry for it in the directory. Once the reference count for it go to 0, then it gets removed from the filesystem -- i.e, it's space on the filesystem gets marked as being available. On a standard UNIX

Re: Accessing variables across classes

2008-05-18 Thread Andrew Farmer
On 18 May 08, at 22:06, Brett Powley wrote: MyAppDelgate *ad = [NSApp delegate]; then do something with [ad myMutableArray] Incorrect. You don't get accessors for instance variables automatically like that. To the original poster, there are three approaches you can go with here. One is to

Re: NSApp with wrong _running count

2008-05-20 Thread Andrew Farmer
On 20 May 08, at 04:07, Micha Fuhrmann wrote: some users are reporting a crash at start. From the logs it seems that the sys is recognizing multiple running of the app, but from there I have no clue as to how to remedy. ... Thread 3: 8 com.apple.AppKit0x93eeb2fd

Re: NSApp with wrong _running count

2008-05-20 Thread Andrew Farmer
On 20 May 08, at 11:10, Michael Vannorsdel wrote: When you mention running count, are you keeping an int or something to keep track of thread progress? If so remember to use atomic operations to update the count from multiple threads to prevent data corruption. As for NSAlert, a general

Re: Newbie question about Database

2008-05-20 Thread Andrew Farmer
On 20 May 08, at 18:29, Mathieu Spénard-Gingras wrote: I am learning Cocoa and would like to develop an application that can connect to a database, such as MySQL. However, I cannot find any tutorial, nor drivers in order to connect to a MySQL database, in such a way JDBC works with Java.

Re: ObjC Question - labeled arguments

2008-05-21 Thread Andrew Farmer
On 21 May 08, at 21:48, Peter Zegelin wrote: After all the talk about the best way to learn Cocoa I thought I'd better brush up on my obj-c. I've been able to get an amazing distance without really understanding a lot as I am mainly using Cocoa as a gui around some C++ code and have been

Re: ObjC Question - labeled arguments

2008-05-21 Thread Andrew Farmer
On 21 May 08, at 22:25, Peter Zegelin wrote: - (void)reset:(RulerStyle*)newStyle:(int)newSide:(int)textLoc: (double)newScale; That syntax is pretty obscure. Try reading it as - (void)reset:(RulerStyle*)style newStyle:(int)newStyle newSide:(int)newSide textLoc:(double)newScale; and

Re: Query about Zip command

2008-05-23 Thread Andrew Farmer
On 23 May 08, at 01:26, parag vibhute wrote: I am developing cocoa application using NSApplescript class to do shell scripting which involves zip command. I am using zip command for zipping the files because there is no framework api available for it. Even though libz is available, it is

Re: Query about Zip command

2008-05-24 Thread Andrew Farmer
On 23 May 08, at 21:22, parag vibhute wrote: But my requirement is to pass arguments to GUI apps while launching it is it possible using Launch services? I will post my code of NSTask for launching GUI app in 1-2 days as my Mac is in office. GUI applications generally do not take arguments -

Re: Cocoa Classes from C++?

2008-05-27 Thread Andrew Farmer
On 27 May 08, at 16:12, J. Todd Slack wrote: 1. I wish to create an NSStatusItem. I have ObjC Code to do so, but how can I do this in C++? You can't. Cocoa is a Objective-C framework, and you'll need to write Objective-C code to use it effectively. 2. Can anyone point me to a reference of

Re: Hii I have problem in

2008-05-29 Thread Andrew Farmer
On 29 May 08, at 21:13, haresh vavdiya wrote: I m doing tic tac toc game and i have completed most of the parts. But only remaining portion is disable button when player won the game. I have set like [button1 setEnabled:FALSE]; and its working but erase all press button. Means whenever player

Re: super respondsToSelector

2008-05-31 Thread Andrew Farmer
On 30 May 08, at 23:22, Russ McBride wrote: Anyone want to take a stab at explaining to me as thoroughly as possible why [super respondsToSelector: aSelector] doesn't actually do what it looks like it should do? Keep in mind that, ordinarily, respondsToSelector: is implemented on

Re: How can i get current system time?

2008-05-31 Thread Andrew Farmer
On 30 May 08, at 23:40, haresh vavdiya wrote: Thank for giving me answer. I want to do one small clock for my iPhone but i can't understand how can i get current system time? I have read about NSDate, NSTimer but i can't understand how to use that class for

Re: gcc-4.0 Fail with Realease Configuration

2008-06-05 Thread Andrew Farmer
On 05 Jun 08, at 17:32, James Murdza wrote: Oh. Whoops, I should have realized that. Here it is: http://tinyurl.com/6xdbw6. I honestly don't know what part of it I should be reading because I've never had this kind of problem before, but I hope that someone more experienced might. The key

Re: App hangs when displaying any sheet in 10.5 [SOLVED]

2008-06-06 Thread Andrew Farmer
On 05 Jun 08, at 22:58, Graham Cox wrote: callL_objc_msgSend$stub lealLC17-L012$pb(%ebx), %ecx movl%eax, %edx andl$65535, %edx shrl$16, %eax cvtsi2ss%eax, %xmm0 cvtsi2ss%edx, %xmm1 mulss

Re: uint64_t and NSNumber

2008-06-08 Thread Andrew Farmer
On 08 Jun 08, at 20:40, Adam Thorsen wrote: I'm trying to store a uint64_t in an NSNumber object, but when I try to retrieve the value of the object, I get 0. - (void)updateLastEventId:(uint64_t *) eventId { printf(eventId %llu \n, eventId); This should throw a compiler warning. (If it

Re: crash on command-W

2008-06-09 Thread Andrew Farmer
On 09 Jun 08, at 21:03, James W. Walker wrote: I'm getting an access violation (inside NSTableView) when I close a window by command-W but not when I close it by clicking the close widget. I don't understand why it would make a difference. I have a nib containing a window and an

Re: Expanding Window/View

2008-06-09 Thread Andrew Farmer
On 09 Jun 08, at 21:07, SD wrote: resize the window (is there a way to do this nicely like System Preferences does) Yep. -[NSWindow setFrame:display:animate:]. CoreAnimation can probably do the job too, but it's unnecessary if all you want is a smooth resize.

Re: noob q: adding a button to a window programmatically

2008-06-10 Thread Andrew Farmer
On 09 Jun 08, at 22:28, Stuart Malin wrote: Until now I have created my GUIs using IB. I want a better understanding of what goes on under the hood of instantiating a Nib, so decided to try adding a button to a window programmatically. I can't get the button to appear, and so presume I am

Re: JNI trouble

2008-06-10 Thread Andrew Farmer
On 09 Jun 08, at 23:15, brien colwell wrote: hi all, I'm having some trouble compiling a JNI lib on Osx. I get the following Undefined synbols errors ... does anyone have a pointer? Very much appreciated! void *a_pointer = 0x90A4BCED; No, but seriously... cc -bundle

Re: Have questions...

2008-06-12 Thread Andrew Farmer
On 12 Jun 08, at 21:09, Rick Langschultz wrote: Am I aloud to ask where I can submit my iPhone programming questions to You're certainly allowed to ask. However, the answer is nobody, for now - sorry. Hopefully this'll change in a month or so...

Re: Have questions...

2008-06-12 Thread Andrew Farmer
On 12 Jun 08, at 22:16, Kyle Sluder wrote: On Fri, Jun 13, 2008 at 12:43 AM, Andrew Farmer [EMAIL PROTECTED] wrote: You're certainly allowed to ask. However, the answer is nobody, for now - sorry. Hopefully this'll change in a month or so... I thought the official answer was to e-mail DTS

Re: looking for a crc code

2008-06-14 Thread Andrew Farmer
On 14 Jun 08, at 10:49, Michael Hall wrote: I googled up this one. Might of taken more than a minute I'm afraid. Checksum, Please http://yamacdev.blogspot.com/2006/12/checksum-please.html It suggests zlib which should always be available, shouldn't it? Yep. There was recently a discussion of

Re: NSNotifications background apps?

2008-06-15 Thread Andrew Farmer
On 15 Jun 08, at 03:18, dreamcat7 wrote: - yes, thank you i have had a look. Its copyright of Tildesoft under creative commons 1.0 liscence. So i must attribude the following (1) line of sourcecode to Tildesoft under the http://creativecommons.org/licenses/by/1.0/ And likely that the Meow

Re: does NSTextField always use UTF8 encoding

2008-06-18 Thread Andrew Farmer
On 17 Jun 08, at 23:16, Wayne Shao wrote: In my UI, a user may type in any string into a NSTextField, e.g. Chinese characters. Do I assume the return value from NSString * value = [textField stringValue] is always encoded with UTF8? NSStrings are encoding-independent. They represent

Re: Cocoa can be used to execute arbitrary (privileged) code !

2008-06-19 Thread Andrew Farmer
On 19 Jun 08, at 07:22, Jerry LeVan wrote: Last night while browsing Slashdot I found this: http://it.slashdot.org/it/08/06/18/1919224.shtml It gives a simple command that can be used to basically execute code as root. osascript -e 'tell app ARDAgent to do shell script whoami' The above will

Re: Storing an unsignedLongLong

2008-06-21 Thread Andrew Farmer
On 21 Jun 08, at 21:59, Adam Thorsen wrote: I'm attempting to store an unsigned long long (stored in memory in an NSNumber) in user defaults, but it appears to be truncated upon retrieval. This may have something to do with the fact that I'm using the setInteger method of NSUserDefaults to

Re: Newbie question: instantiate a class in its header file OR in IB

2008-06-24 Thread Andrew Farmer
On 24 Jun 08, at 20:34, JArod Wen wrote: I am a cocoa newbie from Java. Recently I found an example code in which the instance of a class is defined in its own class's header file, as following: @interface AppController : NSObject { // Instance variables here }

Re: Newbie question: error in creating a NSData object using handle (Resource Management)

2008-06-25 Thread Andrew Farmer
On 25 Jun 08, at 06:43, Hamish Allan wrote: Someone who knows more about these things than I do may be able to point you in the direction of a more modern way of accessing resources :) There is, in fact, no more modern way of accessing resources. The preferred alternative is to use

Re: What does 'thread safe' mean?

2008-06-27 Thread Andrew Farmer
On 26 Jun 08, at 23:50, Kevin Ferguson wrote: I am not entirely sure as to what exactly a thread is, but seeing as anything I've ever programmed is light weight, I've never needed to worry before. And to be honest, such is still the case. This question is merely to satisfy my personal

Re: IBTool and .XIB files

2008-07-05 Thread Andrew Farmer
On 05 Jul 08, at 04:23, Sam Jew wrote: Hi everyone, I upgraded to iPhon--- iPhone development is still under NDA. Wait another week and things may change. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests

Re: Keyboard Shortcut for Stop

2008-07-05 Thread Andrew Farmer
On 05 Jul 08, at 18:33, Alex Wait wrote: It has the solid white up arrow, the apple/command symbol and what looks like the right arrow. I press these three keys to no avail. What am I doing wrong? More of an XCode question than a Cocoa question, but the symbol you're looking at is return,

Re: IBTool and .XIB files

2008-07-05 Thread Andrew Farmer
On 05 Jul 08, at 18:39, Sam Jew wrote: On 05 Jul 08, at 04:23, Sam Jew wrote: Hi everyone, I upgraded to iPhon--- iPhone development is still under NDA. Wait another week and things may change. Evidently the existence of this bug means I'm not doing any development for iPhone. I've

Re: Efficiently receiving data from an NSTask

2008-07-07 Thread Andrew Farmer
On 06 Jul 08, at 23:24, Omar Qazi wrote: On Jul 6, 2008, at 7:46 AM, Martin Hairer wrote: This works like a treat and is faster by a factor 3 or so than using the Moriarity implementation. However, it leaves me a bit concerned about various warnings all over the place concerning the thread

Re: triangulating webcams

2008-07-12 Thread Andrew Farmer
On 12 Jul 08, at 12:57, Gary L. Wade wrote: Sounds intriguing; at first thought, you may want to consider Xgrid to provide such collaboration, although it may not be what you're needing; there's other means to provide collaborative networking between Macs. If you want feedback on an

Re: how do I make chat bubbles using a custom cell

2008-07-15 Thread Andrew Farmer
On 15 Jul 08, at 21:50, Nick Zitzmann wrote: On Jul 15, 2008, at 9:08 PM, TARUN CHAPLOT wrote: I am very new to objective C and working on some application which needs to create Chat bubbles similar to iChat. Can anybody help me to find some documentation or the sample code which will help

Re: how to prevent baseline shift when using NSSuperscriptAttributeName on a NSTextView's NSAttributedString ?

2008-07-21 Thread Andrew Farmer
On 20 Jul 08, at 21:27, Rua Haszard Morris wrote: I am using NSSuperscriptAttributeName to make part of a string displayed in an NSTextView label display as superscript (to show to the power of 2). I may also use a smaller font attribute to make the 2 char smaller. My problem is that

Re: Folder has limited permissions.

2008-07-25 Thread Andrew Farmer
On 25 Jul 08, at 01:55, Macarov Anatoli wrote: When user has a standard account (not administrator), he/she doesn't have rights to create a file in the Directory /Applications/. I try to create a file with the help of function authopen. This code doesn't work: FILE *pFile =

Re: Getting process table info from within a Cocoa app

2008-07-26 Thread Andrew Farmer
On 25 Jul 08, at 22:58, Sumner Trammell wrote: Hi. A daemon process is running independently of my Cocoa app. Given a pid file of the daemon process in a known location, say /var/run/ somedaemon.pid, I would like my Cocoa app to read that file and check the process table to see if the

Re: Launch Path Not Accessible

2008-08-02 Thread Andrew Farmer
On 02 Aug 08, at 13:01, Steve Cronin wrote: I'm trying to do something that seems like it should be easy, but I'm stymied by what I think is a permissions error I don't understand. I'm trying to run a script using NSTask. I have the static script stored as a separate file in my bundle. I have

Re: Restarting an app -- AppleScript 'launch' in a detached shell

2008-08-03 Thread Andrew Farmer
On 03 Aug 08, at 14:00, Steve Cronin wrote: I am trying to simply restart my app. To my dismay, I cannot find a way to do this in Cocoa. Please enlighten me if I have failed to understand something!! After perusing the archives, what makes the most sense to me is to launch a detached shell

Re: Restarting an app -- AppleScript 'launch' in a detached shell

2008-08-03 Thread Andrew Farmer
On 03 Aug 08, at 19:53, Michael Ash wrote: On Sun, Aug 3, 2008 at 5:12 PM, Andrew Farmer [EMAIL PROTECTED] wrote: On 03 Aug 08, at 14:00, Steve Cronin wrote: I am trying to simply restart my app. To my dismay, I cannot find a way to do this in Cocoa. Please enlighten me if I have failed

Re: @try @catch

2008-08-14 Thread Andrew Farmer
On 14 Aug 08, at 03:58, Georg Seifert wrote: is it recommended to use @try .. @catch blocks as flow control like it is used in Python. They say explicitly to use it rather than do a lot of test before just try if it works to look after it only if it fails. Python has been optimized to

Re: !foo vs foo == nil

2008-08-20 Thread Andrew Farmer
On 20 Aug 08, at 20:06, Michael Ash wrote: On Wed, Aug 20, 2008 at 8:34 PM, Douglas Davidson [EMAIL PROTECTED] wrote: Well, after all, zero is zero, how much difference can it make? Quite a bit, as it turns out, since in 64-bit one of them is four bytes of zero, and the other is eight

Re: NSAppleScript shies away from porcupines

2008-08-26 Thread Andrew Farmer
On 26 Aug 08, at 00:39, Gerriet M. Denkmann wrote: I want to open some file: source = tell application SomeApp... You're making things harder than they need to be. [[NSWorkspace sharedWorkspace] openFile:@/path/to/file withApplication:@SomeApp]; As to AppleScript's Unicode support, I

Re: NSFileManager Help

2008-08-28 Thread Andrew Farmer
On 27 Aug 08, at 17:43, J. Todd Slack wrote: NSString *applicationSupportDirectory = @~/Library/Application Support/Ring-Maker/tmp/; /* temp scratch space */ If you need temp scratch space, use the NSTemporaryDirectory() function - the user's home directory may be on a device with slow

Re: NSURLConnection and JavaScript

2008-08-28 Thread Andrew Farmer
On 28 Aug 08, at 01:38, dexter morgan wrote: I'm using NSURLConnection to download a web page. Unfortunatly some particular pages detects JavaScript compatibility so the result data is something like you cannot see this page because you have not js enabled. Is there any way to workaround this

Re: Convert unicode string into ascii

2008-08-28 Thread Andrew Farmer
On 28 Aug 08, at 12:08, Ricky Sharp wrote: Just to point this out, the sequence of ASCII may not be useful at all if the file is say Unicode. The actual bytes making up each char could be ASCII values themselves. Unicode is a character set, not an encoding. I'm not sure about UTF-16 or

Re: programatically quit a program

2008-08-28 Thread Andrew Farmer
On 28 Aug 08, at 13:38, Wayne Shao wrote: What is the correct way to quit a cocoa app? I could use C exit() but that would loose the chance to invoke the right callbacks for clean up. What is the call that would be equivalent to user explicitly selecting the Quit from the menu. I only

Re: Message stack limitations

2008-09-03 Thread Andrew Farmer
On 03 Sep 08, at 02:23, RGA wrote: In trying to get my head around some design patterns for cocoa, I thought about the game of life (eg http://www.bitstorm.org/gameoflife/) . This is where you have a grid of cells, and dependant on the number of live cells around a given cell it dies,

Re: Bundle Load Fails for Users with G3 Processors Only

2008-09-08 Thread Andrew Farmer
On 08 Sep 08, at 17:30, Jerry Krinock wrote: On 2008 Sep, 08, at 15:14, Nick Zitzmann wrote: What is the output of lipo -info {path to the app contents folder}/ Frameworks/SSSQLiter.framework/SSSQLiter? Thanks for reading, Nick. The answer is: Architectures in the fat file:

Re: menu with checkbox

2008-09-10 Thread Andrew Farmer
On 10 Sep 08, at 08:20, Georg Seifert wrote: I have a NSPopupButton. What I need is that each item has a checkbox in front of its label. The menu needs to be selectable like with any normal NSPupupButton but when I click the checkbox it should just check the box but should not change the

Re: C/Obj-C API Confusion

2008-09-10 Thread Andrew Farmer
On 10 Sep 08, at 12:44, J. Todd Slack wrote: 1. Currently I have a .m and I use NSTask, NSString, etc. I would need to change these for C, correct? What is NSTask in the C API? Irrelevant; see below. (For reference, however, a common equivalent to NSTask is popen().) 2. Am I confused?

Re: NSTask is Weird

2008-09-10 Thread Andrew Farmer
On 10 Sep 08, at 20:24, J. Todd Slack wrote: Here it the command I am executing: /usr/local/bin/pymp3cut --segment /Users/slack/Library/Application Support/Ring-Maker/tmp/amber,00:00:11,00:00:36 /Users/slack/Music/ iTunes/iTunes Music/311/Unknown Album/01 Amber.mp3 I get this from the

Re: menu with checkbox

2008-09-11 Thread Andrew Farmer
On 10 Sep 08, at 23:29, Georg Seifert wrote: That what exactly what I was looking after. I think it would be not to strange in the context where it occurs in my app. The normal selection behavior is for selecting the active layer in my view. The additional checkbox should allow to blend

Re: escaping a string

2008-09-21 Thread Andrew Farmer
On 21 Sep 08, at 11:14, Sandro Noel wrote: so basically what i'm dooing here, is that if i find the caracter d and i'm at least 4 bytes into the file, i check to see if the 4 caracters before my location contain the word info, so then i know that my current location is the start of the info

Re: How to get the current screen resolution on Mac

2008-09-27 Thread Andrew Farmer
On 27 Sep 08, at 18:00, 熊佳 wrote: Hi, All,I am a newcomer, I write a simple program on mac, and want to display the main window at the center of screen, i mean the window's position should depends on the screen's width and height, so i need to get the screen resolution, who can tell me

Re: [Math] sin(), cos() not working? What special magic must I use to summon their powers?

2008-09-30 Thread Andrew Farmer
On 30 Sep 08, at 16:43, Michael Robinson wrote: retVal = lround(size*(1-cos(asin((double)i/(double)size; if(retVal 0 ) return retVal; Note that cos(asin(x)) = sqrt(1-x*x). HTH. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do

Re: Cocoa and C99

2008-10-06 Thread Andrew Farmer
On 06 Oct 08, at 00:49, Gerriet M. Denkmann wrote: In the old days I wrote: int i; float f; for( i = 0, f = 0.0; i 5; i++, f+= 3.5 ) . Now I am trying to use the C99 style: for( int i = 0, float f = 0.0; i 5; i++, f+= 3.5 ) . But I am told: parse error before 'float'. Then I tried:

Re: CDMA Programming

2008-10-06 Thread Andrew Farmer
On 06 Oct 08, at 18:19, Alex Wait wrote: I know that the iPhone uses cell phone communication technologies, probably like CDMA. (I am a huge n00b on this area of expertise). I am in a group project that needs to do some CDMA programming. Any ideas if there are any C libraries that can help

Re: gdb of va_alist?

2008-10-15 Thread Andrew Farmer
On 15 Oct 08, at 09:23, David Springer wrote: Folks, I am looking into some legacy code that is called from a third-party library. The function being called has this signature: AStringClass PlatformSpecificImplClass::formatMessage(unsigned int code, va_list* argList) The problem is that on

Re: how to complete c/s app

2008-10-15 Thread Andrew Farmer
On 15 Oct 08, at 19:24, han wrote: I want to complete a vigorous file transfer application.The server is implemented in the max os x,and client in the windows. I think the app is flexible, scalable, reusable. That looks like a sound set of requirements, but what it isn't is a question.

Re: enumerating the NSApplication instances?

2008-10-23 Thread Andrew Farmer
On 23 Oct 08, at 14:55, Charles Steinman wrote: --- On Thu, 10/23/08, Bill Janssen [EMAIL PROTECTED] wrote: Charles Steinman [EMAIL PROTECTED] wrote: You can't get NSApplication instances for other applications. Even as root? It has nothing to do with user permissions. There is no API for

Re: Creating NSDecimal

2008-10-31 Thread Andrew Farmer
On 30 Oct 08, at 23:18, Graham Cox wrote: On 31 Oct 2008, at 5:08 pm, HAMILTON, Steven wrote: Hi folks, Can someone tell me how I create an NSDecimal? The C struct one, not the ObjC NSDecimalNumber. For performance and simplicity I'd rather use the C interface but for the life of me I

Re: maximum theoretical speedup with dual quad processors

2009-01-31 Thread Andrew Farmer
On 31 Jan 09, at 15:11, Chris Hanson wrote: On Jan 31, 2009, at 2:04 PM, jurin...@eecs.utk.edu wrote: There IS a know bug with the NSInvocationQueue method on intels using 10.5.6 which I have read will be fixed on 10.6. Please do not say things like this without citing a specific source.

Re: maximum theoretical speedup with dual quad processors

2009-01-31 Thread Andrew Farmer
On 31 Jan 09, at 19:15, Robert Marini wrote: Easily reproduced doesn't always translate into guaranteed to occur. In my experience, using a single queue in your application is a sufficient safeguard as no system framework I've encountered causes an issue. That isn't to say that the API is

Re: autentification problem

2009-02-02 Thread Andrew Farmer
On 02 Feb 09, at 02:32, Valentin Dan wrote: I have paths like: \\10.1.1.11\SomeFolder\FileName.jpg file:///\\10.1.1.11\SomeFolder\FileName.jpg . I tested the path on Windows in InternetExplorer and it pops up a Login dialog. After authentication the picture is loaded and all further requests are

Re: Saving application data in ~/Library/Application Support/

2009-02-05 Thread Andrew Farmer
On 05 Feb 09, at 10:21, Josh de Lioncourt wrote: I've never seen anything that promoted the idea of storing non- standard data files in that folder. If there's a good argument for it, please enlighten me. Many Carbon applications (especially older ones) store preferences in

Re: NSTask + incomplete stdout at end of process

2009-02-06 Thread Andrew Farmer
On 05 Feb 09, at 22:10, Ken Thomases wrote: On Feb 5, 2009, at 10:48 PM, xEsk PiV wrote: I'm using NSTask for executing a command line tool, but I'm having some troubles getting the entire output. I explain the situation: 1) When I execute the command line tool using the Terminal, the tool

Re: Creating audio files in iphone

2009-02-09 Thread Andrew Farmer
On 08 Feb 09, at 22:41, Mahaboob wrote: I'm using a table view to show all the audio files. When I'm selecting one file among these and click on the record button, the newly recording sound should be attached to the end of the selected file. I'm referring the SpeakeHere example of apple.

Re: Syntax errors, undeclared variables

2009-02-09 Thread Andrew Farmer
On 07 Feb 09, at 16:06, Kevin Walzer wrote: I am making progress on this by refactoring the code to include the Cocoa methods in a Cocoa class and the Tcl C-API code in a separate file, called in normal C procedural style. Keep in mind that there's no restriction against calling ObjC

Re: Question regarding nullified relationship objects

2009-02-09 Thread Andrew Farmer
On 09 Feb 09, at 13:06, Jon C. Munson II wrote: [Jon C. Munson II] My intent with the question was to seek clarity rather than make an assumption. The dox don't say what happens, so one is left to make assumptions. Given that making assumptions about whether maintenance is needed or not

Re: How to get strings like CSSDictionary: 0x126a70 for all objects

2009-02-22 Thread Andrew Farmer
On 22 Feb 09, at 06:14, Ken Tozier wrote: I need to get unique identifiers for all objects I'm passed for use as keys in an NSMutableDictionary. I tried using hash but I don't know if that would really be unique. It isn't. The only requirement for -[NSObject hash] is that two objects

Re: Disabled, auto-disappearing placeholder in search field like Safari, Console.app

2009-02-24 Thread Andrew Farmer
On 23 Feb 09, at 20:52, Jerry Krinock wrote: When I bind to an NSSearchField with option key=value pair NSNullPlaceholderBindingOption=Search names, indeed Search names is displayed in the search field whenever the bound keyPath is nil. But it appears as normal black text which the user

Re: need help on understanding the crashreporter traces

2009-02-25 Thread Andrew Farmer
On 25 Feb 09, at 22:34, Arnab Ganguly wrote: I am analysing the Apple crash report.So I launched my application and tried to forcibly (kill -11 pid) crash the application.The app crashed and even the Apple crash report got generated. The crash report says Thread 1 crashed, but when I go

Re: Test if app run by Guest account?

2009-02-26 Thread Andrew Farmer
On 26 Feb 09, at 14:05, Karl Moskowski wrote: I'm looking for a way to disable some features in my application if it's being run by the Leopard Guest account. I tried using CSIdentityQueryCreateForCurrentUser() as outlined in the Identity Services Programming Guide to determine the current

Re: Test if app run by Guest account?

2009-02-26 Thread Andrew Farmer
On 26 Feb 09, at 15:04, Gerd Knops wrote: On Feb 26, 2009, at 4:29 PM, Andrew Farmer wrote: On 26 Feb 09, at 14:05, Karl Moskowski wrote: I'm looking for a way to disable some features in my application if it's being run by the Leopard Guest account. I tried using

Re: Name to PSN

2009-02-27 Thread Andrew Farmer
On 27 Feb 09, at 22:49, Kyle Sluder wrote: On Sat, Feb 28, 2009 at 1:41 AM, Pierce Freeman piercefreema...@comcast.net wrote: Does anyone have any ideas? To restart the dock, you send a quit event to the Finder. No, that'll just quit the Finder. The Dock is a separate application which

Re: Exel and PowerPoint

2009-03-02 Thread Andrew Farmer
On 02 Mar 09, at 18:16, Тимофей Даньшин wrote: Hello. Are there any abstractions in Cocoa to open and handle Exel and PowerPoint files? Thank you. No. You'll need to either write this code yourself or find a library that'll do it for you.___

  1   2   3   >