Re: How to run progress bar in a separate thread

2008-03-10 Thread James Hober
The following runs your progress indicator modally, which means the user can't do anything while it runs. You may or may not want that behavior. It uses a timer to update the progress indicator on the main thread by reading some instance variables. Your secondary thread writes to those

Cocoa way to get list of user accounts?

2008-03-10 Thread Mac QA
Hi, I am seeking the nice clean Cocoa way of getting a list of user accounts on the local system. Ultimately in the form of an NSArray of NSStrings of user account short names. There must be a way without parsing obscure system files, or spawning off NSTasks and parsing output, right? Any and all

Re: NSBundle wierdness in OCUnit target:

2008-03-10 Thread Nir Soffer
On Mar 11, 2008, at 01:44, William Hunt wrote: Well, I think I've traced the weirdness I was previously having with the model down to the following... When I call: NSLog( @"bundlePath: %@", [[NSBundle mainBundle] bundlePath] ); I get: 2008-03-10 16:41:18.565 otest[3819:80f] bundlePath: /D

Re: MPTask equivalent?

2008-03-10 Thread Ken Thomases
On Mar 10, 2008, at 4:05 PM, Trygve Inda wrote: I would like to use NSThreads as they seem simpler and Apple's latest docs discourages MPTasks. The call I need an equivalent to is MPWaitOnQueue... This blocks a thread until a message is received OR it times out. Is there a way to get a s

Re: Checking "Continuously Updates Value" in NSTextView binding cases Core Data failure

2008-03-10 Thread Mike R. Manzano
Okay, I think I've found the problem, but I'm not sure why it's a problem. I had two NSArrayControllers bound to the same NSManagedContext. I had one text view bound to the selection in the first controller, and another text view bound to the second array controller. I removed one of the ar

Re: Manipulating Sharing Services

2008-03-10 Thread Jens Alfke
On 10 Mar '08, at 9:10 PM, Jim Brown wrote: In Tiger one can determine if AFP is running with 'ps -axc | grep AppleFileServer' and AFP can be turned off by simply running a shell command (sudo killall AppleFileServer). This doesn't really work in Leopard for either determining if AFP is ru

Re: [Moderator] iPhone discussion here - RETRACTION

2008-03-10 Thread Philip Ershler
Sorry, can't talk about that here! ; > ) On Mar 10, 2008, at 10:11 PM, Jacob Bandes-Storch wrote: So are we or are we not getting a specialized (password-protected, probably) discussion area for the iPhone SDK? On Mar 10, 2008, at 6:30 PM, [EMAIL PROTECTED] wrote: That sounds surprisingl

Re: [Moderator] iPhone discussion here - RETRACTION

2008-03-10 Thread Jacob Bandes-Storch
So are we or are we not getting a specialized (password-protected, probably) discussion area for the iPhone SDK? On Mar 10, 2008, at 6:30 PM, [EMAIL PROTECTED] wrote: That sounds surprisingly plausible. I imagine a big speech bubble above the Apple campus that says, "Well, I'm glad we got al

Manipulating Sharing Services

2008-03-10 Thread Jim Brown
Hi All, We are developing an app that does a security review of a Mac looking for obvious vulnerabilities and settings that don't meet our published Best Practices. One of the steps is to get the current state of each of the 'services' listed in the sharing preferences (AFP, SMB, printer

Re: Checking "Continuously Updates Value" in NSTextView binding cases Core Data failure

2008-03-10 Thread Mike R. Manzano
I need the text view to handle multiple fonts and images. It would just be a crying shame if I had to go write a bunch more code to do something that bindings already purports to do. In lieu of having the text view continuously update, is there a way I can manually force the binding to "fir

Re: NSBundle wierdness in OCUnit target:

2008-03-10 Thread Melissa J. Turner
Ok, so it's the expected behavior. Phooey! I then have two questions: 1) How do I "inject [my] tests into [my] application?" You shouldn't need to. They're being injected automatically as part of the way the Xcode OCUnit test targets work. Try printing out [NSBundle allBundles]. Your

Re: CIImage (TIFFRepresentation) memory leak

2008-03-10 Thread Rob Keniger
On 11/03/2008, at 6:03 AM, [EMAIL PROTECTED] wrote: I narrowed this down by removing the filters, and the leak is still there. And what a leak! Everytime I draw the view the memory usage increases with the size of the drawn image. Yet this exact same code is used in the Core Image Programming G

Re: NSURLDownload and userInfo

