Re: NSPipe (NSFileHandle) writedata limit?

2010-04-12 Thread Andrew Farmer
On 12 Apr 2010, at 10:56, McLaughlin, Michael P. wrote: Greg Guerin wrote The fundamental design is send all data before looking for any results. This is inherently synchronous, even though two or more processes are involved. If the subtask is designed to read all data before producting any

Re: Cant read second table from same sqlite database iphone

2010-04-11 Thread Andrew Farmer
On 10 Apr 2010, at 18:02, charisse napeÿf1as wrote: //get the name and the score int iDen = sqlite3_column_int(statement, 0); NSString* name = [NSString stringWithUTF8String:(char *)sqlite3_column_text(statement, 0)]; Surely column 0 cannot be both an

Re: Removing quit button from dock menu

2010-02-24 Thread Andrew Farmer
On 24 Feb 2010, at 05:09, Arun wrote: I think what Yogin is looking for is something like what Finder has. The finder doc menu does not has the Quit option in it. Well i wish i could have given the solution if i were to know how finder has did it. Unfortunately i am Novice in cocoa..!!! The

Re: How to call on id

2010-02-24 Thread Andrew Farmer
On 24 Feb 2010, at 19:43, David Blanton wrote: I misspoke earlier. What I want to do is access an an ivar in m_view such as m_cpp wher m_cpp is an instance of a C++ class and then call functions on m_cpp such as m_view-m_cpp.Function() but I get 'struct objc_object' has no member named

Re: How is the best way to emulate the plist editor GUI?

2010-02-15 Thread Andrew Farmer
On 14 Feb 2010, at 22:35, Juanma Cabello wrote: I have a simple object that only has a NSMutableDictionary where I store all the Apache configurations parameters. That's the collection I want to bind. I know it's a bit of a tangent, but that representation isn't going to work very well.

Re: RegisterEventHotKey and keylogging

2010-02-06 Thread Andrew Farmer
On 6 Feb 2010, at 02:34, Michael Vannorsdel wrote: I found that I can hotkey any keys and then use CGEventPost to post the key to the front application. This effectively lets me track all the keys the user presses from a non-privileged application while still sending input to the key

Re: Touch: Non-rectangular Touch areas

2010-02-06 Thread Andrew Farmer
On 6 Feb 2010, at 11:05, Jens Alfke wrote: The easiest way to do this is to create an NSBezierPath in the shape of the trapezoid and call -containsPoint: on it; but IIRC, that class doesn't exist on iPhone. Fortunately the math for hit-testing convex polygons is pretty easy: check any

Re: Revolving scoreboard

2010-01-03 Thread Andrew Farmer
On 3 Jan 2010, at 15:24, Mike Abdullah wrote: Core Animation is the perfect tech for this. Probably by using layer-backed table views to display the scores. Quartz Composer is also worth looking into if you're after a full-screen display with a minimum of coding. The default RSS and Word Of

Re: Dynamically update drawRect

2009-12-27 Thread Andrew Farmer
On 27 Dec 2009, at 01:18, proger proger wrote: I'm still don't know how to do it. As solution i see programmically create MyView class and call drawRect function as i needed. There is rarely any good reason to call drawRect yourself. It should only be called by the AppKit drawing internals.

Re: Any way to keep on pane of NSSplitView from resizing?

2009-12-27 Thread Andrew Farmer
On 27 Dec 2009, at 16:41, Rick Mann wrote: I have an NSSplitView that divides my window in to two panes (vertically). When the window is resized, I'd like the left pane to keep the width it has, rather than having both panes resizing proportionally. Is this possible? Sure. Even without

Re: IPhone app passing info into Desktop app

2009-12-26 Thread Andrew Farmer
On 26 Dec 2009, at 06:54, Chad Eubanks wrote: Does anyone know of an example that has an iPhone app passing information to a desktop app? Could this be done with CoreData or should I be looking into a webview based app? Neither CoreData nor WebView are appropriate technologies for what

Re: Diacritics in Thai

2009-12-17 Thread Andrew Farmer
On 17 Dec 2009, at 16:41, Randall Meadows wrote: If this is such an emergency for you, open up a DTS support incident. Good luck, you're gonna need it. Alternatively, ignore AppKit and implement the comparison yourself! AppKit does not demand your undying devotion; you're perfectly free to

Re: Sending a non http request

