Custom view controller

2008-11-04 Thread Tomaž Kragelj
Hello My application should be tiger compatible, so I can't use NSViewController. I created a custom view controller class with similar interface albeit much simpler. However I am not sure about the following (taken from NSViewController documentation): "...taking the same care to prevent

Re: Making a Window Class Invocable from Any Thread

2008-11-04 Thread Chris Hanson
On Nov 4, 2008, at 2:22 PM, Jerry Krinock wrote: I have a class which programatically creates and manipulates an alert window, like NSAlert except it's capable of much more. It exposes about 55 methods, doing stuff like like -setTitle:, - setButtonTitle:, -setProgressAmount:, -removeAllSubv

Re: NSTableView

2008-11-04 Thread Chris Hanson
On Nov 4, 2008, at 3:13 AM, Mahaboob wrote: My TableView contains some columns. I need to access all the column values of all selected rows. Rather than try to get the information you want from the table view, you should go directly to the model objects that the table view is presenting.

Re: CALayer contents memory leak

2008-11-04 Thread Adam Fedor
On Nov 4, 2008, at 4:00 PM, Matt Neuburg wrote: I will give two examples of phenomena that sound like yours but are not leaks: Thanks for the analysis. I'll try to figure out why my app is using so much memory. ___ Cocoa-dev mailing list (Co

Re: NSTableView

2008-11-04 Thread Steven Riggs
Thanks for the clarification Graham. It seems that retrieving data ordered (rows and columns) the same as the view is a common task. Apples solutions are pretty well thought out and encompassing so I was surprised there was not an easier way to get it. There's nothing worse than coding so

Re: NSTableView

2008-11-04 Thread Graham Cox
On 4 Nov 2008, at 10:13 pm, Mahaboob wrote: NSString*content; for(i=0;i<[tableView numberOfRows];i++) { if([tableView isRowSelected:i]) { content = [tableView tableColumnWithIdentifier:@"MediaType"] dataCellForRow:i]stringValue] stringByAppendi

Re: NSTableView

2008-11-04 Thread Graham Cox
On 5 Nov 2008, at 3:46 pm, Steven Riggs wrote: This feels like a workaround for not being able to get the data straight from the table view Can I just point out something? NSTableView is a view - the clue is in the name. Thus interrogating it for data is a little silly, no? You should a

Re: NSTableView

2008-11-04 Thread Graham Cox
On 4 Nov 2008, at 10:13 pm, Mahaboob wrote: content = [tableView tableColumnWithIdentifier:@"MediaType"] dataCellForRow:i]stringValue] stringByAppendingString:@","] stringByAppendingString:[[[tableView tableColumnWithIdentifier:@"Category"] dataCellForRow:i]stringValue]] ;

Re: NSTableView

2008-11-04 Thread Steven Riggs
One quick correction... I just noticed that you wanted selected objects so the first line should be... NSArray *array = [yourArrayController selectedObjects]; Cheers! Steven Riggs http://www.stevenriggs.com On Nov 4, 2008, at 11:46 PM, Steven Riggs wrote: You would think that would work. I

Re: NSTableView

2008-11-04 Thread Steven Riggs
You would think that would work. I don't know why it doesn't but I've been here before. You have to read the data from the array controller. But there is a way to line up the data from the array controller to match the organization of the table view. This feels like a workaround for not b

Problem with CGContextDrawShading

2008-11-04 Thread Graham Cox
I have code that draws gradients using the older method (CGContextDrawShading, not NSGradient) and this worked fine on Tiger. On Leopard, it mostly works, but in one case it doesn't, and I'm really having trouble trying to find out why. In this one case, I have a tracking loop within a cont

Re: Making a Window Class Invocable from Any Thread

2008-11-04 Thread Michael Ash
On Tue, Nov 4, 2008 at 6:10 PM, Charles Steinman <[EMAIL PROTECTED]> wrote: > This sounds like it might be a good case for a proxy. You could create a > small class that looks something like this: > > @implementation MyClass > @synthesize targetWindow; > - (void)forwardInvocation:(NSInvocation *)i

Re: FW: NSNumberFormatter: Display INT as decimal

2008-11-04 Thread Michael Ash
On Mon, Nov 3, 2008 at 8:30 PM, HAMILTON, Steven <[EMAIL PROTECTED]> wrote: > That would be an idea. I think my reluctance to do that initially was down > still not understanding floats and their imprecision. I use bindings for some > columns directly into the Core Data INT attribute. I presume I

NSTableView