2008-03-10 Thread Adam Leonard
Or, yet another solution: Just subclass NSURLConnection (say MyUserInfoURLConnection), add a userInfo ivar, drop in some accessors, and you are good to go. :) [userInfoConnection userInfo]; Adam Leonard On Mar 10, 2008, at 6:52 PM, Jens Alfke wrote: On 10 Mar '08, at 6:35 PM, Ben Lachman

Re: How to run progress bar in a separate thread

2008-03-10 Thread Jiva DeVoe
Make sure if you're doing this that you're not actually updating the GUI code from your other thread because much of cocoa is not thread safe. Instead, use the performSelectorOnMainThread... Method to do your update to the progress bar in the main thread. -- Jiva DeVoe http://www.random-

Re: No track index in iTunes SB?

2008-03-10 Thread Adam P Jenkins
On Mar 10, 2008, at 8:47 PM, has wrote: Adam P Jenkins wrote: Anyone know how to get the index of the current iTunes track using Scripting Bridge? You'll have to muck about with raw AE codes if you want to do it with Scripting Bridge; see past discussions of SB's design flaws for more info.

Re: NSURLDownload and userInfo

2008-03-10 Thread Ben Lachman
On Mar 10, 2008, at 9:52 PM, Jens Alfke wrote: On 10 Mar '08, at 6:35 PM, Ben Lachman wrote: Alternatively, if you're managing more than two requests at a time you can declare a mutable array of connections and then build a dictionary for each connection that includes any info you want you

Re: How to run progress bar in a separate thread

2008-03-10 Thread Jeff LaMarche
On Mar 10, 2008, at 10:08 PM, Nick Rogers wrote: NSThread has one method: + (void)detachNewThreadSelector:(SEL)aSelector toTarget:(id)aTarget withObject:(id)anArgument But its hard to understand as to how to implement it, since its a class method. Don't

How to run progress bar in a separate thread

2008-03-10 Thread Nick Rogers
Hi, My app has to show a progress bar on the main window. I have an outlet of type NSProgressIndicator. A start button triggers the method in which I'm incrementing the progress bar. But the buttons stop working once the method gets called. How can I run this progress bar in a separate thread.

Re: Clicking NSButton causes parent view to draw in transparent background

2008-03-10 Thread Justin Williams
That solved it. Thanks, Ken - j On Mon, Mar 10, 2008 at 8:38 PM, Ken Ferry <[EMAIL PROTECTED]> wrote: > > // Want to draw it in the center of the view. > > NSPoint startPoint; > > startPoint.x = rect.origin.x + rect.size.width / 2 - size.width / 2; > > startPoint.y = rect.origin.

Re: NSBundle wierdness in OCUnit target:

2008-03-10 Thread William Hunt
On Mar 10, 2008, at 6:29 PM, Chris Hanson wrote: On Mar 10, 2008, at 4:44 PM, William Hunt wrote: Well, I think I've traced the weirdness I was previously having with the model down to the following... Please don't start a new thread when the existing one will do just fine. Creating a ne

Re: NSURLDownload and userInfo

2008-03-10 Thread Jens Alfke
On 10 Mar '08, at 6:35 PM, Ben Lachman wrote: Alternatively, if you're managing more than two requests at a time you can declare a mutable array of connections and then build a dictionary for each connection that includes any info you want you delegate to have available. I think it's cle

Re: Clicking NSButton causes parent view to draw in transparent background

2008-03-10 Thread Ken Ferry
> // Want to draw it in the center of the view. > NSPoint startPoint; > startPoint.x = rect.origin.x + rect.size.width / 2 - size.width / 2; > startPoint.y = rect.origin.y + rect.size.height / 2 - size.height / 2; rect is the dirty region in your view, which may not be the whole thing

Re: NSURLDownload and userInfo

2008-03-10 Thread Ben Lachman
Alternatively, if you're managing more than two requests at a time you can declare a mutable array of connections and then build a dictionary for each connection that includes any info you want you delegate to have available. I have a method that build the connection dict for a connection

Re: NSBundle wierdness in OCUnit target:

2008-03-10 Thread Chris Hanson
On Mar 10, 2008, at 4:44 PM, William Hunt wrote: Well, I think I've traced the weirdness I was previously having with the model down to the following... Please don't start a new thread when the existing one will do just fine. Creating a new thread removes context from the conversation th

Re: Networked sync service to non .mac server?

2008-03-10 Thread Nick Zitzmann
On Mar 10, 2008, at 7:00 PM, Brian Krisler wrote: I am currently working on an application that requires data collection for scientific study. I have a Core Data entity that I would like to have the contents sent to a central server at scheduled intervals. Is this something that I can leve

