Re: NSTextView attachments and context menus

2010-03-09 Thread Martin Wierschin
Hello Martin, Now I want to offer the user a context menu to perform operations on the attachment (open, save, etc). So far I was unable to find a way to intercept a 'right-click' on the nstextview to offer a custom context menu. You can subclass NSTextView and override menuForEvent:,

Re: NSTextView attachments and context menus

2010-03-09 Thread Keith Blount
Hi, As (the other) Martin says, you can subclass NSTextView and override -menuForEvent: for this, which is the best way of doing it if you need to provide support for systems running versions of OS X earlier than Leopard. If you only need to support Leopard or above, though, Leopard introduced

Re: WebView refresh problem

2010-03-09 Thread Steven Degutis
The problem you're describing isn't very clear to me. Can you be more specific as to what the unexpected result is, and what action you're taking that triggers this unexpected result? And, last but certainly not least, what is the actual code you are using to load a new page into the WebView?

Re: WebView refresh problem

2010-03-09 Thread Arun
Hi, My application is something like a slide show viewer. When the application is launched, a window with WebView is launched and a background thread is started. From the background thread periodically webview is loaded with different HTML's. The function used is loadHTMLString: This works fine.

WebView refresh problem

2010-03-09 Thread Arun
Hi All I have an application which has a single window with a webview inside it. When the application starts it starts a background thread from which i will be feeding different HTML files using performSelectorOnMainThread:. Everything works fine. The problem is when the application is launched,

Re: Custom View in Toolbar

2010-03-09 Thread Paul Sanders
Gregory Weston wrote: I just sat down and attempted to accomplish what you're describing. It took 15 minutes and well under a dozen lines of code. Care to share your code? As someone who develops on both Windows and Mac, I know how hard the transition can be. Paul Sanders.

Re: NSTableViewDropAbove visual remnant

