NSDictionaryController and inserting new objects.

2008-03-31 Thread Jiva DeVoe
So I'm looking through the docs on NSDictionaryController... trying to understand how it decides how to create new keys. The docs say "to customize this behavior (that is the creation of your keys) override the "newObject" method." And it occurs to me, that this kinda defeats the purpose o

Re: Modify Input in NSTableView

2008-03-31 Thread Quincey Morris
On Mar 30, 2008, at 23:08, K. Darcy Otto wrote: I'm working on an application in which users enter data into a table, but I need to substitute a greater-than symbol (>) for a right-arrow symbol (→, unicode: 2192) as the user presses they key (or copies the text, or whatever). After lookin

Re: Modify Input in NSTableView

2008-03-31 Thread Quincey Morris
On Mar 31, 2008, at 00:29, Quincey Morris wrote: On Mar 30, 2008, at 23:08, K. Darcy Otto wrote: I'm working on an application in which users enter data into a table, but I need to substitute a greater-than symbol (>) for a right-arrow symbol (→, unicode: 2192) as the user presses they key

Rotating a bunch of images

2008-03-31 Thread Dave Hersey
Hi, I need to rotate the contents of several image files of various types and then replace the original files. I want to preserve the type of file and as much of the data as possible (for example, multiple representations). This is data processing only; I don't need to display the images

Re: Making a window fit its contents?

2008-03-31 Thread Nick Toumpelis
Hi Jack, the most effective way to do this is by using Jerry Krinock's NS(Attributed)String+Geometrics categories [1]. Using this, you can determine the height or width of your text and size your window (and NSTextField) appropriately. Nick [1] http://sheepsystems.com/sourceCode On 31

Re: Thread safe?

2008-03-31 Thread Thomas Engelmeier
Am 30.03.2008 um 17:01 schrieb Adam R. Maxwell: On Mar 30, 2008, at 6:10 AM, Thomas Engelmeier wrote: On 29.03.2008, at 18:54, Adam R. Maxwell wrote: Drawing into an NSImage is explicitly documented to be thread safe in the article you linked to, and each thread has its own graphics con

How to programming 'drag to Application' action?

2008-03-31 Thread 강경훈
___ 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/Unsubscribe/Update your Subscription: http://lists.apple.com/

Re: Getting other application window reference

2008-03-31 Thread Apparao Mulpuri
Thanks Brian. Accessability API provides Window properties as Elements while mouse moving on a Window. Can we do this operation while mouse drag of a Window? - Apparao. On 3/27/08, Brian Kendall <[EMAIL PROTECTED]> wrote: > > I would recommend the accessibility API, since that can be used to fin

Re: NSDictionaryController and inserting new objects.

2008-03-31 Thread Kyle Sluder
On Mon, Mar 31, 2008 at 3:24 AM, Jiva DeVoe <[EMAIL PROTECTED]> wrote: > What am I missing here? Someone enlighten me? I kinda feel this way > about a lot of the controllers provided in IB. They're *almost* good > enough for most of the things I want to do.. but never *exactly* what > I need.

Spaces Implementation

2008-03-31 Thread Apparao Mulpuri
Hi List, I am interested to develop a sample application, which will work like Spaces functionality. Any pointers on how it was implemented? Thanks & Regards, - Apparao. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post a

Writing x, y to NSBitmapImageRep

