packagemaker won't run foundation tool

2008-05-07 Thread Marc Lohse
Hello, i am not sure whether this is the right place to ask so please forgive me if this question is off topic for the cocoa-dev list, but maybe somebody can help me: I am trying to build an installer package for a little app i wrote. I have also written a small foundation tool that needs to be

Re: packagemaker won't run foundation tool

2008-05-07 Thread Jean-Daniel Dupas
Le 7 mai 08 à 09:23, Marc Lohse a écrit : Hello, i am not sure whether this is the right place to ask so please forgive me if this question is off topic for the cocoa-dev list, You're right, it's not the right place. Try the Installer-dev list.

Re: Multiple controls in a table cell

2008-05-07 Thread matt . gough
On 6 May 2008, at 02:17, j o a r wrote: On May 5, 2008, at 4:46 PM, Hamish Allan wrote: I don't remember where we got it, but if you Google SubviewTableViewController or SubviewTableViewCell it should get you in the right direction. It's by Joar Wingfors: http://joar.com/code/ On

Re: WebView does not expose bindings in IB 3

2008-05-07 Thread Derek Chesterfield
I don't think it's a bug. I think Apple just decided they didn't want to expose WebView with all the useful bindings. I used to love that I could show off to my mates that I could create a web browser in no time at all, and with zero lines of code! On 6 May 2008, at 23:19, Adam Radestock

Re: Bindings Checkbox in NSTableView [SOLVED]

2008-05-07 Thread Steven Huey
Hamish, Thanks, it works using the Check Box Cell from the IB Library. It seems the approach to setting the data cell I was using was the recommended one based on searching the archives, does anyone have an idea why it wasn't working? Thanks, Steve On May 6, 2008, at 4:17 PM, Hamish

re-read of partition table / diskarbitration probe

2008-05-07 Thread The SZ
Hi, I'm writing a password protetction app. It uses the ata security commands. On plugin of the usb mass storage hdd, the hdd is locked and contains no partition/no data at all. After sending the correct password, the partition can be read. However, the diskarbitration doesn't notice this.

Core Data entities within a single context across multiple nibs

2008-05-07 Thread Danny Price
I'm having some trouble managing and editing Core Data entities within a single context across multiple nibs. In my main document nib, I have an NSTreeController with it's content binding set to an NSMutableArray within the document class. I can bind an outline view to this, and some other fields

how to know a window finishes resizing

2008-05-07 Thread Norio
Hi there, Would you tell me how to know a window finishes resizing? If my memory is correct, Carbon Event has the event. I know windowDidResize can track its resizing, but I don't want to get information while the window resizing. I do want to know after user releases the mouse button or

Re: how to know a window finishes resizing

2008-05-07 Thread Jeff Nouwen
On May-7-2008, at 7:01 AM, Norio wrote: Would you tell me how to know a window finishes resizing? I know windowDidResize can track its resizing, but I don't want to get information while the window resizing. I do want to know after user releases the mouse button or presses zoom icon.

offtopic: cocoa iphone

2008-05-07 Thread Bruno Sanz
Hi This is a bit off-topic but Is this mail list also for iphone cocoa or there is another list for iphone topics? All the topics i see here are related to MACOS X Thank you Bruno ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please

Re: offtopic: cocoa iphone

2008-05-07 Thread Mike Abdullah
As ever, the iPhone SDK is under the NDA you agreed to. You cannot discuss it here. On 7 May 2008, at 14:32, Bruno Sanz wrote: Hi This is a bit off-topic but Is this mail list also for iphone cocoa or there is another list for iphone topics? All the topics i see here are related to

Re: how to know a window finishes resizing

2008-05-07 Thread Graham Cox
The doc's description doesn't conflict with the experience of receiving messages in windowDidResize: during resizing. That tells you it did resize (even just a little bit), the -windowWillResize:toSize: is usually used for constraining the window size. AFAICS, there is no such separate

self registering NSValueTransformer and bindings

2008-05-07 Thread Torsten Curdt
I have a self registering NSValueTransformer that requires a binding. @interface MyValueTransformer : NSValueTransformer { IBOutlet NSTabView *tabView; } + (Class)transformedValueClass; + (BOOL)allowsReverseTransformation; - (id)transformedValue:(id)value; @implementation

