Re: Threading - How its done?

2008-05-08 Thread Michael Vannorsdel
I was speaking for a programmer's own code. When you're using someone else's classes that modify their own data or internal state, then it's not just reading memory and therefore neither is the program. But if you truly are just reading then synchronization is not necessary. The point I w

Re: NSStream blocking behavior?

2008-05-08 Thread Stefan Haller
Michael Ash <[EMAIL PROTECTED]> wrote: > NSStream matches the semantics of the UNIX read/write calls. In both > cases, if you are informed that data or space is available, you can > issue a read or write for an arbitrary amount of data and be > guaranteed that it will not block. I would have thou

Quadratic curves in NSBezierPath

2008-05-08 Thread Nick Zitzmann
I searched the archives about this, and didn't find anything helpful (only examples that did the opposite of what I want to do, or include sample code that was published a year ago and is now gone). How do I do something resembling a quadratic curve using NSBezierPath instead of a cubic cur

Creating zip using cocoa framework

2008-05-08 Thread parag vibhute
Hi, I want to create zip file using Cocoa framework. I know I can do it using shell/apple scripting but want to know that is there any framework in Cocoa for creating zip file? Thanks, Palav -- There are many things in your life that will catch your eye but only a few will catch your heart

Re: Saving only required files in a file wrapper?

2008-05-08 Thread Keith Blount
Many thanks again for your replies; much appreciated. On the surface, it look as though Graham's suggested -writeToURL:ofType:forSaveOperation:originalContentsURL:error: would be the ideal solution, allowing me to write just individual files for an NSSaveOperation or copy the whole project for

Re: Creating zip using cocoa framework

2008-05-08 Thread Scott Anguish
On May 8, 2008, at 4:49 AM, parag vibhute wrote: Hi, I want to create zip file using Cocoa framework. I know I can do it using shell/apple scripting but want to know that is there any framework in Cocoa for creating zip file? Thanks, Palav check google. this is asked at least weekly

How to send email without using email client

2008-05-08 Thread vinitha ks
Hi, I'm working with mac 10.5 and xcode3.0.I've to send email from an application with out using any email client.When i try to use message framework,It doesn't work.(deliverMessage always returns no)Is there any any way to send email from my application without using any email client,and i've to

Re: self registering NSValueTransformer and bindings

2008-05-08 Thread Torsten Curdt
On May 7, 2008, at 19:32, I. Savant wrote: I have a self registering NSValueTransformer that requires a binding. Did you mean it's required for use in a binding? Well, maybe it's language barrier as a non-native speaker ...but in order for the transformer to do its job it requires a refe

Re: Saving only required files in a file wrapper?

2008-05-08 Thread Keith Blount
Apologies for so soon a follow up, but I've just been experimenting with -writeToURL:ofType:forSaveOperation:originalContentsURL:error: and the results are disastrous. It turns out that *every single time* it is invoked, absoluteURL is a temporary location and *not* the original URL. So to use t

How to send email without using email client

2008-05-08 Thread vinitha
Hi, I'm working with mac 10.5 and xcode3.0.I've to send email from an application with out using any email client.When i try to use message framework,It doesn't work.(deliverMessage always returns no)Is there any any way to send email from my application without using any email client,and i've to s

Re: self registering NSValueTransformer and bindings

2008-05-08 Thread I. Savant
Well, maybe it's language barrier as a non-native speaker ...but in order for the transformer to do its job it requires a reference to the NSTabView to be set. And I was trying to inject that reference through a binding. That's what I wanted to say. Perhaps, but for clarity, in the Coc

Re: expose - the algorithm

2008-05-08 Thread John Clayton
Yes, agreed that its almost impossible to be very optimal with many windows in a sensible time frame (i.e. within 10-300 ms). I'm new to the packing problem and it appears over the last 40 years that lots of people have been banging their heads against it. Google showed me quite a few app

Re: BLOBs, MySQL, hex. Oh my

2008-05-08 Thread Serge Cohen
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello; One thing I don't understand, is that in MCPKit, you're supposed to "prepare" (that is hexcode) the BLOB when you perform the INSERT, but when using a query and fetch a row, the column containing a BLOB should already be returned as NSDa

