Re: Noise in CALayer

2010-05-14 Thread Bertrand Landry-Hetu
By the looks of that screen shot I'd suggest you had a look at the bitmap used to fade out the reflection, there is probably a semi transparent gradient being drawn on top of a uninitialized image buffer. The easiest way to fix this is to fill it with [NSColor clearColor] before drawing the

Re: iPad interface orientation basics

2010-05-14 Thread David Duncan
On May 12, 2010, at 12:52 PM, sebi s...@happyhappyboy.de wrote: hello, sorry, this is probably a very simple thing, but i am quite puzzled right now. when i do this in my view controller: - (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {

how to terminate first AlertPanel when second AlertPanel appears?

2010-05-14 Thread kirankumar
Hi All, I am developing one application in that i want to add device request feature ,for that i am sending a message like DeviceRequest . if this message is send to other pc in that pc it shows one Alert message (NSRunAlertPanel(@Request,@Please Disconnect the device,@ok,@,nil); But again i

Simple bindings example

2010-05-14 Thread Andrew White
I've searched around and I can find sample code for this simple Bindings problem: I have an NSMutableSet of strings. I update the set internally. I want to display a single column NSTableView with all the current strings in the set. These strings can (and do) change as the program runs.

Re: AsyncUdpSocket: Receiving duplicate UDP Packet

2010-05-14 Thread jonat...@mugginsoft.com
On 13 May 2010, at 03:35, Todd Burch wrote: Hi all, Can anyone who's used AsyncUdpSocket before help out a beginner? Frustrated... Looking at the source for AsyncUdpSocket I would put a break point on - maybeCompleteCurrentReceive and see if this method is called multiple times. Regards

Re: Simple bindings example

2010-05-14 Thread Quincey Morris
On May 14, 2010, at 00:49, Andrew White wrote: I have an NSMutableSet of strings. I update the set internally. I want to display a single column NSTableView with all the current strings in the set. These strings can (and do) change as the program runs. From a user perspective, this is

NSDateFormatter for a web app UTC format

2010-05-14 Thread Keith Blount
Hello, I'm trying to set up a date formatter to convert a date string I receive from a server when downloading and sync'ing notes from web app. The dates I receive look like this: 2008-12-18 04:04:20.554442 The API docs for this web app specify that this is in GMT time, technically

Encode a 'Class' type using NSValue

2010-05-14 Thread Billy Flatman
Hi all, I'm trying to encode a 'Class' type parameter in an class implementing the NSCoding interface, but I keep getting the error 'cannot encode (void *) value: c0860200 0100'. Here's an extract the class I'm encoding: @interface IFNode : NSObject NSCoding { Class

TUTORIAL: Generating Unique ID Strings

2010-05-14 Thread Bill Hernandez
I ran into an interesting thread on the Cocoa Developers discussion group, and thought I 'd try to create a small demo, to see what I could learn, and sure enough I learned a lot. There were quite a few people that participated and provided a lot of great information, I tried to quote the email

Re: iPhone: viewDidAppear called, Default.png still visible

2010-05-14 Thread Thomas Davie
On 12 May 2010, at 17:54, sebi wrote: Hello, How can I find out if my first view is up and running? When viewDidAppear is called on my fist UIViewController I'm still looking only at the Default.png. What I do first in my app is: 1. wait for viewDidAppear to be called 2. show some

Re: Encode a 'Class' type using NSValue

2010-05-14 Thread Quincey Morris
On May 14, 2010, at 02:13, Billy Flatman wrote: I'm trying to encode a 'Class' type parameter in an class implementing the NSCoding interface, but I keep getting the error 'cannot encode (void *) value: c0860200 0100'. Here's an extract the class I'm encoding: @interface IFNode :

[Solved]: Noise in CALayer

2010-05-14 Thread Chaitanya Pandit
BINGO! that did the trick! Thanks Bertrand! Chaitanya Pandit On May 14, 2010, at 11:28 AM, Bertrand Landry-Hetu wrote: By the looks of that screen shot I'd suggest you had a look at the bitmap used to fade out the reflection, there is probably a semi transparent gradient being drawn on top

Re: Encode a 'Class' type using NSValue

2010-05-14 Thread Billy Flatman
Hi Quincey, Thanks for you help. I am trying to pass the class reference around for drag and drop, I think i'll try your idea of converting the pointer to a number, Cheers, Billy. On 14 May 2010, at 10:34, Quincey Morris wrote: On May 14, 2010, at 02:13, Billy Flatman wrote: I'm trying

Newbie: UITextView in Landscape

2010-05-14 Thread Arnold Nefkens
Hi List, Still new to Cocoa... In placed a new ViewController following the example in UICatalog. I got it working but was wondering how to make the view also editable in landscape view... Below is the code to display the keyboard and hide the keyboard, which I supplemented with the if...

Finding which window is causing the NSWindow does not support utility styleMask 0x10 error

2010-05-14 Thread Gideon King
I obviously have the utility style mask set on a window somewhere in one of my nibs, but I have 40 nibs in my project and it would take ages to go through every one of the windows in every nib to find the culprit. Is there some way I can search in my xib files, or set a breakpoint in my code so

Re: Finding which window is causing the NSWindow does not support utility styleMask 0x10 error

2010-05-14 Thread Andy Lee
Just a guess -- I'm looking at a xib file and I see this line: int key=NSWindowStyleMask15/int Maybe you could grep your xib's for NSWindowStyleMask, look at the output, and AND the values with 0x10. --Andy On May 14, 2010, at 7:29 AM, Gideon King wrote: I obviously have the utility

Re: Finding which window is causing the NSWindow does not support utility styleMask 0x10 error

2010-05-14 Thread Gideon King
Found it - find . -name *xib -print -exec grep NSWindowStyleMask {} \; was my friend. Gideon ___ 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: NSArrayController Undo

2010-05-14 Thread Richard Somers
On May 13, 2010, at 10:59 PM, Quincey Morris wrote: This is a little bit harder than it seems. You certainly want to have the document undo manager keep track of the selection changes, in order to stay in sync with the really undoable changes. So: 1. You need to add a transient property

Re: NSArrayController Undo

2010-05-14 Thread Quincey Morris
On May 14, 2010, at 06:43, Richard Somers wrote: Currently I track the selection using NSArrayController's selection methods. I have a custom view that figures out what the selection should or should not be and programatically sets the array controller's selection. It works very well and

Re: new to cocoa

2010-05-14 Thread Jens Alfke
On May 11, 2010, at 1:36 PM, Alejandro Marcos Aragón wrote: I'm new to Cocoa, and I couldn't find information about an error that I'm getting on the web. I'm trying to create an NSMutableDictionary where the keys are of type UIButton*: Sounds like you're trying to associate data values

Re: AsyncUdpSocket: Receiving duplicate UDP Packet

2010-05-14 Thread Greg Guerin
Todd Burch wrote: [aSyncSocket receiveWithTimeout:-1 tag:1]; //Listen for the next UDP packet to arrive...which will call this method again in turn. Don't start another receive. Handle or ignore the packet, then always return NO from the delegate method. The single outstanding

Re: how to terminate first AlertPanel when second AlertPanel appears?

2010-05-14 Thread Jens Alfke
On May 14, 2010, at 12:13 AM, kirankumar wrote: I am developing one application in that i want to add device request feature ,for that i am sending a message like DeviceRequest . if this message is send to other pc in that pc it shows one Alert message (NSRunAlertPanel(@Request,@Please

Re: TUTORIAL: Generating Unique ID Strings

2010-05-14 Thread Jens Alfke
A couple of points on the code: (1) If you're concerned about size, store the IDs in NSData instead of NSString. That way you get the full 8 bits per byte instead of 6, and avoid the complication of translating to and from ASCII. (2) If you do need to convert to string, it would be safer

Re: TUTORIAL: Generating Unique ID Strings

2010-05-14 Thread Jens Alfke
Oh, also, a comment on the site design: why do you present source code in the form of screenshots of Xcode windows? This makes it impossible for a user to copy the text easily, for a blind user to read it at all, or for a search engine to index it. It also consumes orders of more bandwidth

Re: AsyncUdpSocket: Receiving duplicate UDP Packet

2010-05-14 Thread Jens Alfke
On May 12, 2010, at 7:35 PM, Todd Burch wrote: I'm early in development, and all I'm doing is receiving a UDP packet over a given port, and logging it to the console. However, for some reason my UDP packet (transmitted from other software) appears to be arriving twice! The previous

Re: [[NSFileManager alloc] init] considered thread-safe

2010-05-14 Thread Ken Ferry
On Wed, May 5, 2010 at 11:33 AM, Michael Ash michael@gmail.com wrote: On Wed, May 5, 2010 at 2:29 PM, Jens Alfke j...@mooseyard.com wrote: On May 5, 2010, at 8:50 AM, Michael Ash wrote: Delegates are the only reason the doc says anything other than go nuts. This is what both Jens

Re: Encode a 'Class' type using NSValue

2010-05-14 Thread Jens Alfke
On May 14, 2010, at 2:45 AM, Billy Flatman wrote: Thanks for you help. I am trying to pass the class reference around for drag and drop, I think i'll try your idea of converting the pointer to a number, Encoding pointer values in archives is a very bad idea, since if the archive gets

Re: TUTORIAL: Generating Unique ID Strings

2010-05-14 Thread Thomas Wetmore
I must say that I am constantly amused by the nanniness of the Apple discussion lists, telling people what is safe and what is dangerous. There is nothing dangerous about bit-twiddling code. You test it til it works and then it works forever. It doesn't develop bugs later. My goal was to use

Re: NSArrayController Undo

2010-05-14 Thread Richard Somers
On May 14, 2010, at 10:25 AM, Quincey Morris wrote: If I understand you correctly, you're on the right track -- you want to bind the array controller's selection indexes to your data model's selection property. However, Core Data properties don't support index sets as a standard data type,

Re: NSArrayController Undo

2010-05-14 Thread Quincey Morris
On May 14, 2010, at 10:44, Richard Somers wrote: I see what you are saying. The path I was following was a little different. Each model object has a 'selected' attribute or property. When the array controller selection is set, the model objects 'selected' property is also set. What I was

Re: TUTORIAL: Generating Unique ID Strings

2010-05-14 Thread Jens Alfke
On May 14, 2010, at 10:30 AM, Thomas Wetmore wrote: I must say that I am constantly amused by the nanniness of the Apple discussion lists, telling people what is safe and what is dangerous. I'm trying to help people out, many of whom are newbies at Cocoa or at app programming in general.

Re: Image from WebView is sometimes blank

2010-05-14 Thread Adam R. Maxwell
On May 11, 2010, at 2:33 PM, Duncan Oliver wrote: I have a WebView that I use to capture a thumbnail of a loaded webpage using cacheDisplayInRect:. The WebView object is created programmatically and not attached to a window. About half the time, the image it grabs is blank. I can't seem to

Re: TUTORIAL: Generating Unique ID Strings

2010-05-14 Thread Bill Hernandez
On May 14, 2010, at 12:05 PM, Jens Alfke wrote: Oh, also, a comment on the site design: why do you present source code in the form of screenshots of Xcode windows? This makes it impossible for a user to copy the text easily, for a blind user to read it at all, or for a search engine to

Re: TUTORIAL: Generating Unique ID Strings

2010-05-14 Thread Daniel Grace
( 3 ) In order to show the source code (exactly as the screen captures show) using HTML would require so much more work for me, that I would just quit doing these little tutorials altogether. I know that most people on these forums know a whole lot more than me, and that's OK, but most most

Re: new to cocoa

2010-05-14 Thread Alejandro Marcos Aragón
Thanks Kiel for answering so fast. I realized that this was the case a couple of days ago. It took some time for my message to appear in the mailing list. I was trying to associate buttons with objects so that when I press the button I can do certain action on the corresponding object. I solved

Looking for Cocoa Drawing Strategy Advice

2010-05-14 Thread Philip Regan
Howdy-- I am porting a GUI-based MIDI editor from REALbasic to Cocoa to take advantage of the framework for all sorts of reason (though it seems mainly in an effort to torture myself with programming ;-)). I have the model and controller aspects stragetized, and I have cooked up a core working

Crash Question

2010-05-14 Thread koko
Exception Type: EXC_BAD_ACCESS (SIGBUS) Exception Codes: KERN_PROTECTION_FAILURE at 0x0845 Crashed Thread: 0 Dispatch queue: com.apple.main-thread Application Specific Information: objc_msgSend() selector name: release Thread 0 Crashed: Dispatch queue: com.apple.main-thread 0

Re: Crash Question

2010-05-14 Thread Kyle Sluder
On Fri, May 14, 2010 at 12:01 PM, k...@highrolls.net wrote: Is this telling me I crashed releasing some object? See So you crashed in objc_msgSend(): http://www.sealiesoftware.com/blog/archive/2008/09/22/objc_explain_So_you_crashed_in_objc_msgSend.html --Kyle Sluder

Re: Crash Question

2010-05-14 Thread Dave Carrigan
On May 14, 2010, at 12:01 PM, k...@highrolls.net wrote: Exception Type: EXC_BAD_ACCESS (SIGBUS) Exception Codes: KERN_PROTECTION_FAILURE at 0x0845 Crashed Thread: 0 Dispatch queue: com.apple.main-thread Application Specific Information: objc_msgSend() selector name: release

Re: TUTORIAL: Generating Unique ID Strings

2010-05-14 Thread Bill Hernandez
On May 14, 2010, at 1:39 PM, Daniel Grace wrote: There's something called Gist. It's largely part of github, but you don't have to use github to use it. There are other choices, but I do use github, so Gist is the one that I'm aware of. http://gist.github.com/ Not saying that you have

Re: TUTORIAL: Generating Unique ID Strings

2010-05-14 Thread Jens Alfke
On May 14, 2010, at 12:11 PM, Bill Hernandez wrote: It looks pretty nice, I will have to spend some time trying to see how I can use it. I had been using SubVersion via Apache on my OS X Server, and finally gave up and I am using something I wrote temporarily. I have heard good things

Re: [[NSFileManager alloc] init] considered thread-safe

2010-05-14 Thread Michael Ash
On Fri, May 14, 2010 at 1:12 PM, Ken Ferry kenfe...@gmail.com wrote: On Wed, May 5, 2010 at 11:33 AM, Michael Ash michael@gmail.com wrote: On Wed, May 5, 2010 at 2:29 PM, Jens Alfke j...@mooseyard.com wrote: On May 5, 2010, at 8:50 AM, Michael Ash wrote: Delegates are the only

Re: Encode a 'Class' type using NSValue

2010-05-14 Thread Michael Ash
On Fri, May 14, 2010 at 5:45 AM, Billy Flatman b.flat...@googlemail.com wrote: Hi Quincey, Thanks for you help. I am trying to pass the class reference around for drag and drop, I think i'll try your idea of converting the pointer to a number, The best way to pass arbitrary pointers around

Re: TUTORIAL: Generating Unique ID Strings

2010-05-14 Thread Bill Hernandez
On May 14, 2010, at 2:14 PM, Jens Alfke wrote: You don't have to use any particular version control system to use gists. It's just a service provided by GitHub. All it does is let you paste in some source code to create a web page from it, with syntax highlighting and line numbers and

Re: [[NSFileManager alloc] init] considered thread-safe

2010-05-14 Thread Ken Ferry
On Fri, May 14, 2010 at 1:34 PM, Michael Ash michael@gmail.com wrote: On Fri, May 14, 2010 at 1:12 PM, Ken Ferry kenfe...@gmail.com wrote: On Wed, May 5, 2010 at 11:33 AM, Michael Ash michael@gmail.com wrote: On Wed, May 5, 2010 at 2:29 PM, Jens Alfke j...@mooseyard.com wrote:

Re: TUTORIAL: Generating Unique ID Strings

2010-05-14 Thread Paul Sanders
I tried a page on, but it didn't do the color highlighting You could try pastebin. It seems to be popular with the folks round here. Pau Sanders. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or

NSDrawThreePartImage - Strange scaling behavior, is it supposed to do that?

2010-05-14 Thread aaron smith
Hello. Quick question. I'm using NSDrawThreePartImage and for the most part it works. But when the height of the views changes it's scaling the left and right edges. I'm just not sure if it's supposed to be doing that? Here are some images to see what's happening: http://i.imgur.com/LviD0.png -

Re: [[NSFileManager alloc] init] considered thread-safe

2010-05-14 Thread Michael Ash
On Fri, May 14, 2010 at 4:46 PM, Ken Ferry kenfe...@gmail.com wrote: Regarding that 10.5 singleton safety bug, is this documented anywhere? It seems like there are a lot of minor bugs which get fixed in later OS revisions but persist in earlier ones that we often have to support for a while.

Re: Looking for Cocoa Drawing Strategy Advice

2010-05-14 Thread Quincey Morris
On May 14, 2010, at 10:41, Philip Regan wrote: The feature that I'm stuck on sorting on how best to implement is custom rulers—multiple types of horizontal rulers that can be shown and hidden by the user together or alone (or none at all), each with their own editable objects and types of

NSTreeController and remove:

2010-05-14 Thread Tony Romano
I have a NSOutlineView bound to a NSTreeController in class mode(i.e. each NSTreeNode represents my Node object). Everything up to now is working fine. I am trying to remove a single node in the outline view by calling [outlineView remove:self] as a test. The documents are pretty simple and

Re: NSDrawThreePartImage - Strange scaling behavior, is it supposed to do that?

2010-05-14 Thread Graham Cox
I haven't used this function but its behaviour seems logical to me. If the height changes it has to scale the ends to fill that height and if they were the end caps of a button (I guess its main intended use) then it would be necessary to preserve the aspect ratio in order that, e.g. round end

Re: Looking for Cocoa Drawing Strategy Advice

2010-05-14 Thread Graham Cox
On 15/05/2010, at 7:14 AM, Quincey Morris wrote: In terms of placing these drawing objects within a larger canvas (with layering, z-ordering, all the other stuff drawing has), you might want to look into Graham Cox's DrawKit, which designed for this sort of thing. DrawKit may even have a

add small (control size) column to table view

2010-05-14 Thread Scott Ribe
I'm dynamically setting up columns in a table view, and I cannot get them set up to display as NSSmallControlsSize. I try: [[col dataCell] setControlSize: NSSmallControlSize]; Immediately before and immediately after [resultsTbl addTableColumn:...], but it doesn't affect the

Re: NSDrawThreePartImage - Strange scaling behavior, is it supposed to do that?

2010-05-14 Thread Ken Ferry
Yes, this is the intended behavior. See the header for details. You seem to be looking for the nine part draw. /* Draw an image from two end caps and a fill. The end caps are scaled proportionally to match the thickness of the destination frame. In the horizontal case, the startCap is drawn

Re: NSTreeController and remove:

2010-05-14 Thread Quincey Morris
On May 14, 2010, at 15:39, Tony Romano wrote: I have a NSOutlineView bound to a NSTreeController in class mode(i.e. each NSTreeNode represents my Node object). Everything up to now is working fine. I am trying to remove a single node in the outline view by calling [outlineView

Re: NSDrawThreePartImage - Strange scaling behavior, is it supposed to do that?

2010-05-14 Thread aaron smith
AH. I can't believe I missed that. Thanks! On Fri, May 14, 2010 at 4:39 PM, Ken Ferry kenfe...@gmail.com wrote: Yes, this is the intended behavior.  See the header for details. You seem to be looking for the nine part draw. /* Draw an image from two end caps and a fill.  The end caps are

Re: NSTreeController and remove:

2010-05-14 Thread Tony Romano
Thanks Quincey. removeObjectAtArrangedObjectIndexPath works but remove: still does not. It should remove the object, if there is a bug then I will file a bug report. anyone have ideas as to why remove: may not be working. I hate to find another way and drop a possible issue/bug. Thanks.

Objective-C / Cocoa dev position in Chicago area

2010-05-14 Thread Hai Nguyen
My company is hiring a full time, permanent Senior Software Engineer... info follows.  If you're interested, contact me.  Also feel free to pass along the opportunity to a colleague.  Salary is $85K and up.   Westell Inc. (NASDAQ: WSTL) is a designer of carrier-class equipment that delivers