Re: Sending an image to Preview to preview the image

2008-05-07 Thread Ken Thomases
On May 6, 2008, at 5:08 PM, Kimo wrote: My app produces a list of images (NSData format), and I'd like the app Preview to display the image when the user double-clicks on an image in my app. Currently I use NSPerformService as shown below, which works, but Preview always asks to save the

Re: Deep sleep and file wrappers?

2008-05-07 Thread Ken Thomases
I don't have experience with NSDocument-based applications, so take the following with a grain of salt... On May 6, 2008, at 1:27 PM, Keith Blount wrote: I have an application that saves its information as a file package. My NSDocument subclass overrides -saveDocument: to save individual

Re: Sending an image to Preview to preview the image

2008-05-07 Thread Bill
On May 7, 2008, at 8:14 AM, Ken Thomases wrote: On May 6, 2008, at 5:08 PM, Kimo wrote: My app produces a list of images (NSData format), and I'd like the app Preview to display the image when the user double-clicks on an image in my app. Currently I use NSPerformService as shown below,

Can't understand what's causing NSRangeException

2008-05-07 Thread Vinayak Suley
Hi, I'm new to objective-C so this might be elementary for some, but I can't seem to figure out why this is happening. Here's two code samples: ONE: SpectralData* spectrum = [selectedLightSource spectralPowerDistribution]; NSMutableArray* lightSourceData1 = [spectrum data];

Re: Can't understand what's causing NSRangeException

2008-05-07 Thread Jens Alfke
On 7 May '08, at 8:56 AM, Vinayak Suley wrote: If my understanding of objective-C is correct, the second one is just a short version of writing the first. Yup. But the first one works fine and the second one causes an NSRangeException: That's odd. Something else must be going wrong...

Re: how to know a window finishes resizing

2008-05-07 Thread Jens Alfke
On 7 May '08, at 6:01 AM, Norio wrote: Would you tell me how to know a window finishes resizing? NSView has a bunch of accessors to deal with this, because you sometimes need to customize the way a view redraws to make it not take too much time during a live resize. If you need to get

NSArrayController's insert:, where should the new item go?

2008-05-07 Thread Sean McBride
Hi all, The Cocoa Bindings Programming Topics document says of NSArrayController's 'insert:' method: The insert: method creates a new object using the controller's newObject method, and inserts it after the current selection. However, it seems to me that the actual behaviour (in 10.5.2) is to

Re: WebView does not expose bindings in IB 3

2008-05-07 Thread John Stiles
This was actually in a WWDC WebKit demo when WebKit was first announced—they set up a web browser on stage with no code, IIRC. Derek Chesterfield wrote: I don't think it's a bug. I think Apple just decided they didn't want to expose WebView with all the useful bindings. I used to love that

Re: Threading - How its done?

2008-05-07 Thread Jens Alfke
On 7 May '08, at 6:13 AM, Army Research Lab wrote: As for why threads are 'hard'; in reality, they aren't hard, as long as you are absolutely fastidious in following the rules: The same thing could be said of any programming task :) But fastidiously following the rules is itself very

Re: re-read of partition table / diskarbitration probe

2008-05-07 Thread Jens Alfke
On 7 May '08, at 5:13 AM, The SZ wrote: - How can I force a partition table re-read?or- How can I force diskarbitration to probe the hdd again?or- How can I simulate a usb unplug/plugin?or- Something else to notify diskarbitration/finder to mount the hdd? This isn't even remotely a

Re: Sending an image to Preview to preview the image

2008-05-07 Thread Ken Thomases
On May 7, 2008, at 10:56 AM, Bill wrote: I'm embarrassed to say that you're correct. What I remembered was a print preview, and it bypassed the regular print window and Preview button. Instead the image went directly to the preview with the Cancel and Print buttons at the bottom. I just

Re: Sending an image to Preview to preview the image

2008-05-07 Thread Bill
On May 7, 2008, at 9:46 AM, Ken Thomases wrote: On May 7, 2008, at 10:56 AM, Bill wrote: I'm embarrassed to say that you're correct. What I remembered was a print preview, and it bypassed the regular print window and Preview button. Instead the image went directly to the preview with

Re: WebView does not expose bindings in IB 3

