Re: Design Question: Where to observe using KVO?

2008-07-10 Thread Ken Thomases
On Jul 10, 2008, at 4:55 PM, Patrick Mau wrote: I'd like to show you one ugly detail. I put all observed objects, including their keyPath in a local NSDictionary, because I have to remove the observers on deletion of a table row. The 'observeObject' looks like that: - (void)observeObject:(id)o

Re: JDBC Frameworks?

2008-07-10 Thread Brett Powley
On 11/07/2008, at 3:10 PM, Tom Jones wrote: Thanks, for the extra info. I'm looking to create a multi-user inventory type application for a customer. They want it custom and to run on Mac OS X. I guess what I'm really going to do is develop the front end in Cocoa and use SOAP for all of

Re: Receive notifications about frontmost application change

2008-07-10 Thread Александр Даровских
I've managed to use carbon events to receive those notifications. It does not require any special privileges and takes just a couple of lines of code to implement. Apple API's a really nice. Sorry for the newbie question and thanks for the solution! On 09.07.2008, at 23:48, Bill Cheeseman wr

Re: JDBC Frameworks?

2008-07-10 Thread Tom Jones
Thanks, for the extra info. I'm looking to create a multi-user inventory type application for a customer. They want it custom and to run on Mac OS X. I guess what I'm really going to do is develop the front end in Cocoa and use SOAP for all of the database communications. thanks again, t

Re: Goofy behavior with CICheckerboardGenerator filter and transparency

2008-07-10 Thread Graham Cox
I don't know the answer to your question, but might I suggest a much easier way to do this? If you create an image of one square of your checkerboard pattern, you can tile it over the view simply by using it as an NSColor and painting it (using [NSColor colorWithPatternImage:]). The same

Goofy behavior with CICheckerboardGenerator filter and transparency

2008-07-10 Thread Randall Meadows
I have an NSImageView subclass that I'm filling with a checkerboard pattern, using this method: - (void)drawRect:(NSRect)aRect { NSColor *nsColor; CIColor *inputColor0, *inputColor1; floatalpha; NSNumber *inputWidth; nsColor = [[[prefsWdw gridColor1] color] colorUsingColorSp

Re: How do I copy a view?

2008-07-10 Thread Philip Dhingra
Sorry, I should've elaborated by "breaks." The application just stops. If I put a break point at that spot, and try stepping over, nothing happens. I can press it over and over again, nothing. On Thu, Jul 10, 2008 at 10:28 PM, Graham Cox <[EMAIL PROTECTED]> wrote: > I assume that UIButton is an i

Re: Design Question: Where to observe using KVO?

2008-07-10 Thread Patrick Mau
I. Savant wrote: >> Check out this page: >> >> http://homepage.mac.com/mmalc/CocoaExamples/controllers.html >> > > I should also mention that you should approach these examples like this: > > 1 - Read the Cocoa Bindings documentation (including all the Key Value > Coding / Key Value Observing r

Re: JDBC Frameworks?

2008-07-10 Thread Jens Alfke
On 10 Jul '08, at 8:30 PM, Phillip Jacobs wrote: You can use Core Data, or if for any reason you're against that or it's not available you can use fmdb. Um, those both use sqlite. Tom is asking about other SQL databases, like MySQL or Oracle. On Jul 10, 2008, at 10:21 PM, Tom Jones wro

Re: Why can't I name a property `tag'?

2008-07-10 Thread Michael Ash
On Thu, Jul 10, 2008 at 2:17 PM, Brian Stern <[EMAIL PROTECTED]> wrote: > So I would add "For best results, you should avoid using any method name > that is already in use unless its return type and parameters are identical > with the already existing method." Certainly true. I find this to be les

Re: delegation strategy

2008-07-10 Thread Michael Ash
On Wed, Jul 9, 2008 at 11:19 AM, Wesley Smith <[EMAIL PROTECTED]> wrote: > Hi list, > I'm trying to provide a particular windowing interface that combines > NSWindow and NSPanel. For the most part I'm using a custom subclass > of NSWindow that adds a decent amount of functionality. Occasionally,

Re: JDBC Frameworks?

2008-07-10 Thread Phillip Jacobs
You can use Core Data, or if for any reason you're against that or it's not available you can use fmdb. -Phillip On Jul 10, 2008, at 10:21 PM, Tom Jones wrote: Hmm, this is really a shame. I guess I was just looking for a good framework to use to connect to a database. I think this is a big

Re: garbage collection and NSConnection