2008-03-31 Thread Eddie Hebert
I have a need to store and draw an image that I create iteratively over each pixel. I am trying to use NSBitmapImageRep with setColor: x: y:, to do so. Within the constructor of my "rendering engine" class, I instantiate a NSBitmapImageRep, thusly: _imageRep = [[NSBitmapImageRep alloc] init

Re: Writing x, y to NSBitmapImageRep

2008-03-31 Thread Jean-Daniel Dupas
You should use -[NSBitmapImageRep initWithBitmapDataPlanes:pixelsWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bitmapFormat:bytesPerRow:bitsPerPixel :] to initialize your bitmap. A bitmap representation initialized using -initForIncrementalLoad expects that

Re: Spaces Implementation

2008-03-31 Thread Mike Abdullah
Spaces is a feature of the OS, not a standard application. There is no public API for re-creating it. Mike. On 31 Mar 2008, at 14:31, Apparao Mulpuri wrote: Hi List, I am interested to develop a sample application, which will work like Spaces functionality. Any pointers on how it was im

Re: Writing x, y to NSBitmapImageRep

2008-03-31 Thread Eddie Hebert
It appears to be properly storing the values, through inspection from NSLog and colorAt. The next step is drawing, I am trying to show incremental updates of the progress of the render engine, within the drawRect method of an NSImageView I am calling (at an interval based on NSTimer) [[self

Re: Writing x, y to NSBitmapImageRep

2008-03-31 Thread Jean-Daniel Dupas
NSBitmapImageRep is a subclass of NSImageRep, and so, it responds to - draw, -drawAtPoint: and -drawInRect:. Maybe trying to directly draw the bitmap representation will avoid caching and other NSImage optimization issues. [rayTracer.imageRep drawInrect:rect]; Le 31 mars 08 à 16:21, Eddi

Re: Writing x, y to NSBitmapImageRep

2008-03-31 Thread Eddie Hebert
That worked! Thanks again. On Mar 31, 2008, at 10:42 AM, Jean-Daniel Dupas wrote: NSBitmapImageRep is a subclass of NSImageRep, and so, it responds to -draw, -drawAtPoint: and -drawInRect:. Maybe trying to directly draw the bitmap representation will avoid caching and other NSImage optim

Re: Returning values from objc_msgSend etc

2008-03-31 Thread Sherm Pendley
On Sat, Mar 1, 2008 at 9:00 AM, Greg Parker <[EMAIL PROTECTED]> wrote: libffi is smart enough to know about all of the ABI rules. If your ffi_types > correctly describe the method's parameters, then libffi will marshal them > properly. (If it doesn't, then that's a libffi bug.) > > I don't think l

Re: Returning values from objc_msgSend etc

2008-03-31 Thread Sherm Pendley
On Sat, Mar 1, 2008 at 9:00 AM, Greg Parker <[EMAIL PROTECTED]> wrote: libffi is smart enough to know about all of the ABI rules. If your ffi_types > correctly describe the method's parameters, then libffi will marshal them > properly. (If it doesn't, then that's a libffi bug.) > > I don't think l

Re: Returning values from objc_msgSend etc

2008-03-31 Thread Jean-Daniel Dupas
returnCharValue is not a valid argument for ffi_call man ffi_call void ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue); rvalue must point to storage that is sizeof(long) or larger. For smaller return value sizes, the ffi_arg or ffi_sarg integral type must be us

Re: Spaces Implementation

2008-03-31 Thread Hamish Allan
On Mon, Mar 31, 2008 at 3:06 PM, Mike Abdullah <[EMAIL PROTECTED]> wrote: > Spaces is a feature of the OS, not a standard application. There is no > public API for re-creating it. However, there is an effort to reverse-engineer the private API: http://www.cocoadev.com/index.pl?CoreGraphicsPriva

Question on bitmap fonts

2008-03-31 Thread Tobia Conforto
Hello After 1000 messages to this list and no reply, I'm resubmitting my question about bitmap fonts, hoping to get any bit of help or any pointer at all (docs, other mailing lists, etc.) Basically, I would like to know what are the best practices and recommended programs for preparing bi

Main Thread UI and Detached Thread

2008-03-31 Thread Mike
I have all my UI running on my app's main thread. I have a worker thread that I detach with detachNewThreadSelector:toTarget:withObject: (my worker thread). In my worker thread I do a tight processing loop and one of the things I do in the loop is call two methods in the main thread to update

Re: Main Thread UI and Detached Thread

2008-03-31 Thread j o a r
On Mar 30, 2008, at 11:55 AM, Mike wrote: In my worker thread I do a tight processing loop and one of the things I do in the loop is call two methods in the main thread to update the display (a text message and progress bar) - via performSelectorOnMainThread:withObject:waitUntilDone:modes.

core data and sqlite db store problem

2008-03-31 Thread Scott Guyer
Hi, I'm just learning core data and have already stumbled on something. I created a CD application using the XCode template. I've created a sqlite3 .db file with data and a matching core data model in xcode. My code fails here... url = [NSURL fileURLWithPath: [applicationSupportF

Re: Spaces Implementation

2008-03-31 Thread Andrew Merenbach
Hi, I do believe, however, that reverse-engineering talk is off-limits for this list -- someone correct me if I'm wrong? Cheers, Andrew On Mar 31, 2008, at 8:57 AM, Hamish Allan wrote: On Mon, Mar 31, 2008 at 3:06 PM, Mike Abdullah <[EMAIL PROTECTED]> wrote: Spaces is a feature of

Re: Main Thread UI and Detached Thread

2008-03-31 Thread Hank Heijink (Mailinglists)
Just checking the obvious here - is it possible that your worker thread completes its work so fast that the main run loop hasn't updated the screen once before it's done? Keep in mind that the main thread has to display your window with the progress bar and the text and (depending on your i

Re: core data and sqlite db store problem

2008-03-31 Thread Jeff LaMarche
Core data stores metadata as well as data in the sqlite3 file and follows a very specific naming convention for the regular data tables and columns. You'd probably be better off writing a small migration utility to import the data you need than to try create a sqlite3 database in the right

Re: Movable by window background AND custom NSView

2008-03-31 Thread patrick machielse
Op 31 mrt 2008, om 09:52 heeft vance het volgende geschreven: I have a Textured Window with a NSView that has some custom drawing done in drawRect. When I click and drag outside the custom NSView The window moves (That is exactly what is needed) When I click and drag within t

Re: Returning values from objc_msgSend etc

2008-03-31 Thread Greg Parker
On Mar 31, 2008, at 8:34 AM, Sherm Pendley wrote: On Sat, Mar 1, 2008 at 9:00 AM, Greg Parker <[EMAIL PROTECTED]> wrote: libffi is smart enough to know about all of the ABI rules. If your ffi_types correctly describe the method's parameters, then libffi will marshal them properly. (If it does

Re: simple table column bindings

2008-03-31 Thread Gareth Davis
thank you. That works just great now. Gareth On 30 Mar 2008, at 23:58, Milen Dzhumerov wrote: Hi Gareth, There were a couple of problems. 1) You should be calling [movements addObject:m] instead of [movements add:m] 2) You should set the class which the array controller manages in IB to Mo

Re: Movable by window background AND custom NSView

2008-03-31 Thread Michael Ash
On Mon, Mar 31, 2008 at 12:59 PM, patrick machielse <[EMAIL PROTECTED]> wrote: > Op 31 mrt 2008, om 09:52 heeft vance het volgende geschreven: > > > > I have a Textured Window with a NSView that has some custom drawing > > done in drawRect. > > > > When I click and drag outside the custom NSVie

Re: Subverting the first responder chain

2008-03-31 Thread John Stiles
No problem. I'd rather have 90% good info and a bit of confusion than no response at all :) I've filed a radar: rdar://5831739 [Cocoa]Hotkey matching works differently for menu items that use the Command key The root of the problem is really in the docs which you posted earlier. They say

Re: Movable by window background AND custom NSView

2008-03-31 Thread vance
That did it. Thank you! On Mar 31, 2008, at 10:09 AM, Michael Ash wrote: On Mon, Mar 31, 2008 at 12:59 PM, patrick machielse <[EMAIL PROTECTED]> wrote: Op 31 mrt 2008, om 09:52 heeft vance het volgende geschreven: I have a Textured Window with a NSView that has some custom drawing done in

Re: core data and sqlite db store problem

2008-03-31 Thread Scott Guyer
Thanks Jeff, That would explain it. Crikey...whole lotta Zs in the CD created SQLite schema. :) In XCode, there is an Design -> Data Model -> Import... menu item. It is looking to import an XML file of a particular format. Any pointers to this format? Could this be a way for me to

Re: NSNoCellMask differences in Leopard vs. Tiger

2008-03-31 Thread Ben Lachman
So it ends up that while NSNoCellMask works on Tiger it really isn't the way to do what I was wanting. NSPushInCellMask does the same thing (darken the un-bezeled icon), makes more sense, and works on both Tiger and Leopard. The problem is that the documentation doesn't mention NSPushInCe

Re: Threads and Core Data, bindings results in view corruption

2008-03-31 Thread David
Thank you very much for the response which is chock full of helpful information. Its taken me some time to try and digest.I must admit being a little demoralized. I've always considered threading to go hand and hand with GUI programming. I'm having trouble envisioning the scenarios where bindings a

Re: Main Thread UI and Detached Thread

2008-03-31 Thread Mike
I'm not doing any work on the main thread while the spawned thread runs. In fact, the main thread is just idling doing nothing. And the behavior isn't really a responsiveness issue: the rest of the UI still responds fine, but my indicators that I update in the UI do *nothing* the entire time th

Re: Main Thread UI and Detached Thread

2008-03-31 Thread Mike
I suppose it's possible. The spawned thread does a lot of setup then iterates some arrays of a bunch of objects in the filesystem that it needs to delete. The idea is to update the progress bar one increment with each item being deleted. I'm using a MacBook 2.16 Ghz but I doubt that the main th

RE: Main Thread UI and Detached Thread

2008-03-31 Thread Andy Klepack
Are you calling performSelectorOnMainThread:withObject:waitUntilDone:modes on every iteration of the tight loop? That seems like it could be terribly expensive. What if you throttle it back to every X (ten, hundred, thousand, etc) iterations? My speculation would be you're overwhelming your rece

Re: Main Thread UI and Detached Thread

2008-03-31 Thread j o a r
On Mar 31, 2008, at 11:02 AM, Mike wrote: I'm not doing any work on the main thread while the spawned thread runs. In fact, the main thread is just idling doing nothing. And the behavior isn't really a responsiveness issue: the rest of the UI still responds fine, but my indicators that I up

Re: Question on bitmap fonts

2008-03-31 Thread Aki Inoue
Tobia, It appears that this is the intended behavior. The font contains glyphs that extend beyond the ascender line (the accented glyphs) and Cocoa automatically adjusts the default line height accordingly to avoid baseline shifts. So, basically the system, tools you're using to convert th

Network notifications

2008-03-31 Thread Randall Meadows
My app registers a bonjour service, but basically it's really just advertising the web server running on the same machine as my app, with a little extra information pertaining to my app. My app places files in a known location in the hierarchy that apache is serving, and I need to send out

Re: Main Thread UI and Detached Thread

2008-03-31 Thread Hank Heijink (Mailinglists)
On Mar 31, 2008, at 2:06 PM, Mike wrote: I suppose it's possible. The spawned thread does a lot of setup then iterates some arrays of a bunch of objects in the filesystem that it needs to delete. The idea is to update the progress bar one increment with each item being deleted. I'm using a

Re: Threads and Core Data, bindings results in view corruption

2008-03-31 Thread Jeff LaMarche
David: I can't speak for Apple (I'll leave that to Ben), but there are a few things to keep in mind here: 1) Core Data is still a relatively new technology. Sure, it came out with Tiger, but since using it keeps your app from running on earlier versions of OS X, a lot of software projects