2008-05-07 Thread Derek Chesterfield
Yes, but I was showing off to non-Mac-o-philes, so they hadn't seen anything like it before. It was a great way to show off some of the frills of Mac development, even if it is rather contrived [i.e. you'd still need to write code for your web browser eventually!]. But it certainly was a

Re: Group rotation

2008-05-07 Thread Gordon Apple
This is a major advantage of separating the drawing (rendering) code from the data model instead of having objects draw themselves (not to mention cross-platform). Our renderer object is recursive (and could be a shared object if not for the deficiencies in shadow rendering -- a story for

Re: self registering NSValueTransformer and bindings

2008-05-07 Thread I. Savant
I have a self registering NSValueTransformer that requires a binding. Did you mean it's required for use in a binding? @interface MyValueTransformer : NSValueTransformer { IBOutlet NSTabView *tabView; } That's probably not going to work out ... (see below) // from

Re: How to convert UInt8 array to NSString

2008-05-07 Thread Gary L. Wade
If you're interested in determining the best encoding match for text, look at the TextEncodingConverter.h header, which has functions related to encoding sniffing. There may be more modern techniques available, but I had used that almost a decade ago in a formerly major web browser. It's not

Re: how to know a window finishes resizing

2008-05-07 Thread Manfred Schwind
Would you tell me how to know a window finishes resizing? You may want to look at these NSView methods: - (void)viewWillStartLiveResize; - (void)viewDidEndLiveResize; - (BOOL)inLiveResize; Regards, Mani -- http://www.mani.de iVolume - Loudness adjustment for iTunes. LittleSecrets - The

Re: Group rotation

2008-05-07 Thread Kenny Leung
Hmmm... I'm just talking out loud here, but wouldn't it work to have a group model object whose drawing function is to concatenate its transform to the CTM then tell all the objects within the group to draw? Then all objects inside the group just do their drawing normally. -Kenny On

Re: How to convert UInt8 array to NSString

2008-05-07 Thread Jean-Daniel Dupas
More modern and more Cocoa way? You mean something like this + [NSString stringWithContentsOfFile:usedEncoding:error:] ;-) «Discussion This method attempts to determine the encoding of the file at path.» Le 7 mai 08 à 19:33, Gary L. Wade a écrit : If you're interested in determining the

NSWindow Centering Problem

2008-05-07 Thread Philip Bridson
Hi there, Can anyone tell me why when I use [MyWindow center] the window ends up about an inch from the top of the screen? I thought this method is meant to center the window. Is there something I am doing wrong? Many thanks, Phil. ___

Re: NSWindow Centering Problem

2008-05-07 Thread Andy Lee
On May 7, 2008, at 2:59 PM, Philip Bridson wrote: Can anyone tell me why when I use [MyWindow center] the window ends up about an inch from the top of the screen? I thought this method is meant to center the window. Is there something I am doing wrong? Only not reading the documentation. :)

Re: NSNumberFormatter behavior

2008-05-07 Thread Frédéric Testuz
Le 6 mai 08 à 03:29, Chataka a écrit : Hello, My app has a NSTextField on a UI window to accept user input and to display a NSNumber in a model object. The NSTextField and the NSNumber are bound using Cocoa Bindings, and the NSTextField is set a NSNumberFormatter. It is a very simple UI

Re: NSWindow Centering Problem

2008-05-07 Thread Jean-Daniel Dupas
Le 7 mai 08 à 20:59, Philip Bridson a écrit : Hi there, Can anyone tell me why when I use [MyWindow center] the window ends up about an inch from the top of the screen? I thought this method is meant to center the window. Is there something I am doing wrong? Many thanks, Phil.

Avoiding NSAccessibilityException?

2008-05-07 Thread Gerd Knops
When access for assistive devices is enabled in the system preferences, the exception handler in my application catches bunches of NSAccessibilityExceptions when a panel is opened. Any way to avoid that? Thanks Gerd ___ Cocoa-dev mailing list

Re: NSWindow Centering Problem

2008-05-07 Thread Andy Lee
On May 7, 2008, at 3:06 PM, Andy Lee wrote: center Sets the receiver’s location to the center of the screen. - (void)center Discussion The receiver is placed exactly in the center horizontally and somewhat above center vertically. [...] In fairness, I think it's easy to stop reading after