Clicking NSButton causes parent view to draw in transparent background

2008-03-10 Thread Justin Williams
I have a borderless image-based NSButton placed on top of a custom view that prints out a value on an nstextfieldcell. When the button is clicked, the textfieldcell is drawing in the background of my button. You can see what it looks like at the following url: http://carpeaqua.com/images/nsbutto

Re: Causing CFLog error messages

2008-03-10 Thread Ben Lachman
On Mar 10, 2008, at 2:49 AM, Ron Fleckner wrote: On 10/03/2008, at 5:34 PM, Kevin Dixon wrote: 2008-03-10 02:30:08.571 StretchFix[2232] CFLog (0): CFMessagePort: bootstrap_register(): failed 1103 (0x44f), port = 0x3103, name = 'com.YSPf.StretchFix.ServiceProvider' See /usr/include/servers/boo

Re: [Moderator] iPhone discussion here - RETRACTION

2008-03-10 Thread Dave Hersey
That sounds surprisingly plausible. I imagine a big speech bubble above the Apple campus that says, "Well, I'm glad we got all our ducks in a row for that iPhone SDK release!" Meanwhile, cute little baby ducks are running at everyone's feet, riding the elevators up and down, quacking during

Re: on launched with cocoa

2008-03-10 Thread Nir Soffer
On Mar 10, 2008, at 20:14, Mr. Gecko wrote: Well I have a global that is set in a header file. In my awakeFromNib I have it set the globals to the path of an command line tool in the applications resource Don't do this. To find an executable in your bundle, use NSBundle. For example: N

Networked sync service to non .mac server?

2008-03-10 Thread Brian Krisler
Hello, I am currently working on an application that requires data collection for scientific study. I have a Core Data entity that I would like to have the contents sent to a central server at scheduled intervals. Is this something that I can leverage the sync services for, or should I use w

Re: [Moderator] iPhone discussion here - RETRACTION

2008-03-10 Thread has
Scott Anguish wrote: So we're back to the 'no iPhone discussion is allowed' state of things. #1 - The first rule of iPhone SDK is, you do not talk about iPhone SDK. #2 - The second rule of iPhone SDK is, you DO NOT talk about iPhone SDK. ... ___

Re: [iPhone] xml parsing

2008-03-10 Thread Julien Jalon
I can't comment on the iPhone part as this is NDA (and should not be discussed here) but, on Mac OS X, I'd add /usr/include/libxml2 to the header search path in project (or target) build settings. Also, I'd add the libxml2.dylib to my project using "Add existing framework" or add -lxml2 to the "add

Re: No track index in iTunes SB?

2008-03-10 Thread has
Adam P Jenkins wrote: Anyone know how to get the index of the current iTunes track using Scripting Bridge? You'll have to muck about with raw AE codes if you want to do it with Scripting Bridge; see past discussions of SB's design flaws for more info. Actually it's doable in scripting bridge

Re: [Moderator] iPhone discussion here - RETRACTION

2008-03-10 Thread Rob Keniger
On 11/03/2008, at 9:55 AM, I. Savant wrote: Somewhere in Cupertino, somebody's standing next to the big "NDA" switch in the iPhone room, giggling maniacally as they flip it on- off-on-off-... :-D Or, more specifically, *slide* it on-off-on-off. Sorry. -- Rob Keniger __

Re: [iPhone] xml parsing

2008-03-10 Thread Jacob Bandes-Storch
On a similar-ish note, I'm having trouble using libxml. I'm using a slightly modified version of the appropriate sample code. I need to make sure that the library is in my project. Since I couldn't find the library in a convenient place (where are you supposed to get those anyway?), I just

Re: Using Core Data with OCUnit

2008-03-10 Thread Bill Garrison
I've been doing Core Data unit tests using a MOC backed by an in- memory store. It gets the model using [NSManagedObjectModel mergedModelFromBundles:nil]. I didn't have to include the app's model file to the unit test target or anything. It seems to load it it fine directly from the app b

Re: [iPhone] xml parsing

2008-03-10 Thread Julien Jalon
I'm pretty sure you read the SDK release notes ;-) If not, I think you should, that's always a good idea. -- Julien On Mon, Mar 10, 2008 at 11:49 PM, Simon Fell <[EMAIL PROTECTED]> wrote: > The iPhone docs point you in the direction of libXML2 for parsing XML, > yet the headers for NSXML are in

Re: Stupid question: how do you show an NSWindow?

