Re: Porting SetupComm function in Mac

2008-11-03 Thread Rakesh Singhal
Hi Chris Ya there should be one list for porting to and from windows. I have one more query but I will put in darwin-dev now. I have gone through this document already. Thanks and regards rksinghal On Mon, Nov 3, 2008 at 1:08 PM, Chris Ridd <[EMAIL PROTECTED]> wrote: > > On 3 Nov 2008, at 07:25

Help on creating a PlayList

2008-11-03 Thread Arnab Ganguly
Hi All, I would like to develop a player having, playlist.I am able to do the player part successfully,using QTKit and from examples.Can you provide some pointers or some examples as how to develop a playlist for the same using Cocoa. Thanks in advance. Arnab ___

Subview frames and bounds

2008-11-03 Thread DKJ
I'm still puzzled by frames and bounds. I put this in the drawRect: of MyView: [[NSColor redColor] set]; NSRectFill( self.frame ); [[NSColor blueColor] set]; NSFrameRect( self.bounds ); I put this in the awakeFromNib of my controller: NSRect r = NSMakeR

Re: Gradient panel

2008-11-03 Thread Uli Kusterer
On 01.11.2008, at 04:28, David wrote: Is there an easy way to instantiate a Cocoa panel with a gradient background? Are there any code samples? Is NSGradient the key? Any examples of how you hook this in with a panel or window? Do you mean an arbitrary background, or are you perhaps tal

Re: Subview frames and bounds

2008-11-03 Thread Patrick Mau
On 03.11.2008, at 14:23, DKJ wrote: I'm still puzzled by frames and bounds. I put this in the drawRect: of MyView: [[NSColor redColor] set]; NSRectFill( self.frame ); [[NSColor blueColor] set]; NSFrameRect( self.bounds ); I put this in the awakeFromNib of my c

Re: Subview frames and bounds

2008-11-03 Thread Andy Lee
On Nov 3, 2008, at 8:23 AM, DKJ wrote: I'm still puzzled by frames and bounds. Short answer: A view's bounds is specified in the view's coordinate system. Its frame is specified in its superview's coordinate system. Longer answer: I wonder if you're unclear on coordinate systems in genera

Re: Subview frames and bounds

2008-11-03 Thread Andy Lee
On Nov 3, 2008, at 8:57 AM, Andy Lee wrote: At the risk of confusing things, let me try a metaphor. I live in a city with streets on a grid, and I live on 14th Street and 8th Avenue. Can you tell me right now -- how far is 16th Street and 6th Avenue, and in which direction? Is it north,

Modal Dialog Issue

2008-11-03 Thread Carmen Cerino Jr.
I have a button that when clicked will display a modal dialog. My modal dialog is custom, and lives in its own Xib file. My issue is that the first time I click the button to make the dialog appear it does not latch it self onto the window like it should. If I go to dismiss the dialog with my cance

Re: Padding Zeros...

2008-11-03 Thread Uli Kusterer
On 31.10.2008, at 22:52, Jean-Nicolas Jolivet wrote: I'm having an interesting problem... I'm trying to format a number with padding zeros but I can't figure out how to do it in this particular situation. I know I can use a formatted string with something like [stringWithFormat:@"%03d",

Re: Help on creating a PlayList

2008-11-03 Thread Graham Cox
On 3 Nov 2008, at 9:35 pm, Arnab Ganguly wrote: Can you provide some pointers or some examples as how to develop a playlist for the same using Cocoa. NSMutableArray? --G. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not po

Issue with the Downloader application

2008-11-03 Thread Arnab Ganguly
Hi All, I was trying out the /Developer/Examples/WebKit/Downloader test application locally. When I try to download some html files I face no issues but when I try to download some pls (play stations files) like for example http://yp.shoutcast.com/sbin/tunein-station.pls?id=2550 I get popup for "D

Lack of Initializers or Factory Methods

2008-11-03 Thread Gordon Apple
The following example is one of several I have run into recently. Inheritance is as follows: CAKeyframeAnimation: CAPropertyAnimation : CAAnimation. CAKeyframeAnimation has no explicit initializer or factory method. Dudney's book uses [CAKeyframeAnimation animation] to create an object.