Re: How to convert UInt8 array to NSString

2008-05-07 Thread Gary L. Wade
No, that's not the same thing. The method you suggest assumes an exact encoding; the sniffer functions from TextEncodingConverter look at the data to see if it follows the patterns appropriate for a suggested set of encodings and lets you know which one would be the best match. Typically,

Re: NSWindow Centering Problem

2008-05-07 Thread Sean McBride
On 5/7/08 3:06 PM, Andy Lee said: On May 7, 2008, at 2:59 PM, Philip Bridson wrote: Can anyone tell me why when I use [MyWindow center] the window ends up about an inch from the top of the screen? I thought this method is meant to center the window. Is there something I am doing wrong? Only

Re: NSWindow Centering Problem

2008-05-07 Thread Philip Bridson
Ok very funny. Just to clarify that I had already read the documentation, otherwise I would not even be able to get the window to display on the screen - but thanks for pointing it out. However, I probably worded the question wrong, so I will re-phrase it: If by using [MyWindow center]

Re: NSWindow Centering Problem

2008-05-07 Thread Gregory Weston
Philip Bridson wrote: Can anyone tell me why when I use [MyWindow center] the window ends up about an inch from the top of the screen? I thought this method is meant to center the window. Is there something I am doing wrong? The documentation for NSWindowcenter explicitly notes that the

Re: NSWindow Centering Problem

2008-05-07 Thread Sean McBride
On 5/7/08 8:42 PM, Philip Bridson said: Ok very funny. Just to clarify that I had already read the documentation, otherwise I would not even be able to get the window to display on the screen - but thanks for pointing it out. However, I probably worded the question wrong, so I will re-phrase it:

Re: NSWindow Centering Problem

2008-05-07 Thread Jean-Daniel Dupas
AFAK, there is no other method than center to center the window on screen, but doing one that really center the window is not very difficult. @implementation NSWindow (TrueCenter) - (void)trueCenter { NSRect frame = [self frame]; NSRect *screen = [[self screen] frame];

Re: NSWindow Centering Problem

2008-05-07 Thread Philip Bridson
Sean/Andy, I am sorry if I have offended you. I do not wish to cause an argument so please accept my apologies. The reason I put that is because it is not the first time I have had responses like that (and much worse to be fair). I am grateful for any help that I am offered but I just

Re: Saving only required files in a file wrapper?

2008-05-07 Thread Keith Blount
Hi Ken, Many thanks for your response... Hmm, I think you're right. I overrided -saveDocument: because it looked as though -writeToURL: and all of the other -write... methods expected you to write all the data at any one time. It's possible for my file packages to run to hundreds of megabytes,

Re: How to convert UInt8 array to NSString

2008-05-07 Thread Adam R. Maxwell
On Wednesday, May 07, 2008, at 12:37PM, Jean-Daniel Dupas [EMAIL PROTECTED] wrote: What make you think this function assumes an exact encoding ? This method is not the same than +[NSString stringWithContentsOfFile:encoding:error:]. The method +stringWithContentsOfFile:usedEncoding:error:

EventMonitorTarget in Cocoa

2008-05-07 Thread Mike
I see this has been asked many times before on this list but there doesn't seem to be a definitive answer: does the CG Event tap work in Cocoa apps or not? If not how can one grab keystrokes from other apps in a Cocoa app? Thanks, Mike ___

Re: Can't understand what's causing NSRangeException

2008-05-07 Thread Bob Smith
On May 7, 2008, at 8:56 AM, Vinayak Suley wrote: Hi, I'm new to objective-C so this might be elementary for some, but I can't seem to figure out why this is happening. Here's two code samples: ONE: SpectralData* spectrum = [selectedLightSource spectralPowerDistribution];

Re: How is Apple + Ctrl + D implemented?

2008-05-07 Thread Deborah Goldsmith
On Apr 28, 2008, at 5:35 AM, John Joyce wrote: The range of the word is up to you to find and depends on the language. If it is any common language from Europe, your job is a lot easier. You mainly need to work with whitespace and punctuation. If you're working with Japanese, you'll need to

Re: NSWindow Centering Problem

2008-05-07 Thread Andy Lee
On May 7, 2008, at 4:05 PM, Philip Bridson wrote: I am sorry if I have offended you. Sean was more gracious than I was. Let's forget about the whole thing. --Andy ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin

Re: NSWindow Centering Problem

2008-05-07 Thread Andy Lee
On May 7, 2008, at 3:52 PM, Sean McBride wrote: I suspect that back in the NeXTStep days it actually did centre it. But when NeXTStep merged with Mac OS, the behaviour was changed to match the Mac OS behaviour. In Classic Mac OS this position is called the 'alert position'. See for example

Re: Group rotation

2008-05-07 Thread Gordon Apple
That is effectively what our renderer object does. Note that we transform the drawing space, not the object. For a group object, it sets the group's transform, then recursively calls the same rendering function for the objects in the group. Each object's transform is then applied within the

8 Digit random number

2008-05-07 Thread Mr. Gecko
Hello I am needing to find out how to do an 8 digit random number in cocoa. If there are no way than I can use random number from 1000 to in applescript and receive the retuned value. ___ Cocoa-dev mailing list

Re: 8 Digit random number

2008-05-07 Thread Seth Willits
On May 7, 2008, at 1:50 PM, Mr. Gecko wrote: Hello I am needing to find out how to do an 8 digit random number in cocoa. If there are no way than I can use random number from 1000 to in applescript and receive the retuned value. Use rand()? -- Seth Willits

Re: 8 Digit random number

2008-05-07 Thread Shawn Erickson
On Wed, May 7, 2008 at 1:50 PM, Mr. Gecko [EMAIL PROTECTED] wrote: Hello I am needing to find out how to do an 8 digit random number in cocoa. If there are no way than I can use random number from 1000 to in applescript and receive the retuned value.

Re: 8 Digit random number

2008-05-07 Thread Herb Petschauer
My knee jerk response was: (rand() % 9000) + 1000 I like clamp/wrap better though :-) 2008/5/7 Seth Willits [EMAIL PROTECTED]: On May 7, 2008, at 1:50 PM, Mr. Gecko wrote: Hello I am needing to find out how to do an 8 digit random number in cocoa. If there are no way than I can