2008-03-10 Thread Nathaniel Gottlieb-Graham
Um, never mind. The problem has disappeared! There was nothing in the console at all. I think I had mistyped something or used the wrong -orderOut: method. On Mar 10, 2008, at 7:09 PM, Mike Abdullah wrote: To me this sounds like an exception is occurring during code called when clickin

Is IKImageView actually supposed to work?

2008-03-10 Thread Nathan Duran
I could have sworn I saw a working example of IKImageView at one of the traveling "Leopard Technology Preview" seminars a while back, but after spending an entire weekend attempting to accomplish some incredibly basic tasks with it, I'm beginning to wonder if the lack of sample code in /Dev

Re: [Moderator] iPhone discussion here - RETRACTION

2008-03-10 Thread I. Savant
While I was told to allow discussion here, I've now been told that discussion should not be allowed here. Oh, that's just MEAN! Somewhere in Cupertino, somebody's standing next to the big "NDA" switch in the iPhone room, giggling maniacally as they flip it on-off- on-off-... :-D -- I.

Missing Rule For xcdatamodel In Core Data App

2008-03-10 Thread Thaddeus Cooper
Hi All -- I've been through the archives looking for an answer to this problem but have been unable to garner an answer, so I am posting here in the hopes of getting this issue resolved. I created a new core data project today. I created an entity with three attributes and then build an i

NSBundle wierdness in OCUnit target:

2008-03-10 Thread William Hunt
Well, I think I've traced the weirdness I was previously having with the model down to the following... When I call: NSLog( @"bundlePath: %@", [[NSBundle mainBundle] bundlePath] ); I get: 2008-03-10 16:41:18.565 otest[3819:80f] bundlePath: /Developer/Tools This is clearly not correct. (I g

Re: Button on a button

2008-03-10 Thread Mike R. Manzano
The iPhone does this with its menus (the little blue arrow that shows up to the right of a menu). If you click on the menu item, it selects it, if you click on the blue arrow, it allows you to configure it. I would subclass NSButton. On Mar 10, 2008, at 4:28 PM, John Stiles wrote: There isn

Re: fileExistsAtPath with * to indicate random

2008-03-10 Thread Adam P Jenkins
On Mar 10, 2008, at 3:03 PM, Jeff LaMarche wrote: On Mar 10, 2008, at 2:54 PM, John Stiles wrote: In general this is excellent advice, but I believe ImageMagick is not a Mac program but an X11 thing. ImageMagick has some X11 components, but can be compiled as a set of unix command line p

Re: Using Core Data with OCUnit

