Re: populating radio stations like iTunes

2010-06-02 Thread Uli Kusterer
On 02.06.2010, at 00:26, Abhinav Tyagi wrote: > I want to know that how can i get the data and populate a list of stations > similar to that. I think it sends some request to apple server which returns > an xml or a plist which can be further parsed to fetch the stations and > their details. But i

Re: populating radio stations like iTunes

2010-06-02 Thread Uli Kusterer
On 02.06.2010, at 00:26, Abhinav Tyagi wrote: > I want to know that how can i get the data and populate a list of stations > similar to that. I think it sends some request to apple server which returns > an xml or a plist which can be further parsed to fetch the stations and > their details. But i

NSTreeController method removeObjectAtArrangedObjectIndexPath

2010-06-02 Thread Tony Romano
Overview: I am implementing DnD using the NSOutlineview as my UI and the NSTreeController as my "store front" to the file system. If none of the files exist at the drop target both move and copy operations work fine. The case where there is a file in the target that conflicts with one of the fi

Re: -[NSDocument fileURL] is observable (KVO). Documented?

2010-06-02 Thread Mike Abdullah
On 1 Jun 2010, at 23:25, Jerry Krinock wrote: > > On 2010 Jun 01, at 15:07, Mike Abdullah wrote: > >> I'd advise subclassing to add your own notification posting code. > > Yuck. Unless someone knows a better way, that means setting up either a > kqueue or FSEvents thingy for the document to

Trouble embedding a framework in an application