Re: 8 Digit random number

2008-05-07 Thread Jean-Daniel Dupas
Le 7 mai 08 à 22:54, Seth Willits a écrit : On May 7, 2008, at 1:50 PM, Mr. Gecko wrote: Hello I am needing to find out how to do an 8 digit random number in cocoa. If there are no way than I can use random number from 1000 to in applescript and receive the retuned value.

Re: NSArrayController's insert:, where should the new item go?

2008-05-07 Thread Mike Abdullah
On that one, I believe the docs to be wrong. I'd file a bug. On 7 May 2008, at 17:14, Sean McBride wrote: Hi all, The Cocoa Bindings Programming Topics document says of NSArrayController's 'insert:' method: The insert: method creates a new object using the controller's newObject method, and

Re: Getting an array/tree controller to select newly added managed objects

2008-05-07 Thread Sean McBride
On 4/18/08 6:46 PM, Ron Lue-Sang said: Consider an app that uses bindings and Core Data. It has a tableview bound to an array controller. There is an 'Add' button that creates a new entity to be shown in the table. It could be implemented by: 1) sending add: to the array controller. 2)

Re: 8 Digit random number

2008-05-07 Thread Mr. Gecko
I'll try On May 7, 2008, at 4:02 PM, Jean-Daniel Dupas wrote: long value = random() % 1000; ___ 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

Re: 8 Digit random number

2008-05-07 Thread Mr. Gecko
Thanks That worked grate On May 7, 2008, at 4:17 PM, Jean-Daniel Dupas wrote: call srandomdev() before the first call to change the initial state. see man random for all details. Le 7 mai 08 à 23:10, Mr. Gecko a écrit : that is not really random maybe if I had added unix time stamp inside

find repaint areas?

2008-05-07 Thread Denis Bohm
I am trying to create a buffered window and get notified whenever areas are repainted so that I can also send those areas over the network to a custom remote bitmap display. I don't want to copy the complete buffered image on each update as that would be much too slow. NSView has

Re: Multiple controls in a table cell