2008-03-10 Thread William Hunt
On Mar 10, 2008, at 11:19 AM, Chris Hanson wrote: - (NSManagedObjectModel *)managedObjectModel { if (_managedObjectModel == nil) { NSString *modelPath = [[NSBundle mainBundle] pathForResource:@"MyModel" ofType:@"mom"]; NSURL *modelURL = [NSURL fileURLWithPath:modelPath isD

Re: results in attached view

2008-03-10 Thread Mike R. Manzano
On Mar 10, 2008, at 9:12 AM, Torsten Curdt wrote: Hah! Thanks for the pointer! No problemo. So I just create another window in my nib and then add that as a child I assume. Yep. Quicksilver on the other hand just has views inside the nib. How would I display such a view? What's the d

Re: Glyph Generator & hiding glyphs -> _NSBlockNumberForIndex() errors

2008-03-10 Thread Aki Inoue
OK, it appears I made a mistake with the original DTS sample 8-). NSLayoutManager requires each glyph segment to start with non-null glyphs whereas the sample was replacing all incoming glyphs in the hidden range to NSNullGlyph. Beginning the range with NSControlGlyph fixes the issue. Add

Re: Button on a button

2008-03-10 Thread Jean-Daniel Dupas
NSButton is a view. Every view accept subviews. So you can probably adding an other button in an existing button. I don't know if Interface Builder support it, but if it does not, you can do it programmaticaly. Le 11 mars 08 à 00:23, Niklas Saers a écrit : Hi, I'm fairly new to Cocoa so

Re: Button on a button

2008-03-10 Thread John Stiles
There isn't a built-in way to do this, and unless this is a very large button I am having a hard time visualizing how this could work at all. What kind of button are you dealing with here? Technically any view can have subviews so it might be possible to programatically add a small "i" button

Service without calling app to front?

2008-03-10 Thread Keith Blount
Hi, I offer a couple of clippings services via the application services menu for my app in the usual manner. So when the user is looking at text in another application, he or she can select some of it, go to the Services menu and have the text automatically pasted in my app. All of which works

Re: No track index in iTunes SB?

2008-03-10 Thread Adam P Jenkins
On Mar 10, 2008, at 12:14 PM, has wrote: slasktrattenator wrote: Anyone know how to get the index of the current iTunes track using Scripting Bridge? With Applescript, it's as simple as "tell iTunes to return index of current track", but iTunes SB has no such property (well, there is one, but

Button on a button

2008-03-10 Thread Niklas Saers
Hi, I'm fairly new to Cocoa so I'm sorry if this is a trivial question. I would like to create a little button in a button: like in Dashboard where you get a little "i" icon in a circle that can flip the widget, I would like to put a little "i" in a circle on the right-hand side of my butto

Re: Stupid question: how do you show an NSWindow?

2008-03-10 Thread Mike Abdullah
To me this sounds like an exception is occurring during code called when clicking the close button. Anything in the console? Mike. On 10 Mar 2008, at 21:40, Nathaniel Gottlieb-Graham wrote: Okay, now I have another problem. When the window in question is closed programmatically using -orde

Re: [iPhone] xml parsing

2008-03-10 Thread Jean-Daniel Dupas
If you find a function/method/class declaration in a public header (an header that is not in PrivateHeader folder) you can problably considere it as public. Le 10 mars 08 à 23:49, Simon Fell a écrit : The iPhone docs point you in the direction of libXML2 for parsing XML, yet the headers f

Re: [Moderator] iPhone discussion here.

2008-03-10 Thread Sean McBride
On 3/10/08 6:11 PM, Scott Anguish said: >Questions and comments should be sent to the [EMAIL PROTECTED] > as usual Small typo: plural lists: <[EMAIL PROTECTED]> -- Sean McBride, B. Eng [EMAIL PROTECTED] Rogue Research

Re: Small variant of NSSearchField?

2008-03-10 Thread John Stiles
BTW, this is now filed as rdar://5791056 [NSSearchFieldCell] Does not properly honor calls to -setControlSize: Thanks again for everyone's help debugging this issue! John Stiles wrote: OK, I figured it out. My control's frame was too tall! If you set the search field's frame to be more

Re: Expected Behavior? NSWorkspace and LSUIPresentationMode

2008-03-10 Thread Peter Ammon
On Mar 10, 2008, at 3:52 PM, Robert Kukuchka wrote: Hi, I spent a few days debugging why an application wasn't sending NSWorkspaceDidTerminateApplicationNotification to the sharedWorkspace. Turns out it was because LSUIPresentationMode was set to "1". Is this expected behavior? If not I'

Re: Small variant of NSSearchField?

2008-03-10 Thread John Stiles
OK, I figured it out. My control's frame was too tall! If you set the search field's frame to be more than 19 pixels tall, it creates a large-sized variant even if you explicitly asked for the small version. I was using 21 pixels, which is smaller than the regular size of 22 pixels—so it was c

Re: Small variant of NSSearchField?

2008-03-10 Thread John Stiles
I'll try it again with these steps. Thanks for the help. Tom Bunch wrote: It does seem to be order dependent. This works (though it does drop the baseline a pixel) [[searchField cell] setControlSize:NSSmallControlSize]; [searchField setFont:[NSFont systemFontOfSize:[NSFont systemFont

Expected Behavior? NSWorkspace and LSUIPresentationMode

2008-03-10 Thread Robert Kukuchka
Hi, I spent a few days debugging why an application wasn't sending NSWorkspaceDidTerminateApplicationNotification to the sharedWorkspace. Turns out it was because LSUIPresentationMode was set to "1". Is this expected behavior? If not I'll file a radar on it. ~Rob __

Re: Small variant of NSSearchField?

2008-03-10 Thread Tom Bunch
It does seem to be order dependent. This works (though it does drop the baseline a pixel) [[searchField cell] setControlSize:NSSmallControlSize]; [searchField setFont:[NSFont systemFontOfSize:[NSFont systemFontSizeForControlSize:NSSmallControlSize]]]; NSRect searchFrame = [searc

Re: Small variant of NSSearchField?

2008-03-10 Thread Stéphane Sudre
On Mar 10, 2008, at 11:27 PM, John Stiles wrote: [[searchField cell] setControlSize:NSSmallControlSize]; // A solution as ugly as an Orc float tWidth; NSRect tFrame; tWidth =NSWidth([IBsearchField_ frame]); [IBsearchField_ setFont:[NSFont systemFontOfSize:[NSFont

[iPhone] xml parsing

2008-03-10 Thread Simon Fell
The iPhone docs point you in the direction of libXML2 for parsing XML, yet the headers for NSXML are included in the SDK headers, and i was able to build and run fine using NSXMLDoc/element/node. (in fact i just dropped my existing NSXML based code into a iPhone project and it worked fine,

[Moderator] iPhone discussion here - RETRACTION

2008-03-10 Thread Scott Anguish
Apparently there has been some miscommunication somewhere. While I was told to allow discussion here, I've now been told that discussion should not be allowed here. So we're back to the 'no iPhone discussion is allowed' state of things. Sorry for the confusion. Scott Anguish __

Re: Small variant of NSSearchField?

2008-03-10 Thread John Stiles
I've done all of these things, and so far no dice. The small control clearly has a different overall look—for instance, the magnifying glass icon has a smaller variant which I do not see. Also, when I set the smaller frame, it's just using the big-size control and cutting off its bottom edge,

Re: Small variant of NSSearchField?

2008-03-10 Thread Jonathan Hess
Hey John - IB also typically changes the cell's font, and the control's frame when you use the pop up in the control size inspector. Hope that helps - Jon Hess On Mar 10, 2008, at 3:27 PM, John Stiles wrote: Interface Builder can easily make a small variant of NSSearchField— it's right the

Re: Core Animation Choppyness

2008-03-10 Thread Scott Anguish
On Mar 10, 2008, at 3:52 PM, Jonathan Dann wrote: Hi Guys, I have a couple of views in my app that get re-scaled by changing their frames. When I turn on layer backing for the view, the animation of the views' contents (a couple of NSColorWells & NSButtons) is choppy and renders badly,

Small variant of NSSearchField?

2008-03-10 Thread John Stiles
Interface Builder can easily make a small variant of NSSearchField—it's right there in the size popup—but I can't manage to reproduce the effect in code. The typical approach doesn't work: [[searchField cell] setControlSize:NSSmallControlSize]; does nothing at all, though this does shrink a

Re: fileExistsAtPath with * to indicate random

2008-03-10 Thread Keith Duncan
I tried BOOL ImageMagick = [[NSFileManager defaultManager] fileExistsAtPath:@"/ImageMagick*/" isDirectory:YES]; You're calling that wrong, the second parameter expects a pointer to a BOOL, not an actual BOOL. The correct syntax is: BOOL directory; BOOL exists = [[NSFileManager defaultManage

[Moderator] iPhone discussion here.

2008-03-10 Thread Scott Anguish
Originally, the posted rule here was "no discussion of the iPhone SDK". While a dedicated discussion area is being erected, the discussion will be allowed here, with the following restrictions: - no profanity (as usual) - no speculation on what may or may not be added/removed

NSTokenField bug in 10.5.2?

2008-03-10 Thread Tom Bunch
Hey developers, I've been grappling with a problem very similar to this month's earlier thread with the same subject line. The consensus there was that in 10.4 NSTokenField always trims off whitespace before the input it tokenized. In fact, my experience is the opposite. In OmniPlan we

Re: NSTask not completing

2008-03-10 Thread Gerd Knops
On Mar 6, 2008, at 2:35 PM, Charles Ross wrote: [..] If I enter the following command in the terminal, it returns about 20,000 records to the screen in about one second: sqlite3 Videos.sql 'select * from ZVIDEOS' The file has a fairly large number of records, almost 20,000. However, t

Re: FSFindFolder vs NSSearchPathForDirectoriesInDomains

2008-03-10 Thread Trygve Inda
> On 3/10/08 9:28 AM, Chris Parker said: > >> On 10 Mar 2008, at 8:21 AM, Trygve Inda wrote: >>> NSSearchPathForDirectoriesInDomains does not seem to have a constant >>> equivalent to kSharedUserDataFolderType as used by FSFindFolder. >>> >>> Is there any reason behind this... I would have assume

Re: MPTask equivalent?

2008-03-10 Thread Hamish Allan
2008/3/10 Trygve Inda <[EMAIL PROTECTED]>: > The call I need an equivalent to is MPWaitOnQueue... This blocks a thread > until a message is received OR it times out. Is there a way to get a similar > functionality with NSThread? The most Cocoa-ish way to do this is probably to use run loops an

Re: Stupid question: how do you show an NSWindow?

2008-03-10 Thread Nathaniel Gottlieb-Graham
Okay, now I have another problem. When the window in question is closed programmatically using -orderOut:, I can bring it back using - makeKeyAndOrderFront: , and then order it out again and repeat this procedure as many times as I want. However, when I click on the window's close button,

Re: FSFindFolder vs NSSearchPathForDirectoriesInDomains

2008-03-10 Thread Sean McBride
On 3/10/08 9:28 AM, Chris Parker said: >On 10 Mar 2008, at 8:21 AM, Trygve Inda wrote: >> NSSearchPathForDirectoriesInDomains does not seem to have a constant >> equivalent to kSharedUserDataFolderType as used by FSFindFolder. >> >> Is there any reason behind this... I would have assumed that the

Re: MPTask equivalent?

2008-03-10 Thread Trygve Inda
>> Is there a way to mix MPTasks in Cocoa? I am really eager to use Cocoa here >> as many things are much easier than in Carbon (less code), but the >> task/multithreading of Cocoa seems weak. > > Yes, you can create MPTasks from Cocoa, and use Cocoa from MPTasks. The key > is that there's a whole

Re: CIImage (TIFFRepresentation) memory leak

2008-03-10 Thread Gorazd Krosl
"If all the code you're using is present, it looks to me like you're not releasing the object pointed at by image; the object returned by imageWithData is not an auto-released object." I just checked documentation (http://developer.apple.com/documentation/GraphicsImaging/Reference/QuartzCoreFrame

Re: CIImage (TIFFRepresentation) memory leak

2008-03-10 Thread slasktrattenator
Oh really? Hm... *looks away in shame*. That makes me feel kind of stupid. I was under the impression it was an autoreleased object as there is no "init", "copy" or "new" in it's name, and the docs don't mention anything about the user being responsible for releasing it. How are you supposed to kn

Re: MVC Design Question

2008-03-10 Thread Stuart Malin
Take a look at this work by Robbie Hanson: http://deusty.blogspot.com/2008/02/towards-open-source-xmpp-framework- for.html http://code.google.com/p/xmppframework/ I can't vouch for the style of its internal design, but there is a lot there to leverage. I'm building my own native Cocoa XMP

Re: Core Animation Choppyness

2008-03-10 Thread Jonathan Dann
On 10 Mar 2008, at 20:26, Chris Ryland wrote: Looks to me like you're mixing NSAnimation and CAAnimation technologies. Try CAAnimationContexts instead? Tried  Googling CAAnimationContext, and I can't find it, where can I read up on them? Thanks, Jon smime.p7s Description: S/MIME crypt

Re: CIImage (TIFFRepresentation) memory leak

2008-03-10 Thread Brady Duga
On Mar 10, 2008, at 1:21 PM, Gary L. Wade wrote: If all the code you're using is present, it looks to me like you're not releasing the object pointed at by image; the object returned by imageWithData is not an auto-released object. It's not? Why not? I thought convenience methods like that

Re: No track index in iTunes SB?

2008-03-10 Thread has
Christopher Nebel wrote: Anyone know how to get the index of the current iTunes track using Scripting Bridge? With Applescript, it's as simple as "tell iTunes to return index of current track", but iTunes SB has no such property (well, there is one, but it only refers to the index of the

Re: Glyph Generator & hiding glyphs -> _NSBlockNumberForIndex() errors

2008-03-10 Thread Keith Blount
Hi Aki, Many thanks for your reply, much appreciated. I completely stripped all my custom drawing code and everything to double-check it wasn't just some bad expectation of glyph-to-character mapping in my own code, but the problem persists. I've uploaded the sample, stripped down project here:

Re: CIImage (TIFFRepresentation) memory leak

2008-03-10 Thread Gary L. Wade
If all the code you're using is present, it looks to me like you're not releasing the object pointed at by image; the object returned by imageWithData is not an auto-released object. >I narrowed this down by removing the filters, and the leak is still >there. And what a leak! Everytime I draw th

Re: Stupid question: how do you show an NSWindow?

2008-03-10 Thread Nathaniel Gottlieb-Graham
Yup, The windows were released when closed, and I was using -close rather than -orderOut. Thanks guys! On Mar 10, 2008, at 2:31 PM, Matt Mashyna wrote: On Mar 10, 2008, at 2:12 PM, Nathaniel Gottlieb-Graham wrote: This is going to sound really stupid, but how do you show an NSWindow? [a

Re: CIImage (TIFFRepresentation) memory leak

2008-03-10 Thread slasktrattenator
I narrowed this down by removing the filters, and the leak is still there. And what a leak! Everytime I draw the view the memory usage increases with the size of the drawn image. Yet this exact same code is used in the Core Image Programming Guide. So I figure it's a bug in Core Image. But how can

MVC Design Question

2008-03-10 Thread vance
If you would design an IM client using MVC, where would the connection object be? Here is an example: The Model: // Interface Builder has an instance of IMBuddyList // IMBuddyList is the model that contain a list of IMPerson instances @interface IMBuddyList : NSObject

Re: IB3 Application vs File Owner

2008-03-10 Thread Jonathan Hess
On Mar 8, 2008, at 8:27 AM, Quincey Morris wrote: On Mar 8, 2008, at 06:54, Trygve Inda wrote: IB3 has added an NSApplication object. How does this work... It seems if my AppController is still the delegate of the File's Owner that the specific instance of NSApplication is not needed

Core Animation Choppyness

2008-03-10 Thread Jonathan Dann
Hi Guys, I have a couple of views in my app that get re-scaled by changing their frames. When I turn on layer backing for the view, the animation of the views' contents (a couple of NSColorWells & NSButtons) is choppy and renders badly, but when I omit the layer- backing activation the an

Re: No track index in iTunes SB?

2008-03-10 Thread slasktrattenator
Thank you! On Mon, Mar 10, 2008 at 8:04 PM, Christopher Nebel <[EMAIL PROTECTED]> wrote: > > On Mar 10, 2008, at 4:56 AM, [EMAIL PROTECTED] wrote: > > > Anyone know how to get the index of the current iTunes track using > > Scripting Bridge? With Applescript, it's as simple as "tell iTunes > >

Re: Linking to third-party Frameworks and dylibs from a plug-in

2008-03-10 Thread Thomas Engelmeier
On 10.03.2008, at 19:58, Dan Korn wrote: I could install the frameworks in the application's own Frameworks folder, but that seems a bit rude, and defeats the purpose of being able to keep all the parts of the plug-in executable in its own bundle. So, my question is, is there another way

Re: fileExistsAtPath with * to indicate random

2008-03-10 Thread glenn andreas
On Mar 10, 2008, at 2:03 PM, Jeff LaMarche wrote: On Mar 10, 2008, at 2:54 PM, John Stiles wrote: In general this is excellent advice, but I believe ImageMagick is not a Mac program but an X11 thing. ImageMagick has some X11 components, but can be compiled as a set of unix command line

Re: fileExistsAtPath with * to indicate random

2008-03-10 Thread Mr. Gecko
Randall Meadows Helped me and I came up with NSFileManager *fm = [NSFileManager defaultManager]; int i; NSArray *folders = [fm directoryContentsAtPath:@"/"]; for (i=0;i<[folders count];i++) { NSString *folder = [folders objectAtIndex:i]; if ([folder hasPrefix:@"ImageMagick"]) { ImageMa

Re: fileExistsAtPath with * to indicate random

2008-03-10 Thread Herb Petschauer
With a datapoint of one X11 application (Wireshark.app) If I double click on a pcap file, LS does actually launch X11 and runs Wireshark(although the file doesn't actually get opened by Wireshark but that is a different conversation). mdfind "kMDItemKind == 'Application'" also finds Wireshark.

Re: fileExistsAtPath with * to indicate random

2008-03-10 Thread Thomas Engelmeier
On 10.03.2008, at 19:54, John Stiles wrote: In general this is excellent advice, but I believe ImageMagick is not a Mac program but an X11 thing. command-line ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin reque

Re: No track index in iTunes SB?

2008-03-10 Thread Christopher Nebel
On Mar 10, 2008, at 4:56 AM, [EMAIL PROTECTED] wrote: Anyone know how to get the index of the current iTunes track using Scripting Bridge? With Applescript, it's as simple as "tell iTunes to return index of current track", but iTunes SB has no such property (well, there is one, but it only

Re: fileExistsAtPath with * to indicate random

2008-03-10 Thread Jeff LaMarche
On Mar 10, 2008, at 2:54 PM, John Stiles wrote: In general this is excellent advice, but I believe ImageMagick is not a Mac program but an X11 thing. ImageMagick has some X11 components, but can be compiled as a set of unix command line programs that will perform various operations on im

Re: fileExistsAtPath with * to indicate random

2008-03-10 Thread John Stiles
In general this is excellent advice, but I believe ImageMagick is not a Mac program but an X11 thing. Brian Stern wrote: On Mar 10, 2008, at 12:10 PM, Mr. Gecko wrote: I'm needing my application to find out if ImageMagick is installed. You should look at Launch Services. This Carbon API w

Re: Stupid question: how do you show an NSWindow?

2008-03-10 Thread Matt Mashyna
On Mar 10, 2008, at 2:12 PM, Nathaniel Gottlieb-Graham wrote: This is going to sound really stupid, but how do you show an NSWindow? [aWindow close] seems to be the appropriate method to close it, but idiotically enough, I can't seem to find a way re-show the window once it's no longer on-

  1   2   >