Re: "Live" image preview, huge memory usage...

2008-12-04 Thread Jean-Nicolas Jolivet
Thanks for the links! They were pretty much all interesting reading!! However, I still have a problem... Rob Keniger's code for preventing leaks when drawing CIImage off-screen works well, however if I generate my images in an NSOperation, the leaks re-appear... and since Im generating a bu

Re: NSTimer

2008-12-04 Thread Adam R. Maxwell
On Dec 5, 2008, at 10:26 AM, Mahaboob wrote: On 12/4/08 9:41 PM, "Adam R. Maxwell" <[EMAIL PROTECTED]> wrote: On Dec 4, 2008, at 4:47 PM, Mahaboob wrote: Hi, I need to fire the thread repeatedly in regular time intervals. So I used the timer like: timer = [[NSTimer scheduledTimerWithTimeI

Re: NSTimer

2008-12-04 Thread Mahaboob
On 12/4/08 9:41 PM, "Adam R. Maxwell" <[EMAIL PROTECTED]> wrote: > > On Dec 4, 2008, at 4:47 PM, Mahaboob wrote: > >> Hi, >> I need to fire the thread repeatedly in regular time intervals. So I >> used >> the timer like: >> timer = [[NSTimer scheduledTimerWithTimeInterval:(double) >> [txtTim

Re: Custom Window Resize Image

2008-12-04 Thread Mr. Gecko
Ok so I've done some looking around more in the documents, would it be possible to make a button that has a picture of the grow box and than have it send an action when it's dragged using NSLeftMouseDraggedMask. On Dec 4, 2008, at 8:47 PM, Sean McBride wrote: Ron Fleckner ([EMAIL PROTECTED]

Sizing NSDatePicker to reflect chosen date format in System Prefs

2008-12-04 Thread Manoj Patwardhan
How do date format settings in the International pane in System Preferences get reflected in an instance of NSDatePicker? I have a window with a NSDatePicker control. Regardless of what I change the short date format to in System Preferences, the control is not automatically resized. Callin

Re: NSSocketPort == BSD Socket

2008-12-04 Thread Michael Ash
On Thu, Dec 4, 2008 at 7:52 PM, Kirk Kerekes <[EMAIL PROTECTED]> wrote: > -[NSSocketPort socket] returns a file descriptor. Write to it. > > Init an NSFileHandle with it. (-[NSFileHandle initWithFileDescriptor:]) > > > It's all just sockets/files/descriptors. Well, you're not using NSSocketPort to

Re: How To Deal With Rounding Errors

2008-12-04 Thread Scott Ribe
If the user clicks just off the left of the view, does that give you a negative value? Or do you limit it to 0, then divide by 0? What happens if you use a range of 1->2 instead of 0->1? -- Scott Ribe [EMAIL PROTECTED] http://www.killerbytes.com/ (303) 722-0567 voice ___

Re: Custom Window Resize Image

2008-12-04 Thread Sean McBride
Ron Fleckner ([EMAIL PROTECTED]) on 2008-12-04 12:52 AM said: >> Hello, I'm writing a custom window for my application, but I can't >> figure out how to make a custom resize image... Any help? >> >> Thanks, >> Mr. Gecko > >Unless you actually want a 'custom' resize image, you can use the real >one

core data, refreshObject, multiple threads

2008-12-04 Thread Chris Idou
I've got a main thread that handles a gui, and a worker thread with its own persistentStoreCoordinator and managedObjectContext. The gui notifies the worker thread of a change, passing it an objectID, and the worker thread gets the object, and other objects it is connected to, and calls [manag

Re: NSSocketPort == BSD Socket

2008-12-04 Thread Kirk Kerekes
-[NSSocketPort socket] returns a file descriptor. Write to it. Init an NSFileHandle with it. (-[NSFileHandle initWithFileDescriptor:]) It's all just sockets/files/descriptors. But "raw messaging" is not the same as writing raw bytes to a TCP stream. All that means is that you can use the s

Re: indexOfObjectIdenticalTo: problem with NSArrayController

2008-12-04 Thread Ashley Clark
On Dec 4, 2008, at 5:46 PM, Mikael Wämundson wrote: Hi all. Since it is good programming to not access an array's content through its controller when in the model I'm trying to find a way to get to the same object selected in the user interface (i.e. the array controller). In my view I

Re: Big picture relationships between NSConnection, NSInputStream, NSOutputStream etc

2008-12-04 Thread Ken Tozier
OK. After reading the docs on NSStream, here's what I came up with. - (BOOL) openStreamsWithMode:(MySQLConnectMode) inMode { [NSStream getStreamsToHost: host port: port inputStream: &inStream outputStream: &outStream]; if ((inStream != nil) && (outStream != nil)) {

indexOfObjectIdenticalTo: problem with NSArrayController

2008-12-04 Thread Mikael Wämundson
Hi all. Since it is good programming to not access an array's content through its controller when in the model I'm trying to find a way to get to the same object selected in the user interface (i.e. the array controller). In my view I have the array content sorted by binding it to a sort

Re: NSArrays and tableView delegates

2008-12-04 Thread Ashley Clark
On Dec 3, 2008, at 10:05 PM, Steven Hamilton wrote: Hi folks, Hi! I have a subclassed NSWindowController. In this class I have a method that extracts data from my core data model and formulates an array of dictionaries. Also in this class I have the tableview datasource methods. The dat

Re: custom view binding to NSTreeController

2008-12-04 Thread Matthew Johnson
On Dec 5, 2008, at 8:23 AM, Rob Keniger wrote: On 05/12/2008, at 1:29 AM, Matthew Johnson wrote: I agree it's a shame. There are plenty of examples for simpler binding scenarios, but none I have found for custom views binding to NSTreeController. I really appreciate your sample will do

Re: custom view binding to NSTreeController

2008-12-04 Thread Rob Keniger
On 05/12/2008, at 1:29 AM, Matthew Johnson wrote: I agree it's a shame. There are plenty of examples for simpler binding scenarios, but none I have found for custom views binding to NSTreeController. I really appreciate your sample will do something similar if I don't find a better way.

NSArrays and tableView delegates

2008-12-04 Thread Steven Hamilton
Hi folks, I'm looking for advice on usage of arrays in tableviews. I have a subclassed NSWindowController. In this class I have a method that extracts data from my core data model and formulates an array of dictionaries. Also in this class I have the tableview datasource methods. The dataso

Re: How to extract individual icons from icns file?

2008-12-04 Thread I. Savant
On Thu, Dec 4, 2008 at 4:51 PM, Jean-Daniel Dupas <[EMAIL PROTECTED]> wrote: > This is a very old and well known issus. > > http://www.wodeveloper.com/omniLists/macosx-dev/2002/September/msg00251.html Oddly, I tried the very thing joar suggests in the post you reference (running the image throu

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: self = [super init];

2008-12-04 Thread Clark Cox
On Thu, Dec 4, 2008 at 12:53 AM, Stephen J. Butler <[EMAIL PROTECTED]> wrote: > On Thu, Dec 4, 2008 at 2:32 AM, EVS <[EMAIL PROTECTED]> wrote: >> Thank you, I suppose the reason I find it confusing is because self is a >> pointer to the current object. If self were to release self ( the current >>

Re: How to extract individual icons from icns file?

2008-12-04 Thread I. Savant
On Thu, Dec 4, 2008 at 4:12 PM, Randall Meadows <[EMAIL PROTECTED]> 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) makes a difference. Further experimentation at Mi

Re: How to extract individual icons from icns file?

2008-12-04 Thread Randall Meadows
On Dec 4, 2008, at 2:08 PM, I. Savant wrote: On Thu, Dec 4, 2008 at 3:58 PM, I. Savant <[EMAIL PROTECTED]> wrote: Might be what you get, certainly isn't what I got. Great. Now open the newly-created file in Photoshop (as if you were going to do something with it such as creating a branded

Re: How to extract individual icons from icns file?

2008-12-04 Thread Benjamin Dobson
On 4 Dec 2008, at 20:58:29, I. Savant wrote: Great. Now open the newly-created file in Photoshop (as if you were going to do something with it such as creating a branded folder or something similar). :-) Yes, I've noticed how bad Photoshop is with TIFFs. In Preview, File » Save As » Pretty

Re: How to extract individual icons from icns file?

2008-12-04 Thread I. Savant
On Thu, Dec 4, 2008 at 3:58 PM, I. Savant <[EMAIL PROTECTED]> wrote: >> Might be what you get, certainly isn't what I got. > > Great. Now open the newly-created file in Photoshop (as if you were > going to do something with it such as creating a branded folder or > something similar). :-) Afte

Re: Cocoa-dev Digest, Vol 5, Issue 2074

2008-12-04 Thread Michael Ash
On Thu, Dec 4, 2008 at 1:40 PM, Kirk Kerekes <[EMAIL PROTECTED]> wrote: >> "It is *possible* to use NSSocketPort >> to create a socket which you then communicate with using other >> techniques, but you can't use NSSocketPort directly to talk to a >> non-Cocoa app." > > While the documentation used

Re: How to extract individual icons from icns file?

2008-12-04 Thread I. Savant
On Thu, Dec 4, 2008 at 3:54 PM, Michael Ash <[EMAIL PROTECTED]> wrote: > Is this a trick question of some kind? Sort of ... >> Artifacts and ugliness. That's what you get. > > Might be what you get, certainly isn't what I got. Great. Now open the newly-created file in Photoshop (as if you

Re: How to extract individual icons from icns file?

2008-12-04 Thread Michael Ash
On Thu, Dec 4, 2008 at 3:33 PM, I. Savant <[EMAIL PROTECTED]> wrote: > Anyway, there are various problems with trying to save images out of > Icon Composer and Preview. Try finding the standard folder icon and > extracting a clean image from it with either of those apps. Go on ... > I'll wait ...

Animation proxies and Python

2008-12-04 Thread Mani Ghasemlou
Hello list, I've been unsuccessfully trying to use an animation proxy for an NSWindow instance using Python: For example: def fadeOut(self, window): window.animator().setAlphaValue_(0.0) causes my application to crash. Bypassing the proxy, however works: def fadeOut(self, win

Re: How to extract individual icons from icns file?

2008-12-04 Thread Andy Lee
On Dec 4, 2008, at 3:33 PM, I. Savant wrote: On Thu, Dec 4, 2008 at 3:28 PM, Andy Lee <[EMAIL PROTECTED]> wrote: Are you asking where Icon Composer is? What happens if you type "icon composer" into Spotlight? As I recall, the /Developer folder isn't automatically indexed by Spotlight. At

Re: NSSavePanel mishandling extensions

2008-12-04 Thread Corbin Dunn
Le Dec 4, 2008 à 12:02 PM, Kyle Sluder a écrit : On Thu, Dec 4, 2008 at 2:36 PM, Corbin Dunn <[EMAIL PROTECTED]> wrote: They are. Only for NSOpenPanel; for the NSSavePanel it doesn't make as much sense (in other words, what extension would you want to use given a UTI?) If the same UTI map

Re: How to extract individual icons from icns file?

2008-12-04 Thread Benjamin Dobson
On 4 Dec 2008, at 20:33:37, I. Savant wrote: On Thu, Dec 4, 2008 at 3:28 PM, Andy Lee <[EMAIL PROTECTED]> wrote: Are you asking where Icon Composer is? What happens if you type "icon composer" into Spotlight? As I recall, the /Developer folder isn't automatically indexed by Spotlight. A

Re: lid open and close notification

2008-12-04 Thread Nick Zitzmann
On Dec 4, 2008, at 1:11 PM, Benjamin Dobson wrote: I'm not familiar with this, but... how would you know the lid is closed? Wouldn't the computer be asleep? There are several situations in Mac OS X where the clamshell can be closed and the computer will remain wide awake, or the computer

Re: How to extract individual icons from icns file?

2008-12-04 Thread I. Savant
On Thu, Dec 4, 2008 at 3:28 PM, Andy Lee <[EMAIL PROTECTED]> wrote: > Are you asking where Icon Composer is? What happens if you type "icon > composer" into Spotlight? As I recall, the /Developer folder isn't automatically indexed by Spotlight. At least it didn't used to be. I had to manually

Re: How to extract individual icons from icns file?

2008-12-04 Thread Andy Lee
On Dec 4, 2008, at 2:22 PM, Misha Gonodanov wrote: where is Icon Composer tool in /Developer/Applications/Utilities (Leopard). Tiger had Icon Composer and icns Browser tools in the same place Are you asking where Icon Composer is? What happens if you type "icon composer" into Spotlight?

Re: lid open and close notification

2008-12-04 Thread Benjamin Dobson
On 4 Dec 2008, at 18:29:26, sheen mac wrote: Hi All, In my app needs lid open and close notification.I used ioreg shell call for that (ioreg -n IOPMrootDomain | grep AppleClamshellState | sed 's/^.*=//' ).But when lid close and open it return "No". Always the clamshellstate is true.Insom

Re: NSSavePanel mishandling extensions

2008-12-04 Thread Kyle Sluder
I should probably make crystal clear that I am describing an enhancement to NSSavePanel's behavior that I'd like to see, not how it currently works or is documented to work. --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do

Re: NSSavePanel mishandling extensions

2008-12-04 Thread Kyle Sluder
On Thu, Dec 4, 2008 at 2:36 PM, Corbin Dunn <[EMAIL PROTECTED]> wrote: > They are. Only for NSOpenPanel; for the NSSavePanel it doesn't make as much > sense (in other words, what extension would you want to use given a UTI?) If the same UTI maps to multiple extensions, then it shouldn't matter wha

Re: How to extract individual icons from icns file?

2008-12-04 Thread Jens Bauer
Good old Iconographer (Carbon). Wonderful little app, it's now free. http://www.mscape.com/ Love, Jens On Dec 4, 2008, at 20:16, David wrote: 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 wor

Re: How to extract individual icons from icns file?

2008-12-04 Thread Misha Gonodanov
where is Icon Composer tool in /Developer/Applications/Utilities (Leopard). Tiger had Icon Composer and icns Browser tools in the same place Regards, Misha On Dec 4, 2008, at 11:16 AM, David wrote: Is there a tool available to extract individual icons from an icns file? In particular the s

Re: Programmatically loading an NSImage via other field

2008-12-04 Thread jmunson
Namaste! Back so soon... :) OK, I took a look a what you have and have some questions. And, well, h... I'M A DOPE!! :D No questions! The reason for that is I was under the extremely mistaken impression that I couldn't load the ImageView from a simple path via a binding. I took a lo

Re: NSSavePanel mishandling extensions

2008-12-04 Thread Corbin Dunn
Le Dec 3, 2008 à 7:11 PM, Kyle Sluder a écrit : On Wed, Dec 3, 2008 at 10:05 PM, Rob Keniger <[EMAIL PROTECTED]> wrote: Seems like a good idea to me, you should file a bug. To be honest, NSSavePanel and NSOpenPanel should be using UTIs for this by now. I don't know why they're not. They

Re: How to extract individual icons from icns file?

2008-12-04 Thread Randall Meadows
On Dec 4, 2008, at 12:16 PM, David wrote: 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 b

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 bett

Re: Help Menu

2008-12-04 Thread David Blanton
Moving the registration modal dialog to applicationDidFinishLaunching from windowDidLoad solved the problem. Thanks all! On Dec 4, 2008, at 10:53 AM, David Blanton wrote: No. I searched Apple Developer. Duh. Will do so now. On Dec 4, 2008, at 10:38 AM, I. Savant wrote: Have you tried

How to extract individual icons from icns file?

2008-12-04 Thread David
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 better place for me to ask this question? Tha

Re: Programmatically loading an NSImage via other field

2008-12-04 Thread jmunson
Great! Thanks! I'll take a look at at it. I'm still a Windows guy. Actually, I'm becoming dual-platform. Now that's a scary thought (but quite marketable if need be). But you are probably not in the Maryland area, are ya? Appreciate the help, I'll grab that zip now. Peace, Love, and L

Re: Programmatically loading an NSImage via other field

2008-12-04 Thread Matt Long
Jon, I'm not sure I understand the whole problem here, but from your initial message I put together a simple demo project that will take the input value from a text field and use that as the path for an NSImageView. It does it on the fly (e.g. as you type). Here is the demo project: htt

Re: Help Menu

2008-12-04 Thread David Blanton
The cited reference seems to describe my problem. I am putting up a modal registration in windowDidLoad so I am moving that code to applicationDidFinishLaunching. I'll report my results but I am sure it will resolve the issue. Thanks so much for your patience! On Dec 4, 2008, at 11:25 AM

Re: Cocoa-dev Digest, Vol 5, Issue 2074

2008-12-04 Thread Kirk Kerekes
"It is *possible* to use NSSocketPort to create a socket which you then communicate with using other techniques, but you can't use NSSocketPort directly to talk to a non-Cocoa app." While the documentation used to imply this, it did not appear to be true then, and the documentation no longer a

Re: Weird warning

2008-12-04 Thread development2
Duh... OMG. Sorry about the bandwidth waste, what an idiot I am. On Dec 4, 2008, at 11:25 AM, Bill Bumgarner wrote: On Dec 4, 2008, at 10:22 AM, development2 wrote: Can anyone see what I am doing wrong. I just don't get this and of course if I try to debug this, it freezes on that line of c

lid open and close notification

2008-12-04 Thread sheen mac
Hi All, In my app needs lid open and close notification.I used ioreg shell call for that (ioreg -n IOPMrootDomain | grep AppleClamshellState | sed 's/^.*=//' ).But when lid close and open it return "No". Always the clamshellstate is true.Insomania.kext was loaded before close the lid. Any other w

Re: Weird warning

2008-12-04 Thread Bill Bumgarner
On Dec 4, 2008, at 10:22 AM, development2 wrote: Can anyone see what I am doing wrong. I just don't get this and of course if I try to debug this, it freezes on that line of code. You are trying to invoke a class method via an instance of the class. b.bum

Re: Help Menu

2008-12-04 Thread jmunson
Hmmm... Maybe this will help? http://vgable.com/blog/2008/10/29/two-help-menus/ Peace, Love, and Light, /s/ Jon C. Munson II Quoting David Blanton <[EMAIL PROTECTED]>: I searched the list archives to no avail. I do not believe that I am the only one to see this problem ... the code is vanil

Weird warning

2008-12-04 Thread development2
Hi, I am getting some weird warnings that I can't figure out. /Development/Contracting Code/iTask-iPhone/trunk/iTask/Classes/ iTaskAppController.m:103: warning: assignment from distinct Objective- C type /Development/Contracting Code/iTask-iPhone/trunk/iTask/Classes/ iTaskAppController.m:98

Re: Help Menu

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 believ

Re: Help Menu

2008-12-04 Thread David Blanton
I searched the list archives to no avail. I do not believe that I am the only one to see this problem ... the code is vanilla IB menu stuff On Dec 4, 2008, at 10:53 AM, David Blanton wrote: No. I searched Apple Developer. Duh. Will do so now. On Dec 4, 2008, at 10:38 AM, I. Savant wrote

Re: Custom Window Resize Image

2008-12-04 Thread Mr. Gecko
I'm not needing to know how to draw it, I'm needing to know how to make it functional. so if someone clicks and drags it would resize the window. On Dec 3, 2008, at 11:22 PM, Aby wrote: Hi, NSDrawNinePartImage may do the job... Regards Abin On 12/4/08, Mr. Gecko <[EMAIL PROTECTED]> wro

Re: Help Menu

2008-12-04 Thread David Blanton
No. I searched Apple Developer. Duh. Will do so now. On Dec 4, 2008, at 10:38 AM, I. Savant wrote: Have you tried searching this list's archives? This is a FAQ. On Thu, Dec 4, 2008 at 12:36 PM, David Blanton <[EMAIL PROTECTED]> wrote: On Tiger I get one Help Menu On Leopard I get two He

Re: Help Menu

2008-12-04 Thread David Blanton
Out of the box menu with two items: app help app register app help has key equivalent ? On Leopard I get the Help Menu with Spotlight followed by the two aforementioned entries but app help does not have the key equivalent. Next to this menu I get another Help Menu with only the app help

Re: Help Menu

2008-12-04 Thread jmunson
'twould help to have a little more info on what you are doing, done, etc., in order to shed light on your situation... For instance: are you creating a menu item called Help, or are you sticking with the out-of-the-box menu item? Peace, Love, and Light, /s/ Jon C. Munson II Quoting David

Re: Help Menu

2008-12-04 Thread I. Savant
Have you tried searching this list's archives? This is a FAQ. On Thu, Dec 4, 2008 at 12:36 PM, David Blanton <[EMAIL PROTECTED]> wrote: > On Tiger I get one Help Menu > On Leopard I get two Help Menus > > Has anyone seen this before? > Is there some brain dead thing I am missing? > Am I brain de

Re: Help Menu

2008-12-04 Thread David Blanton
On Tiger I get one Help Menu On Leopard I get two Help Menus Has anyone seen this before? Is there some brain dead thing I am missing? Am I brain dead? My boss thinks I am because of this problem. arrghh! On Dec 4, 2008, at 12:39 AM, David Blanton wrote: I have been required to develop and

Re: Asynchronous timers (without a run loop)

2008-12-04 Thread Michael Ash
On Thu, Dec 4, 2008 at 8:00 AM, Påhl Melin <[EMAIL PROTECTED]> wrote: > 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 ta

Re: NSTimer

2008-12-04 Thread Keary Suska
On Dec 4, 2008, at 4:17 AM, Mahaboob wrote: Hi, I need to fire the thread repeatedly in regular time intervals. So I used the timer like: timer = [[NSTimer scheduledTimerWithTimeInterval:(double) [txtTimeinterval doubleValue] target:self selector:@selector(myThread:) userInfo:nil repeats:

Re: Programmatically loading an NSImage via other field

2008-12-04 Thread jmunson
Namaste! OK, I've been playing around with this for too long now... NOTHING gets called when text in a control is set via code or a mechanism other than strict keyboard/mouse entry by the user from what I can determine. This, in a word, is not good. I've set up an observer, delegates, and

Re: Beginner memory management question

2008-12-04 Thread Scott Ribe
A few things to note: As was already pointed out, you meant if(newName != nil) [newName release], but note that it's not an error to send a message to nil (as long as you're not using a return value, then there are rules as to whether it's safe or not), so you could just do [newName release]. Als

Re: "Live" image preview, huge memory usage...

2008-12-04 Thread Erik Buck
See http://theocacao.com/document.page/497 See http://www.wilshipley.com/blog/2005/09/jpeg2000-cool-but-slow.html See http://www.macresearch.org/cocoa-tutorial-image-kit-and-image-browser-views-part-i See http://www.macresearch.org/cocoa-tutorial-image-kit-cover-flow-and-quicklook-doing-things-we

Re: Big picture relationships between NSConnection, NSInputStream, NSOutputStream etc

2008-12-04 Thread Michael Ash
On Thu, Dec 4, 2008 at 1:22 AM, Ken Tozier <[EMAIL PROTECTED]> wrote: > Thanks Mike > > Still trying to get my head around this stuff, but here's how I interpret > what I need to do... > > Create a connection to MySQL >#define DEFAULT_MYSQL_PORT_NUMBER 3306 >socket = [[NSSock

[NSButtonCell] How to ask for refresh when a window resigns from being the key window

2008-12-04 Thread Stéphane Sudre
I have a subclass of NSButtonCell that uses a customized version of: - (void) drawImage:(NSImage*) inImage withFrame:(NSRect) inFrame inView:(NSView*) inControlView; for radio buttons. The issue I have is when the window that contains the cell resigns from being the key window: - If the

Re: How to display simple dialog at application startup?

2008-12-04 Thread Erik Buck
See http://www.stepwise.com/Articles/2006/eb1/index.html ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsu

Re: Asynchronous timers (without a run loop)

2008-12-04 Thread Joseph Kelly
On Dec 4, 2008, at 7:14 AM, Påhl Melin wrote: I'm very happy with the messaging framework and would like to use it on Mac OS X as well. Run loops are not compatible with this approach since my threads need to run forever or block in my framework when they are waiting for messages (the timers ar

Re: Linking CFBundle with static libraries

2008-12-04 Thread Nick Zitzmann
On Dec 4, 2008, at 3:48 AM, frank wrote: the problem was with the way I was building my libraries; I was using the "Generate Position-Dependent Code" from the "GCC 4.0 Code Generation" options. Once I disabled this my bundle built without any problems. Yeah, that would do it. That optio

Re: Asynchronous timers (without a run loop)

2008-12-04 Thread Julien Jalon
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 idling API is select() or kevent(), you'd use their timeout parameters. So, for what you se

Re: Controlled Font Substitution

2008-12-04 Thread Gerriet M. Denkmann
On 4 Dec 2008, at 01:34, Aki Inoue wrote: Mac OS X ships with Thonburi as the Thai system font, and that's the font usually you get for Thai character substitution. Yes. And Thonburi is much more readable than Lucida Grande, which was used on Tiger. The font substitution system is applyin

Re: NSTimer

2008-12-04 Thread Adam R. Maxwell
On Dec 4, 2008, at 4:47 PM, Mahaboob wrote: Hi, I need to fire the thread repeatedly in regular time intervals. So I used the timer like: timer = [[NSTimer scheduledTimerWithTimeInterval:(double) [txtTimeinterval doubleValue] target:self selector:@selector(myThread:) userInfo:nil repeats:

[SOLVED] RE: Determining unreleased objects after Quit

2008-12-04 Thread Jon C. Munson II
Just to close the thread... This problem resolved itself. I didn't do nothing... I suspect kaboshed bindings in a window/form. Peace, Love, and Light,   Jon C. Munson II "And Jesus looking upon them saith, With men it is impossible, but not with God: for with God all things are possible." [Mar

Re: Asynchronous timers (without a run loop)

2008-12-04 Thread David Springer
I don't mean to sound patronizing, but unless I have missed some fundamental premise, didn't you just re-invent DO? Maybe the right way to port this framework is to make your API a thin wrapper on top of Obj-C messages, and your set up a wrapper on top of DO setup. Just a thought. - Dave.S On Th

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

2008-12-04 Thread Thomas Brian
On Thu, Dec 4, 2008 at 12:17 PM, Mahaboob <[EMAIL PROTECTED]> wrote: > Hi, > For that I used the code : > NSDate* theDate = [NSDate dateWithTimeIntervalSinceReferenceDate:0]; Unless I am mistaken, this will create a date set to January 1st, 2001. To get a date representing "now", you can use [NS

String Constant containing 2 ASCII Control Chars

2008-12-04 Thread Jerry Krinock
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 that I could put it in some +initialize method fo

Re: Asynchronous timers (without a run loop)

2008-12-04 Thread Jeremy Pereira
If I were trying to generate an asynchronous timer event in C I'd probably just run a thread in a tight loop calling poll (man 2 poll for details) each time round with a timeout equal to your timer interval and no other events. And when the poll returns do whatever processing you need on y

Re: Programmatically loading an NSImage via other field

2008-12-04 Thread Ken Tozier
My example wasn't, strictly speaking, KVO. To set up an observer you would need to do something like the following @interface MYController : NSObject { IBOutlet NSTextField *imagePath; } @end @implementation - (id) init { self = [super init]; if (self) {

Re: custom view binding to NSTreeController

2008-12-04 Thread Matthew Johnson
As far as I know it's the only way, all the examples I've ever seen use a similar method. Array iteration is pretty fast and I can only imagine it being slow for a very large data set. I've definitely never had performance issues with it, but I am not creating large trees. I also would lo

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: Asynchronous timers (without a run loop)

2008-12-04 Thread Påhl Melin
2008/12/4 Joseph Kelly <[EMAIL PROTECTED]>: > I've used both the CF and NS timer apis in many different situations without > a hitch. They're fairly reliable. Perhaps you could explain your "can't use > a runloop" restriction -- e.g. if you are writing a daemon or a kext, this > is not the list you

Re: Asynchronous timers (without a run loop)

2008-12-04 Thread Joseph Kelly
I've used both the CF and NS timer apis in many different situations without a hitch. They're fairly reliable. Perhaps you could explain your "can't use a runloop" restriction -- e.g. if you are writing a daemon or a kext, this is not the list you want to post to. You might find if you refa

Re: Asynchronous timers (without a run loop)

2008-12-04 Thread Påhl Melin
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 chance on darwin-dev. >> >

Re: NSTimer

2008-12-04 Thread Joseph Kelly
You could call [self myThread:nil] after you start your timer. Joe K. On Dec 4, 2008, at 3:17 AM, Mahaboob wrote: Hi, I need to fire the thread repeatedly in regular time intervals. So I used the timer like: timer = [[NSTimer scheduledTimerWithTimeInterval:(double) [txtTimeinterval doub

Webview and streaming data

2008-12-04 Thread Reza Farhad
Dear all I am loading a web page that has a Quicktime streaming file. I was expecting to get the load delegate message "didFinishLoadForFrame" for the main frame when all the page is loaded and the movie starts playing, but the message is not called at that stage. Does anyone know how I c

Re: Programmatically loading an NSImage via other field

2008-12-04 Thread jmunson
In continuance... Alright, so it isn't strictly KVO...:) But it looks like it...:) Anyway, is there a way to know when the "stuff" in the cell changes? Most everything I can find is relative to when the user interacts with the control. But I can't find anything, as yet, for when the user

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 tha

Re: Asynchronous timers (without a run loop)

2008-12-04 Thread Påhl Melin
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 that supports timers without a run loop. But may

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 a

Re: Asynchronous timers (without a run loop)

2008-12-04 Thread Påhl Melin
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 a fully functional and reliable version. I reall

Re: How To Deal With Rounding Errors

2008-12-04 Thread Ricky Sharp
On Dec 4, 2008, at 6:37 AM, Andrew Farmer wrote: On 04 Dec 08, at 00:08, Bridger Maxwell wrote: Short version of my question: I believe I am having rounding errors because I am working with really, really small values. Would it help if I multiplied these values by a scalar (say, 1,000), did

Re: How To Deal With Rounding Errors

2008-12-04 Thread Andrew Farmer
On 04 Dec 08, at 00:08, Bridger Maxwell wrote: Short version of my question: I believe I am having rounding errors because I am working with really, really small values. Would it help if I multiplied these values by a scalar (say, 1,000), did math with them, and then divided them by the scal

Re: How To Deal With Rounding Errors

2008-12-04 Thread Nathan Day
The way floats work the round will always be to the same number of bits no matter what the order of magnitude (ignoring the extreme values < 2^-1023 for doubles). Check that you haven't let any integers into you calculations. On 04/12/2008, at 7:08 PM, Bridger Maxwell wrote: Hey, Short ve

Re: self = [super init];

2008-12-04 Thread mmalcolm crawford
On Dec 3, 2008, at 2:14 PM, EVS wrote: Why does the above line of code not cause a memory leak or memory fault? This may be of interest: mmalc

Re: Asynchronous timers (without a run loop)

2008-12-04 Thread Nathan Day
NSRunLoop use to be based on the function select() (it was in GnuStep anyway), it waits for inputs but also has a single timeout value also, NSRunLoop works out how long the timeout value should be for the shortest NSTimer. If you want to wait on multiple timers without using run NSRunLoop

NSTimer

2008-12-04 Thread Mahaboob
Hi, I need to fire the thread repeatedly in regular time intervals. So I used the timer like: timer = [[NSTimer scheduledTimerWithTimeInterval:(double)[txtTimeinterval doubleValue] target:self selector:@selector(myThread:) userInfo:nil repeats:YES]retain]; It is working but, the thread is fired o

  1   2   >