Re: External Program Control from within Cocoa App

2008-11-03 Thread Matt Neuburg
On Sun, 02 Nov 2008 17:25:01 -0500, Ronald Ramdhan <[EMAIL PROTECTED]> said: >Hey Everyone, > I am working on a project where I would like to control external >programs from within my Cocoa Application. For example, the ability to >control a program like PowerPoint from within my code. > > Is there

asl_search() no longer returns old messages

2008-11-03 Thread Karl Moskowski
Last week, I started converting my app to use ASL, and everything was hunky dory. For diagnostic purposes, I use an ASL query to export to text for upload recent logs. // really, days & flag are passed in to a method double days = 30.0; // varies from 1.0 to 30.0 NSString *mi

Re: Lack of Initializers or Factory Methods

2008-11-03 Thread Jim Correia
On Nov 3, 2008, at 10:53 AM, Gordon Apple wrote: The following example is one of several I have run into recently. Inheritance is as follows: CAKeyframeAnimation: CAPropertyAnimation : CAAnimation. CAKeyframeAnimation has no explicit initializer or factory method. Dudney's book use

Re: Lack of Initializers or Factory Methods

2008-11-03 Thread Charles Steinman
--- On Mon, 11/3/08, Gordon Apple <[EMAIL PROTECTED]> wrote: > Is there a basic assumption that such factory methods > are implicitly > redefined for all subclasses? It's not implicitly redefined -- just inherited. One of the advantages of Objective-C's dynamic nature is that [[[self class

Re: asl_search() no longer returns old messages

2008-11-03 Thread Jason Coco
On Nov 3, 2008, at 11:01 , Karl Moskowski wrote: Last week, I started converting my app to use ASL, and everything was hunky dory. For diagnostic purposes, I use an ASL query to export to text for upload recent logs. // really, days & flag are passed in to a method double d

Re: Cannot change menu state in NSSearchField menu for more than once

2008-11-03 Thread Matt Neuburg
On Mon, 03 Nov 2008 08:58:20 +0100, Alexander Reichstadt <[EMAIL PROTECTED]> said: >I found something really odd just now. The searchmenu is actually >connected to an IBAction method. The NSLog sits in there and simply >prints out the sender, i.e. the menuItem that triggered it. > >If I change the

Re: asl_search() no longer returns old messages

2008-11-03 Thread Karl Moskowski
On 3-Nov-08, at 11:16 AM, Jason Coco wrote: Yes... by default messages are pruned every 24 hours by syslog. See the section on Messaging Expiry and Archival in the manpage for syslogd(8) for more information on how to adjust this... Thanks for the pointer to that manpage section. It look

Re: Lack of Initializers or Factory Methods

2008-11-03 Thread Gordon Apple
Is "self" even defined for a class object? If so, should case 1 (or similar) be the assumed implementation for all of Cocoa? If not, then, IMHO, the docs in general should specify which is is for each factory method. On 11/3/08 10:06 AM, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On

Re: Modal Dialog Issue

2008-11-03 Thread Matt Neuburg
On Mon, 3 Nov 2008 09:22:25 -0500, "Carmen Cerino Jr." <[EMAIL PROTECTED]> said: >I have a button that when clicked will display a modal dialog. My >modal dialog is custom, and lives in its own Xib file. My issue is >that the first time I click the button to make the dialog appear it >does not latc

Re: Lack of Initializers or Factory Methods

2008-11-03 Thread Michael Ash
On Mon, Nov 3, 2008 at 11:30 AM, Gordon Apple <[EMAIL PROTECTED]> wrote: >Is "self" even defined for a class object? If so, should case 1 (or > similar) be the assumed implementation for all of Cocoa? If not, then, > IMHO, the docs in general should specify which is is for each factory > meth

Re: Lack of Initializers or Factory Methods

2008-11-03 Thread graham . lee
Gordon Apple wrote on 03/11/2008 16:30:57: > Is "self" even defined for a class object? Yes; in any method, self is (or at least starts life as) the object which received the message. > If so, should case 1 (or > similar) be the assumed implementation for all of Cocoa? I don't think that

Re: Lack of Initializers or Factory Methods

2008-11-03 Thread Andy Lee
On Nov 3, 2008, at 11:30 AM, Gordon Apple wrote: Is "self" even defined for a class object? Yes. If so, should case 1 (or similar) be the assumed implementation for all of Cocoa? If not, then, IMHO, the docs in general should specify which is is for each factory method. Either way,

Re: Lack of Initializers or Factory Methods

2008-11-03 Thread j o a r
On Nov 3, 2008, at 8:37 AM, Michael Ash wrote: If the method is declared like this then you should assume that you get a subclass: + (id)foo; And if it is declared like this then you should not assume that: + (Foo *)foo; The difference being the return type. The 'id' return type implicitly

Re: Modal Dialog Issue

2008-11-03 Thread Carmen Cerino Jr.
Bingo! Keary hit the nail right on the head. It is indeed the "visible at launch" option that caused this behavior. On Mon, Nov 3, 2008 at 12:11 PM, Keary Suska <[EMAIL PROTECTED]> wrote: > > On Nov 3, 2008, at 9:32 AM, Matt Neuburg wrote: > >> On Mon, 3 Nov 2008 09:22:25 -0500, "Carmen Cerino Jr.

Re: asl_search() no longer returns old messages

2008-11-03 Thread Jason Coco
On Nov 3, 2008, at 11:27 , Karl Moskowski wrote: On 3-Nov-08, at 11:16 AM, Jason Coco wrote: Yes... by default messages are pruned every 24 hours by syslog. See the section on Messaging Expiry and Archival in the manpage for syslogd(8) for more information on how to adjust this... Than

Re: asl_search() no longer returns old messages

2008-11-03 Thread Karl Moskowski
On 3-Nov-08, at 12:18 PM, Jason Coco wrote: 2) Add the key ASLExpireTime key to the message... the message will not be archived or deleted until at least sometime after this time has passed. After I replied, I spotted that one in Peter Hosey's excellent blog on ASL.

Re: Use of cURL and OpenSSL versus CF and NS Classes

2008-11-03 Thread Nick Zitzmann
On Nov 3, 2008, at 9:37 AM, Tom Fortmann wrote: I'm porting some code to OS X (10.4 is minimum required level) that uses the cURL and OpenSSL libraries. I see both of these libraries are present in the /usr/lib directory on a stock machine. So, I am assuming they are included in the base

NSNumberFormatter: Display INT as decimal

2008-11-03 Thread Steven Hamilton
Hi Folks, Following on from my previous query regarding decimals and floats, I've decided to refactor my code to maintain a base component of any currency in use gnucash stylee. This means all values are kept as INT for accuracy. However, I wish to display the "cent" amounts as dollars whi

Re: Lack of Initializers or Factory Methods

2008-11-03 Thread Gordon Apple
Ok, it looks like I should assume (at least in Cocoa) that the inherited factory methods normally return the calling class. I guess I've normally assumed that, but just never questioned it. For example, I have often used [NSMutableArray array] without even thinking about it, although I've mor

Re: NSTableView problems

2008-11-03 Thread Corbin Dunn
On Nov 2, 2008, at 10:53 AM, Priscila J.V. wrote: The question is how can just draw one time every cell without change values in my table view?, because every time I click outside my XCode project appears in my Log View changes and makes me think that the table's work never stops and every

Re: Localization...

2008-11-03 Thread Frédéric Testuz
Le 3 nov. 08 à 05:04, Chris Idou a écrit : I don't seem to be having much luck getting localization to work. I've got a utf16 strings file in my project called MetaData.strings that contains: "kMDItemFSLabel" = "color label"; Then in my code... [[NSBundle bundleForClass:[self class]]

Key Paths @count and mutablestrings

2008-11-03 Thread Amy Heavey
Hi, I'm afraid I have a couple more questions :( Key Paths Bindings I've been quite sucessful in setting up my bindings using key paths, but now I'm trying to use @count. I have a table that displays a list of PurchaseOrders. PurchaseOrder is an Entity, with a relationship called products t

Re: Modal Dialog Issue

2008-11-03 Thread Keary Suska
On Nov 3, 2008, at 9:32 AM, Matt Neuburg wrote: On Mon, 3 Nov 2008 09:22:25 -0500, "Carmen Cerino Jr." <[EMAIL PROTECTED] > said: I have a button that when clicked will display a modal dialog. My modal dialog is custom, and lives in its own Xib file. My issue is that the first time I click th

Use of cURL and OpenSSL versus CF and NS Classes

2008-11-03 Thread Tom Fortmann
I'm porting some code to OS X (10.4 is minimum required level) that uses the cURL and OpenSSL libraries. I see both of these libraries are present in the /usr/lib directory on a stock machine. So, I am assuming they are included in the base OS X build. What I'm wondering is, is it safe to assume

Re: Signature Recognition in Cocoa

2008-11-03 Thread Raphael Sebbe
If you have access to the temporal sequence of events (not just final image), DTW (Dynamic Time Warping) could be an easy approach. You would have to choose features (pressure, location, speed, acc) with respect to time, then record a few "templates" for the reference signature. The output of the D

Re: Lack of Initializers or Factory Methods

2008-11-03 Thread Jim Correia
On Nov 3, 2008, at 11:30 AM, Gordon Apple wrote: Is "self" even defined for a class object? `self` is the class object when you are in a class method. If so, should case 1 (or similar) be the assumed implementation for all of Cocoa? If not, then, IMHO, the docs in general should specify

Creating a Hyperlink in the UI

2008-11-03 Thread development2
I need to create Hyperlink to the companies web site, but the link will be in a NSTextField. How do I create a hyperlink in this text field. I am sure it is something with NSMutableAttributedString but can't seem to figure it out. I though maybe there was some Cocoa class to do that, but co

NSTableView with Custom Views as Cells Redraw Problem

2008-11-03 Thread Carmen Cerino Jr.
Basically I have an array of views for every item in my data source, and my table uses a custom cell for its data cell. This cell has a weak reference to one of the views in the array, and it is set every time during the tableWillDisplayCell delegate method of the TableView. When the cell goes to d

Re: Creating a Hyperlink in the UI

2008-11-03 Thread I. Savant
On Mon, Nov 3, 2008 at 3:25 PM, development2 <[EMAIL PROTECTED]> wrote: > I need to create Hyperlink to the companies web site, but the link will be > in a NSTextField. How do I create a hyperlink in this text field. I am sure > it is something with NSMutableAttributedString but can't seem to figur

Re: NSTableView with Custom Views as Cells Redraw Problem

2008-11-03 Thread Corbin Dunn
On Nov 3, 2008, at 12:35 PM, Carmen Cerino Jr. wrote: Basically I have an array of views for every item in my data source, and my table uses a custom cell for its data cell. This cell has a weak reference to one of the views in the array, and it is set every time during the tableWillDisplayCell

Re: NSTableView with Custom Views as Cells Redraw Problem

2008-11-03 Thread Carmen Cerino Jr.
I was messing around in IB by turning off "draw background", which also turns off copy on scroll, on the NSScrollView that contains the table. I am not exactly sure what this means yet, but I am in the middle of investigating this new discovery. It may be linked to your suggestion. Thanks again fo

About Ink drawing with wacom tablet

2008-11-03 Thread john chen
Hi all, I am working on to implement a signature feature in a cocoa application. I have an NSImageView, and the goal is for user to sign their names using wacom tablet and the signature would be drawn on the NSImageView. I was wondering if there is an API (from Ink, or wacom ...) that once user i

Re: About Ink drawing with wacom tablet

2008-11-03 Thread Kevin Gessner
If you use NSEvent to get a tablet event, the absoluteX, absoluteY, and absoluteZ will give you position information. I believe that it will be independent of the image view coordinates. You could construct a path from that, and even include the pressure and rotation information as well (th

Re: About Ink drawing with wacom tablet

2008-11-03 Thread john chen
Kevin, Do you mean to implement the - (void)tabletPoint:(NSEvent *)theEvent in my imageView class and construct the path from the points ? I will give it a shot, thanks! John On Mon, Nov 3, 2008 at 4:01 PM, Kevin Gessner <[EMAIL PROTECTED]>wrote: > If you use NSEvent to get a tablet event, the

Xml

2008-11-03 Thread Gerriet M. Denkmann
I do: NSXMLDocument *xmlDoc = ... NSData *data = [ xmlDoc XMLDataWithOptions: NSXMLNodePrettyPrint | NSXMLNodeCompactEmptyElement ]; This looks like: ]> So far so good(?) When I do [ xmlDoc validateAndReturnError: &error ] I ge

FW: NSNumberFormatter: Display INT as decimal

2008-11-03 Thread HAMILTON, Steven
My god, I think I was on too much coffee when I wrote that. Sorry folks, I’ll explain further. I have an NSTableView with a NSTextfield in it with an NSNumberFormatter attached. I wish to display INT values in this Textfield but format them in such a way that a decimal point appears 2 digits fro

Re: NSPredicateEditor

2008-11-03 Thread Peter Ammon
On Nov 2, 2008, at 9:09 PM, Chris Idou wrote: Has anyone been able to add menu items to the first popup while it is running? Or are you pretty much stuck with whatever the initial values were? I've tried various things and haven't been able to do it. If you want to change the items av

Re: Creating a Hyperlink in the UI

2008-11-03 Thread Ron Fleckner
On 04/11/2008, at 7:25 AM, development2 wrote: I need to create Hyperlink to the companies web site, but the link will be in a NSTextField. How do I create a hyperlink in this text field. I am sure it is something with NSMutableAttributedString but can't seem to figure it out. I though may

Re: Lack of Initializers or Factory Methods

2008-11-03 Thread Michael Ash
On Mon, Nov 3, 2008 at 11:57 AM, j o a r <[EMAIL PROTECTED]> wrote: > > On Nov 3, 2008, at 8:37 AM, Michael Ash wrote: > >> If the method is declared like this then you should assume that you >> get a subclass: >> >> + (id)foo; >> >> And if it is declared like this then you should not assume that:

Re: About Ink drawing with wacom tablet

2008-11-03 Thread john chen
I tried to implement a - (void)tabletPoint:(NSEvent *)theEvent in my imageView class, but it didn't receive the event. I then tried to check the NSTabletPoint in - (void)sendEvent:(NSEvent *)event of my event handler class, but it didn't receive the NSTabletPoint event either. It did receive NSTa

Re: Xml

2008-11-03 Thread Klaus Backert
Am 03.11.2008 um 23:09 schrieb Gerriet M. Denkmann: I do: NSXMLDocument *xmlDoc = ... NSData *data = [ xmlDoc XMLDataWithOptions: NSXMLNodePrettyPrint | NSXMLNodeCompactEmptyElement ]; This looks like: ]> So far so good(?) W

Re: Creating a Hyperlink in the UI

2008-11-03 Thread Karl Moskowski
On 3-Nov-08, at 3:52 PM, development2 wrote: I need to create Hyperlink to the companies web site, but the link will be in a NSTextField. How do I create a hyperlink in this text field. I am sure it is something with NSMutableAttributedString but can't seem to figure it out. I though maybe ther

Re: External Program Control from within Cocoa App

2008-11-03 Thread has
Ronald Ramdhan wrote: I am working on a project where I would like to control external programs from within my Cocoa Application. For example, the ability to control a program like PowerPoint from within my code. Is there anyway to do this programmatically without the use of App

Re: When and how often do you mix C++ with Objective C in your project?

2008-11-03 Thread Sean McBride
On 11/2/08 4:17 PM, Tommy Nordgren said: > You can invoke the constructors and destructors yourself, using >placement new. Also, supporting GC is no big deal: >simnply add a finalize method to destroy c++ objects. finalize methods do not run on the main thread. Thus, in your example, one m

Re: Porting SetupComm function in Mac

2008-11-03 Thread Sean McBride
On 11/3/08 12:55 PM, Rakesh Singhal said: >This API setups some communication parameters for communication devie. Here >I am writing library for serial port. If you want to do serial port communication in a Mac app, I strongly suggest you take a look at AMSerialPort:

RE: FW: NSNumberFormatter: Display INT as decimal

2008-11-03 Thread HAMILTON, Steven
That would be an idea. I think my reluctance to do that initially was down still not understanding floats and their imprecision. I use bindings for some columns directly into the Core Data INT attribute. I presume I can use a Value Transformer to do this last tweak of the data? Also, am I right

Quartz Display Services - Rotation & Custom Resolutions

2008-11-03 Thread Chad Williams
Is there a way to rotate the the Display 90š programmatically. I have searched through the Quartz Display Services API and have found nothing. Also, is it possible to add custom resolutions to the Display options? I know that SwitchResX can accomplish this. Would I have to modify System/Library/Dis

Get MD5 without crashing

2008-11-03 Thread Mr. Gecko
Hello I am trying to MD5 a whole bunch of strings and I choose SSCrypto for it, but for some reason, it crashes because of memory. I know it has to do with releasing, I haven't found much details on when to use release and autorelease; so this is a huge task for me to find out. Here is my

Spin Progress Indicator is not spinning

2008-11-03 Thread Rashmi Vyshnavi
Hi all, I am setting a custom view containing a label and spin style progress indicator. I want the progress indicator to spin when the menu is popped up (similar to AirPort Menu). The progess indicator does not spin though I call startAnimation on it. When I change the style to bar the progress i

Re: LaunchServices/Finder refuses to recognize my NSDocument subclass

2008-11-03 Thread Mark Douma
On Nov 1, 2008, at 12:12 PM, John Pannell wrote: I'm working on a document-based application, but having trouble getting the Finder to match my document to my application. On disk, the document is a package. I am successfully writing the directory and the contents to disk, and the direc

NSPredicateEditor not updating scrollbar

2008-11-03 Thread Guy Umbright
I have an NSPredicateEditor in an NSTabView. But when I add enough predicate items to the point where the vertical scrollbar should appear, it does not. My question is am I wrong to expect it to handle the scrollbar or am I missing something obvious? Thanks Guy Umbright

Re: Get MD5 without crashing

2008-11-03 Thread Alex Heinz
You probably want [[[crypto digest:@"MD5"] hexval] autorelease]. This will add the NSString object to the autorelease pool, instead of the SSCrypto object, as you are doing now. HTH, Alex On Nov 3, 2008, at 9:05 PM, Mr. Gecko wrote: Hello I am trying to MD5 a whole bunch of strings and I ch

Re: NSPredicateEditor not updating scrollbar

2008-11-03 Thread Graham Cox
On 4 Nov 2008, at 3:38 pm, Guy Umbright wrote: I have an NSPredicateEditor in an NSTabView. But when I add enough predicate items to the point where the vertical scrollbar should appear, it does not. My question is am I wrong to expect it to handle the scrollbar or am I missing somethin

Re: Get MD5 without crashing

2008-11-03 Thread Roland King
well no that would leak since then the crypto object wouldn't get released. Also, I don't have the documentation for SSCrypto but I'd have thought whatever the digest returns is already autoreleased, so releasing it again would be wrong. Question is how are you calling this? Is there an autore

Re: LaunchServices/Finder refuses to recognize my NSDocument subclass

2008-11-03 Thread Kyle Sluder
On Mon, Nov 3, 2008 at 10:42 PM, Mark Douma <[EMAIL PROTECTED]> wrote: > Surely to be regarded as a package, you'll need the following somewhere > within there: > >LSTypeIsPackage > Theoretically, this key is only necessary for 10.3. 10.4+ should be

XCode won't build - Error while Linking CocoaMySQL MCPKit_bundled

2008-11-03 Thread Sebastian Pape
Hi, I am trying to get CocoaMySQL running in my XCode. So I created an easy application to query my database. In the Controller.m file I added the line: #import CODE: __ MCPConnection * mySQLConnection = [[MCPConnection alloc] initToHost:@"localhos