Re: BLOBs, MySQL, hex. Oh my

2008-05-08 Thread Serge Cohen
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello; One thing I don't understand, is that in MCPKit, you're supposed to "prepare" (that is hexcode) the BLOB when you perform the INSERT, but when using a query and fetch a row, the column containing a BLOB should already be returned as NSDa

Re: self registering NSValueTransformer and bindings

2008-05-08 Thread Torsten Curdt
On May 8, 2008, at 13:59, I. Savant wrote: Well, maybe it's language barrier as a non-native speaker ...but in order for the transformer to do its job it requires a reference to the NSTabView to be set. And I was trying to inject that reference through a binding. That's what I wanted to

Re: How to send email without using email client

2008-05-08 Thread August Trometer
NSMailDelivery (in the Message framework) has been deprecated in 10.5. Even so, it still uses Mail.app to send email. The only way I believe you can send email (without writing your own SMTP client) is to use the Scripting Bridge to send the email via Mail.app. Apple has recently posted sam

Re: 8 Digit random number

2008-05-08 Thread Mr. Gecko
Yeah I knew that before in the days that I made c programs but it been so long that I forgot. On May 8, 2008, at 6:57 AM, Gregory Weston wrote: Since neither the question nor the answer is particularly Cocoa- related, I'm following up off-list. I just wanted to make sure that you understood

Re: Quadratic curves in NSBezierPath

2008-05-08 Thread Graham Cox
A cubic bezier with the two control points set to the same value is equivalent to a quadratic bezier. In other words the cubic is a superset of the quadratic. Why do you need quadratics specifically? G. On 8 May 2008, at 6:06 pm, Nick Zitzmann wrote: I searched the archives about this, an

Re: expose - the algorithm

2008-05-08 Thread Graham Cox
By the way, has anyone else noticed that Leopard's implementation of Exposé is broken slightly compared to Tiger's? I have my middle mouse button set to invoke Exposé, and when I do that, drag to the window I want, it highlights... then probably 6 times in ten it activates a completely diff

Re: Keys dependent on NSArrayController's selection

2008-05-08 Thread Sean McBride
On 5/8/08 1:53 AM, Dave Dribin said: >> The docs for keyPathsForValuesAffectingValueForKey say >> keyPaths are ok, but mmalc has mentioned on this list "provided that >> the >> path doesn't include to-many relationships". This appears to be >> true in >> your case, so probably explains it. The d

Re: How to send email without using email client

2008-05-08 Thread Sherm Pendley
On Thu, May 8, 2008 at 5:52 AM, <[EMAIL PROTECTED]> wrote: > I'm working with mac 10.5 and xcode3.0.I've to send email from an > application with out using any email client.When i try to use message > framework,It doesn't work.(deliverMessage always returns no)Is there any > any way to send email

regarding fxPlug plugins

2008-05-08 Thread Shashi Kumar
Hey all, I am new to fxplug. And I wanted to create an fxplug plugin from a cocoa application. What should be the right way to do this ? I have fxPlug SDK installed. The specification is: I have an cocoa application with UI having effects and image. And I want to create fx

Re: How to send email without using email client

2008-05-08 Thread Torsten Curdt
On May 8, 2008, at 16:26, Sherm Pendley wrote: On Thu, May 8, 2008 at 5:52 AM, <[EMAIL PROTECTED]> wrote: I'm working with mac 10.5 and xcode3.0.I've to send email from an application with out using any email client.When i try to use message framework,It doesn't work.(deliverMessage always r

Re: setting frequency using CoreAudio (like iTunes - Equalizer )

2008-05-08 Thread Jens Alfke
On 7 May '08, at 11:44 PM, Rajeswar Rao wrote: I am trying to implement iTunes-Equalizer kind of functionality to my mp3 playback. Can any body direct me how to do this. I started looking into CoreAudio frameworks. You'll need to use CoreAudio, specifically an AUGraph of AudioUnits. Be war

Re: How to send email without using email client