2008-05-07 Thread j o a r
On May 7, 2008, at 1:46 AM, [EMAIL PROTECTED] wrote: I had independently experimented with a similar hack (adding row views as subviews of the Table) and was about to flesh it out until I came across your pre-baked example. Before I dive too deeply into using it, do you see any problem in

Re: Saving only required files in a file wrapper?

2008-05-07 Thread Ken Thomases
Hi, On May 7, 2008, at 3:08 PM, Keith Blount wrote: Many thanks for your response... Sure thing. I'm happy to flail in the dark and guess wildly with the best of them. ;) Hmm, I think you're right. I overrided -saveDocument: because it looked as though -writeToURL: and all of the

Re: EventMonitorTarget in Cocoa

2008-05-07 Thread Ken Thomases
On May 7, 2008, at 3:17 PM, Mike wrote: I see this has been asked many times before on this list but there doesn't seem to be a definitive answer: does the CG Event tap work in Cocoa apps or not? If not how can one grab keystrokes from other apps in a Cocoa app? CG Event tap and

Any way to filter an NSTreeController?

2008-05-07 Thread Jens Alfke
I'm using an NSTreeController bound to an NSBrowser to display a hierarchical data structure in my app. I now find I need to implement filtering, i.e. hiding items at all levels of the hierarchy that don't match some condition. Unfortunately it appears that only NSArrayController supports a -

Re: -draggingEntered: never gets called [SOLVED]

2008-05-07 Thread Michael Gardner
It turns out that this was caused by manipulating the GUI outside the main thread. Once I realized that and refactored accordingly, the issue went away. No wonder I was having trouble duplicating the symptoms! Thanks to everybody who helped me figure this out. -Michael On May 5, 2008, at

Keys dependent on NSArrayController's selection

2008-05-07 Thread Dave Dribin
Hi All, I feel like I'm missing something basic here. Say I have a table bound to an array controller. And also say that each item in the array controller is a Person with firstName and lastName properties. Now say, I want to have a button that is only enabled when a Person with last

Re: NSArrayController's insert:, where should the new item go?