2008-07-10 Thread Michael Ash
On Thu, Jul 10, 2008 at 7:33 PM, Marcel Weiher <[EMAIL PROTECTED]> wrote: > > On Jul 10, 2008, at 9:50 , Michael Ash wrote: > >> On Thu, Jul 10, 2008 at 12:17 PM, Marcel Weiher <[EMAIL PROTECTED]> >> wrote: >>> >>> [hash tables not generally used + internal refcounts] > >> Atomic updates are still

Re: How do I copy a view?

2008-07-10 Thread Graham Cox
I assume that UIButton is an iPhone class. Well, we can't talk about that... If it were an NSView, archiving works for copying views, but maybe UIButtons aren't archivable? (Guessing, obviously). When you say it "breaks" what do you mean if you get no error message? Graham On 11 Jul 200

Re: JDBC Frameworks?

2008-07-10 Thread Tom Jones
Hmm, this is really a shame. I guess I was just looking for a good framework to use to connect to a database. I think this is a big hole that Apple should really fill. It would be really cool if we could connect to other databases rather than just SQLite. Thanks, tom On Jul 10, 2008, at

How do I copy a view?

2008-07-10 Thread Philip Dhingra
I'm trying to add a copy of a view as a subview to the parent view. This is what I tried: UIButton* firstButton = [[UIButton alloc] initWithFrame:CGRectMake(0,0,360, 360)]; NSData *btnData = [NSArchiver archivedDataWithRootObject:firstButton]; // Breaks Here [parentView addSubview:firstButton];

Re: Setting Finder comments and keywords

2008-07-10 Thread Adam R. Maxwell
On Jul 10, 2008, at 5:29 PM, Chris Idou wrote: How does one programmatically change Finder comments and keywords? I found this comment about MDItemSetAttribute... [...] The other suggestion I've seen is to send Apple events to the Finder to change these things. Since I'm writing a backgro

Setting DPI of image data

2008-07-10 Thread Graham Cox
I'm using NSBitMapImageRep's -representationUsingType:properties: method to convert data to JPEG, TIFF, etc. I'd like to be able to specify the DPI of the image. I can calculate the right number of pixels needed for a given DPI OK, but the image always comes up as having 72 dpi when opened

Re: Any good advice for naming parameters of init methods?

2008-07-10 Thread William Xu
Jens Alfke <[EMAIL PROTECTED]> writes: > With any naming convention, the possible problem is a conflict with a name in > a > superclass. Apple's Cocoa frameworks tend to use a "_" prefix for both ivars > and private method names. How about using "_" as postfix then? Like `this_one_'. I find go

Re: Extracting text elements from an Image

2008-07-10 Thread Scott Anguish
On Jul 10, 2008, at 10:48 PM, Devraj Mukherjee wrote: Hi all, I am writing an application that deals with images that have bits of textual information in them (so say a serial number, these images are medical scans etc). The text is usually well defined and are primarily numbers. Does CoreIma

Extracting text elements from an Image

2008-07-10 Thread Devraj Mukherjee
Hi all, I am writing an application that deals with images that have bits of textual information in them (so say a serial number, these images are medical scans etc). The text is usually well defined and are primarily numbers. Does CoreImage or OpenGL provide any APIs that will let me match shape

Re: Such a newbie question that I'm embarrassed to ask it :-)

2008-07-10 Thread Chris Suter
On 11/07/2008, at 12:36 PM, Dale Jensen wrote: I have the need to modify a menu item title, so I: a) Added a tag to the menu item in IB (selected the menu item, then went to the first "tab" of the Inspector, and added a number in the "Tag" field. I tried both 99 and 1). b) Added this cod

Such a newbie question that I'm embarrassed to ask it :-)