2010-03-09 Thread Corbin Dunn
On Mar 8, 2010, at 10:20 PM, Steve Cronin wrote: Folks; I have a tableView which is working pretty handily. I support a form of import by dropping a text file on it. The backing arrayController returns an NSTableViewDropAbove for UI feedback purposes. (the row the file is

Re: [NSTableview] can't make selected text stay black

2010-03-09 Thread Corbin Dunn
On Mar 8, 2010, at 3:15 PM, Kent Hauser wrote: On Mon, Mar 8, 2010 at 12:20 PM, Corbin Dunn corb...@apple.com wrote: On Mar 5, 2010, at 2:25 PM, Kent Hauser wrote: Hi, I'm trying to make a NSTableView selected row not look selected. I subclassed NSTableView added the following

Re: [NSTableview] can't make selected text stay black

2010-03-09 Thread Corbin Dunn
On Mar 8, 2010, at 3:30 PM, Kevin Wojniak wrote: What about overriding the drawTitleXXX method and just draw the text yourself? That's shouldn't be necessary; it should be possible to (easily) override the settings set by the tableview. It is just a matter of knowing what those settings are!

[Moderator] Thread CLOSED - Re: is as high as mine

2010-03-09 Thread Scott Anguish
On Mar 8, 2010, at 2:53 PM, David Blanton wrote: Your overall knowledge was not being questioned, but if you had first hand knowledge of this approach I am sure I would know of it by now. That is all. I'll figure this out and post a comprehensive solution when I have time. This is closed.

Re: [NSTableview] can't make selected text stay black

2010-03-09 Thread Keith Blount
Hi, Actually the only way I know of doing this pre-10.6 is to override NSTableView's private _highlightColorForCell: method to return nil. Even if you override -highlightSelectionInClipRect: to do nothing, the cell drawing will still use the highlight colour returned from this private method.

IKFilterUIView - Problem with text fields

2010-03-09 Thread paul morel
Hi,-I am developping a program where I use an IKFilterUIView to manage the user interface for filters. I also created my own filter according to the core image filter tutorials in the Mac Dev Center. So far I have the user interface and when I interact with the sliders it works pretty well.

PDF links, iPhone and Quartz 2D

2010-03-09 Thread David Gagnon
Hi, I have made a small application to display PDF on the iPhone. It is working well but now, I would like to implement PDF links so the user can click on a link to display target information. I plan to do it following thoses steps: 1- Scan PDF to find links using CGPDF classes in Quartz 2D.

Question Re Memory Management in Apps

2010-03-09 Thread Philippe Sismondi
I have just finished reading the Memory Management Programming Guide for Cocoa. I am also working my way through the Hillegass book on Cocoa. There is something that is puzzling me that probably involves autorelease pools. Or else I am hopelessly confused in some other way. I have created a

How to set value to UITextField using App Delegate in a Tabbar application

2010-03-09 Thread Nabi, Reza
Hello: Below is the document view of MainWindow.xib where I have 2 tabs (Plan One and Plan Two). -- Files Owner -- App Delegate (CPSAppDelegate) -- Window -- Tab Bar Controller (rootController : UITabBarController) -- -- -- Tab Bar -- -- -- Plan One Navigation Controller (PlanOneNavController :

Re: NSTextView attachments and context menus

2010-03-09 Thread Martin Hewitson
On Mar 9, 2010, at 9:18 AM, Martin Wierschin wrote: Hello Martin, Now I want to offer the user a context menu to perform operations on the attachment (open, save, etc). So far I was unable to find a way to intercept a 'right-click' on the nstextview to offer a custom context menu. You

Re: NSTextView attachments and context menus

2010-03-09 Thread Martin Hewitson
Hi Keith, As (the other) Martin says, you can subclass NSTextView and override -menuForEvent: for this, which is the best way of doing it if you need to provide support for systems running versions of OS X earlier than Leopard. If you only need to support Leopard or above, though, Leopard

Re: Question Re Memory Management in Apps

2010-03-09 Thread David Duncan
On Mar 8, 2010, at 7:44 PM, Philippe Sismondi wrote: Here is my AppController's init method, in which instanceObj is set to an autoreleased MadeObj: - (id)init { if(![super init]) return nil; instanceMadeObj = [MadeObj madeObjConvenienceConstructor];

Re: Objective-C Garbage Collection problems

2010-03-09 Thread Josh de Lioncourt
OK, here is the part that I'm still sticking on. First, you wrote: On Mar 8, 2010, at 6:25 PM, Quincey Morris wrote: On Mar 8, 2010, at 16:01, Josh de Lioncourt wrote: Therefore, if the framework isn't coded for GC compatibility, it's likely going to be unusable at runtime in a GC app, no

Re: NSTextView attachments and context menus

2010-03-09 Thread Keith Blount
Hi Martin, Does something like the following not work for you? NSTextAttachment *attachment = [[textView textStorage] attribute:NSAttachmentAttributeName atIndex:charIndex effectiveRange:NULL]; if (attachment)// Possibly check it’s of the kind of attachment you want to handle, too return

Re: Objective-C Garbage Collection problems

2010-03-09 Thread Clark Cox
On Tue, Mar 9, 2010 at 11:08 AM, Josh de Lioncourt overl...@lioncourt.com wrote: OK, here is the part that I'm still sticking on. First, you wrote: On Mar 8, 2010, at 6:25 PM, Quincey Morris wrote: On Mar 8, 2010, at 16:01, Josh de Lioncourt wrote: Therefore, if the framework isn't coded

Re: Question Re Memory Management in Apps

2010-03-09 Thread Hank Heijink (Mailinglists)
On Mar 8, 2010, at 10:44 PM, Philippe Sismondi wrote: In other words, the MadeObj instance for AppController's instance variable is created and then immediately dealloc'd. I take this to mean that the autorelease pool it was in was released/drained. If I change the AppController init

Re: NSTextView attachments and context menus

2010-03-09 Thread Kyle Sluder
On Tue, Mar 9, 2010 at 10:58 AM, Martin Hewitson martin.hewit...@aei.mpg.de wrote: Yes, I went down this route a little, but I was unable to figure out how to check for an attachment at that character index. I guess I need to look at this again. It seems like the elegant way to go since I

MoviePlayer_iPhone sample code in XCode 3.2

2010-03-09 Thread Jon
I just tried the MoviePlayer_iPhone sample code in simulator 3.2, (i believe i am running beta 2) while it works if you set it to 3.1, as soon as you set it to 3.2, the local' movie no longer plays? can someone confirm, and a possible reason/solution? thanks in advance. Jon.

Re: NSTextView attachments and context menus

2010-03-09 Thread Martin Hewitson
On Mar 9, 2010, at 8:15 PM, Keith Blount wrote: Hi Martin, Does something like the following not work for you? NSTextAttachment *attachment = [[textView textStorage] attribute:NSAttachmentAttributeName atIndex:charIndex effectiveRange:NULL]; if (attachment)// Possibly check it’s of

Re: MoviePlayer_iPhone sample code in XCode 3.2

2010-03-09 Thread Eli Bach
On Mar 9, 2010, at 12:40 PM, Jon wrote: I just tried the MoviePlayer_iPhone sample code in simulator 3.2, (i believe i am running beta 2) while it works if you set it to 3.1, as soon as you set it to 3.2, the local' movie no longer plays? can someone confirm, and a possible

Re: MoviePlayer_iPhone sample code in XCode 3.2

2010-03-09 Thread Kyle Sluder
On Tue, Mar 9, 2010 at 11:40 AM, Jon trambl...@mac.com wrote: can someone confirm,   and a possible reason/solution? Not here. iPhone SDK 3.2 is under NDA. The developer forums at http://devforums.apple.com are the only place you can discuss this. --Kyle Sluder

Re: Is kCAOnOrderOut too good to be true?

2010-03-09 Thread Steven Degutis
Not yet; still asking everyone I know and hoping a Core Animation wizard comes across this thread. -Steven On Tue, Mar 9, 2010 at 2:49 PM, Jon Buffington li...@jon.buffington.namewrote: Steven, Did you ever find a solution to the kCAOnOrderOut animation problem? I was frustrated by this

keeping scrollbar hidden

2010-03-09 Thread Joshua Strickon
I have 2 synchronized scrollviews side-by-side. I only want a scrollbar on the right most view. I do this by hiding the left scroller. This all works fine until I vertically resize the grouped views. The scroller reappears in the left view. I have tried numerous methods to keep the

Re: Is kCAOnOrderOut too good to be true?

2010-03-09 Thread David Duncan
Unfortunately the answer is that this is a bug without a clear solution (in the removal case). Your best bet is to hide the layer, then remove it after the animation has completed rather than to remove it directly. On Mar 9, 2010, at 11:52 AM, Steven Degutis wrote: Not yet; still asking

Re: CA transition suddenly too fast

2010-03-09 Thread Matt Neuburg
On Mon, 8 Mar 2010 12:04:37 -0600, Fritz Anderson fri...@manoverboard.org said: Since then, the card flip has become almost instantaneous. You can see the edges move if you look carefully, but the visual effect of a flip is essentially gone. H'm. After running a few minutes, I find that the

Re: UIImageView animationImages problem

2010-03-09 Thread David Duncan
On Mar 8, 2010, at 2:40 PM, patrick machielse wrote: I'm trying to run small, full screen, 1 second long animations using the UIImageView animationImages property. Small and fullscreen are unfortunately a contradiction in terms of iPhone. Since each frame has to be decompressed to be

Re: Question Re Memory Management in Apps

2010-03-09 Thread David Duncan
On Mar 9, 2010, at 11:47 AM, Philippe Sismondi wrote: However, unless I am still mistaken, by deallocated at any time you mean outside the scope of my init method. That is, I suppose I could have used the autoreleased object within the scope of my init method without it being deallocated

How to get NSPathControl to resize programatically?

2010-03-09 Thread Robert Monaghan
Hi Everyone, I am changing the NSURL of a path, that drives NSPathControl. If I edit the path so that the new text element of that path is longer or shorter than the original path, I would need to have NSPathControl redraw itself.. Here is an example of what I am doing: (myPathControl is a

Re: Question Re Memory Management in Apps

2010-03-09 Thread Philippe Sismondi
On 2010-03-09, at 2:01 PM, David Duncan wrote: On Mar 8, 2010, at 7:44 PM, Philippe Sismondi wrote: Here is my AppController's init method, in which instanceObj is set to an autoreleased MadeObj: In other words, the MadeObj instance for AppController's instance variable is created

Re: Question Re Memory Management in Apps

2010-03-09 Thread Dave Carrigan
On Mar 9, 2010, at 11:47 AM, Philippe Sismondi wrote: However, unless I am still mistaken, by deallocated at any time you mean outside the scope of my init method. That is, I suppose I could have used the autoreleased object within the scope of my init method without it being deallocated

Re: How to get NSPathControl to resize programatically?

2010-03-09 Thread Sean McBride
On Tue, 9 Mar 2010 12:26:14 -0800, Robert Monaghan said: I am changing the NSURL of a path, that drives NSPathControl. If I edit the path so that the new text element of that path is longer or shorter than the original path, I would need to have NSPathControl redraw itself.. Did you try

Re: How to get NSPathControl to resize programatically?

2010-03-09 Thread Robert Monaghan
Yeah, I did.. that didn't work either. Tried: [myPathControl sizeToFit]; bob. On Mar 9, 2010, at 12:33 PM, Sean McBride wrote: On Tue, 9 Mar 2010 12:26:14 -0800, Robert Monaghan said: I am changing the NSURL of a path, that drives NSPathControl. If I edit the path so that the new text

Re: Question Re Memory Management in Apps

2010-03-09 Thread Bill Bumgarner
On Mar 8, 2010, at 7:44 PM, Philippe Sismondi wrote: if(![super init]) return nil; Since no one else mentioned it in the followups, the above is wrong. This is correct: self=[super init]; if (!self) return nil; ... etc ... b.bum

[[Class alloc] init] preferable over [[Class instance] retain]?

2010-03-09 Thread Laurent Daudelin
I've been running in that situation and I'm just wondering if there are any advice for/against one or the other method. For example, is: NSMutableArray *anArray = [[NSMutableArray array] retain]; better than: NSMutableArray *anArray = [[NSMutableArray alloc] init]; ? I know that for

Re: [[Class alloc] init] preferable over [[Class instance] retain]?

2010-03-09 Thread Luke the Hiesterman
On Mar 9, 2010, at 1:41 PM, Laurent Daudelin wrote: I've been running in that situation and I'm just wondering if there are any advice for/against one or the other method. For example, is: NSMutableArray *anArray = [[NSMutableArray array] retain]; There is no reason to use this when

Re: [[Class alloc] init] preferable over [[Class instance] retain]?

2010-03-09 Thread Alexander Spohr
Am 09.03.2010 um 22:44 schrieb Luke the Hiesterman: On Mar 9, 2010, at 1:41 PM, Laurent Daudelin wrote: I've been running in that situation and I'm just wondering if there are any advice for/against one or the other method. For example, is: NSMutableArray *anArray =

Re: [[Class alloc] init] preferable over [[Class instance] retain]?

2010-03-09 Thread Nick Zitzmann
On Mar 9, 2010, at 2:50 PM, Alexander Spohr wrote: I’d use NSMutableArray *anArray = [NSMutableArray new]; in this case ;) FWIW, I prefer to use alloc-init for one main reason: When I want to look for places in the code that initialize certain objects (which does happen in large code

Bison/Yacc with Objective-C ?

2010-03-09 Thread Thomas Wetmore
I'm porting an old interpreter from a C-based program that used yacc to parse report generating programs and convert them into interpretable programs that could then generate reports. A system akin to XSLT but using a procedural language rather XML as a programming language, ahem. Yacc (and

Using a valuetransformer in a popupmenu

2010-03-09 Thread Eli Bach
I have a core data application, with an NSArrayController with the managedobjects I want to display in an NSPopupMenu. I can get the popup to display a specific attribute of each object [like attributeX, say] by binding the content to the controller.arrangedObjects and binding content values

Re: [[Class alloc] init] preferable over [[Class instance] retain]?

2010-03-09 Thread Sean McBride
On Tue, 9 Mar 2010 13:41:03 -0800, Laurent Daudelin said: I've been running in that situation and I'm just wondering if there are any advice for/against one or the other method. For example, is: NSMutableArray *anArray = [[NSMutableArray array] retain]; better than: NSMutableArray *anArray =

10.6 Base, 10.5 Target, runs fine on everything except Intel 10.5

2010-03-09 Thread Steve Mykytyn
Trying to build an app with base SDK 10.6, target OS 10.5. everything works fine on Intel 10.6, PPC 10.5, but I get a crash on PPC 10.5. Any suggestions? Exception Type: EXC_BREAKPOINT (SIGTRAP) Exception Codes: 0x0002, 0x Crashed Thread: 0 Dyld Error Message:

Re: 10.6 Base, 10.5 Target, runs fine on everything except Intel 10.5

2010-03-09 Thread Sean McBride
On Tue, 9 Mar 2010 14:30:07 -0800, Steve Mykytyn said: Trying to build an app with base SDK 10.6, target OS 10.5. everything works fine on Intel 10.6, PPC 10.5, but I get a crash on PPC 10.5. Any suggestions? Exception Type: EXC_BREAKPOINT (SIGTRAP) Exception Codes: 0x0002,

10.6 Base, 10.5 Target, runs fine on everything except Intel 10.5 (repost)

2010-03-09 Thread Steve Mykytyn
(fumbled the previous post - sorry) Trying to build an app with base SDK 10.6, target OS 10.5. everything works fine on Intel 10.6, PPC 10.5, but I get a crash on INTEL 10.5. Any suggestions? Exception Type: EXC_BREAKPOINT (SIGTRAP) Exception Codes: 0x0002, 0x

Re: [NSTableview] can't make selected text stay black

2010-03-09 Thread Kent Hauser
Keith, Your solution was perfect. (It didn't work at first, but that's because I had somehow left HighlightStyle as source list in IB while I was trying everything. Per your note, the first thing I checked then perfection.) As you mention, overriding -highlightSelctionInClipRect is unneeded. I

NSObjectController Selection Delay

2010-03-09 Thread Richard Somers
I have a NSObjectController, in a nib, bound to a managed object context, in entity mode, and set to automatically prepare content. The problem is that the selection marker is delayed. When a document is opened which contains an object, the object controller does not obtain a selection

Re: 10.6 Base, 10.5 Target, runs fine on everything except Intel 10.5

2010-03-09 Thread Steve Christensen
The class NSRunningApplication only exists on 10.6 and later. Are you doing a runtime check before using it? Class nsRunningAppClass = NSClassFromString(@NSRunningApplication); if (nsRunningAppClass != NULL) { // 10.6 case... NSRunningApplication* currentApplication =

Re: 10.6 Base, 10.5 Target, runs fine on everything except Intel 10.5

2010-03-09 Thread Steve Mykytyn
I know all about separating 10.6 from 10.5 stuff. The problem is: I've been testing on a 10.5 PPC machine, where everything works fine. On 10.5 Intel, it does not finish starting up, just crashes out. Never gets anywhere that I would use something 10.6 related. Trying to be as clear as

Re: Custom View in Toolbar

2010-03-09 Thread Gregory Weston
Paul Sanders wrote: Gregory Weston wrote: I just sat down and attempted to accomplish what you're describing. It took 15 minutes and well under a dozen lines of code. Care to share your code? As someone who develops on both Windows and Mac, I know how hard the transition can be.

Re: 10.6 Base, 10.5 Target, runs fine on everything except Intel 10.5

2010-03-09 Thread Nick Zitzmann
On Mar 9, 2010, at 3:57 PM, Steve Mykytyn wrote: Even if the startup sequence for an app was different between PPC and Intel, I'd expect to eventually crash out on both PPC and Intel if it was something I'm doing in the source code. This has got to be something with the way I have the

Re: 10.6 Base, 10.5 Target, runs fine on everything except Intel 10.5 (repost)

2010-03-09 Thread Clark Cox
On Tue, Mar 9, 2010 at 2:36 PM, Steve Mykytyn smyky...@exostrategy.com wrote: (fumbled the previous post - sorry) Trying to build an app with base SDK 10.6, target OS 10.5. everything works fine on Intel 10.6, PPC 10.5, but I get a crash on INTEL 10.5.  Any suggestions? Exception Type:  

Re: 10.6 Base, 10.5 Target, runs fine on everything except Intel 10.5

2010-03-09 Thread Greg Parker
On Mar 9, 2010, at 2:57 PM, Steve Mykytyn wrote: I know all about separating 10.6 from 10.5 stuff. The problem is: I've been testing on a 10.5 PPC machine, where everything works fine. On 10.5 Intel, it does not finish starting up, just crashes out. Never gets anywhere that I would use

Re: Bison/Yacc with Objective-C ?

2010-03-09 Thread Graham Cox
On 10/03/2010, at 9:00 AM, Thomas Wetmore wrote: Yacc (and Bison) convert yacc files into C files. Instead I would like to generate Objective-C files so I can use Cocoa containers classes and NSString to get Unicode for free. I do see that bison can generate C++ instead of C. Does anyone

Re: Bison/Yacc with Objective-C ?

2010-03-09 Thread Thomas Wetmore
Graham, Definitely not nonsense, and is the solution I will use unless I can find a more direct route. I have done this in the past for YACC to generate C++ on Windows systems. The headache with this solution is that the Xcode has a built-in rule that goes from YACC to C and tries to compile

RE: Bison/Yacc with Objective-C ?

2010-03-09 Thread Jeff Laing
I haven't tried it, so this might be nonsense, but I think that YACC simply copies the emitted code from the source file to the final C file. Yacc has to parse the emitted code enough to be able to replace references to $$, $1, etc with the corresponding tokens from the recognized grammar

Re: Bison/Yacc with Objective-C ?

2010-03-09 Thread Graham Cox
On 10/03/2010, at 10:46 AM, Jeff Laing wrote: Yacc has to parse the emitted code enough to be able to replace references to $$, $1, etc with the corresponding tokens from the recognized grammar element. for example, a grammar I have lying around contains: [] Yacc changes those $

RE: [[Class alloc] init] preferable over [[Class instance] retain]?

2010-03-09 Thread Jeff Laing
For example, is: NSMutableArray *anArray = [[NSMutableArray array] retain]; better than: NSMutableArray *anArray = [[NSMutableArray alloc] init]; I've been reamed, in the recent past, for expressing the opinion that the first was just as good as the second - apparently the answer

Core Data Spotlight: Record-Level Indexing : Issues?

2010-03-09 Thread Jerry Krinock
On Mac OS X v10.6 and later, for non-document-based programs, you can create Spotlight indexes where each record is indexed individually. [1] I interpret this to mean that users can get results for my app's records in their Spotlight searches, the way they get Safari bookmarks and Address Book

Using a NSTextField inside a NSMenuItem?

2010-03-09 Thread Robert Monaghan
Hi Everyone, Another Question: How does one make a NSTextField work inside an NSMenuItem? (For 10.5/10.6) I can place the NSTextField into a View that I've created in a NIB file, and have added it to the NSMenuItem using setView: It shows up perfectly, and I can pre-populate the text field

Re: Bison/Yacc with Objective-C ?

2010-03-09 Thread F van der Meeren
You can just use your objc magic inside the curly braces... All you have to do is rename your file to *.ym instead of *.y Then all your files will be named *.m To call upon yacc with objc code is currently a no go. Therefor you still need to call the basic yyparse methods, or add a special

Re: Bison/Yacc with Objective-C ?

2010-03-09 Thread F van der Meeren
On 10 Mar 2010, at 00:51, Graham Cox wrote: On 10/03/2010, at 10:46 AM, Jeff Laing wrote: Yacc has to parse the emitted code enough to be able to replace references to $$, $1, etc with the corresponding tokens from the recognized grammar element. for example, a grammar I have lying

Re: Bison/Yacc with Objective-C ?

2010-03-09 Thread Thomas Wetmore
Bloomin' magic! Thanks, Filip, it worketh well. Hardy souls all. Tom W. On Mar 9, 2010, at 6:43 PM, F van der Meeren wrote: You can just use your objc magic inside the curly braces... All you have to do is rename your file to *.ym instead of *.y Then all your files will be named *.m To

Re: NSObjectController Selection Delay

2010-03-09 Thread Richard Somers
On Mar 9, 2010, at 3:45 PM, Richard Somers wrote: The problem is that the selection marker is delayed. Turns out this is a well documented issue. http://developer.apple.com/mac/library/documentation/cocoa/Conceptual/CoreData/Articles/cdTroubleshooting.html Cannot access contents of an

Cocoaheads Lake Forest (92630) meeting TOMORROW, Wed 3/10/2010 at 7 pm on Highlights of the 2010 Stanford iPhone development class

2010-03-09 Thread Scott Ellsworth
CocoaHeads Lake Forest will be meeting on the second Wednesday of the month. We will be meeting at the Orange County Public Library (El Toro) community room, 24672 Raymond Way, Lake Forest, CA 92630 Please join us from 7pm to 9pm on Wednesday, 3/10. We will be watching select excerpts from the