Re: Modify Input in NSTableView

2008-03-31 Thread K. Darcy Otto
On Mar 31, 2008, at 00:29, Quincey Morris wrote: > On Mar 30, 2008, at 23:08, K. Darcy Otto wrote: > >> I'm working on an application in which users enter data into a >> table, but I need to substitute a greater-than symbol (>) for a >> right-arrow symbol (→, unicode: 2192) as the user presses t

Re: Network notifications

2008-03-31 Thread Hamish Allan
On Mon, Mar 31, 2008 at 7:23 PM, Randall Meadows <[EMAIL PROTECTED]> wrote: > But to use DO, there needs to be a known > connection between my app and the remote app, right? We don't want > this connection What is it that you are averse to? A persistent connection? A fixed handle for your ser

Re: Threads and Core Data, bindings results in view corruption

2008-03-31 Thread David
On Mon, Mar 31, 2008 at 2:26 PM, Jeff LaMarche <[EMAIL PROTECTED]> wrote: > 4) You can, as Ben mentioned, use performSelector:onMainThread: to > actually have the object inserted on the main thread's context. It's a bit > of a pain, but threads are always at least a little painful. > How? Core da

Re: Threads and Core Data, bindings results in view corruption

2008-03-31 Thread Jeff LaMarche
On Mar 31, 2008, at 2:36 PM, David wrote: On Mon, Mar 31, 2008 at 2:26 PM, Jeff LaMarche <[EMAIL PROTECTED]> wrote: 4) You can, as Ben mentioned, use performSelector:onMainThread: to actually have the object inserted on the main thread's context. It's a bit of a pain, but threads are alw