2008-07-10 Thread Dale Jensen
I have the need to modify a menu item title, so I: a) Added a tag to the menu item in IB (selected the menu item, then went to the first "tab" of the Inspector, and added a number in the "Tag" field. I tried both 99 and 1). b) Added this code to my function: NSMenu *mainMenu = [NSApp ma

Re: JDBC Frameworks?

2008-07-10 Thread Nick Zitzmann
On Jul 10, 2008, at 7:42 PM, Tom Jones wrote: I would like to write a app to be able to talk to a couple of different types of databases (MySQL, Oracle). I'm thinking that JDBC is the way to go. Does anyone know of any JDBC frameworks and examples that you can point me towards, I cant seem

Re: JDBC Frameworks?

2008-07-10 Thread Marcelo Alves
Well, Java-Cocoa Bridge is deprecated and not supported on 10.5. You can use PyObjC, RubyCocoa, Perl, etc. On 10/07/2008, at 22:14, Tom Jones wrote: Hello, I would like to write a app to be able to talk to a couple of different types of databases (MySQL, Oracle). I'm thinking that JDB

[Moderator] iPhone SDK is still under NDA - Do not discuss openly.

2008-07-10 Thread Cocoa Dev Admins
Until an announcement is made otherwise, developers should be aware that the iPhone SDK is still under non-disclosure. It can't be discussed here, or anywhere publicly. This includes other mailing lists, forums, and definitely blogs. This situation is somewhat different than a Mac OS X rele

JDBC Frameworks?

2008-07-10 Thread Tom Jones
Hello, I would like to write a app to be able to talk to a couple of different types of databases (MySQL, Oracle). I'm thinking that JDBC is the way to go. Does anyone know of any JDBC frameworks and examples that you can point me towards, I cant seem to really find much. Thanks, tom _

Setting Finder comments and keywords

2008-07-10 Thread Chris Idou
How does one programmatically change Finder comments and keywords? I found this comment about MDItemSetAttribute... http://www.cocoadev.com/index.pl?SpotlightAndTagging which seems to say that if you use MDItemSetAttribute the changes will get blown away on a spotlight rebuild. I could understa

Re: Dynamic Tooltips

2008-07-10 Thread Graham Cox
Hi Jeff, I do something like this in numerous places in DrawKit to show the instantaneous positions, angles and sizes of objects, guides, etc. I use a custom window that emulates the tooltip appearance which gives me a lot of additional flexibility, but it's a pretty simple class. Using i

NSOutlineView hiding a column while editing a row in another column

2008-07-10 Thread casa
I have a NSOutlineView which I want to make several columns hidden in response to a user action. I have set up the outlineColumn to resize with table and the rest have fixed size, so that when one or more columns are hidden, the outlineColumn widens accordingly. In normal conditions everyt

Re: Storing structured data in file - any easy way?

2008-07-10 Thread Chris Hanson
On Jul 10, 2008, at 6:09 AM, Jules Colding wrote: I'm trying to figure out how to write and read structured data to a specific file. I have a very bad feeling that the answer is Core Data, but I'm feeling totally at lost after having been reading up on Core Data for a couple of days by now.

Re: Problem copying pdfImageRep to bitmapRep. [SOLVED]

2008-07-10 Thread Graham Cox
Thanks Heinrich, that was the key to it. (Sometimes it pays to quit and sleep rather than try and solve "one more thing" before closing down ;-) Working well now - I adapted my code as follows: - (NSBitmapImageRep*) bitmapWithResolution:(int) dpi { NSPDFImageRep* pdfRep = [NSPDFI

JDBC Frameworks?

2008-07-10 Thread Tom Jones
Hello, I would like to write a app to be able to talk to a couple of different types of databases (MySQL, Oracle). I'm thinking that JDBC is the way to go. Does anyone know of any JDBC frameworks and examples that you can point me towards, I cant seem to really find much. Thanks, tom _

Re: the 11th can't come soon enough :-)

2008-07-10 Thread Scott Anguish
That isn't an official announcement. Having just checked, there is no news on this front. Developers who have downloaded the SDK are still under non-disclosure. The SDK is still not to be discussed publicly. Given that the development environment doesn't ship with the iPhone OS, this is a b

Re: XCode3 for Persistent Data on Tiger

2008-07-10 Thread Jens Alfke
On 10 Jul '08, at 3:46 PM, John Velman wrote: Thanks, Jens. I see that by selecting the SCM Menu item, and under that, "Configure SCM for this project" I find that I've actually set the SDK to 10.4 and the architectures to ppc and i386. Oh I see, that's why you were referring to SCM! Tha

Re: Why can't I name a property `tag'?

2008-07-10 Thread Bill Bumgarner
On Jul 10, 2008, at 4:25 PM, Matt Burnett wrote: But most of the time compound statements makes code easier to read. Why do you think apple included valueForKeyPath instead of only valueForKey? The two are completely unrelated. Key-Value Coding has all kinds of behaviors and heuristics abov

Re: XCode3 for Persistent Data on Tiger

2008-07-10 Thread John Velman
Thanks, Jens. I see that by selecting the SCM Menu item, and under that, "Configure SCM for this project" I find that I've actually set the SDK to 10.4 and the architectures to ppc and i386. Probably couldn't have found this without your info. Thanks, John V. On Thu, Jul 10, 2008 at 01:54:22P

Re: KVO: Observing an aggregate property of a collection?

2008-07-10 Thread Chris Suter
On 11/07/2008, at 7:46 AM, Jens Alfke wrote: How do I set up key-value observing of an aggregate property over an array, like a sum? Say I have a Bulb class with a boolean "lit" property. I have an NSArrayController with an array of Bulbs, being shown in a table view. To compute the numb

Re: garbage collection and NSConnection

2008-07-10 Thread Marcel Weiher
On Jul 10, 2008, at 9:50 , Michael Ash wrote: On Thu, Jul 10, 2008 at 12:17 PM, Marcel Weiher <[EMAIL PROTECTED] > wrote: [hash tables not generally used + internal refcounts] Atomic updates are still a pretty big hit on a multiprocessor system (all of them, these days), Yes, they're defi

Re: Best way to handle background i/o and notify main UI thread

2008-07-10 Thread Chris Irvine
On Jul 1, 2008, at 4:27 PM, Jean-Daniel Dupas wrote: Le 2 juil. 08 à 01:24, Chris Irvine a écrit : On Jul 1, 2008, at 3:17 PM, Douglas Davidson wrote: On Jul 1, 2008, at 3:11 PM, Chris Irvine wrote: I've been doing a lot of reading about this, but I still don't feel like I have a conc

Re: Why can't I name a property `tag'?

2008-07-10 Thread Matt Burnett
But most of the time compound statements makes code easier to read. Why do you think apple included valueForKeyPath instead of only valueForKey? On Jul 10, 2008, at 10:26 AM, Graham Cox wrote: There's no real performance advantage to huge compound statements, and they definitely make code h

Re: Intercepting Apple Events

2008-07-10 Thread Michael Hall
On Jul 10, 2008, at 12:24 PM, Elan Feingold wrote: Hi, I'm writing an application that would like to intercept Apple Events sent to iTunes, and possibly even reply with its own replies (say, if iTunes isn't running). Is such a thing possible? A very limited way might be with the debug en

Re: Drawing issues in custom view

2008-07-10 Thread I. Savant
Not to worry, just realised what is happening. drawRect: gets called for ALL drawing operations in the view, not just background as I expected. More specifically, -drawRect: gets called (by the system) for the rect (of your view) that needs redrawn. It's up to you to 'do the right thing

NSOutlineView hiding a column while editing a row in another column

2008-07-10 Thread Joan Lluch (casa)
I have a NSOutlineView which I want to make several columns hidden in response to a user action. I have set up the outlineColumn to resize with table and the rest have fixed size, so that when one or more columns are hidden, the outlineColumn widens accordingly. In normal conditions everyt

Re: Drawing issues in custom view

2008-07-10 Thread Michael Ash
On Thu, Jul 10, 2008 at 12:30 PM, Jason Wiggins <[EMAIL PROTECTED]> wrote: > Not to worry, just realised what is happening. drawRect: gets called for ALL > drawing operations in the view, not just background as I expected. > Carry on... This is not really true. What's happening is that your subvie

Re: Intercepting Apple Events

2008-07-10 Thread Michael Hall
On Jul 10, 2008, at 12:24 PM, Elan Feingold wrote: Hi, I'm writing an application that would like to intercept Apple Events sent to iTunes, and possibly even reply with its own replies (say, if iTunes isn't running). Is such a thing possible? I just remembered this one from the applescri

Re: Mini Popup Window (Like iCal)

2008-07-10 Thread Markus Spoettl
On Jul 10, 2008, at 11:33 AM, Seth Willits wrote: Has anyone created a custom window like the event info editor in iCal in 10.5? There's a few things I'm not sure how to do: 1) Drawing the window background gradient is pretty straightforward, but creating the thin border on the window is not

