Re: Which language to get started with cocoa development?

2009-01-06 Thread Jean-Daniel Dupas
Le 1 janv. 09 à 20:44, Keary Suska a écrit : On Dec 31, 2008, at 1:22 AM, Achim Domma wrote: I develop software for a living and want to get started with cocoa development just for fun. I'm good at python, C, C++ and C# and have some Ruby knowledge. Now I'm asking myself, which language

Re: Overlay controls a la iTunes and QuickTime

2009-01-06 Thread Jean-Daniel Dupas
Le 5 janv. 09 à 06:58, Kiel Gillard a écrit : Howdy all, What would be the best way to implement a HUD-like overlay of controls in the same manner as iTunes and QuickTime? These overlays can be seen when playing a video in iTunes 8 or a full screen video in (at least) the free version

Re: Overlay controls a la iTunes and QuickTime

2009-01-06 Thread Jean-Daniel Dupas
Le 6 janv. 09 à 10:53, Jean-Daniel Dupas a écrit : Le 5 janv. 09 à 06:58, Kiel Gillard a écrit : Howdy all, What would be the best way to implement a HUD-like overlay of controls in the same manner as iTunes and QuickTime? These overlays can be seen when playing a video in iTunes 8

Re: Making an object release itself?

2008-12-31 Thread Jean-Daniel Dupas
Le 31 déc. 08 à 18:28, Matt Neuburg a écrit : On Wed, 31 Dec 2008 14:28:44 +1100, Jacob Rhoden li...@jacobrhoden.com said: I'm thinking PostReader class could have a static function that initialises a new PostReader object, tells it to start the work, and then do a [self release] after it

Re: When is the - (id)init method not called for an Objective-C class?

2008-12-30 Thread Jean-Daniel Dupas
Le 30 déc. 08 à 09:29, Andrew Farmer a écrit : On 30 Dec 08, at 00:24, Michael A. Crawford wrote: I have an init method for an NSView sub-class that is never called. Not expert enough with Objective-C to understand why? Anyone have a clue? The designated initializer for NSView is

Re: A Mac App helper NSStatusItem - how to share preferences

2008-12-30 Thread Jean-Daniel Dupas
Le 30 déc. 08 à 14:37, Michael Ash a écrit : On Mon, Dec 29, 2008 at 4:16 AM, Steve Cronin steve_cro...@mac.com wrote: Kyle; Thanks for that pointer! Based on the documentation you cited I've now got the reading of NSUserDefaults functioning! In the hopes that it might be useful to

Re: Input Method Kit Sample Code

2008-12-30 Thread Jean-Daniel Dupas
Cocoa documentation has been updated to include related sample codes links everywhere (class description, each method documentation, etc…) Just open a IMK class reference, and you can find one: For example, the IMKServer contains a link to the NumberInput_IMKit_Sample.

Re: Setting Caps Lock state from the application

2008-12-23 Thread Jean-Daniel Dupas
Le 22 déc. 08 à 13:41, Girish Kolari a écrit : Hi All We have an application in which we post keyboard events using the API CGError CGPostKeyboardEvent (CGCharCode keyChar, CGKeyCode virtualKey, boolean_t keyDown); API works fine for all the events. However, we are facing an issue with

Re: Reliable way to capitalize camel-case strings? [SOLVED]

2008-12-22 Thread Jean-Daniel Dupas
Le 22 déc. 08 à 14:48, Michael Ash a écrit : On Mon, Dec 22, 2008 at 8:25 AM, Graham Cox graham@bigpond.com wrote: I ended up writing this category method. I guess it will be reliable, as it's making no assumptions about encoding. Actually it is! It assumes that the first character

Re: NSStream APIs

2008-12-22 Thread Jean-Daniel Dupas
Le 22 déc. 08 à 19:48, Alex Kac a écrit : Does anyone have a good tutorial on how to use these? I have to admit to being stumped. I have some pre-written code written using NSData to send data using CFNetwork and ASyncSocket code and I just can't seem to figure out how to get the file

Re: NSString property: copy or retain?

2008-12-22 Thread Jean-Daniel Dupas
Le 22 déc. 08 à 23:04, Debajit Adhikary a écrit : Let's say I have a class called SomeClass with a string property name: @interface SomeClass : NSObject{ NSString* name; } @property (nonatomic, retain) NSString* name; @end I understand that name may be assigned a NSMutableString in

Re: Optimizing NSRectFill