2009-12-15 Thread Andrew Farmer
On 15 Dec 2009, at 14:22, Development wrote: I am trying to post data to NSString * url = [NSString stringWithFormat:@ipp://%@:%i/%@,host,[service port],item]; Which as you can see is an ipp address. However the code below fails as I get an error from the NSError that I am using an

Re: memcpy with 64 bit

2009-12-14 Thread Andrew Farmer
On 14 Dec 2009, at 11:06, gMail.com wrote: Handle imagesH = NewHandleClear(totImages * oneImageSize); Wait, Handle? NewHandleClear? Your use of these functions suggests that you may be working from a dangerously old textbook. There's really no reason to use them in new

Re: NSNumber stringValue

2009-12-12 Thread Andrew Farmer
On 12 Dec 2009, at 09:32, Ben Haller wrote: You should not compare floating point numbers for equality in most cases. This is true of any language on any platform. Indeed, some floating-point numbers (such as the one represented by the integer 0x7fc0) will compare as not equal to

Re: NSNumber stringValue

2009-12-11 Thread Andrew Farmer
On 11 Dec 2009, at 21:14, Bryan Henry wrote: You should not compare floating point numbers for equality in most cases. This is true of any language on any platform. Indeed, some floating-point numbers (such as the one represented by the integer 0x7fc0) will compare as not equal to

Re: Localizing Xibs using bindings

2009-12-07 Thread Andrew Farmer
On 5 Dec 2009, at 10:05, Rossi Matteo wrote: I find it very annoying to localize Xibs by keeping a copy for each translation. It's both tedious and error-prone. I've found that by simply binding each button's title (or wharever other control you need) to the appropriate key of a NSDictionary

Re: Heap and memory zone queries

2009-12-06 Thread Andrew Farmer
On 6 Dec 2009, at 13:57, jonat...@mugginsoft.com wrote: 1. GC is on. Does that mean that all allocations invocation by NS*/CF* will be in the auto_zone? Not necessarily. AppKit and CoreFoundation objects are still capable of allocating unmanaged memory (via malloc(), for instance) for their

Re: applicationShouldTerminate problem

2009-12-03 Thread Andrew Farmer
On 3 Dec 2009, at 00:25, proger proger wrote: I'm making little cocoa application. After the application will be closed i need to show alert. So i created applicationShouldTerminate delegate: - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication*)app { if (textChanged

Re: dynamic NSPointArray allocation

2009-12-01 Thread Andrew Farmer
On 1 Dec 2009, at 05:27, Jonathan Dann wrote: Just use NSPointerArray... Just as is the case with an array of NSValue objects, NSPointerArray doesn't help here -- it makes no guarantees about how the objects will be arranged in memory, and NSBezierPath needs them to be

Re: Download Alert -- Quarantine information removal

2009-12-01 Thread Andrew Farmer
On 1 Dec 2009, at 22:04, John Joyce wrote: Please do not do this. Please read the documentation on why this is there and what is expected behavior. Code Signing does not prevent this. Even Apple software that is downloaded internally triggers the quarantine message to users on first

Re: Cast NSNumber to int

2009-11-28 Thread Andrew Farmer
On 28 Nov 2009, at 03:20, Philip Vallone wrote: I want to cast a NSNumber to int. When I execute the below code, my result should be 1, not 68213232. What am I doing wrong? You are trying to cast a pointer to an integer and expecting meaningful results. Don't. If you want to get the numeric

Re: dynamic NSPointArray allocation

2009-11-28 Thread Andrew Farmer
On 28 Nov 2009, at 15:12, Henry McGilton (Boulevardier) wrote: Another possible approach is simply use a NSMutableArray full of NSValue objects that contain the NSPoint structures . . . I don't believe that'll work - storing everything in NSValue objects will end up scattering the actual

Re: Conversion of CFSocketCreateWithNative - NSSocketPort

2009-11-27 Thread Andrew Farmer
On 27 Nov 2009, at 06:48, Michael Ash wrote: There's no Cocoa version of this, as far as I know. However, CFSocketCopyPeerAddress is just a wrapper around the POSIX function getpeername(), so you can just get the native socket from your NSSocketPort and then call that. Or just keep using

Re: My try/catch block isn't catching exceptions on 10.6

2009-11-27 Thread Andrew Farmer
On 27 Nov 2009, at 11:40, Mark Allan wrote: Isn't it the case that you only need locks around something if you plan that it will be modified by more than one thread at a time, or if you write to it in another thread and care that any read operation will be predictable? No, that is not the

Re: How can I not block hotkey from other apps

2009-11-24 Thread Andrew Farmer
On 23 Nov 2009, at 07:17, Symadept wrote: I managed to get my app support for registering hotkeys and using it. But unfortunately if I register Cmd P as hot key in my app, no one in the system can use this hotkey to print unless I deregister it. How can I make it not block others. If you

Re: Keeping NSView square

2009-11-19 Thread Andrew Farmer
On 19 Nov 2009, at 00:10, Kyle Sluder wrote: 2009/11/18 Andrew Farmer andf...@gmail.com: Don't. Arbitrarily changing the size of your view in setFrame: makes AppKit lose track of what size your view was, making it impossible to restore the original size later. Cut the view down to square

Re: Keeping NSView square

2009-11-18 Thread Andrew Farmer
On 18 Nov 2009, at 04:38, Henri Häkkinen wrote: I'm making a custom NSView derived class and I need the view to have a fixed width/height ratio at all times, specifically I would like the view to stay square. I am trying to override the setFrame: method like this... Don't. Arbitrarily

Re: Multiple variable rules in for() statement

2009-11-13 Thread Andrew Farmer
On 12 Nov 2009, at 11:50, David Ross wrote: GCC does not like declaring variables in a for statement. Adding -std=c99 or -std=gnu99 to the compiler flags will fix that. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin

Re: Close/Minimize the app

2009-11-13 Thread Andrew Farmer
On 11 Nov 2009, at 21:23, kirankumar wrote: this will help you keep this 3lines of code in awakeFromNib, and mpwindow is you are window name. id closeButton = [mpWindow standardWindowButton:NSWindowCloseButton ]; [closeButton setAction:@selector(closeapp:)]; [closeButton setTarget:self];

Re: Drag-Move the Transparent windowed app over the screen

2009-11-13 Thread Andrew Farmer
On 12 Nov 2009, at 01:58, kirankumar wrote: goto attributes for your window ,enable the texture checkbox so that you can drag your window. While this does have the desired effect, there is a much more direct approach available (which Dave Keck has hinted

Re: beginner question, NSNumber, NSDecimalAsNumber

2009-11-09 Thread Andrew Farmer
On 9 Nov 2009, at 10:49, Jeffrey Oleander wrote: Last I looked, 1-bit count was an assembly/ hardware instruction. Getting the highest order on-bit required a little cleverness. Take a look at __builtin_clz(). (It maps to 'bsr' on x86.) ___

Re: beginner question, NSNumber, NSDecimalAsNumber

2009-11-08 Thread Andrew Farmer
On 8 Nov 2009, at 08:53, Jay Swartzfeger wrote: Hi all, I'm an absolute beginner to Objective-C (and programming in general). I have lots of books on order, but I've been messing with Xcode/Cocoa/iPhone SDK with online resources while I wait. My question -- for my next project, I want to do a

Re: Getting a handle on inf

2009-10-26 Thread Andrew Farmer
On 26 Oct 2009, at 12:11, Ian Piper wrote: ...and I still get a failed build with this message: Expecting inf; we got inf Which seems odd. And internally, this is because the IEEE float machinery guarantees that all infinite and NaN values compare as not-equal to each other, so that 1/0

Re: Crash drawing image

2009-10-24 Thread Andrew Farmer
On 24 Oct 2009, at 10:36, slasktrattena...@gmail.com wrote: And after the crash, gdb is confused and can't get info about the process? Sort of. I think the problem is no app can have keyboard focus as long as the screensaver is running/frontmost. So Xcode is not responding to keyboard events

Re: Getting a view's size?

2009-10-19 Thread Andrew Farmer
On 18 Oct 2009, at 22:45, patrick wrote: Thank you! That was exactly the problem. :) While we're at it, don't forget about NSStringFromRect(). No need to write format strings yourself when Apple's done it for you -- and written a parser to go with (NSRectFromString).

Re: NSURLRequest SSL Mac vs iPhone

2009-10-16 Thread Andrew Farmer
On 16 Oct 2009, at 00:48, Greg Hoover wrote: I have the same piece of code making a secure request to a server in a Mac application and in an iPhone app. Both use an NSURLRequest with exactly the same settings, message, body, etc. On the Mac, the request succeeds, returning the data

Re: UITextField formatting for IP Address

2009-10-16 Thread Andrew Farmer
On 16 Oct 2009, at 17:54, Alex Kac wrote: Here is my code, btw. It works OK, but it still has the issue of moving the cursor to the end. Perhaps there is no way to do this on the iPhone - I just don't want to bang my head for hours. - (void)formatForIP:(UITextField*)textField

Re: A good Obc-C framework for sending email?

2009-10-15 Thread Andrew Farmer
On 15 Oct 2009, at 13:34, Ben Haller wrote: Hi all. I need a good Obj-C framework for sending email. I used to use the Message.framework associated with Apple's Mail, but they killed that a long time ago, sadly. Then I used Pantomime; but it seems to also be abandoned, now, and it is

Re: NSString vs. encoding

2009-09-17 Thread Andrew Farmer
On 16 Sep 2009, at 22:55, Johan Kool wrote: Thanks so much!! That is indeed the case! I now use strunvis and it's all done in just 4 lines of code. (Well, except that I should still handle a returned error code.) int len = [stringA lengthOfBytesUsingEncoding:NSUTF8StringEncoding];

Re: Making a new ICNS file with NSImage

2009-09-17 Thread Andrew Farmer
On 17 Sep 2009, at 19:39, Squ Aire wrote: My problem is this: I want to derive a new icon file (simulated by an NSImage somehow) which has some margins applied to it. The margins on each side should be the size of the area being drawn on divided by 100. So for instance, if we are drawing

Re: sprintf and 64-bit integers

2009-09-14 Thread Andrew Farmer
On 14 Sep 2009, at 11:48, Sean McBride wrote: On 9/13/09 12:01 PM, Jens Alfke said: It would be best to convert all your sprintf calls to snprintf, which is a safer equivalent that won't overflow the buffer. Yes, sprintf is pure evil. snprintf is less evil. Also, I recommend adding

Re: NSString and UIWebView load

2009-09-11 Thread Andrew Farmer
On 11 Sep 2009, at 06:59, Dragos Ionel wrote: Is the following code supposed to run correctly? NSString* *htmlContent* = ...;// very long html content UIWebView* webView = [[UIWebView alloc] initWithFrame:...]; [webView loadHTMLString:*htmlContent* baseURL:...]; //assume this will take

Re: Create VNC Client iPhone

2009-08-24 Thread Andrew Farmer
On 24 Aug 2009, at 07:49, Joe Turner wrote: I've wanted to switch from bonjour to something more universal for a while now. And, I'm wondering about how to do VNC. I've seen that many apps on the iPhone use Apple's Screen-Sharing functionality as a VNC Server, and I would like to do the

Re: Help needed with ConvertCocoa64 script

2009-08-24 Thread Andrew Farmer
On 24 Aug 2009, at 19:17, Graham Cox wrote: Trying to run the ConvertCocoa64 script. /Developer/Extras/64BitConversion/ConvertCocoa64 'find . -name '*. [hm]' | xargs' this comes up 'no match' Try this: find . -name '*.[hm]' | xargs /Developer/Extras/64BitConversion/ ConvertCocoa64

Re: debug control not reaching init method

2009-08-22 Thread Andrew Farmer
On 20 Aug 2009, at 04:20, Navneet Kumar wrote: AppController is not coming from an archive. Dragged an NSObject to MainMenu.xib, set its class to AppController, made AppController the delegate of File's Owner. Er, that IS coming from an archive. (Nib files are archives.)

Re: NSAlternateKeyMask is not working

2009-08-22 Thread Andrew Farmer
On 20 Aug 2009, at 04:54, Nikhil Khandelwal wrote: In my application I am setting shortcut key for a menu item as [Menuitem setKeyEquivalentModifierMask:NSAlternateMask]; [Menuitem setKeyEquivalent:@1]; But it is not working with alt key though it is working fine if I press Fn + option + 1

Re: Table view with multiple columns

2009-08-21 Thread Andrew Farmer
On 21 Aug 2009, at 03:53, Massimiliano Gargani wrote: I have a mutable array with inside something like luke,l...@luke.com ,mark,m...@mark.com, .. ... - (id) tableView: (NSTableView*) tableView objectValueForTableColumn: (NSTableColumn *) tableColumn row: (int) row {

Re: int to bytes(value in NSString)

2009-08-18 Thread Andrew Farmer
On 17 Aug 2009, at 23:21, bosco fdo wrote: Hi graham Thanks for the reply. I have tried %i.1 but i am getting 0.10.10.10.1 , but i need it in binary byte value Wait, you're trying to construct a NSString with null bytes in it? I'm pretty sure that doesn't work correctly in a lot of

Re: [iPhone] Webview stringByEvaluatingJavaScriptFromString

2009-08-05 Thread Andrew Farmer
On 5 Aug 2009, at 12:08, Development wrote: NSString * aString =[theWebView stringByEvaluatingJavaScriptFromString :@document.getElementsByName(\encrypted\).value]; This Javascript will never work correctly, no matter whether it's from HTML or from ObjC. getElementsByName returns a

Re: Cocoa Document-Based App v. Windows MDI App

2009-07-27 Thread Andrew Farmer
On 26 Jul 2009, at 22:57, Jeff Biggus wrote: If you want it to look like Safari tabs across the top you'll just have to do a little work to make that top bar view behave how you want. Side tabs are much easier to get up and running, and are often a better solution GUI-wise, depending on

Re: How to display the information in the columns of the table view?

2009-07-27 Thread Andrew Farmer
The crash you're seeing is almost certainly occuring because you aren't retaining infoDictionary correctly. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the

Re: NSTableView - populating from C procedure

2009-07-25 Thread Andrew Farmer
On 25 Jul 2009, at 03:56, Uli Kusterer wrote: I don't think you can use sizeof() on a pointer passed as a parameter, though. That only works on variables in the current scope. That pointer could point at anything, so the compiler has no idea whether it points at the stack or the heap. Even

Re: Screen Saver test button click notification

2009-07-23 Thread Andrew Farmer
On 23 Jul 2009, at 03:57, Santosh Sinha wrote: I have developing a calibration tool , but there is a little issue, When i have done the calibration and go into the system preferences and click screen saver test button , after that calibration is gone, What kind of calibration are you

Re: missing vertical scroll bar

2009-07-17 Thread Andrew Farmer
On 17 Jul 2009, at 13:36, Joel Norvell wrote: I believe the recipe you want involves shoe-horning the scrollViewRect into its containing window. Also, I might just be missing something, but isn't there usually a NSClipView in the hierarchy somewhere?

Re: Problems displaying an image in UIWebView [solved]

2009-07-16 Thread Andrew Farmer
On 16 Jul 2009, at 09:55, M.S. Hrishikesh wrote: img align=center src=/file://Users/hrishi/Library/Application Support/iPhone Simulator/User/Applications/87888BAB-2F9D-44F6-BEB8- FB7D65D2F1CC/Epicures.app/myImage.png / Although it may display correctly, that's still not correct. The URI

Re: Windowed Video

2009-07-16 Thread Andrew Farmer
On 16 Jul 2009, at 05:15, Eric E. Dolecki wrote: I would like to play a m4v from my bundle and I am using MPMoviePlayerController to do this. Works great. However in my view the designer would like the video to playback overlaid on top of a graphic of a television set. I don't seem to be

Re: Trouble with binary data and byte buffers

2009-07-13 Thread Andrew Farmer
On 13 Jul 2009, at 22:02, Chase Meadors wrote: Hi, I'm having some confusion here over displaying raw binary data. I have my NSMutableData object that I'm getting the bytes from. As I understand it, there are different ways to get the bytes. The -getBytes:range: method NSRange r =

Re: Intercepting console in an app

2009-07-08 Thread Andrew Farmer
On 8 Jul 2009, at 03:48, Angelo Chen wrote: I use NSTask to run a command line program(ffmpeg in this case), NSPipe can't get the output from the program, but I can see those messages from the Console during runtime, is there a way to grab the Console output from a running cocoa app?

Re: The code limit to the media type to .mp3 and .aiff

2009-07-08 Thread Andrew Farmer
On 8 Jul 2009, at 00:56, Bright wrote: { if(UTTypeConformsTo(uti, CFSTR(public.aiff-audio))) You're looking for the wrong thing here. % mdls /System/Library/Sounds/Morse.aiff ... kMDItemContentType = public.aifc-audio kMDItemContentTypeTree = ( public.aifc-audio,

Re: CGSRegisterNotifyProc and unlock screen notification

2009-07-08 Thread Andrew Farmer
On 8 Jul 2009, at 09:53, Austin wrote: I am wondering if anybody could provide a little details on how to register through CGSRegisterNotifyProc for an unlock screen notification. Basically I would like my application to get notified when the user successfully unlock the screen from

Re: EXC_BAD_ACCESS on returning an int?

2009-07-05 Thread Andrew Farmer
On 4 Jul 2009, at 17:39, Ian Havelock wrote: @synthesize numberOfSides; @synthesize minimumNumberOfSides; @synthesize maximumNumberOfSides; - (int)numberOfSides { return numberOfSides; } - (void)setNumberOfSides:(int)value { numberOfSides = value; } Let me guess:

Re: looks like my syntax is wrong. Does not compile

2009-07-03 Thread Andrew Farmer
On 3 Jul 2009, at 21:29, Agha Khan wrote: Aobject is type of Myobject* it has an array for 6 intergers Aobject.myArray = [NSArray arrayWithObjects:[NSNumber numberWithInt: 1], [NSNumber numberWithInt: 2],[NSNumber numberWithInt:3], [NSNumber numberWithInt:4], [NSNumber

Re: Determining OS at Runtime

2009-07-02 Thread Andrew Farmer
On 2 Jul 2009, at 16:29, Steve Christensen wrote: If you want to make sure that you don't include any old code in your executable when you decide to make 10.5 (for example) your base OS version, you could arrange your code like this: #if MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_5

Re: Window not displaying

2009-07-01 Thread Andrew Farmer
On 30 Jun 2009, at 22:28, rethish wrote: @implementation SendWindowClass -(void)openNew { [ScheduleWindow makeKeyAndOrderFront:self]; } What is ScheduleWindow, and how is it allocated? The code you've provided here never initializes a window - I'm assuming that it's sometimes

Re: Raw Infrared Data

2009-06-30 Thread Andrew Farmer
On 30 Jun 2009, at 07:03, Mr. Gecko wrote: Is there anyway to get raw Infrared data from the Apple IR Controller? I'll like to be able to see data from remotes that are not the Apple Remote and also see the raw data of the apple remote so I could make a generic game controller or something

Re: UITextView symbols

2009-06-28 Thread Andrew Farmer
On 27 Jun 2009, at 16:26, DKJ wrote: I'm using this method: textView:shouldChangeTextInRange:replacementText: to let users put special symbols into a UITextView. I detect the Return key by checking whether the input string is equal to @\n. But how would I detect the back-delete key? @\b

Re: Tool-tips on NSTabViewItem

2009-06-28 Thread Andrew Farmer
On 26 Jun 2009, at 08:01, PKameo wrote: How do you add a tool-tip to a NSTabViewItem? I tried the following, but that didn't work right. [[tabViewItem view] setToolTip:toolTip]; //Where tabViewItem is of type NSTabViewItem* and toolTip is of type NSString* [tabViewItem view] returns the

Re: Bonjour over the web

2009-06-27 Thread Andrew Farmer
On 27 Jun 2009, at 21:58, Development wrote: I was reading the docs and did not see the answer to this so I am hoping that I can get some help through the list. Is it possible to publish a bonjour service on the web? No. Bonjour depends on the availability of local network broadcasts to do

Re: Cocoa and email (SMTP/POP3)

2009-06-23 Thread Andrew Farmer
On 23 Jun 2009, at 20:42, Dave DeLong wrote: 3.5: Use /usr/sbin/sendmail: Create an NSTask that launches /usr/ sbin/sendmail, configures the headers, and then just pipes your email through the task's standardInput. That doesn't work for users behind residential ISPs that block port 25, or

Re: Cocoa and email (SMTP/POP3)

2009-06-23 Thread Andrew Farmer
On 23 Jun 2009, at 21:52, Jeff Laing wrote: Ok, I'll bite. How does the mail server that Mail.app is talking to distinguish between Mail.app and /usr/sbin/sendmail ? They both presumably just talk SMTP ? Mail.app is configurable by the user to connect to a specific relay mail server,

Re: Possible to set tab stops in an NSTextView?

2009-06-21 Thread Andrew Farmer
On 21 Jun 2009, at 15:44, Ken Tozier wrote: Here's how I interpreted your code NSArray *tabStops = [[[NSArray alloc] initWithObjects: [NSNumber numberWithInt: 70], [NSNumber numberWithInt:

Re: Show the dock icon's context menu:

2009-06-21 Thread Andrew Farmer
On 19 Jun 2009, at 16:37, Ian was here wrote: I think the best way to show an application dock icon's context menu from within the application itself is to write an AppleScript that can find the desired application's dock icon, then ask it to show its context menu. And how would you

Re: Weird dyld loader crash

2009-06-20 Thread Andrew Farmer
On 20 Jun 2009, at 20:27, Erg Consultant wrote: I suddenly started getting a weird loader crash when launching my app. Has anyone seen any errors similar to this one: Exception Type: EXC_BAD_ACCESS (SIGBUS) Exception Codes: KERN_PROTECTION_FAILURE at 0x Crashed Thread: 0

Re: Jerky/juttery (core-)animation in a screensaver

2009-06-19 Thread Andrew Farmer
On 17 Jun 2009, at 11:51, Phillip B Oldham wrote: Also, I'm quite sure its not a problem with the hardware. I've tested the built-in screensavers which use core-animation, and downloaded a few free CA-based for comparison, and they run without issue on both machines. None of the standard

Re: Problem with capturing active state of the application

2009-06-18 Thread Andrew Farmer
On 17 Jun 2009, at 22:49, Srinivasa Prabhu wrote: In our application we want to capture a selected area similar to Apple's Cmd+Shift+4 i.e during selection capture, the active state of another application has to be captured. ... Is there any workaround to capture the active state of the

Re: How to fill rectangle under vertical scroller?

2009-06-17 Thread Andrew Farmer
On 16 Jun 2009, at 21:40, Sumin Kim wrote: That's not part of the scroller. Assuming you're working with NSTableView, this is the cornerView, which you can set up separately. Yes, you are right. I am working with table. Of course I tried to use cornerView. But as far as I understood

Re: How to fill rectangle under vertical scroller?

2009-06-16 Thread Andrew Farmer
On 16 Jun 2009, at 16:43, Sumin Kim wrote: I am drawing custom scroller for my application and could change color and looks of knob, arrows, and knob slot. But I still cannot change the color of a rectangle located in right bottom corner under vertical scroller. I could not find out how to

Re: Serial port access from C / Objective C

2009-06-15 Thread Andrew Farmer
On 15 Jun 2009, at 15:10, Vansickle, Greg wrote: With the write / read in place, although the write appears to work (numbytes returns 5), the photometer does not respond (I get no REMOTE indication on the instrument panel. The subsequent read fails (returns -1). This indicates that an

Re: Putting files in an flat-file executable

2009-06-13 Thread Andrew Farmer
On 13 Jun 2009, at 14:35, KK wrote: Well, I'm making a command-line tool that uses another tool, and it would be convenient if that other tool could be packaged right inside the first tool. So, the bundle structure is basically out... Right? You can't execute a binary that doesn't exist as

Re: searching a string in big file

2009-06-13 Thread Andrew Farmer
On 13 Jun 2009, at 00:27, Angelo Chen wrote: Hi Stephen, Thanks for the quick reply, it is a binary file, coming from Quicktime's mov, I need to search backward for a string 'free', then change it to 'moov', so search should start from the end of file, any ideas? Thanks, Angelo This is

Re: Drop dowm status menubar item while hovering cursor over it

2009-06-11 Thread Andrew Farmer
On 10 Jun 2009, at 23:02, Arjun SM wrote: Pardon me for i din't understand (still a novice). I did try adding a tooltip for the menu item, but when i clicked on the menu bar and hovered the mouse over my Menulet drop down didn't appear even though menuitem of Time Machine, Bluetooth and

Re: crashing web browser with openURL call

2009-06-06 Thread Andrew Farmer
On 6 Jun 2009, at 08:37, iseecolors wrote: What I am doing is a single sign on to an web service. I send the URL (with cert and nounce) to the server and get back a re-direct to the actual page, which does start to load. I see all of this take place. Than before the page finishes

Re: NSTask curl

2009-06-06 Thread Andrew Farmer
On 6 Jun 2009, at 14:18, Ammar Ibrahim wrote: I'm using NSTask to spawn a process to do some work as per the code below: snip [task setLaunchPath:@/usr/bin/curl]; Why on earth are you shelling out to do that? NSURLDownload exists for a reason. In any case, the reason you aren't ending

Re: NSTask curl

2009-06-06 Thread Andrew Farmer
On 6 Jun 2009, at 15:05, Ammar Ibrahim wrote: On Sun, Jun 7, 2009 at 12:29 AM, Andrew Farmer andf...@gmail.com wrote: Given downloadFilePath /foo/bar/baz, this'll create a file called baz - with a leading space. Either use -o%@ or use two separate arguments. Thanks that fixed

Re: NSAppleScript's compileAndReturnError always succeeds

2009-06-04 Thread Andrew Farmer
On 3 Jun 2009, at 19:47, Paul J. Lucas wrote: Given that NSAppleScript objects are always supposed to run on the main thread, I created a small proxy object to use: snip If I compile a valid script, it works as expected; however, if I compile a gibberish script, e.g., foo,

Re: Can't set header on NSURLRequest

2009-06-02 Thread Andrew Farmer
On 1 Jun 2009, at 23:44, Chris wrote: I'm having an issue with setting two headers for my NSURLRequest: [theRequest setValue: [NSString stringWithFormat:@/principals/ __uids__/%@/\r\n,self.userGUID] forHTTPHeaderField:@Originator]; [theRequest setValue: [NSString

Re: Validation of toolbaritem based on certain action is encountered?

2009-06-02 Thread Andrew Farmer
On 2 Jun 2009, at 19:48, archana udupa wrote: I m havin a list of toolbar.I m working on application similar to winmerge in windows,which shows difference between 2 files.When i click toolbar item Previous difference ma cursor ll move to previous difference.But after it reaches the first

Re: NSURLConnection sendSynchronousRequest: crashes since, upgrading to 10.5.7

2009-05-31 Thread Andrew Farmer
On 27 May 2009, at 18:20, Dennis Hartigan-O'Connor wrote: I have a very similar problem: my simple program that downloads stock prices has been working fine but intermittently crashes on 10.5.7, whether I use sendSynchronousRequest or stringWithContentsOfURL. For me, too, everything is

Re: Question about NSFileHandle class

2009-05-30 Thread Andrew Farmer
On 30 May 2009, at 00:14, Graham Cox wrote: On 30/05/2009, at 5:09 PM, Adil Saleem wrote: Does the class NSFileHandle implements endianness checks or is it the responsibility of the programmer? I am using its method - (NSData *)readDataOfLength:(NSUInteger)length I want to read binary data

Re: sending continues NSImage data to iPhone

2009-05-29 Thread Andrew Farmer
On 28 May 2009, at 06:31, sheen mac wrote: I am doing a screen sharing app for iPhone and Mac.I captured the Mac Screen as NSImage using OpenGL and send it to iPod as Gif data. But sending and restoring to UIImage process make delay because of Image size.The image size of capture is 320 x

Re: Performance, Efficiency - Coding practice

2009-05-28 Thread Andrew Farmer
On 28 May 2009, at 16:57, John Ku wrote: snip Is this a more efficient way to code? Which coding practice is better in terms of efficiency, memory, performance? The update method will get called often. So Im thinking there is no need to create 'NSPoint drawAtOrigin' everytime. Your

Re: Sending keycode to stdin

2009-05-22 Thread Andrew Farmer
On 22 May 2009, at 15:54, Marc Tecles wrote: i'm trying to write a Cocoa application that launch a command line tool for example top. I've used NSTask with 2 NSPipe to launch the command line tool and to redirect the stdout and stderr to an NSTextview in my applycation asynchronously with

Re: Escaping white space in an NSString

2009-05-21 Thread Andrew Farmer
On 20 May 09, at 23:26, Bruce Johnson wrote: char mdfile[PATHSIZE]; strncpy(mdfile, pathToFile, MAXREAD); FILE * stream = fopen(pathToFile, rt); the rest of the c-code iterates over a rather large text file getting a line at a time, (fgets(inbuff,MAXREAD,stream)) make some calculations and

Re: Unknown Host: Operation timed out Error

2009-05-15 Thread Andrew Farmer
On 15 May 09, at 04:54, Shraddha Karwan wrote: I am writing an iPhone application. When I traverse from the main screen to a second screen, an AlertView is displayed. If the user clicks on the Cancel button of this alert view I am traversing back to the main screen. I used this

Re: Hex to NSString or NSData

2009-05-09 Thread Andrew Farmer
On 09 May 09, at 18:58, Gwynne Raskind wrote: c = hexCharToNibble(i % 255); May want to use the operator instead of %. IIRC, modulus needs integer division, and may be taking more time than the inlined hexCharToNibble. Yeah, but since that was only done as part of a benchmark, it didn't

Re: NSString to bit pattern

2009-05-08 Thread Andrew Farmer
On 08 May 09, at 08:47, Greg Guerin wrote: A string is a sequence of characters. Retrieve each character, determine its bit-pattern, then append that pattern to an NSMutableString. Now you have to figure out how to turn a character into its bit-pattern. So break that down. One extra

Re: NSApplication and command line args

2009-05-08 Thread Andrew Farmer
On 07 May 09, at 12:36, Brian Arnold wrote: I have recently converted an application which processes command line arguments to call NSApplicationMain when it starts up, and defer command line processing until later in a separate thread. The deferred command line processing still works; however,

Re: Cancel NSThread - cocoa/mysql database search...

2009-05-08 Thread Andrew Farmer
On 08 May 09, at 07:08, spartan g wrote: But the problem I am facing now is, once i sent the query to MySQL through SMySQL framework, I am unable to cancel it. This query takes so much time to return the results and cannot be canceled as far as I understand. Is there any way to cancel this

Re: HFS Format API?

2009-05-08 Thread Andrew Farmer
On 08 May 09, at 07:01, iseecolors wrote: Is there a Cocoa/Core Foundation (or ___) API for formatting a Volume? No, largely because formatting a volume is a privileged operation which can't be performed by a userspace application anyway. However, you may want to look into the newfs_hfs

  1   2   3   >