Re: the 11th can't come soon enough :-)

2008-07-10 Thread Jeff Johnson
On Jul 10, 2008, at 2:50 PM, Scott Anguish wrote: On Jul 10, 2008, at 2:26 PM, John Zorko wrote: ... s many questions I have, mostly to do with media APIs. I'm bursting at the seams with inquiries, and I look very forward to being able to discuss them with others :-) Please do no

KVO: Observing an aggregate property of a collection?

2008-07-10 Thread Jens Alfke
How do I set up key-value observing of an aggregate property over an array, like a sum? Say I have a Bulb class with a boolean "lit" property. I have an NSArrayController with an array of Bulbs, being shown in a table view. To compute the number of lit bulbs I can do: - (unsigned)

Re: XCode3 for Persistent Data on Tiger

2008-07-10 Thread Jens Alfke
On 10 Jul '08, at 10:19 AM, John Velman wrote: If I set the SCM options properly, and use XCode3, following steps as outlined in the NSPersistentDocument CoreDataUtilityTutorial (but setting the SCM options for 10.4), am I going to get there? If you mean SDK, not SCM, then the answer is "y

Re: Dynamic Tooltips

2008-07-10 Thread Todd Ransom
Jeff, You can do this but you will need to implement the tooltips yourself using tracking rects (or maybe you can just do it in mouseDown:, I have only done it for cell-based custom views, not sliders) and a custom window class for the tooltips. A tooltip window implementation to start wi