2008-05-07 Thread Sean McBride
On 5/7/08 10:03 PM, Mike Abdullah said: On that one, I believe the docs to be wrong. I'd file a bug. Thanks for the confirmation. rdar://5919061. I wish the docs were right, that's the behaviour I wanted. :( -- Sean McBride, B. Eng

Re: Keys dependent on NSArrayController's selection

2008-05-07 Thread Sean McBride
On 5/7/08 6:16 PM, Dave Dribin said: In Interface Builder I bind the button's Enabled to MyController.canEnableButton. The implementation for canEnableButton is this: - (BOOL)canEnableButton { NSArray * selectedPeople = [peopleController selectedObjects]; if ([selectedPeople count]

BLOBs, MySQL, hex. Oh my

2008-05-07 Thread Ben Einstein
Hi All, I have an enterprise DB application that once used DO to move some files around (images and zip files, mostly). After some serious testing and lots of reading, I decided to move this to a few different BLOB fields in the database. Despite major warnings from people, I've found

Re: BLOBs, MySQL, hex. Oh my

2008-05-07 Thread John Stiles
Have you tried running Shark? That might give you some insight as to what's going on. Ben Einstein wrote: Hi All, I have an enterprise DB application that once used DO to move some files around (images and zip files, mostly). After some serious testing and lots of reading, I decided to move

Off Topic: selling a product line

2008-05-07 Thread Kimo
This is not the usual development question, but this list probably has the best people to answer. Suppose you wrote a cool Mac product, and it's been selling well as shareware for years. Then a larger software development company contacts you and says they want to purchase the entire

Re: Off Topic: selling a product line

2008-05-07 Thread Andrew Merenbach
Hi, Kimo, Although I have no answers that I am able to offer you, I would recommend checking out the macsb Yahoo! Group at http://tech.groups.yahoo.com/group/macsb/ . I've never used that list myself, but I've seen it recommended here on Cocoa-Dev before, and it sounds like what you may

Re: Off Topic: selling a product line

2008-05-07 Thread Andy Lee
On May 7, 2008, at 8:31 PM, Kimo wrote: I hope this topic is not too far off-topic. I would say it is pretty far off-topic. Try this list, where questions very similar to yours have been asked a lot: http://tech.groups.yahoo.com/group/mac-gui-dev/ --Andy

stringValue/indexOfSelectedItem in NSComboBox returning wrong values.

2008-05-07 Thread Cameron Hotchkies
Hi all, In an app I'm working on, I need a ComboBox that pulls it's contents from a database. I did this by attaching a datasource. I have the (case insensitive) autocomplete working, everything seemed to be going well. My datasource class implements the following functions: -

Where to set values for initWithFrame:..... in my NSMatrix subclass

2008-05-07 Thread P Teeson
Using Mac OS X.4.11, Xcode 2.5 on PPC In my project I have sub-classed both NSMatrix (e.g FooMatrix) and NSButtonCell (e.g. FooButtonCell). The designated initialiser for FooMatrix is -(id)initWithFrame:(NSRect)frameRect mode:(int)aMode cellClass:(Class)classId

Re: BLOBs, MySQL, hex. Oh my

2008-05-07 Thread Ben Einstein
Well, I know what's happening, so I don't think Shark or Instruments can help any. I just don't know WHY it happens. This is the code i've been playing with (from Hayden Stainsby): inti; const char*thumbnailHex; thumbnailHex = [thumbnailDataHex bytes];

Re: Group rotation

2008-05-07 Thread Graham Cox
I don't think it makes the more classic approach wrong - it's just another way to crack that particular nut, with its own advantages (and probably disadvantages too, like more code, more dependency between classes, possibly lower performance, I don't know - but there's no one true way to

Re: Group rotation

2008-05-07 Thread Erik Buck
Regarding flowing text around objects, do you have a function for breaking an arbitrary shape into a series of line rectangles that you'd be prepared to share with the world? http://www.cocoabuilder.com/archive/message/cocoa/2007/2/22/179186 ___

Re: Avoiding NSAccessibilityException?

2008-05-07 Thread Martin Wierschin
When access for assistive devices is enabled in the system preferences, the exception handler in my application catches bunches of NSAccessibilityExceptions when a panel is opened. Any way to avoid that? You can have your NSExceptionHandler delegate methods ignore accessibility

Palette a NSStepper with tow Buttons and a NSTextField

2008-05-07 Thread 王仕俊
Hi,all I know NSStepper provided by Interface builder. But now I need to setImage like NSButton for a NSStepper, so I use two buttons and a textFiled to make my stepper. and another problem, I need make my stepper as a palette. How should I do? Many thanks

Re: Saving only required files in a file wrapper?

2008-05-07 Thread Graham Cox
On 8 May 2008, at 10:26 am, Keith Blount wrote: The trouble with all of these methods is that they tell you not to rely on fileURL My interpretation of that advice is that at the time the read... and write... methods are called, the document hasn't set up -fileURL, so in that sense you

Re: find repaint areas?

2008-05-07 Thread Denis Bohm
Thanks for the CGWaitForScreen tip. I hadn't seen those and will take a look. Overriding drawRect on a top level view sounds promising also. I had thought about overriding setNeedsDisplay on a top level view in the window, but it wasn't clear that would catch calls to child views. On May

Re: Saving only required files in a file wrapper?

2008-05-07 Thread Ken Thomases
On May 7, 2008, at 9:06 PM, Graham Cox wrote: On 8 May 2008, at 10:26 am, Keith Blount wrote: The trouble with all of these methods is that they tell you not to rely on fileURL My interpretation of that advice is that at the time the read... and write... methods are called, the document

Re: Off Topic: selling a product line

2008-05-07 Thread Andy Lee
Please disregard. I was confusing this with the list Andrew Merenbach pointed to. Sorry for the noise. --Andy On May 7, 2008, at 8:44 PM, Andy Lee wrote: On May 7, 2008, at 8:31 PM, Kimo wrote: I hope this topic is not too far off-topic. I would say it is pretty far off-topic. Try this

Re: BLOBs, MySQL, hex. Oh my

2008-05-07 Thread Ben Einstein
John's suggestion of getting rid of strlen was spot on; the code below works extremely well if using [NSData length] a single time before the loop. What I'm still curious about is the difference in processing between the NSImage and the zip archive. The same code and the same number of

expose - the algorithm

2008-05-07 Thread John Clayton
Hi All, I have a task to move windows around and fit them into a defined space, almost exactly like Expose. I.e. the space to fit all the windows to is defined (i.e. its your display), but I can scale windows in order to make my space allocation more efficient as required. Does anyone

Re: Threading - How its done?

2008-05-07 Thread Michael Vannorsdel
This post contains a lot of great info. However just wanted to clear up a common misconception on memory barriers. Unfortunately they're not guaranteed to cause all data in register to be pushed to memory (don't generate store instructions); only when the program executes a store

Re: BLOBs, MySQL, hex. Oh my

2008-05-07 Thread David Wilson
On Wed, May 7, 2008 at 11:12 PM, Ben Einstein [EMAIL PROTECTED] wrote: John's suggestion of getting rid of strlen was spot on; the code below works extremely well if using [NSData length] a single time before the loop. What I'm still curious about is the difference in processing between the

Re: BLOBs, MySQL, hex. Oh my

2008-05-07 Thread Sherm Pendley
On Thu, May 8, 2008 at 12:19 AM, David Wilson [EMAIL PROTECTED] wrote: On Wed, May 7, 2008 at 11:12 PM, Ben Einstein [EMAIL PROTECTED] wrote: John's suggestion of getting rid of strlen was spot on; the code below works extremely well if using [NSData length] a single time before the loop.

[moderator ]Re: Off Topic: selling a product line

2008-05-07 Thread Scott Anguish
Yes, this is entirely off-topic. anytime you feel you need to put 'offtopic' in the subject, you shouldn't post it here. others have pointed you to other resources. scott moderator On May 7, 2008, at 8:31 PM, Kimo wrote: This is not the usual development question, but this list probably

[moderator] Re: offtopic: cocoa iphone

2008-05-07 Thread Scott Anguish
On May 7, 2008, at 9:13 PM, Jeremy Pereira wrote: On 7 May 2008, at 14:47, I. Savant wrote: On May 7, 2008, at 9:37 AM, Mike Abdullah wrote: As ever, the iPhone SDK is under the NDA you agreed to. You cannot discuss it **ANYWHERE**. Fixed that for you. ;-) As far as I can tell, the