2008-11-04 Thread Mahaboob
Hi, My TableView contains some columns. I need to access all the column values of all selected rows. So I coded like: NSString*content; for(i=0;i<[tableView numberOfRows];i++) { if([tableView isRowSelected:i]) { content = [tableView tableColu

Downloading a pls file

2008-11-04 Thread Arnab Ganguly
Hi All, I need help on how do I download a pls file from my application.I tried out /Developer/Examples/WebKit/Downloader test application, but it doesn't support download for pls files. Any help would be very much appreciated. Thanks Arnab ___ Cocoa-dev

Re: Spin Progress Indicator is not spinning

2008-11-04 Thread Rashmi Vyshnavi
Hi all, I could resolve this problem by using performSelectorOnMainThread as my application is multi threaded application. Thanks, Rashmi On Tue, Nov 4, 2008 at 8:09 AM, Rashmi Vyshnavi <[EMAIL PROTECTED]>wrote: > Hi all, > > I am setting a custom view containing a label and spin style progress

Re: CABasicAnimation, CALayers, and rotation

2008-11-04 Thread Michael A. Crawford
Thanks for the code reference, Matt. I'll go look it up after I reply to this thread. I think I'm just going to use Graham's suggestion, to multiply by -1. This seems to give me the behavior I'm looking for. -Michael On Nov 4, 2008, at 5:16 PM, Matt Long wrote: Others have answered the

Re: Use PPPOE to load net

2008-11-04 Thread Xianyu_Ge
First, I thanks for you reply, I have an algorithm that can calculate the real user name , and use this name and PPPOE to load service. I am not familiar with applescript, I understand cocoa, can use objective- c, thanks very much. --- Best Regards, Xianyu

Re: CABasicAnimation, CALayers, and rotation

2008-11-04 Thread Michael A. Crawford
Unless North is 0 and East is 90, which it is in my context after I execute the following code snippet: // // Center and rotate the drawing context so that 0,0 is at the center and // zero degrees is at the top of the context. // CGContextTranslateCTM(ctx, CGRectGetMidX(l

Re: Cocoa binding for NSTableView and a background object list

2008-11-04 Thread Xianyu_Ge
Hi, Xiaogang, There are some links to introduce cocoa bindings: http://www.cocoadevcentral.com/articles/80.php http://www.cocoadev.com/index.pl?CocoaBindings I hope that can help you. --- Best Regards, Xianyu

Re: CABasicAnimation, CALayers, and rotation

2008-11-04 Thread Matt Long
Others have answered the question, but here's some code. Gotta love code. ;-) http://www.cimgf.com/2008/10/25/core-animation-tutorial-slider-based-layer-rotation/ -Matt On Nov 4, 2008, at 5:30 PM, Michael A. Crawford wrote: By default, positive angle values assigned to a rotation animation

Re: Pop-Up Graphical Calendar

2008-11-04 Thread Graham Cox
On 5 Nov 2008, at 12:09 pm, Brad Gibbs wrote: I suppose an action is being sent, but not one coded by me. So just define one and hook it up. AFAIK you can still do this even if you are using bindings. --Graham ___ Cocoa-dev mailing list (Cocoa

Re: Pop-Up Graphical Calendar

2008-11-04 Thread Brad Gibbs
It's setting a start date field for a Core Data entity. Once a date is selected, it updates two text fields -- one in a master table and another in the detail view (both of which are bound to the start date attribute). I suppose an action is being sent, but not one coded by me. On Nov 4

Re: CABasicAnimation, CALayers, and rotation

2008-11-04 Thread David Duncan
On Nov 4, 2008, at 4:30 PM, Michael A. Crawford wrote: By default, positive angle values assigned to a rotation animation result in counter clockwise rotation. Is there a way to cause the rotation to occur in the clock-wise direction, with positive values? For example, consider a needle r

Re: CABasicAnimation, CALayers, and rotation

2008-11-04 Thread Graham Cox
On 5 Nov 2008, at 11:30 am, Michael A. Crawford wrote: By default, positive angle values assigned to a rotation animation result in counter clockwise rotation. Is there a way to cause the rotation to occur in the clock-wise direction, with positive values? For example, consider a needle

CABasicAnimation, CALayers, and rotation

2008-11-04 Thread Michael A. Crawford
By default, positive angle values assigned to a rotation animation result in counter clockwise rotation. Is there a way to cause the rotation to occur in the clock-wise direction, with positive values? For example, consider a needle rotating in a compass. As the needle rotates in a clock

Re: Forcing garbage collection, freeing up memory, thrashing

2008-11-04 Thread Bill Bumgarner
On Nov 4, 2008, at 3:51 PM, Sean McBride wrote: Thanks very much for your reply Bill. I'm afraid one of us is misunderstanding the other though. My object is being collected when I expect. And by 'being collected' I mean the object's finalize was called when I expect (no later than after ob

Re: Forcing garbage collection, freeing up memory, thrashing

2008-11-04 Thread Sean McBride
On 11/4/08 11:21 AM, Bill Bumgarner said: >Have you used the Object Graph instrument in Instruments and/or gdb's >info gc-references/gc-roots to determine what is sticking around and >why? Analysis with said tools can tell you exactly what is going on. > >In this case, though, I have an idea wha

Re: Pop-Up Graphical Calendar

2008-11-04 Thread Graham Cox
On 5 Nov 2008, at 10:15 am, Brad Gibbs wrote: Hi, I'm trying to replicate one of the pop-up calendars you see on Orbitz, Hotwire, etc. , where the user clicks a calendar icon, the calendar appears and then the calendar disappears once the user has selected a date. I've got a graphical

Interface Builder - QTMovieView related eror

2008-11-04 Thread Jean-Nicolas Jolivet
I wasn't having much success trying to create a QTMovie from a path and assigning it to a QTMovieView outlet so I decided to go back to the basic and just set the QTMovieView's movie in Interface Builder and see if it would at least play when I run the app... however I'm getting an error now sa

Pop-Up Graphical Calendar

2008-11-04 Thread Brad Gibbs
Hi, I'm trying to replicate one of the pop-up calendars you see on Orbitz, Hotwire, etc. , where the user clicks a calendar icon, the calendar appears and then the calendar disappears once the user has selected a date. I've got a graphical NSDatePicker and I can show and hide it with an

Re: Making a Window Class Invocable from Any Thread

2008-11-04 Thread Charles Steinman
This sounds like it might be a good case for a proxy. You could create a small class that looks something like this: @implementation MyClass @synthesize targetWindow; - (void)forwardInvocation:(NSInvocation *)invocation { [invocation performSelectorOnMainThread:@selector(invokeWithTarget:) withO

Re: CALayer contents memory leak

2008-11-04 Thread Matt Neuburg
On Tue, 04 Nov 2008 08:58:24 -0700, Adam Fedor <[EMAIL PROTECTED]> said: > >On Nov 4, 2008, at 8:23 AM, Matt Neuburg wrote: > >> On Sun, 02 Nov 2008 22:08:04 -0700, Adam Fedor <[EMAIL PROTECTED]> said: >>> I have a simple program with a memory leak that is driving me crazy. >>> It's basically a sli

Re: Get MD5 without crashing (Mr. Gecko)

2008-11-04 Thread Mr. Gecko
I've got it to work. On Nov 4, 2008, at 1:22 PM, Stuart Malin wrote: Mr. Gecko, In your method, because you alloc an instance of a crypto object, you must release that crypto object. The problem you are having is that you want to return a value, yet the value is derived from an object tha

Re: Making a Window Class Invocable from Any Thread

2008-11-04 Thread Nick Zitzmann
On Nov 4, 2008, at 3:22 PM, Jerry Krinock wrote: This seems like a good solution but before I write wrappers for 55 methods I was wondering if anyone knows a better approach to this problem. Did you see the easy-to-miss NSInvocationOperation class? Nick Zitzmann

Making a Window Class Invocable from Any Thread

2008-11-04 Thread Jerry Krinock
I have a class which programatically creates and manipulates an alert window, like NSAlert except it's capable of much more. It exposes about 55 methods, doing stuff like like -setTitle:, -setButtonTitle:, - setProgressAmount:, -removeAllSubviews, -setPopupTitles:, setIconStyle: etc., etc.

Re: Programatically Change NSMenu Title

2008-11-04 Thread Chunk 1978
excellent! this works well, since i don't use the nibtool... i should probably use the nibtool for my next app :) thanks for all the replies On Tue, Nov 4, 2008 at 4:55 PM, Peter Ammon <[EMAIL PROTECTED]> wrote: > > On Nov 4, 2008, at 12:02 PM, Chunk 1978 wrote: > > for localization purposes, i'

Re: Key Paths @count and mutablestrings

2008-11-04 Thread Graham Cox
On 5 Nov 2008, at 5:28 am, Amy Gibbs wrote: I can connect it in IB, my problem is how to reference it / use the objects in it in the code. In IB I already have the Array Controller called Purchase Order Items. If you have an IBOutlet, let's call it 'myPurchaseOrderItems', you can see an

Re: Programatically Change NSMenu Title

2008-11-04 Thread Christopher Hickman
On Tuesday, November 04, 2008, at 04:44PM, "Chunk 1978" <[EMAIL PROTECTED]> wrote: >i just found it a lot easier to edit the localizable.strings file than >change the menu items in the nib file... i mean, if i had a program >that is localized in 20 different languages, it would certainly be >easie

Re: Programatically Change NSMenu Title

2008-11-04 Thread Peter Ammon
On Nov 4, 2008, at 12:02 PM, Chunk 1978 wrote: for localization purposes, i'd like to programatically change all of my app's menu item titles. the above code works fine for everything except the menu bar titles (like "File", "Edit", "Window", etc.)... when i click on these objects in I

Re: Programatically Change NSMenu Title

2008-11-04 Thread Chunk 1978
i just found it a lot easier to edit the localizable.strings file than change the menu items in the nib file... i mean, if i had a program that is localized in 20 different languages, it would certainly be easier to edit a text file than the nib... anyway... i've done it with the NSMenuItems, and

Re: 64-bit swizzling

2008-11-04 Thread Nick Zitzmann
On Nov 4, 2008, at 1:26 PM, Charles Steinman wrote: Check out method_exchangeImplementations(). Thanks; that looks like it will do what I need to do. Nick Zitzmann ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.co

Re: 64-bit swizzling

2008-11-04 Thread Charles Steinman
- Original Message > From: Nick Zitzmann <[EMAIL PROTECTED]> > > Short question: How do I perform method swizzling in the 64-bit runtime? Check out method_exchangeImplementations(). http://developer.apple.com/documentation/Cocoa/Reference/ObjCRuntimeRef/Reference/reference.html#//apple

Re: Programatically Change NSMenu Title

2008-11-04 Thread Christopher Hickman
On Tuesday, November 04, 2008, at 03:02PM, "Chunk 1978" <[EMAIL PROTECTED]> wrote: >for localization purposes, i'd like to programatically change all of >my app's menu item titles. Generally, you'd accomplish that with localized nibs instead of doing it proramatically. Is there some reason why t

64-bit swizzling

2008-11-04 Thread Nick Zitzmann
I searched the archives and didn't see anything relevant... Short question: How do I perform method swizzling in the 64-bit runtime? Long question: I've got a 32-bit UB bundle. I'd like to compile that bundle for X86-64, but the bundle uses method swizzling to work around a bug in a third-pa

Re: Underlining text in Interface Builder

2008-11-04 Thread Joey Hagedorn
Hello, If you are unable to format text as you intend, please do file a bug at http://bugreporter.apple.com with precisely what you're trying to do, how you expect it to behave, and how it currently behaves. Thanks, -Joey On Nov 4, 2008, at 12:37 AM, Adil Saleem wrote: Hi, I am trying to

SecKeyGeneratePair export Public Key and OpenSSL API

2008-11-04 Thread Jacopo Mangiavacchi
I need to export a public key generated with the SecKeyGeneratePair API and send it to a WebServices (written in PHP) that using the OpenSSL API must encrypt something using this key and return back the ciphered value to the cocoa client. In order to pass the public key NSData buffer I've t

Re: Underlining text in Interface Builder

2008-11-04 Thread Jonathan Hess
Hey Adil - A text label in Interface Builder is an NSTextField, which has an NSTextFieldCell. NSTextFieldCell has three related properties, stringValue, font, and attributedStringValue. When the cell has just a stringValue, and a font, it combines the two during drawing to draw the string

Programatically Change NSMenu Title

2008-11-04 Thread Chunk 1978
for localization purposes, i'd like to programatically change all of my app's menu item titles. #import -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- @interface AppController : NSObject { //Main Menu Outlets IBOutlet id MenuItem1; IBOutlet id MenuItem2; } @

Re: Get MD5 without crashing (Mr. Gecko)

2008-11-04 Thread Stuart Malin
Mr. Gecko, In your method, because you alloc an instance of a crypto object, you must release that crypto object. The problem you are having is that you want to return a value, yet the value is derived from an object that must be released. In a sense, what you want to do is this: - (NSStr

Re: Forcing garbage collection, freeing up memory, thrashing

2008-11-04 Thread Bill Bumgarner
On Nov 4, 2008, at 10:46 AM, Sean McBride wrote: Hi all, I have a 64 bit, Cocoa, GC app. It loads many large bitmap files. Each is about 500 MiB, and the user may want to load about 50 of them. When each file is opened, I read the entire file, then downscale the image to a smaller reso

Re: CALayer contents memory leak

2008-11-04 Thread David Duncan
On Nov 4, 2008, at 10:47 AM, Adam Fedor wrote: On Nov 4, 2008, at 10:05 AM, David Duncan wrote: While I don't see a leak in here, it can never hurt to simplify your code. Try this instead. Thanks, that is simpler, but it doesn't solve the problem. I've tried many things. The easiest way t

Forcing garbage collection, freeing up memory, thrashing

2008-11-04 Thread Sean McBride
Hi all, I have a 64 bit, Cocoa, GC app. It loads many large bitmap files. Each is about 500 MiB, and the user may want to load about 50 of them. When each file is opened, I read the entire file, then downscale the image to a smaller resolution. I then no longer need the large image. Basically

Re: Xml

2008-11-04 Thread Gerriet M. Denkmann
On 4 Nov 2008, at 18:58, Klaus Backert wrote: Am 04.11.2008 um 17:49 schrieb Gerriet M. Denkmann: < new as of today ]> Looks better, but both problems still persist: "no DTD found!" and NSXMLParserNAME

Re: CALayer contents memory leak

2008-11-04 Thread Adam Fedor
On Nov 4, 2008, at 10:05 AM, David Duncan wrote: While I don't see a leak in here, it can never hurt to simplify your code. Try this instead. Thanks, that is simpler, but it doesn't solve the problem. I've tried many things. The easiest way to solve the problem is to comment out this line

Re: View swapping questions

2008-11-04 Thread Andrew Merenbach
On Nov 4, 2008, at 10:00 AM, Robert Mullen wrote: I am attempting to swap views somewhat like XCode does between project and debug modes. This is being done to an existing project that has the main windows content view set in IB. I have tried to store the initial view before replacing it wi

Re: View swapping questions

2008-11-04 Thread Andy Lee
Also if you take this approach remember to retain oldView -- it will get released when you replace it with newView. --Andy On Nov 4, 2008, at 1:24 PM, Volker in Lists wrote: Hi Robert, sounds reasonable, but no need to store any control states as far as I can tell (they are not released,

Re: Key Paths @count and mutablestrings

2008-11-04 Thread Amy Gibbs
On 4 Nov 2008, at 18:21, Volker in Lists wrote: Hi, Is there an easy way to access the existing Array Controller from the code? I have a suitable Array Controller called Purchase Order Items Array Controller in IB, but I don't see a way to reference this in the code. The Array Controll

Re: View swapping questions

2008-11-04 Thread Andy Lee
On Nov 4, 2008, at 1:00 PM, Robert Mullen wrote: oldView = [window contentView]; [window setContentView:newView]; and then swapping them back out on a segmented cell action [window setContentView:oldView]; You could do it this way, but I suspect it would be simpler to use a tabless NSTabVie

Re: View swapping questions

2008-11-04 Thread Volker in Lists
Hi Robert, sounds reasonable, but no need to store any control states as far as I can tell (they are not released, just "taken out of view"). There is an example available demonstrating this w/ some nice CoreAnimation transition > BasicCocoaAnimations found on the online developer example

Re: Key Paths @count and mutablestrings

2008-11-04 Thread Volker in Lists
Hi, Is there an easy way to access the existing Array Controller from the code? I have a suitable Array Controller called Purchase Order Items Array Controller in IB, but I don't see a way to reference this in the code. The Array Controller is bound to the selection of another Array Con

Re: About Ink drawing with wacom tablet

2008-11-04 Thread john chen
Ben, I tried both turn off or turn on the Ink from Ink panel, but still not seeing the NSTabletPoint event in either case. Thanks, John On Tue, Nov 4, 2008 at 11:34 AM, Benjamin Stiglitz <[EMAIL PROTECTED]> wrote: > > Did I miss something, or I was doing something wrong? I have > > InkSetAppli

View swapping questions

2008-11-04 Thread Robert Mullen
I am attempting to swap views somewhat like XCode does between project and debug modes. This is being done to an existing project that has the main windows content view set in IB. I have tried to store the initial view before replacing it with the new view using code similar to this: oldV

Re: Xml

2008-11-04 Thread Klaus Backert
Am 04.11.2008 um 17:49 schrieb Gerriet M. Denkmann: < new as of today ]> Looks better, but both problems still persist: "no DTD found!" and NSXMLParserNAMERequiredError. Any ideas? Kind regards, Gerr

Re: Key Paths @count and mutablestrings

2008-11-04 Thread Amy Heavey
On 4 Nov 2008, at 17:32, Benjamin Stiglitz wrote: On Mon, Nov 03, 2008 at 06:55:24PM +, Amy Heavey wrote: … How do I access the count of a to-many relationship? You’ve got that backwards; you want [EMAIL PROTECTED] Fantastic! Thank You, Do you mean print out on a printer, or just di

Re: About Ink drawing with wacom tablet

2008-11-04 Thread Benjamin Stiglitz
> Did I miss something, or I was doing something wrong? I have > InkSetApplicationWritingMode (kInkWriteAnywhereInApp); > > InkSetApplicationRecognitionMode (kInkRecognitionGesture | > kInkRecognitionText); You don’t want to turn on Ink in your case, since you want to capture the tablet events o

Re: Key Paths @count and mutablestrings

2008-11-04 Thread Benjamin Stiglitz
On Mon, Nov 03, 2008 at 06:55:24PM +, Amy Heavey wrote: > PurchaseOrder is an Entity, with a relationship called products to the > PurchaseOrderItems Entity which lists the actual items on the order. I'd > like a column in my Purchase Order tabel to display the number of items > in the order

Re: Get MD5 without crashing

2008-11-04 Thread Mr. Gecko
I finally got it working. I put the crypto object in the header file and than every time the md5 method starts, it would release and make it nil Thanks for the help, Mr. Gecko On Nov 4, 2008, at 11:16 AM, Andy Lee wrote: On Nov 4, 2008, at 11:41 AM, Mr. Gecko wrote: now that I added a auto

Re: Get MD5 without crashing

2008-11-04 Thread Andy Lee
On Nov 4, 2008, at 11:41 AM, Mr. Gecko wrote: now that I added a auto release pool it crashes later on. but it doesn't have to do with MD5 anymore it has to do with the hexdump of SSCrypto. [...] - (NSString *)md5:(NSString *)MD5 { SSCrypto *crypto = [[SSCrypto alloc] init]; [crypto setClea

Re: CALayer contents memory leak

2008-11-04 Thread David Duncan
On Nov 2, 2008, at 9:08 PM, Adam Fedor wrote: image = [[NSImage alloc] initWithContentsOfFile: next]; if (image) { CGImageRefimageRef = NULL; CGImageSourceRef sourceRef; sourceRef = CGImageSourceCreateWithData((CFDataRef)[image TIFFRepresentation], NULL); if

Re: Xml

2008-11-04 Thread Gerriet M. Denkmann
On 4 Nov 2008, at 00:57, Klaus Backert wrote: Am 03.11.2008 um 23:09 schrieb Gerriet M. Denkmann: I do: NSXMLDocument *xmlDoc = ... NSData *data = [ xmlDoc XMLDataWithOptions: NSXMLNodePrettyPrint | NSXMLNodeCompactEmptyElement ]; This looks like: <

Re: Please help. At wit's end binding NSPopupButtonCell selection

2008-11-04 Thread Chris Hanson
To summarize what you've done: 1. You set up a Pages NSArrayController. 2. You set up a Masters NSArrayController. 3. You bind the pop-up's Content Values to the Masters controller's "arrangedObjects.name". 4. You bind the pop-up's Selected Value to the Pages controller's "selection.master" p

Use named constants, not literal strings (was Re: Please help. At wit's end binding NSPopupButtonCell selection)

2008-11-04 Thread Chris Hanson
On Nov 4, 2008, at 1:05 AM, Ken Tozier wrote: Here's how I'm setting up the bindings 1. bind an NSArrayController (pageController ) to an NSArray of pages in a project [pageController bind: @"contentArray" toObject: inProject withKeyPath: @"pages" options: nil]; One tip that has nothing

Re: Get MD5 without crashing

2008-11-04 Thread Mr. Gecko
now that I added a auto release pool it crashes later on. but it doesn't have to do with MD5 anymore it has to do with the hexdump of SSCrypto. 0 libSystem.B.dylib 0x07c7 __memcpy + 39 1 libobjc.A.dylib 0x9347c13e fixupSelectorsInMethodList + 99 2

RE: properties, threads, and KVO

2008-11-04 Thread Karan, Cem (Civ, ARL/CISD)
> -Original Message- > From: Chris Hanson [mailto:[EMAIL PROTECTED] > Sent: Tuesday, November 04, 2008 10:49 AM > To: Karan, Cem (Civ, ARL/CISD) > Cc: cocoa-dev@lists.apple.com > Subject: Re: properties, threads, and KVO > > On Nov 4, 2008, at 7:20 AM, Karan, Cem (Civ, ARL/CISD) wrote:

Re: Endless Hang on Saving a Core Data Document

2008-11-04 Thread Andrew Merenbach
Oh, yeah, this was my issue, right? For some stupid reason, I never filed a bug report. Strange that this hasn't been addressed yet in a dot update -- it seems pretty significant. Of course, there's a lot to do for future OSes, I suppose. Also strange that we don't see this issue come u

Re: CALayer contents memory leak

2008-11-04 Thread Adam Fedor
On Nov 4, 2008, at 8:23 AM, Matt Neuburg wrote: On Sun, 02 Nov 2008 22:08:04 -0700, Adam Fedor <[EMAIL PROTECTED]> said: I have a simple program with a memory leak that is driving me crazy. It's basically a slide show application (no I can't use IKSlideShow), where I repeatedly set an image in

Re: Endless Hang on Saving a Core Data Document

2008-11-04 Thread Mathieu Coursolle
Hi, We have a Core Data/ Leopard/Garbage collection/SQLite application that is never returning from save. I found your post, and changing to XML did solve the issue. Is there a rdar for this? We do have a 100% repro case, and we'd like to use SQLite... Thanks! Mathieu On 28-Feb-08, at

Re: properties, threads, and KVO

2008-11-04 Thread Chris Hanson
On Nov 4, 2008, at 7:20 AM, Karan, Cem (Civ, ARL/CISD) wrote: KVO is ideal, but I don't know it works across threads. KVO doesn't do anything special with respect to threads. Since it's synchronous, that means KVO notifications are delivered in the thread in which they occur, just as if you

Cocoa binding for NSTableView and a background object list

2008-11-04 Thread Andrew
Hi,List I have a project that need use the Cocoa Bindings. But I am not familiar with this mechanism. So, I post my question here for some help. Any comments will be appreciated sincerely. The functionality of my project like this, once the application is launched, one thread will

Re: NSTableView Informal Protocal

2008-11-04 Thread Matt Neuburg
On Mon, 03 Nov 2008 11:00:38 -0600, Ron Green <[EMAIL PROTECTED]> said: >'m a newb and am struggling to find documentation. > >Example: > >NSTableView: setObjectValue:forTableColumn:row > >I have looked through all the documentation for NSTableView and cannot >find this method. >Does anyone know wh

Re: CALayer contents memory leak

2008-11-04 Thread Matt Neuburg
On Sun, 02 Nov 2008 22:08:04 -0700, Adam Fedor <[EMAIL PROTECTED]> said: >I have a simple program with a memory leak that is driving me crazy. >It's basically a slide show application (no I can't use IKSlideShow), >where I repeatedly set an image in a CALayer. When run, the app >increases in memory

properties, threads, and KVO

2008-11-04 Thread Karan, Cem (Civ, ARL/CISD)
I'm running into a problem with my code that is most easily solved by splitting up everything into a client server model, where the client is the main thread of my application, and the server is a background thread that does networking type stuff. I want the client to update itself as soon as t

Re: Get MD5 without crashing

2008-11-04 Thread Roland King
does SSCrypto follow a different pattern from normal Cocoa objects? It's being created with alloc/init and that, for cocoa objects, gives it a retain count of 1, you own it, you have to release it. SSCrypto *crypto = [[SSCrypto alloc] init]; I note also that the examples on the SSCrypto si

Re: Get MD5 without crashing

2008-11-04 Thread Jonathan del Strother
Please just refer people to http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Tasks/MemoryManagementRules.html when memory management comes up. And in Gecko's case, 'crypto' certainly does need to be released, since it's being alloc-inited. On Tue, Nov 4, 2008 at 1:48 PM, Alex

Re: Get MD5 without crashing

2008-11-04 Thread Alex Heinz
The SSCrypto object doesn't need to be released; it isn't being retained, and doesn't leave the scope of the function. It will be deallocated when control leaves the function. Alex On Nov 4, 2008, at 12:09 AM, Roland King wrote: well no that would leak since then the crypto object wouldn't

Re: Please help. At wit's end binding NSPopupButtonCell selection

2008-11-04 Thread Ken Tozier
Success! Here's the correct incantation 1. bind page controller to page list [pageController bind: @"contentArray" toObject: inProject withKeyPath: @"pages" options: nil]; 2. bind popup controller to master page list [popupController bind: @"contentArray" toObject: inProject withKeyPath

Re: pragma mark Queston

2008-11-04 Thread I. Savant
On Nov 4, 2008, at 7:46 AM, Carmen Cerino Jr. wrote: How are the labels suppose to appear in the drop down menu? All of mine are showing up at the bottom of the list. I have opened other people's projects and have seen their labels appear before each function group they are describing. Thou

Re: pragma mark Queston

2008-11-04 Thread Ken Tozier
I use pragma mark all the time and this seems to work fine #pragma mark- #pragma mark Drawing #pragma mark- Xcode does seem to hiccup once in awhile with pragma mark though. Sometimes, for unknown reasons, a mark will completely disappear and I have to manually cut and past them back in the

pragma mark Queston

2008-11-04 Thread Carmen Cerino Jr.
How are the labels suppose to appear in the drop down menu? All of mine are showing up at the bottom of the list. I have opened other people's projects and have seen their labels appear before each function group they are describing. ___ Cocoa-dev mailin

Re: Please help. At wit's end binding NSPopupButtonCell selection

2008-11-04 Thread Cathy Shive
On Nov 4, 2008, at 1:27 PM, Ken Tozier wrote: The reason I think this might be possible through bindings, is that other bound fields in the table have values specific to their associated page. For example, pages also have a status string, indicating whether stories need trims, are missing p

Re: Use PPPOE to load net

2008-11-04 Thread Adam Penny
Actually, I just tried the link I mentioned and it didn't work. There's an example of how to do exactly what you want on this page though. http://developer.apple.com/releasenotes/AppleScript/RN-AppleScript/index.html Ad On Nov4, 2008, at 1:28 PM, Adam Penny wrote: Hey there, I get the impr

Re: Use PPPOE to load net

2008-11-04 Thread Adam Penny
Hey there, I get the impression that what he means is that he has an ADSL set up where you have to dial a PPPoE connection from the computer as opposed to an always on ADSL connection provided by a router. It looks like this has already been done with Applescript by someone else, which yo

Re: Please help. At wit's end binding NSPopupButtonCell selection

2008-11-04 Thread Ken Tozier
On Nov 4, 2008, at 7:07 AM, Cathy Shive wrote: As for whether or not it's possible to do this with bindings, I'm not 100% sure... When the table is first displayed, are the proper selections displayed for each row? Yes and no. The popups have all the correct choices in them but all pag

Re: Please help. At wit's end binding NSPopupButtonCell selection

2008-11-04 Thread Cathy Shive
The 'anIndex' in my snippet is just nothing - you'd have to determine that. I guess it would be something like the selected object index of the array controller you're binding the popup's content to? As for whether or not it's possible to do this with bindings, I'm not 100% sure... When

Re: Use PPPOE to load net

2008-11-04 Thread Uli Kusterer
On 04.11.2008, at 03:04, Xianyu_Ge wrote: I am a beginner of cocoa program, I want to write an project that use PPPOE to automatic loading net, I don't know how to do it, can give me some help or sample, thank you very much. I don't quite understand what you are trying to achieve here ...

Re: Please help. At wit's end binding NSPopupButtonCell selection

2008-11-04 Thread Ken Tozier
Hmmm. So there's no way to set this up just through bindings? Also, in your snippet, where does "anIndex" come from? On Nov 4, 2008, at 5:32 AM, Cathy Shive wrote: On Nov 4, 2008, at 10:05 AM, Ken Tozier wrote: What happens is that when I choose an item in one row's popup cell, the selectio

Do i need to call NSTreeController setContent: in awakeFromNib?

2008-11-04 Thread Florian Soenens
Hi list, i am new to bindings (not Cocoa) and i set up a simple NSOutlineView bound to an NSTreeController. I created a simple plist file with a tree structure and load that in a NSMutableDictionary at awakeFromNib: The purpose is that my NSOutlineview gets populated immediately at startu

Re: Please help. At wit's end binding NSPopupButtonCell selection

2008-11-04 Thread Cathy Shive
On Nov 4, 2008, at 10:05 AM, Ken Tozier wrote: What happens is that when I choose an item in one row's popup cell, the selection in every popup in the entire table changes to the new selection. Don't forget that there is only one NSPopUpButtonCell per column. If you change it's selection

Re: NSTableView Informal Protocal

2008-11-04 Thread Graham Cox
On 4 Nov 2008, at 4:00 am, Ron Green wrote: 'm a newb and am struggling to find documentation. Example: NSTableView: setObjectValue:forTableColumn:row I have looked through all the documentation for NSTableView and cannot find this method. Does anyone know where it is? http://developer

  1   2   >