2010-06-02 Thread Tito Ciuro
Hello, I'm having some trouble embedding a framework in my app. I've done that countless times before in other projects and it worked fine, but for some reason, it doesn't work this time around. I don't know what I'm missing and I get the feeling I'm running in circles. The app launches (and wo

PMSessionSetCurrentPMPrinter crashes on 64 bit Mac (with x86_64 build architecture)

2010-06-02 Thread Shilpi Aggarwal
PMSessionSetCurrentPMPrinter crashes on 64 bit Mac (with x86_64 build architecture) Please find below the crash stack: EXC_BAD_EXCESS OpaquePMPrinter::PJCValidPrinterKey () PMSessionSetCurrentPMPrinter () ___ Cocoa-dev mailing list (Cocoa-dev@lists

ANN: Syntax highlighting editor view

2010-06-02 Thread jonat...@mugginsoft.com
From time to time the issue of syntax highlighting/colouring is raised on the list. Fragaria is framework based on Smultron (now Fraise) that provides a simple way of embedding a syntax aware editor in an application. The project includes a simple demo application that illustrates how to embed

Re: -[NSDocument fileURL] is observable (KVO). Documented?

2010-06-02 Thread Jerry Krinock
On 2010 Jun 02, at 02:15, Mike Abdullah wrote: > er, I meant just override -setFileURL: to post a notification. But that doesn't solve the possibility of some future OS release changing fileURL in a non-KVO-compliant manner when another process changes the path of this document. Not likely, I

Re: ANN: Syntax highlighting editor view

2010-06-02 Thread Stephane Sudre
Which license? One file mentions Apache, others don't. On Wed, Jun 2, 2010 at 12:53 PM, jonat...@mugginsoft.com wrote: > From time to time the issue of syntax highlighting/colouring is raised on the > list. > > Fragaria is framework based on Smultron (now Fraise) that provides a simple > way of

Re: ANN: Syntax highlighting editor view

2010-06-02 Thread jonat...@mugginsoft.com
Smultron was released under the Apache 2.0 licence. Fragaria will follow suit. I will add the missing licence file to the repository now. Regards Jonathan Mitchell Developer Mugginsoft LLP http://www.mugginsoft.com On 2 Jun 2010, at 13:11, Stephane Sudre wrote: > Which license? One file menti

Re: ANN: Syntax highlighting editor view

2010-06-02 Thread Rui Pacheco
BSD would be better for shareware developers. On 2 June 2010 13:20, jonat...@mugginsoft.com wrote: > Smultron was released under the Apache 2.0 licence. > Fragaria will follow suit. > > I will add the missing licence file to the repository now. > > Regards > > Jonathan Mitchell > > Developer > Mu

Re: ANN: Syntax highlighting editor view

2010-06-02 Thread jonat...@mugginsoft.com
On 2 Jun 2010, at 14:03, Rui Pacheco wrote: > BSD would be better for shareware developers. > I don't see a huge practical difference between BSD and Apache 2.0. If anything Apache 2.0 gives you more rights. You can use Apache 2.0 licensed code in commercial products. Google use it. http://arst

Re: nibs don't know about protocols?

2010-06-02 Thread Matt Neuburg
On or about 6/1/10 12:01 PM, thus spake "Kyle Sluder" : > On Tue, Jun 1, 2010 at 11:00 AM, Matt Neuburg wrote: >> So... Are nibs just ignorant of protocols? > > I don't believe the nib loading machinery checks protocol conformance > when it hooks up outlets. It certainly doesn't check class iden

Re: Simulating app termination

2010-06-02 Thread Michael Ash
On Tue, Jun 1, 2010 at 3:34 PM, Kyle Sluder wrote: > On Tue, Jun 1, 2010 at 12:26 PM, Michael Ash wrote: >> If your goal is to simulate shutdown/restart termination, this won't >> work; the system does not send signals to your app to kill it during >> those situations. > > TN2083 is ambiguous abo

Re: nibs don't know about protocols?

2010-06-02 Thread Michael Ash
On Wed, Jun 2, 2010 at 11:00 AM, Matt Neuburg wrote: > On or about 6/1/10 12:01 PM, thus spake "Kyle Sluder" > : > >> On Tue, Jun 1, 2010 at 11:00 AM, Matt Neuburg wrote: >>> So... Are nibs just ignorant of protocols? >> >> I don't believe the nib loading machinery checks protocol conformance >>

Spotlight-Style search menu

2010-06-02 Thread John Johnson
So I know how to set a view in an NSMenuItem, but my question is how to get it to look similar to the Spotlight search menu. For example, if I set the first item in a popup menu to a custom view, there is still a thin strip of "white" across the top. I want the gradient from the view to fill up

The Unadopted Protocol

2010-06-02 Thread Matt Neuburg
Here's something I stumbled on by accident. Consider the following: // MyClass.h #import @interface MyClass : NSObject { } @end // MyClass.m #import "MyClass.h" @implementation MyClass - (void) testing { NSLog(@"testing"); } @end // UnadoptedProtocolAppDelegate.h #import ... // skipping

Re: The Unadopted Protocol

2010-06-02 Thread Dave DeLong
Mostly d, but partly f. It's d in that it's well-known that you can send any message you want to an id, but f in that the scenario you came up with is a slightly unusual one. Dave On Jun 2, 2010, at 9:57 AM, Matt Neuburg wrote: > Here's something I stumbled on by accident. Consider the follow

Re: The Unadopted Protocol

2010-06-02 Thread Kevin Wojniak
I've used this when compiling code for both 10.6 and below to avoid protocol errors. Seems to do the trick. Kevin On Jun 2, 2010, at 8:57 AM, Matt Neuburg wrote: Here's something I stumbled on by accident. Consider the following: // MyClass.h #import @interface MyClass : NSObject { } @e

Re: The Unadopted Protocol

2010-06-02 Thread John Johnson
> This compiles and runs fine, even though MyClass never adopted the protocol > Unadopted. It take it that by casting mc to an id, I cause the compiler to > grasp at the only signature for "testing" that it knows about, namely the > one in the protocol. So it happily uses that signature without co

Displaying dialog at shutdown

2010-06-02 Thread lorenzo7620
I have a very simple application that runs as an LSUIElement/BackgroundOnly. Its only purpose is to display a message and play a short sound (3 seconds) to the user whenever it quits, which, since its a background only app, is only at shutdown/restart. I can use an AppleScript to force the

Re: [iPhone] more UIScrollView

2010-06-02 Thread David Duncan
On Jun 1, 2010, at 9:00 PM, Development wrote: > That's pretty much where I started with this code. However it's still fuzzy. > I can scale the view itself and it's perfectly clear but the origin is all > messed up and it's offset halfway out of it's parent view. thats what I tried > here:CGCont

Re: Binding SelectedText Background

2010-06-02 Thread Ross Carter
On Jun 1, 2010, at 4:25 PM, Keary Suska wrote: > On Jun 1, 2010, at 11:18 AM, Erick Pérez wrote: > >> Hi: >> I manage to bind the text color to a color well, one of those many >> tutorials you can find online, but what i want is to change the color >> of the selected text's background. Can i bind

Re: Displaying dialog at shutdown

2010-06-02 Thread Jens Alfke
On Jun 2, 2010, at 9:13 AM, lorenzo7...@gmail.com wrote: > I can use an AppleScript to force the app to quit and when doing that, I see > the dialog every time, but if I actually restart the computer, I only see the > dialog, maybe 1 out of 5 times. This is on 10.6? Read the system docs about

Re: Spotlight-Style search menu

2010-06-02 Thread Kyle Sluder
On Jun 2, 2010, at 8:48 AM, John Johnson wrote: So I know how to set a view in an NSMenuItem, but my question is how to get it to look similar to the Spotlight search menu. For example, if I set the first item in a popup menu to a custom view, there is still a thin strip of "white" acros

Re: Spotlight-Style search menu

2010-06-02 Thread Chaitanya Pandit
I don't know but if you can set your NSStatusItem as a custom view and determine it's location on the screen, you can then show your custom view in a borderless window at that position On Jun 2, 2010, at 9:18 PM, John Johnson wrote: > So I know how to set a view in an NSMenuItem, but my questi

Re: Spotlight-Style search menu

2010-06-02 Thread John Johnson
> Currently there is not. You should file an enhancement request at > http://bugreport.apple.com asking for this feature. You're certainly not the > only one who would like it. :) > > --Kyle Sluder Hmm that is slightly disappointing. Another couple of subclasses and dozens of lines of code fo

Re: Re: Displaying dialog at shutdown

2010-06-02 Thread lorenzo7620
On Jun 2, 2010 11:22am, Jens Alfke wrote: On Jun 2, 2010, at 9:13 AM, lorenzo7...@gmail.com wrote: I can use an AppleScript to force the app to quit and when doing that, I see the dialog every time, but if I actually restart the computer, I only see the dialog, maybe 1 out of 5 times. T

Re: ANN: Syntax highlighting editor view

2010-06-02 Thread Uli Kusterer
Am Jun 2, 2010 um 3:03 PM schrieb Rui Pacheco: > BSD would be better for shareware developers. There's always my http://github.com/uliwitness/UKSyntaxColoredTextDocument/ if you want a more liberal license (it's zlib-style). -- Uli Kusterer "The Witnesses of TeachText are everywhere..." _

Re: Spotlight-Style search menu

2010-06-02 Thread Chaitanya Pandit
> > This is the solution I've decided on as well. It's actually a button on a > window that I want to trigger the search field to pop down, and I still want > it to behave like a menu, i.e. clicking anywhere else on the screen dismisses > the "menu", and the button get's the pushed in look. Wha

Re: Spotlight-Style search menu (SOLVED)

2010-06-02 Thread John Johnson
> Well, you can have the custom view in the status bar to be a NSButton, it's > action will compute the location and make the window key and visible at that > location and when the window resigns key, just fade it away Brilliant! Seems the only way to go. Anyhow, thanks for the help :)

Re: The Unadopted Protocol

2010-06-02 Thread Quincey Morris
On Jun 2, 2010, at 08:57, Matt Neuburg wrote: > So this appears to be a technique for implementing a highly informal > protocol. What's the problem that this technique is intended to solve? This is one of several techniques that can be used to send an arbitrary message to an arbitrary object wi

Delayed -dealloc occurs on worker thread if object is "working". How?

2010-06-02 Thread Jerry Krinock
I allocate an object Foo on the main thread. Then I spin off a secondary thread and give it a long task to do there, but immediately release the object, on the main thread. I expect that the -release invoke -dealloc immediately, on the main thread. To my amazement, the object is not deallocce

Re: Delayed -dealloc occurs on worker thread if object is "working". How?

2010-06-02 Thread BJ Homer
detachNewThreadSelector:target:withObject: retains both the target and the object. -BJ On Wed, Jun 2, 2010 at 11:39 AM, Jerry Krinock wrote: > I allocate an object Foo on the main thread. Then I spin off a secondary > thread and give it a long task to do there, but immediately release the > ob

Re: The Unadopted Protocol

2010-06-02 Thread Greg Parker
On Jun 2, 2010, at 8:57 AM, Matt Neuburg wrote: > So this appears to be a technique for implementing a highly informal > protocol. (The technique is: define a protocol, don't bother adopting it > anywhere, but send messages defined in that protocol to an id.) Yep. When the compiler looks for a met

Re: Delayed -dealloc occurs on worker thread if object is "working". How?

2010-06-02 Thread Jens Alfke
On Jun 2, 2010, at 10:39 AM, Jerry Krinock wrote: > I allocate an object Foo on the main thread. Then I spin off a secondary > thread and give it a long task to do there, but immediately release the > object, on the main thread. I expect that the -release invoke -dealloc > immediately, on th

Re: The Unadopted Protocol

2010-06-02 Thread Matt Neuburg
On or about 6/2/10 11:11 AM, thus spake "Greg Parker" : > On Jun 2, 2010, at 8:57 AM, Matt Neuburg wrote: >> So this appears to be a technique for implementing a highly informal >> protocol. (The technique is: define a protocol, don't bother adopting it >> anywhere, but send messages defined in th

NSNumberFormatter setLocalizesFormat, docs wrong or implementation wrong?

2010-06-02 Thread Sean McBride
Hi all, Any NSNumberFormatter experts out there? The docs for setLocalizesFormat: say "This method is for use with formatters using NSNumberFormatterBehavior10_0 behavior." This is plainly wrong, which you can prove to yourself with a simple test, as I did. It applies to NSNumberFormatterBehavi

Mail Frameworks

2010-06-02 Thread Jeremy Matthews
So...I'm working on an app that needs an email framework to send messages...right now I'm using MailCore, and I hear good things about EDMessage as well...where I am at now I need to send attachments and neither is very forthcoming on support details there (or examples) - so I am reading through

How to change color of text in webView

2010-06-02 Thread Nava Carmon
Hi, Is it possible to change the font color in web view? How do I do it? Thanks, Nava Carmon ncar...@mac.com "Think good and it will be good!" ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator com

app crashing, some errors in console are related to drawing of UI elements

2010-06-02 Thread Nick Rogers
Hi, The app sometime (not always) crashes when run on Leopard OS (32-bit) on an old mac mini. On Leopard (64-bit) and Snow Leopard, the crash never happens. The app is GC enabled. I'm running a separate thread to do some processing, and it does update a few text fields and a progress bar on the

Problem with CGPDFPageRef

2010-06-02 Thread Development
Ok this is bizarre and it's been happening in several apps of mine and I don't understand it. I'm getting scrambled variable data. For instance I pass a float 'float' with a value of 1.0 and the receiver gets some weird number like 345783653.0. Most recently what is happening has me completely p

Re: Mail Frameworks

2010-06-02 Thread Simon Wolf
On 2 Jun 2010, at 19:57, Jeremy Matthews wrote: > So...I'm working on an app that needs an email framework to send > messages...right now I'm using MailCore, and I hear good things about > EDMessage as well...where I am at now I need to send attachments and neither > is very forthcoming on supp

Re: Problem with CGPDFPageRef

2010-06-02 Thread David Duncan
On Jun 2, 2010, at 1:11 PM, Development wrote: > Ok this is bizarre and it's been happening in several apps of mine and I > don't understand it. > I'm getting scrambled variable data. For instance I pass a float 'float' with > a value of 1.0 and the receiver gets some weird number like 345783653

Re: Problem with CGPDFPageRef

2010-06-02 Thread David Duncan
On Jun 2, 2010, at 1:23 PM, Development wrote: > This is what I use to get the page: CGPDFPageRef thePage = > CGPDFDocumentGetPage(self.pdf,1); > and what is passed back is a CALayer You previously mentioned that a receiver was getting the incorrect value – this code doesn't show any objects o

Re: Mail Frameworks

2010-06-02 Thread Laurent Cerveau
Is this on MacOS or iPhoneOS? I think the way to go on MacOS is through the scripting bridge laurent Sent from my road phone On Jun 2, 2010, at 8:57 PM, Jeremy Matthews wrote: So...I'm working on an app that needs an email framework to send messages...right now I'm using MailCore, and

Re: Mail Frameworks

2010-06-02 Thread Jeremy Matthews
Mac OS... Sent from my iPhone On Jun 2, 2010, at 3:25 PM, Laurent Cerveau wrote: Is this on MacOS or iPhoneOS? I think the way to go on MacOS is through the scripting bridge laurent Sent from my road phone On Jun 2, 2010, at 8:57 PM, Jeremy Matthews wrote: So...I'm working on an ap

Access ObjC class from PyOBJC

2010-06-02 Thread jonat...@mugginsoft.com
My app is ObjC cocoa based It also loads and executes PyObjC classes. I require my loaded PyObjC code to access an ObjC class (myControllerClass) defined within an ObjC framework linked to the main application. The desired Python looks something like: #py import AppKit taskController = myCon

Re: Access ObjC class from PyOBJC

2010-06-02 Thread Bill Bumgarner
On Jun 2, 2010, at 2:16 PM, jonat...@mugginsoft.com wrote: > My app is ObjC cocoa based > > It also loads and executes PyObjC classes. > > I require my loaded PyObjC code to access an ObjC class (myControllerClass) > defined within an ObjC framework linked to the main application. > > The de

NSNumberFormatter and printf-style %g ?

2010-06-02 Thread Sean McBride
Hi all, Is there a way to make NSNumberFormatter work like printf's %g ? That is, "print a double in either normal or exponential notation, whichever is more appropriate for its magnitude." As best as I can tell from the docs the answer in no. I know about NSNumberFormatterScientificStyle, but

Re: Mail Frameworks

2010-06-02 Thread Torsten Curdt
On Wed, Jun 2, 2010 at 22:12, Simon Wolf wrote: > On 2 Jun 2010, at 19:57, Jeremy Matthews wrote: > >> So...I'm working on an app that needs an email framework to send >> messages...right now I'm using MailCore, and I hear good things about >> EDMessage as well...where I am at now I need to send

Re: Access ObjC class from PyOBJC

2010-06-02 Thread jonat...@mugginsoft.com
On 2 Jun 2010, at 22:24, Bill Bumgarner wrote: > > On Jun 2, 2010, at 2:16 PM, jonat...@mugginsoft.com wrote: > >> My app is ObjC cocoa based >> >> It also loads and executes PyObjC classes. >> >> I require my loaded PyObjC code to access an ObjC class (myControllerClass) >> defined within

Re: UIWebView Background

2010-06-02 Thread Matt James
As it looks like the only way to solve this problem is by using private APIs to turn off rubberbanding, I've flagged this as a bug in Radar - #8055256. -Matt On Jun 1, 2010, at 9:50 PM, Matt James wrote: > I'm integrating a UIWebView directly into a design such that it should just > sort of si

Re: Monster memory leak and I can't figure out why

2010-06-02 Thread Ken Tozier
Thanks all for the replies Re point #1: I was using Activity Monitor and both the "Real Memory" and "Virtual Memory" columns showed this 100+ MB leak every 5-10 seconds. After a minute or so of running, My app had gobbled up almost 2 gigs of memory. Re point #2: All the thumbnail conversi

Re: Mail Frameworks

2010-06-02 Thread Dante Palacios
Hi Jeremy, You might want to try the MailDelivery.framework, inspired on the deprecated methods from the Apple's Message.framework, the MailDelivery.framework makes the process of mail deliveries ridiculously easy to handle, you do not need to worry about for the Keychain and the top leve

Re: Mail Frameworks

2010-06-02 Thread Dante Palacios
I forgot to mention, the MailDelivery.framework is free and open source https://code.google.com/p/maildelivery/ On Jun 2, 2010, at 4:47 PM, Torsten Curdt wrote: On Wed, Jun 2, 2010 at 22:12, Simon Wolf wrote: On 2 Jun 2010, at 19:57, Jeremy Matthews wrote: So...I'm working on an app that ne

Re: Monster memory leak and I can't figure out why

2010-06-02 Thread Jeff Schilling
Are you running with NSZombieEnabled=YES? many an hour has been spent tracking down 'memory leaks' - I have some firsthand experience with this :-) On Jun 2, 2010, at 9:51 AM, Ken Tozier wrote: > Thanks all for the replies > > Re point #1: I was using Activity Monitor and both the "Real Memory"

Re: How to change color of text in webView

2010-06-02 Thread Shripada Hebbar
You can do all that stuff such as fonts, color in html/css that you feed to web view. Regards Shripada On 03/06/10 8:43 AM, "cocoa-dev-requ...@lists.apple.com" wrote: > Date: Wed, 02 Jun 2010 22:39:15 +0300 > From: Nava Carmon > Subject: How to change color of text in webView > To: list-coco