Re: Main Thread UI and Detached Thread

2008-03-31 Thread Matt Mashyna
As long as we're top posting... Why not update values for your worker thread and spawn another thread that does the UI progress updates periodically ? Works nice for me. I update the UI with whatever my controller object's state is at that moment and then sleep for a little. I like this sch

Simple NSComboBox example?

2008-03-31 Thread David Springer
Folks, Is there a simple NSComboBox example that uses bindings out there? I want to populate an NSComboBox with a list of filenames using an NSArrayController, etc. Thanks! - Dave.S ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not

Re: Main Thread UI and Detached Thread

2008-03-31 Thread Mike
Yes, but in some cases the loop doesn't run for 10,000. It could run for 5 iterations or 100,000 depending on the # if files to delete. There's no caveat in the docs on the use of performSelectorOnMainThread:withObject:waitUntilDone:modes - the docs make it sound that there are no restrictions

Re: Main Thread UI and Detached Thread

2008-03-31 Thread Mike
I have two methods in the main thread that I call from the worker using performSelector, etc. The method for updating the progress bar for example looks like this: - (void)setProgressBarValue:(double)value { if( progressBar ) { [ progressBar setDoubleValue:value

Re: Main Thread UI and Detached Thread

2008-03-31 Thread Mike
Hank Heijink (Mailinglists) wrote: On Mar 31, 2008, at 2:06 PM, Mike wrote: I suppose it's possible. The spawned thread does a lot of setup then iterates some arrays of a bunch of objects in the filesystem that it needs to delete. The idea is to update the progress bar one increment with each

Re: Main Thread UI and Detached Thread

2008-03-31 Thread Mike
Matt Mashyna wrote: As long as we're top posting... Why not update values for your worker thread and spawn another thread that does the UI progress updates periodically ? Works nice for me. I update the UI with whatever my controller object's state is at that moment and then sleep for a littl

Problem with setting color in NSBitmapImageRep

2008-03-31 Thread Christian Kaiser
I'm struggling with setting color in a NSBitmapImageRep. I'm computing the components of a NSColor according to a numeric value; its basically a linear interpolation between all components of two NSColors. I've got a function which is computing the new NSColor based on a given value. If I call

NSPredicate and Arrays

2008-03-31 Thread Jake Carter
Hey Guys, I'm trying to use NSPredicate to filter an array. Here's the structure of my array ArrayOfFoos: Foo: (Custom Object) Bars: (NSArray *)Bar: (Custom Object) Baz = 1 (int Property on custom object) Bar: Baz = 3 ...

libpq prepared statement

2008-03-31 Thread Justin Giboney
I am trying to get a libpq prepared statement to compile (not actually work) in my app. I am having difficulty finding an example of one on the internet somewhere. I don't really understand the documentation ( http://www.postgresql.org/docs/8.1/static/libpq-exec.html#LIBPQ-EXEC-SELECT-INFO )

Re: Main Thread UI and Detached Thread

2008-03-31 Thread j o a r
On Mar 31, 2008, at 12:20 PM, Mike wrote: I have two methods in the main thread that I call from the worker using performSelector, etc. The method for updating the progress bar for example looks like this: - (void)setProgressBarValue:(double)value { if( progressBar ) {

Re: Network notifications

2008-03-31 Thread Randall Meadows
On Mar 31, 2008, at 12:34 PM, Hamish Allan wrote: On Mon, Mar 31, 2008 at 7:23 PM, Randall Meadows <[EMAIL PROTECTED] pc.com> wrote: But to use DO, there needs to be a known connection between my app and the remote app, right? We don't want this connection What is it that you are averse to?

Re: libpq prepared statement

2008-03-31 Thread stephen joseph butler
On Mon, Mar 31, 2008 at 2:44 PM, Justin Giboney < [EMAIL PROTECTED]> wrote: > PQprepare *statement = PQPrepare(theConnection, "stmtname", "SELECT * > FROM admin WHERE id = %s", 1, [theUUID]); > http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NS

Re: Main Thread UI and Detached Thread

2008-03-31 Thread j o a r
On Mar 31, 2008, at 12:25 PM, Mike wrote: I am doing nothing in the main run loop when th worker thread fires. The main thread is doing nothing but idling This is not true, as you call to the main thread for display updates. On Mar 31, 2008, at 12:28 PM, Mike wrote: But my question is: w

Re: Threads and Core Data, bindings results in view corruption

2008-03-31 Thread Ben Lachman
On Mar 31, 2008, at 2:47 PM, Jeff LaMarche wrote: On Mar 31, 2008, at 2:36 PM, David wrote: On Mon, Mar 31, 2008 at 2:26 PM, Jeff LaMarche <[EMAIL PROTECTED]> wrote: 4) You can, as Ben mentioned, use performSelector:onMainThread: to actually have the object inserted on the main thread's co

Re: Main Thread UI and Detached Thread

2008-03-31 Thread Ken Victor
At 1:08 PM -0700 3/31/08, [EMAIL PROTECTED] wrote: Date: Mon, 31 Mar 2008 12:20:41 -0700 From: Mike <[EMAIL PROTECTED]> Subject: Re: Main Thread UI and Detached Thread To: Apple Cocoa List Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=ISO-8859-1; format=flowed I have two met

Re: libpq prepared statement

2008-03-31 Thread Keary Suska
on 3/31/08 1:44 PM, [EMAIL PROTECTED] purportedly said: > PQprepare *statement = PQPrepare(theConnection, "stmtname", "SELECT * > FROM admin WHERE id = %s", 1, [theUUID]); Yes--it not even close. The libpq prototype is: PGresult *PQprepare(PGconn *conn, const char *stmtName, const char *query, i

Re: outlineViewSelectionDidChange not called

2008-03-31 Thread Jonathan Dann
Hi Adam, I've found that programmatically changing the selection using the tree controller's -setSelectionIndexPath(s): will always send the NSOutlineViewSelectionDidChangeNotification, you might want to have a look here http://www.wilshipley.com/blog/2006/04/pimp-my-code-part-10-whining-

Re: Network notifications

2008-03-31 Thread Hamish Allan
On Mon, Mar 31, 2008 at 8:47 PM, Randall Meadows <[EMAIL PROTECTED]> wrote: > The two apps that are going to be communicating* will have similar, > though not identical life times. In general, my app is going to be > launched first, and will be gathering data; the remote app will likely > com

Re: NSPredicate and Arrays

2008-03-31 Thread Keary Suska
on 3/31/08 1:41 PM, [EMAIL PROTECTED] purportedly said: > ArrayOfFoos: > Foo: (Custom Object) > Bars: (NSArray *)Bar: (Custom Object) > Baz = 1 (int Property on custom object) > Bar: > Baz = 3 > ... > Foo:Bars:

Bindings for NSComboBox?

2008-03-31 Thread David Springer
All, I'm having trouble setting up the bindings for my NSComboBox. I bind the NSComboBox's content to NSArrayController's arrangedObjects. This works fine. Now, I want to add to the content array when you enter a new string into the combo box. Say, for example, I start with an array of @"file

Re: Threads and Core Data, bindings results in view corruption

2008-03-31 Thread David
I found a post with a solution similar to what I was asking about, http://lists.apple.com/archives/student-dev/2006/Jun/msg00104.html Essentially he proposed to maintain multiple mocs in sync using an in memory persistent store. But I worry that that will be too slow and consume excessive memory. _

remote debugging between ppc & intel

2008-03-31 Thread Daniel Child
I have a project that is going to require remote debugging, and I am wondering if there are any restrictions on remote debugging between a PowerPC Mac and one of the newer Intel machines. Apple's documentation makes no mention of this other than for the case of panic kernels. Can one comp

Re: Returning values from objc_msgSend etc

2008-03-31 Thread Sherm Pendley
On Mon, Mar 31, 2008 at 1:03 PM, Greg Parker <[EMAIL PROTECTED]> wrote: > On Mar 31, 2008, at 8:34 AM, Sherm Pendley wrote: > > On Sat, Mar 1, 2008 at 9:00 AM, Greg Parker <[EMAIL PROTECTED]> wrote: > >> > >> I don't think libffi does any type promotion. > > > > ffi_call(3) says: > "rvalue must po

Re: libpq prepared statement

2008-03-31 Thread Andrew Farmer
On 31 Mar 08, at 12:44, Justin Giboney wrote: p.s. why is it that Apple has no documentation on having Cocoa work with Databases? Try typing in "mysql" or "postgresql" in the search box of this page http://developer.apple.com/cocoa/ while restricting it to cocoa. Do they not want business to

linked list problem

2008-03-31 Thread Nick Rogers
Hi, I have the following singly linked list: typedef struct Dir { // some space to hold data here void *next; // have to take void * here cause Dir* leads to compile error }DIR; In my code: DIR *temp = parentDir; //parentDir is allocated initially but its next is not allocated at

Re: Threads and Core Data, bindings results in view corruption

2008-03-31 Thread Ben Trumbull
At 4:05 PM -0400 3/31/08, Ben Lachman wrote: You also should try using an SQLite store. It will be faster than a binary store for saving incrementally since it only touches part(s) of the file. Binary store ? Binary store ? The xml, binary, and custom atomic stores are all atomic. The entir

Re: Problem with setting color in NSBitmapImageRep

2008-03-31 Thread Jean-Daniel Dupas
Don't know why you got this problem, but if I had to fill a bitmap using a simple gradient, i would probably use either CGGradient (Leopard required) or CGShading (if you want a greater control of the shading function, etc…). It can be done like this: NSGraphicsContext *ctxt = [NSGraphicsC

Re: linked list problem

2008-03-31 Thread stephen joseph butler
On Mon, Mar 31, 2008 at 4:31 PM, Nick Rogers <[EMAIL PROTECTED]> wrote: > Hi, > I have the following singly linked list: > > typedef struct Dir > { >// some space to hold data here >void *next; // have to take void * here cause Dir* leads to > compile > error > }DIR; It won't

Re: Threads and Core Data, bindings results in view corruption

2008-03-31 Thread Ben Trumbull
At 4:05 PM -0400 3/31/08, Ben Lachman wrote: If you needed to do further work on that entity, like adding relationships to it, then it would get to be trickier, as you'd also need to get its managedObjectID back to your thread. Actually this isn't true. You can add relationships, etc. without

Cocoa GUI app invocation from CLI with arguments

2008-03-31 Thread Mac QA
Hi, In the past I have written a few little Cocoa programs that when double-clicked are opened in GUI mode, or can also be invoked from the CLI by passing in a few arguments. In those situations when invoking from the CLI I never actually displayed a GUI, but just performed the same core functiona

Re: linked list problem

2008-03-31 Thread Andrew Farmer
On 31 Mar 08, at 14:39, stephen joseph butler wrote: On Mon, Mar 31, 2008 at 4:31 PM, Nick Rogers <[EMAIL PROTECTED]> wrote: In my code: DIR *temp = parentDir; //parentDir is allocated initially but its next is not allocated at this point while (temp) { temp = (DIR*)temp->next;//

Re: Simple menu-action question

2008-03-31 Thread Rick Mann
On Mar 30, 2008, at 7:58 PM, Graham Cox wrote: I'm not sure if using Core Data would make a difference, but I'd just do this by responding to the menu command by putting up an NSOpenPanel then processing the filename it returns appropriately. I don't think there's any magic "proper" way to

Re: Cocoa GUI app invocation from CLI with arguments

2008-03-31 Thread Jean-Daniel Dupas
You can get cli arguments at anytime using NSProcessInfo. - [[NSProcessInfo processInfo] arguments]; So just get them in -applicationDidFinishLaunching or in -awakeFromNib and do what you need with them. Le 1 avr. 08 à 00:18, Mac QA a écrit : Hi, In the past I have written a few little

Re: linked list problem

2008-03-31 Thread Jean-Daniel Dupas
Le 1 avr. 08 à 00:19, Andrew Farmer a écrit : On 31 Mar 08, at 14:39, stephen joseph butler wrote: On Mon, Mar 31, 2008 at 4:31 PM, Nick Rogers <[EMAIL PROTECTED]> wrote: In my code: DIR *temp = parentDir; //parentDir is allocated initially but its next is not allocated at this point while

Re: Cocoa GUI app invocation from CLI with arguments

2008-03-31 Thread Jens Alfke
On 31 Mar '08, at 3:18 PM, Mac QA wrote: Can anyone suggest how, when invoked from the CLI, I can throw up my existing GUI and then fill in the values from the CLI into the corresponding fields of the GUI. You can get the command-line arguments as [[NSProcessInfo processInfo] arguments].

Re: Simple menu-action question

2008-03-31 Thread Hamish Allan
On Mon, Mar 31, 2008 at 11:29 PM, Rick Mann <[EMAIL PROTECTED]> wrote: > It's easy enough to make my app open more document types, but that > doesn't really get at the core of the problem...how does one add > fundamental commands similar to Open? They're targeted at the first > responder, and

Re: Cocoa GUI app invocation from CLI with arguments

2008-03-31 Thread Mac QA
On 3/31/08, Jean-Daniel Dupas <[EMAIL PROTECTED]> wrote: > > You can get cli arguments at anytime using NSProcessInfo. > > - [[NSProcessInfo processInfo] arguments]; Awesome! This looks to be a much better method than parsing argv inside main before calling NSApplicationMain, which is what I've

Re: libpq prepared statement

2008-03-31 Thread Scott Ribe
These are _very_ basic C (and Objective-C) questions. 1) An NSString is a Cocoa Objective-C class. It is not a char* C string. Whether you need to have your UUID as a char* throughout the code, or whether you need to start with an NSString* and extract a char* for use with libpq depends on the big

Re: Cocoa GUI app invocation from CLI with arguments

2008-03-31 Thread Chris Suter
On 01/04/2008, at 9:40 AM, Mac QA wrote: On 3/31/08, Jean-Daniel Dupas <[EMAIL PROTECTED]> wrote: You can get cli arguments at anytime using NSProcessInfo. - [[NSProcessInfo processInfo] arguments]; Awesome! This looks to be a much better method than parsing argv inside main before calling

Re: Simple menu-action question

2008-03-31 Thread Rick Mann
On Mar 31, 2008, at 3:36 PM, Hamish Allan wrote: In a document-based application, the document controller does. See http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSDocumentController_Class/Reference/Reference.html#/ /apple_ref/occ/instm/NSDocumentController/ope

Re: Simple menu-action question

2008-03-31 Thread Rick Mann
Sorry, just read a bit more, and see what I was missing. I thought NSDocumentController was an NSDocument. I have one more question about that that I'm going to try to answer for myself, if not I'l post. Thanks! On Mar 31, 2008, at 3:36 PM, Hamish Allan wrote: In a document-based applicati

[Student-Jobs]: GNUstep looking for Google Summer of Code participants

2008-03-31 Thread Lars Sonchocky-Helldorf
Google Summer of Code is a program that offers student developers stipends to write code for various open source projects. http://code.google.com/soc/2008/ http://code.google.com/opensource/gsoc/2008/faqs.html#0.1_what_is The GNUstep project is participating the second time in Google Summer

Re: Bloated NIB files

2008-03-31 Thread Jonathan Hess
Hey Andreas - What version of IB are you using? Also what objects are using the images? Maybe you could delete sections of the document and save and compare files sizes so that you can find the objects that are embedding the TIFF images directly in the archive. Perhaps they are coming fro

Re: Simple menu-action question

2008-03-31 Thread Graham Cox
On 1 Apr 2008, at 9:29 am, Rick Mann wrote: Well, I guess it's a separate argument as to whether or not "Import" should be used instead of "Open". I tend to think of "Import" as being used to add to an existing document's data (creating one if none exists), and for data types that are not "

window stay on top

2008-03-31 Thread Torsten Curdt
Hey guys, How do I make a window to always stay on top? Have been searching and just can't seem to find the NSWindow property for it. Or is it more complicated? cheers -- Torsten ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do n

Saving NSManagedObject in Core-Data

2008-03-31 Thread malcom
Hello to all! What's the correct way in Core Data to save a stream of data? This is the problem. Suppose to have lots of packets each of these can be linked to a parent and could have one or more childrens. You can receive these packets ordered (so you can receive the parent of message only in a me

Re: Simple menu-action question

2008-03-31 Thread Joel Norvell
Hi Rick, The Sketch example program (Developer->Examples->AppKit->Sketch) adds some menu commands. I used it as an example when I was puzzling out how to add a menu item with new commands and then handle those commands in my first app. Hope this helps, Joel _

Re: window stay on top

2008-03-31 Thread Nick Zitzmann
On Mar 31, 2008, at 6:00 PM, Torsten Curdt wrote: How do I make a window to always stay on top? Try setting its level to NSFloatingWindowLevel. Alternately, try using NSPanel instead of NSWindow. Nick Zitzmann ___

Re: Bloated NIB files

2008-03-31 Thread Andreas Schwarz
Thanks for the suggestion; I should have thought of that one myself! But I actually just wrote something to display the embedded TIFFs and discovered they were all various sizes of icons... Turns out the embedded icons all corresponded to those an NSPathControl was showing for the path I ha

Custom interface

2008-03-31 Thread Mr. Gecko
How would I make a custom interface as in making the buttons windows and process bar look different. I need this to give my customers a more clean interface. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests o

Re: window stay on top

2008-03-31 Thread Torsten Curdt
On Apr 1, 2008, at 02:11, Nick Zitzmann wrote: On Mar 31, 2008, at 6:00 PM, Torsten Curdt wrote: How do I make a window to always stay on top? Try setting its level to NSFloatingWindowLevel. Cool - that did the trick! Thanks! cheers -- Torsten

Re: Custom interface

2008-03-31 Thread John Stiles
Basically you get to rewrite all the controls from scratch :) It's not a minor undertaking, so be sure it's worth the effort. Your best bet is to look for open-source code which does what you want, since there are already a ton of open-source Cocoa classes for custom UIs. Also, be sure your c

  1   2   >