2008-12-20 Thread Jean-Daniel Dupas
Le 20 déc. 08 à 15:22, Oleg Krupnov a écrit : Here is how I arrived at the conclusion that NSRectFill is the bottleneck. (I cannot show the code because it's spread over objects). The slowness of redraw is only noticeable when I drag the mouse, e.g. to resize an object in the custom view. I

Re: Optimizing NSRectFill

2008-12-20 Thread Jean-Daniel Dupas
Sorry for the blank previous mail. Try to call NSFillRect with the rect pased as parameter in drawRect: and before applying the scaling method. As the rect parameter contains the invalid rect in screen coordinates, you don't have to transform it before filling the rect with white. Le 20

Re: Optimizing NSRectFill

2008-12-20 Thread Jean-Daniel Dupas
Le 20 déc. 08 à 15:33, Jean-Daniel Dupas a écrit : Sorry for the blank previous mail. Try to call NSFillRect with the rect pased as parameter in drawRect: and before applying the scaling method. As the rect parameter contains the invalid rect in screen coordinates, you don't have

Re: Optimizing NSRectFill

2008-12-20 Thread Jean-Daniel Dupas
Le 20 déc. 08 à 21:14, Michael Ash a écrit : On Sat, Dec 20, 2008 at 1:51 PM, Kyle Sluder kyle.slu...@gmail.com wrote: On Sat, Dec 20, 2008 at 12:18 PM, Michael Ash michael@gmail.com wrote: A simple way to do this is to avoid calling setNeedsDisplay: (or its friends) directly from your

Re: Optimizing NSRectFill

2008-12-20 Thread Jean-Daniel Dupas
Le 20 déc. 08 à 22:47, Jean-Daniel Dupas a écrit : Le 20 déc. 08 à 21:14, Michael Ash a écrit : On Sat, Dec 20, 2008 at 1:51 PM, Kyle Sluder kyle.slu...@gmail.com wrote: On Sat, Dec 20, 2008 at 12:18 PM, Michael Ash michael@gmail.com wrote: A simple way to do this is to avoid calling

Re: UNIX signals

2008-12-18 Thread Jean-Daniel Dupas
Le 18 déc. 08 à 04:55, Michael Ash a écrit : On Wed, Dec 17, 2008 at 2:32 PM, Greg Parker gpar...@apple.com wrote: On Dec 16, 2008, at 7:22 PM, Michael Ash wrote: On Tue, Dec 16, 2008 at 8:02 PM, Chris Idou idou...@yahoo.com wrote: Is there any Cocoa and/or Carbon interface to UNIX

Re: Sublclassing NSThread

2008-12-17 Thread Jean-Daniel Dupas
Le 17 déc. 08 à 04:27, Michael Ash a écrit : On Tue, Dec 16, 2008 at 5:19 PM, Bradley S. O'Hearne br...@bighillsoftware.com wrote: All, Thanks to everyone for the replies. In my code, I made an error -- overrode the start method rather than the main method. After I overrode the start

Re: Sublclassing NSThread

2008-12-17 Thread Jean-Daniel Dupas
Le 17 déc. 08 à 16:29, Michael Ash a écrit : On Wed, Dec 17, 2008 at 4:49 AM, Jean-Daniel Dupas devli...@shadowlab.org wrote: Le 17 déc. 08 à 10:32, Jean-Daniel Dupas a écrit : And before you go off using NSOperationQueue, you should be aware that it's broken on Leopard, as described

Re: Sublclassing NSThread

2008-12-17 Thread Jean-Daniel Dupas
Le 17 déc. 08 à 10:32, Jean-Daniel Dupas a écrit : And before you go off using NSOperationQueue, you should be aware that it's broken on Leopard, as described in this thread: http://www.cocoabuilder.com/archive/message/cocoa/2008/10/30/221452 We already discuss this issues, and I agree

Re: More - Safari Download Security Alerts

2008-12-17 Thread Jean-Daniel Dupas
Le 17 déc. 08 à 16:19, Dave a écrit : Hi Matt, Thanks so much for this. I was using PM version 3.0.2, I hadn't realized that there was a new version of XCode available, for some reason I thought it would auto-magically detect a new version and offer to update itself. Anyway I downloaded

Re: More - Safari Download Security Alerts

2008-12-17 Thread Jean-Daniel Dupas
Le 17 déc. 08 à 16:40, Dave a écrit : On 17 Dec 2008, at 15:29, Jean-Daniel Dupas wrote: Le 17 déc. 08 à 16:19, Dave a écrit : Hi Matt, Thanks so much for this. I was using PM version 3.0.2, I hadn't realized that there was a new version of XCode available, for some reason I thought

Re: proper way to release a static NSMutableDictionary?

2008-12-16 Thread Jean-Daniel Dupas
Le 16 déc. 08 à 05:56, Andy Lee a écrit : On Dec 15, 2008, at 6:27 PM, John Michael Zorko wrote: I'm not concerned about the contents per se -- i'm concerned about releasing something I declared as static, just to create it again later. Creating and re-creating objects is in itself

Re: Write to file.

2008-12-16 Thread Jean-Daniel Dupas
Le 16 déc. 08 à 13:47, Macarov Anatoli a écrit : I have admin rights. But I can't use NSUserDefaults because upon starting system in login window I'm not in user account, and there the function doesn't work.. After authorization and login in user account the function will work because

Re: More - Safari Download Security Alerts

2008-12-16 Thread Jean-Daniel Dupas
Le 16 déc. 08 à 20:02, Dave a écrit : Hi, I looked at xattr but can't find a man page and couldn't seem to find much about it anywhere. I did a xattr -l CleanUp.App, and it produced a dump of the data and resource forks. I can't see any attribute names. Is there any docs on xattr? Or

Re: encoding/decoding selectors?

2008-12-15 Thread Jean-Daniel Dupas
Le 15 déc. 08 à 14:47, Karan, Cem (Civ, ARL/CISD) a écrit : I need to encode/decode an object which has a selector as one of its instance variables. I know that NSCoder doesn't directly support this, so my current way of doing things is the following: - (void) encodeWithCoder:(NSCoder *)

Re: View Swapping

2008-12-15 Thread Jean-Daniel Dupas
Le 15 déc. 08 à 18:49, Carmen Cerino Jr. a écrit : Howdy, Are there any guides regarding when it is appropriate to use this technique? Thanks, Carmen Generaly people prefere to use tabless tabview. ___ Cocoa-dev mailing list

Re: More - Safari Download Security Alerts

2008-12-15 Thread Jean-Daniel Dupas
Le 15 déc. 08 à 19:04, Bill Bumgarner a écrit : On Dec 15, 2008, at 8:53 AM, Dave wrote: Why doesn't drag and drop work? AFAIK it does work, but my boss wants to be able to display a TC page etc. and he wants an installer. Also it isn't a straight forward .app file, it's an App file

Re: Cocoa equivalent of std::vectorMyType ?

2008-12-14 Thread Jean-Daniel Dupas
Le 14 déc. 08 à 13:34, Guillaume Laurent a écrit : Hi all, I need to create an array of values of a specific type, and I'd prefer to have it as a set of values rather than pointer to values (mostly performance reasons), so not an NSMutableArray. I couldn't find anything in Cocoa to do

Re: Cocoa equivalent of std::vectorMyType ?

2008-12-14 Thread Jean-Daniel Dupas
Le 14 déc. 08 à 14:42, Guillaume Laurent a écrit : On Dec 14, 2008, at 13:45 , Jean-Daniel Dupas wrote: Le 14 déc. 08 à 13:34, Guillaume Laurent a écrit : Hi all, I need to create an array of values of a specific type, and I'd prefer to have it as a set of values rather than pointer

Re: Unexpected behaviour with autorelease pool

2008-12-14 Thread Jean-Daniel Dupas
Le 14 déc. 08 à 22:36, Filip van der Meeren a écrit : I think I have found the answer to your question; when executing the following code, I get a few strange results... NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; NSNumber *n0 = [NSNumber numberWithInt:1]; NSLog(@n0: %d,

Re: Using NSWorkspace's launchedApplication to detect running App

2008-12-13 Thread Jean-Daniel Dupas
Le 13 déc. 08 à 18:14, John Love a écrit : I do not understand why this code completes with the specified application not being active .. when it really is? I really need your help. BOOL AppActive = NO; NSWorkspace *workSpace; NSArray

Re: Using NSWorkspace's launchedApplication to detect running App

2008-12-13 Thread Jean-Daniel Dupas
, in his case, wouldn't it be: aDictionary valueForKey:@NSApplicationName] isEqualToString: @MyApplication ? Quoting Jean-Daniel Dupas devli...@shadowlab.org: Le 13 déc. 08 à 18:14, John Love a écrit : I do not understand why this code completes with the specified application not being

Re: Cancel CGEvent

2008-12-13 Thread Jean-Daniel Dupas
Le 13 déc. 08 à 19:19, sheen mac a écrit : Hi All, Is it possible to cancel CGEvent for mouse at CGEventTrapCallBack ?. Could suggest some link info?. Thanks In Advance, Sheen From the CGEventTapCallBack reference: If the event tap is an active filter, your callback function should

Re: Handle Mouse Event in Background Using Cocoa Framework

2008-12-12 Thread Jean-Daniel Dupas
Le 12 déc. 08 à 12:26, sheen mac a écrit : Hi All, Is it possible to monitor mouse event in background using cocoa framework ?. Where can I get more info about this?. Could I monitor the mouse events without using carbon?. Yes, using CGEvent Tap. See Quartz Event Services Reference for

Re: Programmatically constructing list of variable arguments?

2008-12-12 Thread Jean-Daniel Dupas
Le 12 déc. 08 à 14:53, Jonathan del Strother a écrit : I'm calling a method that takes a nil-terminated variable list of arguments. It doesn't supply a va_arg alternative (like NSLogv, -[NSString initWithFormat:arguments:] etc). The number of arguments isn't known at compile-time. I'd like

Re: Looking for info on creating Plugins/Modules

2008-12-12 Thread Jean-Daniel Dupas
Le 12 déc. 08 à 17:19, glenn andreas a écrit : On Dec 12, 2008, at 9:37 AM, Sherm Pendley wrote: On Dec 12, 2008, at 4:05 AM, Chris Hanson wrote: - Your plug-ins should have a document type and UTI declared in your app's Info.plist so they can be recognized as file packages rather than

Re: Looking for info on creating Plugins/Modules

2008-12-12 Thread Jean-Daniel Dupas
Le 12 déc. 08 à 18:19, glenn andreas a écrit : On Dec 12, 2008, at 11:01 AM, Jean-Daniel Dupas wrote: Le 12 déc. 08 à 17:19, glenn andreas a écrit : On Dec 12, 2008, at 9:37 AM, Sherm Pendley wrote: On Dec 12, 2008, at 4:05 AM, Chris Hanson wrote: - Your plug-ins should have

Re: PAM module

2008-12-11 Thread Jean-Daniel Dupas
Is PAM a Cocoa Project ? As we are on cocoa-dev, I assume it's one, isn't it ? If not, you can try to post your question on a more appropriate list, like darwin-dev Le 10 déc. 08 à 16:30, Macarov Anatoli a écrit : How to compile a PAM module? Where to download libpam-dev or files

Re: TIFFRepresentation makes big file!

2008-12-11 Thread Jean-Daniel Dupas
Le 11 déc. 08 à 14:05, Caroline a écrit : Hello all, I have some Questions. 1. I try to write NSImage to file. NSImage *image = [NSImage imageNamed:@test.png]; NSBitmapImageRep *imageRep; imageRep = [[NSBitmapImageRep alloc] initWithData:[image TIFFRepresentation]]; NSData *imageData;

Re: How can users check if their mac is 64-bit-capable?

2008-12-11 Thread Jean-Daniel Dupas
Le 11 déc. 08 à 18:07, Russ a écrit : Is there an official Apple-supplied list of which Macs (PPC and Intel) are capable of running 64-bit applications? I need something to refer customers to so they can verify whether their machine is 64- bit capable or not. Obviously I could supply a

Re: Design for showing ridiculously huge number of images in Table View

2008-12-11 Thread Jean-Daniel Dupas
Le 11 déc. 08 à 17:55, rajesh a écrit : Hi All, I implemented NStableView which contains few columns with NSImageCells , there are huge number of rows ( for the nightmare ) images are requested over the network and hence images are never readily available. but part of my framework

Re: Development workflows for signed code?

2008-12-09 Thread Jean-Daniel Dupas
Le 9 déc. 08 à 05:12, Jack Repenning a écrit : I'm just dipping my toes into the world of signed code. After spending some time with the Code Signing guide, I'm still not clear on how this affects the work flows around my product (SCPlugin, http://scplugin.tigris.org , which adds

Re: NSTask and environment variables

2008-12-09 Thread Jean-Daniel Dupas
Le 9 déc. 08 à 11:51, Ingvar Nedrebo a écrit : On Dec 9, 2008, at 00:43, Chris Idou wrote: I want to call a script with NSTask and I want to set an environment variable. But it seems like bad form to blow away the current environment. So I guess I need to read the current environment and

Re: Multithreading and Mach ports

2008-12-09 Thread Jean-Daniel Dupas
Le 9 déc. 08 à 21:36, John Love a écrit : Reference: http://developer.apple.com/documentation/Cocoa/Conceptual/Multithreading/RunLoopManagement/chapter_6_section_5.html#/ /apple_ref/doc/uid/1057i-CH16-SW7 I've got several questions since I'm just starting to investigate Mach Ports.

Re: Asynchronous timers (without a run loop)

2008-12-06 Thread Jean-Daniel Dupas
Le 6 déc. 08 à 00:22, Påhl Melin a écrit : 2008/12/5 Sherm Pendley [EMAIL PROTECTED]: On Dec 5, 2008, at 3:16 PM, Påhl Melin wrote: 2008/12/5 Sherm Pendley [EMAIL PROTECTED]: You'd have far, far less trouble programming for the Mac if you'd simply learn how Cocoa works, instead of

Re: Asynchronous timers (without a run loop)

2008-12-05 Thread Jean-Daniel Dupas
Le 5 déc. 08 à 13:52, Påhl Melin a écrit : 2008/12/4 Julien Jalon [EMAIL PROTECTED]: The question itself does not make a lot of sense for me. A timer API is tightly bound to the underlying framework that is idling your thread. If the idling API is CFRunLoopRun(), you'd use CFTimers, if your

Re: Asynchronous timers (without a run loop)

2008-12-05 Thread Jean-Daniel Dupas
to the next interval after each signal. Some extra work but doable. When using multiple timers the alarms could possible start to drift I suppose. But I got the impression from Jean-Daniel Dupas, that kevent() with the timer filter EVFILT_TIMER is implemented even though the man page of kqueue(2) says

Re: Asynchronous timers (without a run loop)

2008-12-04 Thread Jean-Daniel Dupas
Le 4 déc. 08 à 14:00, Påhl Melin a écrit : Yes, I could set up a new thread, handling a list of usleep() intervals between the actual timer events but it would be very hard to make a reliable, drift-free timer service, handling lots of timer events and it would take quite some time to develop

Re: Asynchronous timers (without a run loop)

2008-12-04 Thread Jean-Daniel Dupas
Le 4 déc. 08 à 15:17, Påhl Melin a écrit : 2008/12/4 Jean-Daniel Dupas [EMAIL PROTECTED]: If you want to avoid Cocoa, Cocoa-dev is probably not the best mailing list to ask. You will have more chance on darwin-dev. I don't want to avoid Cocoa, but I just haven't found any Cocoa class

Re: Asynchronous timers (without a run loop)

2008-12-04 Thread Jean-Daniel Dupas
Le 4 déc. 08 à 15:50, Påhl Melin a écrit : 2008/12/4 Jean-Daniel Dupas [EMAIL PROTECTED]: Le 4 déc. 08 à 15:17, Påhl Melin a écrit : 2008/12/4 Jean-Daniel Dupas [EMAIL PROTECTED]: If you want to avoid Cocoa, Cocoa-dev is probably not the best mailing list to ask. You will have more

Re: String Constant containing 2 ASCII Control Chars

2008-12-04 Thread Jean-Daniel Dupas
Le 4 déc. 08 à 16:42, Jerry Krinock a écrit : I'd like to define a global string constant consisting of two ASCII start-of-text (STX, 0x02) characters. The following ^code^ will create such a thing: NSString* two = [[NSString alloc] initWithFormat:@%C%C, 0x2, 0x2] ; and I realize

Re: Help Menu Please

2008-12-04 Thread Jean-Daniel Dupas
Use cocoa builder or Google to search: http://www.google.com/search?q=duplicate+help+menu+site%3Alists.apple.com http://www.cocoabuilder.com/archive/message/cocoa/2007/7/30/186910 Le 4 déc. 08 à 19:05, David Blanton a écrit : I searched the list archives to no avail. I do not

Re: How to extract individual icons from icns file?

2008-12-04 Thread Jean-Daniel Dupas
Le 4 déc. 08 à 20:16, David a écrit : Is there a tool available to extract individual icons from an icns file? In particular the smaller ones. I've tried several tools but none of them work with the 16x16 size. I've seen Linux and Windows tools but no Mac tools. How can that be. Is there a

Re: How to extract individual icons from icns file?

2008-12-04 Thread Jean-Daniel Dupas
Le 4 déc. 08 à 22:18, I. Savant a écrit : On Thu, Dec 4, 2008 at 4:12 PM, Randall Meadows [EMAIL PROTECTED] pc.com wrote: To throw another monkey wrench into your conclusion, I opened it in PS CS3, and it looked just fine. I did save from Preview as a PNG, dunno if format (or version)

Re: Crash when closing window from the menu

2008-12-01 Thread Jean-Daniel Dupas
When you dealloc a datasource, a delegate or any other object that is not retained by class that uses it, you have to unregister it. For example, if you have an object that is datasource for its _tableView ivar and delegate for _otherIVar ivar, you should do something like this : -

Re: Crash when closing window from the menu

2008-12-01 Thread Jean-Daniel Dupas
Le 1 déc. 08 à 15:15, Andre Masse a écrit : Thanks for your reply Keary, What I don't understand is why I don't crash if the window is closed from its close box... Andre Masse The order in which the window go offscreen, the window content is released, etc. is probably not the same

Re: Power code unplug and plug

2008-12-01 Thread Jean-Daniel Dupas
Le 1 déc. 08 à 18:46, sheen mac a écrit : Hi All, My app want to get power code plug and unplug notification for MacBook. How can I get that info. Could suggest some info or link about this?. Thanks In Advance, Sheen I think you are looking for the IOPowerSources API, especially

Re: Keystrokes for non-ascii letters (SOLVED)

2008-11-30 Thread Jean-Daniel Dupas
Le 30 nov. 08 à 01:02, Dave DeLong a écrit : Fantastic! I've gotten it to work, and it works beautifully! Thank you, James (and everyone else) for helping me with this. For archival purposes, here's my code: CGEventSourceRef eventSource =

Re: Right language

2008-11-30 Thread Jean-Daniel Dupas
Le 30 nov. 08 à 09:15, Arnold Nefkens a écrit : Ok thank you, I did indeed mean Objective-C as the language. I do not have the lingo down yet... To access a Directory you have to use dscl to gain the access to needed data. dscl use a public API. It's possible to access a Directory from

Re: Keystrokes for non-ascii letters

2008-11-29 Thread Jean-Daniel Dupas
Le 29 nov. 08 à 19:34, Bill Bumgarner a écrit : On Nov 29, 2008, at 10:00 AM, Dave DeLong wrote: Can this be used for posting events that would get picked up by other applications? Nope. To be honest, I don't know how you post such events to another application -- specifically targeted

Re: I am trying to update the cfbundleversion key with agvtool and it does not seem to work

2008-11-28 Thread Jean-Daniel Dupas
agvtool update the CURRENT_PROJECT_VERSION of your Xcode project. To reflect this change in CFBundleVersion, set CFBundleVersion to $ {CURRENT_PROJECT_VERSION} (and make sure the Expand Build Settings in Info.plist File build setting is not disabled) keyCFBundleVersion/key

Re: NSTextView

2008-11-27 Thread Jean-Daniel Dupas
Le 27 nov. 08 à 11:34, Graham Cox a écrit : On 27 Nov 2008, at 9:27 pm, Mahaboob wrote: Hi all, I need to check whether the NSTextView contains any data. For an NSTextField, [[txtName stringValue] length] should work. Is there any method like this for a textView? [[[myTextView

Re: Private frameworks in a bundle

2008-11-27 Thread Jean-Daniel Dupas
Le 27 nov. 08 à 10:35, Luke Evans a écrit : I've had a need, for the first time, to have a private framework in a bundle that gets loaded into an app. Now, I've done a bit of framework wrangling in the past, and thought it might involve getting the installation path in the framework

Re: Can I split an implementation file?

2008-11-27 Thread Jean-Daniel Dupas
You can learn more about category in the Obj-C language guide: http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/Articles/chapter_6_section_3.html Le 27 nov. 08 à 15:04, Matt Gough a écrit : Yes, something like this should do you In file MyObj.h @interface MyObj :

Re: Number of Files on Volume

2008-11-26 Thread Jean-Daniel Dupas
Just a question, what was wrong with the CoreServices way ? (ie using FSGetVolumeInfo). Le 26 nov. 08 à 15:19, Joe Turner a écrit : Okay, maybe I spoke too soon... It worked twice. To get the number of files, I am doing this now: - (NSNumber *)fileCount { NSDictionary *attributes =

Re: Number of Files on Volume

2008-11-26 Thread Jean-Daniel Dupas
count). Le 26 nov. 08 à 15:53, Joe Turner a écrit : I'm just worried that it will be deprecated soon with the release of Snow Leopard; it is Carbon. Second, I just wanted to see if there was an easy Cocoa way; the CoreServices way works fine. On Nov 26, 2008, at 8:51 AM, Jean-Daniel Dupas

Re: Figure out the size of an NSAttributedString

2008-11-26 Thread Jean-Daniel Dupas
Le 27 nov. 08 à 00:14, Jean-Nicolas Jolivet a écrit : I know this might seem like a weird idea, but I need to figure out the size (width and height) of an NSAttributedString that I am drawing... basically I need to know it because I am drawing it inside a larger image and I need to

Re: NSTableView in-line editing

2008-11-25 Thread Jean-Daniel Dupas
Le 25 nov. 08 à 13:52, 양승준 a écrit : Hello, I followed instructions from websites and apples' table view programming guide to implement a table view that displays an NSMutableArray of NSMutableDictionary's. Data show up in the table view alright. But in-line editing is not working. I can

Re: NSTableView in-line editing

2008-11-25 Thread Jean-Daniel Dupas
Le 25 nov. 08 à 14:23, Graham Cox a écrit : On 26 Nov 2008, at 12:16 am, Jean-Daniel Dupas wrote: -(void)tableView:(NSTableView *)aTableView setObjectValue:anObject objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex { id theRecord; theRecord = [aBuffer

Re: NSSTextView

2008-11-25 Thread Jean-Daniel Dupas
Le 25 nov. 08 à 18:57, Jordon Hirshon a écrit : I have a command line tool that outputs to the console. I would like to rewrite the application and have the output displayed in a textView window. What's the best way to go about this? Jordon I don't know the best way, but the

Re: Remove HTML Tags

2008-11-24 Thread Jean-Daniel Dupas
Le 24 nov. 08 à 00:54, Mr. Gecko a écrit : Hello, what's the best way to remove html tags and javascript from a NSString? (I'm working on a web crawler and I'm needing a way to get the contents of a page that doesn't have a description on it.) Thanks, Mr. Gecko Just a suggestion:

Re: Need some advice on multithreading

2008-11-24 Thread Jean-Daniel Dupas
Le 24 nov. 08 à 11:35, WT a écrit : [...] Is this the right idea? Does anyone have a better suggestion? Are there any pitfalls that I'm not seeing? One concern I have is that there might be some weird interactions between running the simulation and drawing the results due to the fact that the

Re: using C++ STL in Empty Project

2008-11-24 Thread Jean-Daniel Dupas
Le 24 nov. 08 à 13:27, BirdSong a écrit : Hi all,I want to use c++ STL in a empty project, but there are some linking errors... Does anyone know how to fix it?Are there any pre- steps to setup the environment (such as set include path, or include some framework, etc).Thanks in

Re: Call getElementById in Cocoa

2008-11-24 Thread Jean-Daniel Dupas
Le 24 nov. 08 à 16:42, Pierce Freeman a écrit : Hi everyone. I am wondering if there is some way to call the getElementById on a website through Cocoa, and then return the value of the field. I am assuming it would somehow be through WebKit, but I am not sure how to do this (as well as

Re: Call getElementById in Cocoa

2008-11-24 Thread Jean-Daniel Dupas
Le 24 nov. 08 à 18:03, Mike Abdullah a écrit : On 24 Nov 2008, at 16:45, John Terranova wrote: On Nov 24, 2008, at 8:11 AM, Jean-Daniel Dupas wrote: You call -mainFrameDocument on your WebView to get a DOMDocument instance, and have access to the DOM functions from here

Re: Call getElementById in Cocoa

2008-11-24 Thread Jean-Daniel Dupas
requestWithURL:[NSURL URLWithString:urlOfObject]]]; DomDocument *domObject = [webView mainFrameDocument]; NSString *hiddenField = [domObject getElementById:@hiddenField]; Also, how would the link that you gave come into play in this case? Sincerely, Pierce F On 11/24/08 8:11 AM, Jean-Daniel Dupas

Re: GetApplicationTextEncoding carbon free

2008-11-21 Thread Jean-Daniel Dupas
Le 21 nov. 08 à 10:42, spsaxena a écrit : Hi all, I am working on making my application carbon free. I could not find any replacement for the API GetApplicationTextEncoding probably because this API has not been marked as deprecated yet. Because of this API I need to link with the carbon

Re: Tabbing to Placeholders

2008-11-21 Thread Jean-Daniel Dupas
Le 21 nov. 08 à 15:50, Greg Deward a écrit : Good morning! This may be more of an XCode question, however the XCode list appears to be for people who are developing for or extending XCode. Sorry if this isn't a good place to post this. isn't the list name xcode-users ? And extending

Re: NSIndexSet

2008-11-21 Thread Jean-Daniel Dupas
Le 21 nov. 08 à 16:44, David Blanton a écrit : How would one construct an NSIndexSet containing the indices 2,4,5 ? I did: NSRange two = NSMakeRange(2, 1); NSRange four = NSMakeRange(4, 1); NSRange five = NSMakeRange(5, 1); NSRange u1 =

Re: Autorelease Question

2008-11-21 Thread Jean-Daniel Dupas
Le 21 nov. 08 à 16:56, Filip van der Meeren a écrit : Ok, lets say that [NSString string] creates a new object each and every time a framework/Application needs an empty string (like about a billion times). Then the RAM would be stuffed with empty string objects that are useless for

Re: Autorelease Question

2008-11-20 Thread Jean-Daniel Dupas
Le 20 nov. 08 à 05:48, Kyle Sluder a écrit : On Wed, Nov 19, 2008 at 11:38 PM, Michael Ash [EMAIL PROTECTED] wrote: Seriously, this kind of hysteria does nobody any good. Nothing you do besides explicitly releasing/draining an NSAutoreleasePool instance that you explicitly created is going

Re: [MyClass class] returning superclass's class

2008-11-20 Thread Jean-Daniel Dupas
As I said, NSCharacterSet is a class cluster, you cannot subclass it as you do for simple classes. Le 20 nov. 08 à 11:37, Ken Tozier a écrit : @interface KOptionString : NSCharacterSet { } @end KOptionString *whiteTest = [KOptionString whitespaceCharacterSet], *hexTest =

Re: [MyClass class] returning superclass's class

2008-11-19 Thread Jean-Daniel Dupas
Le 19 nov. 08 à 13:32, Ken Tozier a écrit : Hi I wrote a subclass of NSCharacterSet and at runtime, when I do [MyClass class] it returns the superclass's class rather than the class value. I suspect this is normal What make you think this is normal ? How do you create your instance ?

Re: Writing a more usable AppleEvent logger

2008-11-19 Thread Jean-Daniel Dupas
Le 19 nov. 08 à 13:36, Ken Tozier a écrit : On Nov 17, 2008, at 3:51 AM, Jean-Daniel Dupas wrote: Le 17 nov. 08 à 08:06, Ken Tozier a écrit : What do you mean by this tool ? export is used to set an environment variable. I guess that system functions that send and receive event just

Re: OpenGL + NSTextView/NSTextContainer?

2008-11-19 Thread Jean-Daniel Dupas
Le 19 nov. 08 à 13:39, Karan, Cem (Civ, ARL/CISD) a écrit : On Tue, 18 Nov 2008 12:26:04 -0800 (PST) Erik Buck wrote: Open GL has no built-in capability for drawing text. Open GL provides lower level primitives like lines and curves and meshes. Open GL also provides texture compositing.

Re: Writing a more usable AppleEvent logger

2008-11-19 Thread Jean-Daniel Dupas
Le 19 nov. 08 à 15:43, Ken Tozier a écrit : On Nov 19, 2008, at 8:52 AM, Jean-Daniel Dupas wrote: The logging is performed by the application itself (I guess this is done in AESendMessage or a lower level private function for send events and in AEDecodeMessage or a lower level private

Re: OpenGL + NSTextView/NSTextContainer?

2008-11-19 Thread Jean-Daniel Dupas
Le 19 nov. 08 à 17:16, Karan, Cem (Civ, ARL/CISD) a écrit : On Wednesday, November 19, 2008 9:04 AM Jean-Daniel Dupas wrote: Do you need text editing capability, or just text drawing ? If this is text drawing, I don't see what NSTextView provide that is not possible with NSAttributedString

Re: Changing Services HotKey at Runtime

2008-11-19 Thread Jean-Daniel Dupas
Le 19 nov. 08 à 22:30, Peter Ammon a écrit : On Nov 19, 2008, at 4:49 AM, Xavier Snark wrote: Greetings, In my application I would like to change the Services Hotkey combination at runtime. So far, the only Apple documentation that I have found states that the hotkey is configured via

Re: Question about NSThread?

2008-11-19 Thread Jean-Daniel Dupas
Yes, as long as you do not access directly your UI from the background thread (you can do it, but using you should use the performOnMainThread: method). Note that you may want to release and recreate your auto release pool from time to time (between each image for example), else your

Re: Grow Bug ?

2008-11-17 Thread Jean-Daniel Dupas
Le 16 nov. 08 à 23:32, Carlos Eduardo Mello a écrit : Hi, Cocoa newbie here. I've been doing Carbon developing for a while, but just started to learn Cocoa. So, forgive me if my questions seem too dum. I was working on Hillgass's Custom Views tutorial (chapter 17, pg. 233). It involves

Re: Writing a more usable AppleEvent logger

2008-11-17 Thread Jean-Daniel Dupas
Le 17 nov. 08 à 08:06, Ken Tozier a écrit : Hi I've been working with AppleEvents and discovering their internals by setting the following in the terminal export AEDebugSends=1; export AEDebugReceives=1 What I'd like to be able to do is observe apple events exactly like this tool but

Re: newbie NSMutable dictionary subclass question

2008-11-17 Thread Jean-Daniel Dupas
Can the value part of a key-value pair in an NSMutableDictionary be a literal NSString, like @name? It would seem so, because this works or at least doesn't crash: NSMutableDictionary *bobo; bobo = [[NSMutableDictionary alloc] init]; [bobo setValue:@root

Re: Archiving NSError

2008-11-16 Thread Jean-Daniel Dupas
Le 16 nov. 08 à 15:41, Vera Tkachenko a écrit : Hello to mac developers :) If I don't misunderstand things NSError objects can be archived because NSError implements NSCoding protocol. I try to archive it as follows: NSMutableDictionary * dict = [[NSMutableDictionary alloc]

Re: Distributed Objects Performance

2008-11-14 Thread Jean-Daniel Dupas
Le 14 nov. 08 à 10:47, Seth Willits a écrit : On Nov 13, 2008, at 11:33 PM, Bridger Maxwell wrote: How often? 60 times per second often? Once per second often? Every minute, often? You'll need to calculate the amount of data you're expecting to transfer, worst case. I would say about

[ANN] SArchiveKit: A XAR Cocoa library

2008-11-14 Thread Jean-Daniel Dupas
Hi, The SArchiveKit is a Cocoa framework to create and extract XAR archives. It supports archive signature, background file extraction, subdocument, and more. http://code.google.com/p/sarchivekit/ And it is released under MIT license. ___

Re: Thread programming

2008-11-13 Thread Jean-Daniel Dupas
Please, read the link provided in the previous post. It describe in details how and when to setup and run a run loop. Using a runloop without understanding what it does is not a good thing, especially if you want to do multi-threading programming. Le 13 nov. 08 à 09:48, Mahaboob a écrit

Re: geting the folders contents via http

2008-11-13 Thread Jean-Daniel Dupas
Le 13 nov. 08 à 18:00, Valentin Dan a écrit : Hi, Is there a way to get the files in a folder like: http://mysite.com/myfolder/; ? I have a bunch of pictures there and I want to go through them, select one and put it's content in a NSTableView's cell. If your server allows directory

Re: NSColorWell opacity...

2008-11-13 Thread Jean-Daniel Dupas
Didn't you have the API reference in Xcode ? +[NSColor setIgnoresAlpha:]; http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSColor_Class/Reference/Reference.html#/ /apple_ref/occ/clm/NSColor/setIgnoresAlpha: If the application doesn't support alpha, no opacity

Re: Setting up a main menu in a NIB(XIB)?

2008-11-12 Thread Jean-Daniel Dupas
Did you had a look at the nibless app articles on Lap Cat's blog? http://lapcatsoftware.com/blog/2008/10/20/working-without-a-nib-part-7-the-empire-strikes-back/ Le 12 nov. 08 à 17:47, Russ a écrit : As I said, please save your typing on the this is the wrong way speech. This is an existing

<    2   3   4   5   6   7   8   9   10   11   >