2008-05-08 Thread Jens Alfke
On 8 May '08, at 3:10 AM, vinitha ks wrote: My other question is about vector graphics,Is there any way to implement SVG in my cocoa application? Use a WebView and load an SVG document into it. Is there anyway to draw vector graphics other than using GCDrawKit (because still it doesn't pr

Re: Threading - How its done?

2008-05-08 Thread Scott Ribe
> What is sounds like you're saying is something like: No, not exactly, because you know that str is constant and its value is set at load time, so multiple readers without locks will be safe. However, what he was responding to was much more broad, and not correct: > Now if two threads are just

Re: BLOBs, MySQL, hex. Oh my

2008-05-08 Thread Ben Einstein
Hi Serge, It's really quite strange. MySQL does return an NSData object, but there's a byte level problem. Again, I really don't know much about this stuff but NSImage instances fail to be unarchived and zip files can't be unpacked. From what I understand, MySQL is giving us back hex. So

Re: Core Data with NSArrayController Confusion

2008-05-08 Thread Sean McBride
On 4/8/08 3:53 PM, I. Savant said: >On Tue, Apr 8, 2008 at 3:34 PM, Michael Burns <[EMAIL PROTECTED]> wrote: >> Interestingly enough, I started looking back to figure out where I had read >> that and realized it had come up in a thread I started back in September >> (http://www.cocoabuilder.com/ar

Re: regarding fxPlug plugins

2008-05-08 Thread Steve Christensen
On May 8, 2008, at 7:10 AM, Shashi Kumar wrote: I am new to fxplug. And I wanted to create an fxplug plugin from a cocoa application. What should be the right way to do this ? I have fxPlug SDK installed. The specification is: I have an cocoa application with UI having effects and image. And I

Re: Saving only required files in a file wrapper?

2008-05-08 Thread Michael Nickerson
On May 8, 2008, at 7:30 AM, Keith Blount wrote: Apologies for so soon a follow up, but I've just been experimenting with -writeToURL:ofType:forSaveOperation:originalContentsURL:error: and the results are disastrous. It turns out that *every single time* it is invoked, absoluteURL is a temp

Re: Quadratic curves in NSBezierPath

2008-05-08 Thread Nick Zitzmann
On May 8, 2008, at 7:33 AM, Graham Cox wrote: A cubic bezier with the two control points set to the same value is equivalent to a quadratic bezier. In other words the cubic is a superset of the quadratic. Why do you need quadratics specifically? I'm reading in a file format that uses on

Re: Saving only required files in a file wrapper?

2008-05-08 Thread Keith Blount
Hi, Many thanks for your reply, much appreciated - it all helps. I've spent the last couple of hours digging deeper into this, and I think what I'm going to try to do next is override at a slightly lower level, by overriding -writeSafelyToURL:ofType:forSaveOperation:error:. I found the part of

Re: NSStream blocking behavior?

2008-05-08 Thread Michael Gardner
Okay, then next question: what will happen if I call -write:maxLength: on an NSOutputStream without having received a NSStreamEventHasSpaceAvailable event? Is is guaranteed to block until it has written at least one byte (assuming we're not dealing with a fixed-length stream that has reache

Re: Avoiding NSAccessibilityException?

2008-05-08 Thread Gerd Knops
On May 7, 2008, at 8:31 PM, Martin Wierschin wrote: 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 NSExceptionHan

Re: How to convert UInt8 array to NSString

2008-05-08 Thread Gary L. Wade
Sorry, I misread your suggested method, but, as Adam points out, it still isn't adequate for someone who has free-styled 8-bit text with no idea what the original encoding was. > >On Wednesday, May 07, 2008, at 12:37PM, "Jean-Daniel Dupas" ><[EMAIL PROTECTED]> wrote: >>What make you think this

Re: BLOBs, MySQL, hex. Oh my

2008-05-08 Thread Chris Williams
I'm doing exactly what you are describing, using Serge's great stuff, and it works perfectly. I'm not sure what your problem is... I just put it in with the "prepare..." function, and when I get the thing back from MySQL, pump it into an NSImage, and voila, it works fine. If it's stored in a blo

Re: Keys dependent on NSArrayController's selection

2008-05-08 Thread Dave Dribin
On May 8, 2008, at 9:22 AM, Sean McBride wrote: On 5/8/08 1:53 AM, Dave Dribin said: For kicks, I did try "peopleController.selectionIndex" as well as "peopleController.selectedObjects" to no avail. So it seems you have observed the same as I: that keyPathsForValuesAffectingValueForKey does no

Re: Keys dependent on NSArrayController's selection

2008-05-08 Thread Sean McBride
On 5/8/08 1:45 PM, Dave Dribin said: >On May 8, 2008, at 9:22 AM, Sean McBride wrote: >> On 5/8/08 1:53 AM, Dave Dribin said: >>> For kicks, I did try >>> "peopleController.selectionIndex" as well as >>> "peopleController.selectedObjects" to no avail. >> >> So it seems you have observed the same a

Re: How to convert UInt8 array to NSString

2008-05-08 Thread Joe Goh
Hi Marc, Wish this thread existed 2 years ago. :-) But I digress.. You may also consider using the alternative approach of getting the user to select the most readable encoding (after you've tried automatically detecting it) and floating the most appropriate/most frequently used encodings on to

Re: BLOBs, MySQL, hex. Oh my

2008-05-08 Thread Ben Einstein
I was very surprised that exactly what you're describing didn't work for me. I never tested it with an NSImage but it definitely fails with a zip archive. I get an "unable to read pkzip package" error from ditto. I'll try it with an image and see what happens. I still don't know why there w

An Example NSStatusItem with a menu

2008-05-08 Thread J. Todd Slack
Hi All, Does anyone have an example os a NSStatusitem that programatically creates the menu and menu items below it? -Jason ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list

Re: BLOBs, MySQL, hex. Oh my

2008-05-08 Thread Thomas Engelmeier
On 08.05.2008, at 21:27, Ben Einstein wrote: I was very surprised that exactly what you're describing didn't work for me. I never tested it with an NSImage but it definitely fails with a zip archive. I get an "unable to read pkzip package" error from ditto. I'll try it with an image and

Re: BLOBs, MySQL, hex. Oh my

2008-05-08 Thread Chris Williams
That would make me suspect the way in which you are unzipping it, not the way it's stored. I assume you are writing it to a file, and passing that to your unzip routine? Is the issue there? > From: Ben Einstein <[EMAIL PROTECTED]> > Subject: Re: BLOBs, MySQL, hex. Oh my > > I was very surprise

Re: How to send email without using email client

2008-05-08 Thread Jim Turner
On Thu, May 8, 2008 at 5:10 AM, vinitha ks <[EMAIL PROTECTED]> wrote: > > Hi, > I'm working with mac 10.5 and xcode3.0.I've to send email from an > application with out using any email client.When i try to use message > framework,It doesn't work.(deliverMessage always returns no)Is there any > any

Re: How to send email without using email client

2008-05-08 Thread Shawn Erickson
On Thu, May 8, 2008 at 8:10 AM, Jens Alfke <[EMAIL PROTECTED]> wrote: > You shouldn't need a 3rd party framework just to do drawing. CoreData draws > vector graphics, and Cocoa has wrappers like NSBezierPath. Think you meant Core Graphics. ___ Cocoa-de

Dictionary Enumeration

2008-05-08 Thread Western Botanicals
I am getting the following error that seems to be happening because I am enumerating through a dictionary while it is being edited. I really need these things to happen simultaneously. What can I do? 2008-05-08 17:02:58.558 TimeKeeper[1641:813] *** NSDistantObject initWithCoder: 0x4d not gi

Re: expose - the algorithm

2008-05-08 Thread Gary L. Wade
Google TreeMap and look at the links for space-constrained visualization of hierarchies as a method of doing something similar to what Expose does. > 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 th

Re: Dictionary Enumeration

2008-05-08 Thread Nick Zitzmann
On May 8, 2008, at 5:05 PM, Western Botanicals wrote: I am getting the following error that seems to be happening because I am enumerating through a dictionary while it is being edited. I really need these things to happen simultaneously. What can I do? You cannot edit an NSMutableDiction

Re: Dictionary Enumeration

2008-05-08 Thread Western Botanicals
How can I lock it then? Justin Giboney ___ 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 y

Re: NSNumberFormatter behavior [Solved]

2008-05-08 Thread Chataka
F. Testuz, Thank you very much for your reply. My both problems were fixed. I guess the second problem was the same error. I guess the alert panel is shown only when nil is set through an IB element, and is not shown when it is set within the code. -Chataka On 2008/05/08, at 4:06, Frédéric Test

Re: Saving/restoring PDFAnnotationTextWidget stringValues with PDFKit 10.5

2008-05-08 Thread Joel Norvell
This is roughly the recipe Antonio suggested, although I'm shoehorning the widget data into the pdf itself; probably heretical, but it seemed like the practical thing to do. Synchronistically, I'd written this before posting my question :-) http://frameworker.wordpress.com/2008/05/06/a-cocoa-rec

Re: Dictionary Enumeration

2008-05-08 Thread Ken Thomases
On May 8, 2008, at 6:05 PM, Western Botanicals wrote: I am getting the following error that seems to be happening because I am enumerating through a dictionary while it is being edited. I really need these things to happen simultaneously. I doubt you do. If you think about it, the very idea

Re: Dictionary Enumeration

2008-05-08 Thread David Wilson
On Thu, May 8, 2008 at 7:19 PM, Western Botanicals <[EMAIL PROTECTED]> wrote: > How can I lock it then? If you just want to lock it for synchronization, use an NSLock if you're multithreaded. Actually, if you're multithreaded, you should really be aware that none of the containers are thread-safe

command-period doesn't close NSComboBox popup window

2008-05-08 Thread [EMAIL PROTECTED]
by subclassing NSComboBox and providing a subclass of NSTextView as its field editor, i am able to support the home/end/page down/page up keys in the popped up window. (i'm surprised this isn't the default behavior!) however, i haven't been able to figure out how to support command-period (to

F-Script Anywhere can't add to procmod group

2008-05-08 Thread David Carlisle
I'm trying to install F-Script Anywhere, but it can't install my developer account into the procmod group. It says "not a known DirStatus." I don't speak Unix, but I tried finding some terminal commands on the internet for installing a user into the procmod group via terminal, but I can't

Re: F-Script Anywhere can't add to procmod group

2008-05-08 Thread Dave Dribin
On May 8, 2008, at 7:31 PM, David Carlisle wrote: I'm trying to install F-Script Anywhere, but it can't install my developer account into the procmod group. It says "not a known DirStatus." I don't speak Unix, but I tried finding some terminal commands on the internet for installing a user

Re: F-Script Anywhere can't add to procmod group

2008-05-08 Thread David Carlisle
My file directory name says "FScriptBin-20070421" My startup warning message says I got it Jan 8, 2008, from www.fscript.org. But if ignore the procmod installation message, it still fails to install in, for example, Stickies. In that case I get: F-Script Anywhere was unable to install i

Re: F-Script Anywhere can't add to procmod group

2008-05-08 Thread Dave Dribin
On May 8, 2008, at 7:53 PM, David Carlisle wrote: My file directory name says "FScriptBin-20070421" My startup warning message says I got it Jan 8, 2008, from www.fscript.org. I think you may have to downgrade to Robert's FSA 1.3.1 as it looks like the code signing stuff hasn't made it into

Re: How to send email without using email client

2008-05-08 Thread Chris Suter
On 08/05/2008, at 8:10 PM, vinitha ks wrote: I'm working with mac 10.5 and xcode3.0.I've to send email from an application with out using any email client.When i try to use message framework,It doesn't work.(deliverMessage always returns no)Is there any any way to send email from my applicat

Re: F-Script Anywhere can't add to procmod group

2008-05-08 Thread John Stiles
I think they are focusing on polishing up 2.0. I submitted an enhancement for FSA a while back and that seemed to be where all the focus was. Dave Dribin wrote: On May 8, 2008, at 7:53 PM, David Carlisle wrote: My file directory name says "FScriptBin-20070421" My startup warning message say

Re: F-Script Anywhere can't add to procmod group

2008-05-08 Thread David Carlisle
I got 1.3.1, and that solved the installation problem. There is some confusion in the version numbers that made me think I didn't need 1.3.1: FSA Version 1.3 (1.3.2) dated May 30, 2006 FSA Version 1.3.1 (1.3.1) dated Oct 12, 2007. Thanks, DC On May 8, 2008, at 6:57 PM, Dave Dribin wrote:

Re: Quadratic curves in NSBezierPath

2008-05-08 Thread Kyle Sluder
On Thu, May 8, 2008 at 12:51 PM, Nick Zitzmann <[EMAIL PROTECTED]> wrote: > I'm reading in a file format that uses only a single control point for > curved edges. So create two control points for each one in your data file, just make them equal. --Kyle Sluder _

Re: Quadratic curves in NSBezierPath

2008-05-08 Thread Graham Cox
If you can use Core Graphics, there is: CGPathAddQuadCurveToPoint If using NSBezierPath, some simple maths will get you the needed control points, this googled up from http://fontforge.sourceforge.net/bezier.html Any quadratic spline can be expressed as a cubic (where the cubic term is zero

Re: Quadratic curves in NSBezierPath

2008-05-08 Thread Graham Cox
That doesn't actually yield precisely the same curve - see my other message. G. On 9 May 2008, at 11:26 am, Kyle Sluder wrote: On Thu, May 8, 2008 at 12:51 PM, Nick Zitzmann <[EMAIL PROTECTED]> wrote: I'm reading in a file format that uses only a single control point for curved edges.

Re: Quadratic curves in NSBezierPath

2008-05-08 Thread Nick Zitzmann
On May 8, 2008, at 7:28 PM, Graham Cox wrote: If you can use Core Graphics, there is: CGPathAddQuadCurveToPoint If using NSBezierPath, some simple maths will get you the needed control points, this googled up from http://fontforge.sourceforge.net/bezier.html Thank you. I did try Google bu

NSPopUpButton again

2008-05-08 Thread Johnny Lundy
Hi, still having no luck with NSPopUpButton and getting the selected item in the popup back into my model string. Simplified down to the bone, here's my class Popup: // Popup.h // TestPopup #import @interface Popup : NSObject { NSArray *popupArray; NSString *selectedGame; }

Superview and Subview Implementation Question

2008-05-08 Thread Kip Nicol
Hello all, I've run into an implementation issue regarding the best way to implement a view and its subviews. Maybe someone here can push me in the right direction :) I currently have a custom superview which holds custom subviews. These subviews can be selected and moved around by clicki

Re: NSPopUpButton again

2008-05-08 Thread Ken Thomases
On May 8, 2008, at 8:56 PM, Johnny Lundy wrote: Bindings: 1. My NSPopUpButton is bound with its Content, Content Objects, and Content Values to the NSArrayController's arrangedObjects.self. 2. The NSArrayController's Content is bound to Popup.popupArray through an instance of the class Popu

Crashes with NSOpenPanel and garbage collection

2008-05-08 Thread Daniel Parnell
Hi All, I'm having an interesting problem. I'm trying to use NSOpenPanel to select some files (as one usually does), however if I compile with garbage collection on and then try to use the Music, Photos or Movies areas in the open panel I get very strange crashes. If I've previously o

Re: Threading - How its done?

2008-05-08 Thread Michael Vannorsdel
Casting something as const doesn't automatically make a section of memory synchronized. In the end it's a compiler hint and doesn't change the fact the data is still going to live in the same RAM and cpu caches as everything else. Also, cache/data coherency is an industry accepted standard

Re: Crashes with NSOpenPanel and garbage collection

2008-05-08 Thread Antonio Nunes
On May 9, 2008, at 3:12 AM, Daniel Parnell wrote: I'm having an interesting problem. I'm trying to use NSOpenPanel to select some files (as one usually does), however if I compile with garbage collection on and then try to use the Music, Photos or Movies areas in the open panel I get very