NSStream blocking behavior?

2008-05-07 Thread Michael Gardner
Are there any guarantees about blocking behavior for NSInputStream and NSOutputStream? For example, if I receive an NSStreamEventHasSpaceAvailable for an NSOutputStream, how many bytes can I write without blocking? It doesn't seem safe to do I/O in the main thread if there are no such

InstantMessage Framework Question

2008-05-07 Thread Steve Cronin
Folks; I've gotten the IM framework to respond to a few basic things but I'm puzzled by something simple... I can determine the audio or video capabilities of buddies just fine BUT how do I figure out what my own capabilities are? If I send the request for IMPersonCapabilitiesKey for my

Re: BLOBs, MySQL, hex. Oh my

2008-05-07 Thread Michael Ash
On Thu, May 8, 2008 at 12:19 AM, David Wilson [EMAIL PROTECTED] wrote: On that note, John suggested sharking in his first response, and your response to him was I know what's happening, so I don't think Shark or Instruments can help any. I would very strongly suggest that this response is

Re: NSStream blocking behavior?

2008-05-07 Thread Michael Ash
On Thu, May 8, 2008 at 12:59 AM, Michael Gardner [EMAIL PROTECTED] wrote: Are there any guarantees about blocking behavior for NSInputStream and NSOutputStream? For example, if I receive an NSStreamEventHasSpaceAvailable for an NSOutputStream, how many bytes can I write without blocking? It

Re: Threading - How its done?

2008-05-07 Thread Chris Hanson
On May 5, 2008, at 10:12 PM, Michael Vannorsdel wrote: Now if two threads are just reading the same piece of data it's ok for them to do so at the same time, I don't know what gave you this idea, but it's simply not correct in the general case. Whether you're accessing or changing shared

Re: Threading - How its done?

2008-05-07 Thread Chris Hanson
On May 6, 2008, at 6:32 PM, Karl von Moller wrote: With regard to Threading PDF's, while I didn't want to specifically build for 10.5 only, using NSOperation's or using some sort of priority queue process - does this offer any protection for threading PDF activities? As yet I have not used

  1   2   >