Re: Intercepting Apple Events

2008-07-10 Thread Jens Alfke
On 10 Jul '08, at 10:24 AM, Elan Feingold wrote: I'm writing an application that would like to intercept Apple Events sent to iTunes, and possibly even reply with its own replies (say, if iTunes isn't running). Is such a thing possible? I'm pretty certain it's not. Such a service would pre

Re: Storing structured data in file - any easy way?

2008-07-10 Thread Jens Alfke
On 10 Jul '08, at 11:29 AM, Jules Colding wrote: Assume that I want to store the set {"HI", "HELLO"}. At one point I want to be able to use "HI" as key and get "HELLO". At another point I want to use "HELLO" as key and get "HI". There are several trivial ways to do this. I could use two

Re: Problem copying pdfImageRep to bitmapRep.

2008-07-10 Thread Heinrich Giesen
On 10.07.2008, at 20:19, Graham Cox wrote: I want to render pdf data into a bitmap as part of an export conversion. My pdf data is good (I can save it as a pdf file and that comes up OK). My bitmap is good, but it's blank. follows the code . If I understand the code and what you

Re: Design Question: Where to observe using KVO?

2008-07-10 Thread I. Savant
> Check out this page: > > http://homepage.mac.com/mmalc/CocoaExamples/controllers.html > I should also mention that you should approach these examples like this: 1 - Read the Cocoa Bindings documentation (including all the Key Value Coding / Key Value Observing related documentation). 2 - Exam

Re: Design Question: Where to observe using KVO?

2008-07-10 Thread I. Savant
> Where would you observe changes to data? I think you should worry about one thing at a time (ie, leave the animation part for another day and concentrate on your bindings machinery first). Check out this page: http://homepage.mac.com/mmalc/CocoaExamples/controllers.html Great examples of B

Re: Why can't I name a property `tag'?

2008-07-10 Thread Uli Kusterer
On 10.07.2008, at 21:29, Michael Ash wrote: I can't find any particular pattern to it, but it's clear that it's a bug, not a deliberate omission. I recommend you file a bug with Apple. Your warnings kinda remind me of type promotion. Ints get promoted to floats, etc. Cheers, -- Uli Kuster

Re: Why can't I name a property `tag'?

2008-07-10 Thread Michael Ash
On Thu, Jul 10, 2008 at 3:29 PM, Michael Ash <[EMAIL PROTECTED]> wrote: > I recommend you file a bug with Apple. And to put my money where my mouth is, I've filed this bug as rdar://6066914 Anyone who's interested in playing with this further may find this python program useful: #!/usr/bin/pytho

Re: the 11th can't come soon enough :-)

2008-07-10 Thread Scott Anguish
On Jul 10, 2008, at 2:26 PM, John Zorko wrote: ... s many questions I have, mostly to do with media APIs. I'm bursting at the seams with inquiries, and I look very forward to being able to discuss them with others :-) Please do not assume that the iPhone SDK will be something that

delegation strategy

2008-07-10 Thread Wesley Smith
Hi list, I'm trying to provide a particular windowing interface that combines NSWindow and NSPanel. For the most part I'm using a custom subclass of NSWindow that adds a decent amount of functionality. Occasionally, I want to make use of NSPanel (for the NSUtilityWindowMask style flag) and I'd li

Re: Why can't I name a property `tag'?

2008-07-10 Thread Steve Bird
On Jul 10, 2008, at 3:29 PM, Michael Ash wrote: On Thu, Jul 10, 2008 at 11:52 AM, Graham Cox <[EMAIL PROTECTED]> wrote: Actually it doesn't emit a warning. If you recall my problem a few weeks ago with: - (float) position; vs. - (int) position; the compiler sailed blithely on without a m

Re: Why can't I name a property `tag'?

2008-07-10 Thread Randall Meadows
On Jul 10, 2008, at 1:29 PM, Michael Ash wrote: Some experimentation reveals that the compiler is "merely" extremely inconsistent about when it warns. For example, int and void warns, float and void warns, but float and int does not. Double and int warns, double and float warns, but int and id d

Re: Why can't I name a property `tag'?

2008-07-10 Thread Michael Ash
On Thu, Jul 10, 2008 at 11:52 AM, Graham Cox <[EMAIL PROTECTED]> wrote: > Actually it doesn't emit a warning. > > If you recall my problem a few weeks ago with: > > - (float) position; > > vs. > > - (int) position; > > the compiler sailed blithely on without a mention, generating code that > smashe

Re: Storing structured data in file - any easy way?

2008-07-10 Thread Jules Colding
Hi again, On 10/07/2008, at 20.29, Jules Colding wrote: On 10/07/2008, at 15.18, Graham Cox wrote: Sounds like you want to do archiving - it can handle all the object relationships you mention. Check out NSKeyedArchiver and the NSCoding protocol. http://developer.apple.com/documentation/

Re: Any good advice for naming parameters of init methods?

2008-07-10 Thread Ricky Sharp
On Jul 10, 2008, at 11:19 AM, glenn andreas wrote: The problem is that while when you recompile you'll see the conflict, for existing users (who won't be compiling from source), if they use KVC they'll have the problem. @interface NSFoo { id _reserved; } @end @interface MyFoo: NSFo

Re: the 11th can't come soon enough :-)

2008-07-10 Thread Ricky Sharp
... s many questions I have, mostly to do with media APIs. I'm bursting at the seams with inquiries, and I look very forward to being able to discuss them with others :-) Please wait until an official communication comes from Apple. The NDA may still be in place even after the 11th.

[OT] Re: Any good advice for naming parameters of init methods?

2008-07-10 Thread Jeff Johnson
If you have a property "value" in your subclass (using the term 'property' loosely, not in the Objective-C 2.0 sense), and Apple adds the property "value" to the superclass, you're probably going to be hosed in one way or another. For example, if Apple adds the _value ivar, they're also lik

Re: dataWithPDFInsideRect: ignores alpha of a shading?

2008-07-10 Thread David Duncan
On Jul 10, 2008, at 5:47 AM, Graham Cox wrote: I've noticed that when generating PDF data from a view with - dataWithPDFInsideRect:, transparent flat colours work OK, but gradients (CGShading) that have some colours that are not 100% opaque are not recorded correctly (the alpha is ignored an

Mini Popup Window (Like iCal)

2008-07-10 Thread Seth Willits
Has anyone created a custom window like the event info editor in iCal in 10.5? There's a few things I'm not sure how to do: 1) Drawing the window background gradient is pretty straightforward, but creating the thin border on the window is not. I'm concerned about not being getting it "thi

Dynamic Tooltips

2008-07-10 Thread jeffs87
Hi, I have a slider and while dragging I want to have a tooltip show the current value of the slider and have the tooltip follow the mouse position. GarageBand does this for volume and pan. I've looked around and it doesn't look like you can do it in Cocoa. In Carbon you can do it with HMD

Re: Storing structured data in file - any easy way?

2008-07-10 Thread Jules Colding
Hi Graham, On 10/07/2008, at 15.18, Graham Cox wrote: Sounds like you want to do archiving - it can handle all the object relationships you mention. Check out NSKeyedArchiver and the NSCoding protocol. http://developer.apple.com/documentation/Cocoa/Conceptual/Archiving/Concepts/archives.ht

the 11th can't come soon enough :-)

2008-07-10 Thread John Zorko
... s many questions I have, mostly to do with media APIs. I'm bursting at the seams with inquiries, and I look very forward to being able to discuss them with others :-) Regards, John Falling You - exploring the beauty of voice and sound http://www.fallingyou.com

Re: Any good advice for naming parameters of init methods?

2008-07-10 Thread glenn andreas
On Jul 10, 2008, at 11:06 AM, Jens Alfke wrote: On 10 Jul '08, at 8:52 AM, Sean McBride wrote: On 7/11/08 12:38 AM, Graham Cox said: What I would suggest though is that you adopt a naming convention for your instance variables (ivars) that consistently flag them as such. Some people use

I cannot add a (system) framework to a Cocoa Application

2008-07-10 Thread Anders Sommer Lassen
Hi, I have problem adding frameworks to standard Cocoa Application projects. When I add a framwork the header files are not included. That is, there is no header folder beneath the framework icon. This is very odd, because when I read documentation and search on the internet, I can see tha

Re: Why can't I name a property `tag'?

2008-07-10 Thread Brian Stern
On Jul 10, 2008, at 12:44 PM, Michael Ash wrote: On Thu, Jul 10, 2008 at 9:49 AM, an0 <[EMAIL PROTECTED]> wrote: Thanks. But isn't it annoying for XCode to pretend to know something for sure while in fact it is just a wrong guess? At least the warning is very misleading. The warning isn't mi

Re: Why can't I name a property `tag'?

2008-07-10 Thread Bill Bumgarner
On Jul 10, 2008, at 8:55 AM, an0 wrote: Sure. I'm grateful that you tell me the internal truth instead of confusing me even more by just saying it is my responsibility to tell compiler more. But if different return types cause different native code, how could my program still work with the mistak

Re: Why can't I name a property `tag'?

2008-07-10 Thread Joan Lluch (casa)
Joan Lluch El 10/07/2008, a las 18:29, Graham Cox escribió: Well, that's the weird thing. I wasn't getting that warning. I was including both headers, my own usage explicitly using #import, and all of Cocoa implictly using the precompiled headers. I wonder if that's how the compiler fails

Intercepting Apple Events

2008-07-10 Thread Elan Feingold
Hi, I'm writing an application that would like to intercept Apple Events sent to iTunes, and possibly even reply with its own replies (say, if iTunes isn't running). Is such a thing possible? Many thanks, -elan ___ Cocoa-dev mailing list (Cocoa-

XCode3 for Persistent Data on Tiger

2008-07-10 Thread John Velman
I'm new to Mac, Objective C and XCode, but comfortable what I've seen seen and tried so far. I am confident I could complete my project except for the question of developing on Leopard, running on Tiger. I want to develop an app with persistent data on my intel iMac running Leopard that will run o

Re: NSTableView prematurely posts selection changed notification

2008-07-10 Thread Joan Lluch (casa)
El 10/07/2008, a las 5:21, Graham Cox escribió: When my app starts up, it opens a floating window containing a table view. As the table is brought to life from the Nib, it posts a "selection changed" notification to its delegate. At that time it hasn't had its data initialised from the da

Re: Why can't I name a property `tag'?

2008-07-10 Thread Jean-Daniel Dupas
That's odd. I did some test. It does not require any warning flags, but for an undefined reason, gcc does not considere that int and float are incompatibles. if you have int and short, int and double, int and long long, int and NSSize, int and , it logs a warning, but int and float is s

Re: garbage collection and NSConnection

2008-07-10 Thread Michael Ash
On Thu, Jul 10, 2008 at 12:17 PM, Marcel Weiher <[EMAIL PROTECTED]> wrote: > Some minor factual corrections: > > > On Jul 2, 2008, at 18:33 , Michael Ash wrote: > >> In Cocoa you do lots of retaining and releasing. These operations >> aren't free. They involve a lookup into a global hash table and

Re: Why can't I name a property `tag'?

2008-07-10 Thread Michael Ash
On Thu, Jul 10, 2008 at 9:49 AM, an0 <[EMAIL PROTECTED]> wrote: > Thanks. But isn't it annoying for XCode to pretend to know something > for sure while in fact it is just a wrong guess? At least the warning > is very misleading. The warning isn't misleading at all. Xcode is not pretending anything

Re: Printing a Webview

2008-07-10 Thread Frédéric Testuz
Hello, If your have : WebView *myView; Don't print myView, but print [[[myView mainFrame] frameView] documentView]. Consider WebView and frameView like NSScrolView. You don't want to print the scroll view but its content. Frédéric Testuz Le 10 juil. 08 à 17:44, Western Botanicals a écr

Re: Drawing issues in custom view

2008-07-10 Thread Jason Wiggins
Not to worry, just realised what is happening. drawRect: gets called for ALL drawing operations in the view, not just background as I expected. Carry on... Regards, Jason On 11/07/2008, at 1:38 AM, Jason Wiggins wrote: Hi everyone, I have a Custom View in IB with an rounded NSTokenField

Re: Why can't I name a property `tag'?

2008-07-10 Thread Graham Cox
Well, that's the weird thing. I wasn't getting that warning. I was including both headers, my own usage explicitly using #import, and all of Cocoa implictly using the precompiled headers. I wonder if that's how the compiler fails to notice the ambiguity - because of one being in a precompil

Problem copying pdfImageRep to bitmapRep.

2008-07-10 Thread Graham Cox
OK, it's very late (2.18 am) and I'm almost cross-eyed with fatigue.. but I just can't see what I'm doing wrong here. I want to render pdf data into a bitmap as part of an export conversion. My pdf data is good (I can save it as a pdf file and that comes up OK). My bitmap is good, but it's

Re: Why can't I name a property `tag'?

2008-07-10 Thread Jean-Daniel Dupas
Le 10 juil. 08 à 17:52, Graham Cox a écrit : Actually it doesn't emit a warning. If you recall my problem a few weeks ago with: - (float) position; vs. - (int) position; the compiler sailed blithely on without a mention, generating code that smashed the stack to pieces. This is differe

Re: garbage collection and NSConnection

2008-07-10 Thread Marcel Weiher
Some minor factual corrections: On Jul 2, 2008, at 18:33 , Michael Ash wrote: In Cocoa you do lots of retaining and releasing. These operations aren't free. They involve a lookup into a global hash table and some sort of atomic increment/decrement operation. The hash table is only used by NS

Re: Why can't I name a property `tag'?

2008-07-10 Thread Jens Alfke
On 10 Jul '08, at 8:55 AM, an0 wrote: But if different return types cause different native code, how could my program still work with the mistaken type(an NSString * returned from the inner message is treated as an NSInteger at the first place, then is passed as an NSString * to the outer messa

Re: NSSavePanel bug with -setNameFieldLabel: workaround?

2008-07-10 Thread Corbin Dunn
Can you please log a bug for this? thank you, corbin On Jul 10, 2008, at 6:08 AM, Graham Cox wrote: Hmm, finding them thick and fast today... Using NSSavePanel's -setNameFieldLabel:, this method doesn't make more space available for a longer string (say by shifting the text field over or

Re: Any good advice for naming parameters of init methods?

2008-07-10 Thread Jens Alfke
On 10 Jul '08, at 8:52 AM, Sean McBride wrote: On 7/11/08 12:38 AM, Graham Cox said: What I would suggest though is that you adopt a naming convention for your instance variables (ivars) that consistently flag them as such. Some people use a leading underscore, but Apple say not to do that.

Design Question: Where to observe using KVO?

2008-07-10 Thread Patrick Mau
Hallo everyone I would appreciate if someone wants to comment on my conceptual design question: I have developed a custom NSView displaying a pie chart. The data is an NSMutableArray containing NSMutableDictionary instances for the pie segments (a standard NSArrayController instance). Each segme

Re: Why can't I name a property `tag'?

2008-07-10 Thread Graham Cox
Probably because at the machine code level, it's just a value placed into a register. You get away with it because an object address is 32 bits wide and so is an integer, and both types are passed in the same register. G. On 11 Jul 2008, at 1:55 am, an0 wrote: But if different return ty

Re: Why can't I name a property `tag'?

2008-07-10 Thread an0
Sure. I'm grateful that you tell me the internal truth instead of confusing me even more by just saying it is my responsibility to tell compiler more. But if different return types cause different native code, how could my program still work with the mistaken type(an NSString * returned from the in

Re: NSEntityDescription random crash

2008-07-10 Thread Shawn Erickson
On Thu, Jul 10, 2008 at 6:56 AM, Nicolas Lapomarda <[EMAIL PROTECTED]> wrote: > The error I'm getting is random as well, but always takes the form > >"*** -[NSCFString _entityForName]: unrecognized selector sent to > instance xxx". You likely are not retaining an object that you expect to

Re: Why can't I name a property `tag'?

2008-07-10 Thread Johan Kool
filteredPosts = [[self filterPosts:postNodes WithTag:[[tagView itemAtRow:row] tag]] retain]; You don't tell the compiler what is returned by -(id)itemAtRow: so the compiler doesn't know wether to expect "you" or "your brother". You should tell it whom to expect and it won't complain an

Re: Any good advice for naming parameters of init methods?

2008-07-10 Thread Sean McBride
On 7/11/08 12:38 AM, Graham Cox said: >What I would suggest though is that you adopt a naming convention for >your instance variables (ivars) that consistently flag them as such. >Some people use a leading underscore, but Apple say not to do that. Do the docs still say that? We've had this discu

Re: Why can't I name a property `tag'?

2008-07-10 Thread Graham Cox
Actually it doesn't emit a warning. If you recall my problem a few weeks ago with: - (float) position; vs. - (int) position; the compiler sailed blithely on without a mention, generating code that smashed the stack to pieces. This is different from the situation that does emit a warning,

Printing a Webview

2008-07-10 Thread Western Botanicals
I am trying to print a whole page in a webview, but it is only printing the portion that I can see in the window (there is more if I scroll down), how can I print the whole thing. I think the problem may be that the page setup is not the right size. What can I do? Thank you Justin Giboney

  1   2   >