Re: Grabbing current Safari webpage url

2008-03-07 Thread has
Steve Sheets wrote: Is there a way of finding out what is the current topmost webpage being viewed by Safari? Somehow then grabbing the url & title of that page? Using objc-appscript (http://appscript.sourceforge.net/objc-appscript.html ): #import #import "SFGlue/SFGlue.h" // To make Saf

Re: How to debug a nib loading error?

2008-03-07 Thread Quincey Morris
On Mar 6, 2008, at 23:54, Steve Cronin wrote: If I set the NSZombieEnabled variable to YES I get the following: #0 0x9282b36d in -[NSException raise] #1 0x92852247 in +[NSException raise:format:] #2 0x928da79b in logMessageAndRaise #3 0x927dc8af in NSPopAutoreleasePool #4

Re: Grabbing current Safari webpage url

2008-03-07 Thread has
Adam Leonard wrote: If you are looking to do it in Applescript (you want it to work in 10.4, for example) ObjC-appscript supports Panther onwards, and is MIT-licensed so you can freely include it in your application bundle for distribution. HTH has -- http://appscript.sourceforge.net __

Re: How to debug a nib loading error?

2008-03-07 Thread Kyle Sluder
On Fri, Mar 7, 2008 at 1:36 AM, Steve Cronin <[EMAIL PROTECTED]> wrote: > I have the [NSException raise] as a Global breakpoint but it doesn't > fire. > > Using the po command I can tell that MainMenu is the nib involved; > the prefs window is in a separate nib... > > How do I track this down?

IKImageBrowserView crash when providing it lots lots of pictures?

2008-03-07 Thread Scott . D . R
Greetings everyone. As the title mentioned, I am using the IKImageBrowserView to provide a quick preview of many pictures. However, I found my application regularly crashed. The GDB outputs complained it met something like: "IKImagedatabase CFHash..." and so on. It seems that it is related t

Re: IKImageBrowserView crash when providing it lots lots of pictures?

2008-03-07 Thread Julien Jalon
IKImageBrowserView is known to support something like 250,000 images so I'd look somewhere else. Providing the full crash stack trace might help understand what object you (or some other place) is likely to be over-released. Also, enabling NSZombie might help you debugging the problem. --

Re: GetMonitorFromWindow

2008-03-07 Thread Roy Lovejoy
On Mar 6, 2008, at 9:48 PM, Apparao Mulpuri wrote: So you mean --- there is no APIs avialable. no, there are of course APIs available. I was just trying to help you a) not alienate your customers b) avoid work that does not need to be coded. ___

iPhone SDK question

2008-03-07 Thread John Newlin
Ok, I realize this is not a Cocoa question, please don't flog me. Hopefully they'll make an iPhone mailing list.. Anyhow, has anyone been able to run an app on a device yet, I get an error message when I try to load my app onto the phone. The simulator works fine. Thanks, -john __

Re: iPhone SDK question

2008-03-07 Thread mmalc crawford
On Mar 7, 2008, at 8:06 AM, John Newlin wrote: Ok, I realize this is not a Cocoa question, please don't flog me. Please re-read and adhere to your NDA and to the messages from the moderators... From: Scott Anguish <[EMAIL PROTECTED]> Date: March 6, 2008 4:35:34 PM PST To: Kevin Vanwulpen

Binding Error (accessing value for key) - but works with debugging on

2008-03-07 Thread Jason Kravitz
The following is occurring on Leopard - Garbage Collection set to required... I have an Entity with a NSManagedObject class declaration // header @interface MyEntity : NSManagedObject { } @property (readwrite, copy) NSString *origText,*title; @property (readwrite, copy) NSDate *date; @end //

Re: Using an auto incremented NSNumber as attribute in a NSManagedObject

2008-03-07 Thread Florent Pillet
> You could issue a fetch request at startup, store its @max in some > ivar in a MOC subclass, and use that instead of the local static > variable. > > Still a pain, but might do you what you want. I happen to have needed autoincrement properties too, and stumbled upon this post by David Emme:

Re: GetMonitorFromWindow

2008-03-07 Thread John Stiles
I'm going to jump on the bandwagon and say that your client is wrong. Mac apps do not and should not do this. Roy Lovejoy wrote: On Mar 6, 2008, at 9:48 PM, Apparao Mulpuri wrote: So you mean --- there is no APIs avialable. no, there are of course APIs available. I was just trying to hel

Re: NSPreferencePane with my own private framework?

2008-03-07 Thread Ryan
Thanks for the reply - still not having any luck - I'm going to move this question over to the Xcode-users list and see if anyone over there has any further ideas. -Ryan On Mar 5, 2008, at 8:18 PM, Adam Leonard wrote: In your preference pane project, make sure @loader_path/../ Frameworks i

Re: Binding Error (accessing value for key) - but works with debugging on

2008-03-07 Thread mmalc crawford
On Mar 7, 2008, at 8:19 AM, Jason Kravitz wrote: I am a bit confused about using dynamic properties and whether I should be using synthesize to create the setter/getters on these fields. Is it appropriate (or more importantly, required) to add a line like this to my MyEntity NSManagedObjec

Re: GetMonitorFromWindow

2008-03-07 Thread Daniel Kennett
Try and make DVD Player span multiple screens - it simply won't. Since DVD Player is hardware accelerated, I was going to suggest that hardware accelerating across multiple screens is hard (especially when said screens are connected to different cards), but World of Warcraft manages just fi

Re: GetMonitorFromWindow

2008-03-07 Thread Randall Meadows
On Mar 7, 2008, at 9:38 AM, John Stiles wrote: I'm going to jump on the bandwagon and say that your client is wrong. Mac apps do not and should not do this. Sorry, I've got to jump in here as well, as much as I've tried to keep my mouth shut. Apparao Mulpuri posted a question requesting h

Re: Localized Apple Help (HTML) doesn't load

2008-03-07 Thread Ryan Poling
I don't think you should be changing the help book name for each localization - keep it the same. -Ryan On Mar 6, 2008, at 9:03 PM, John Fox wrote: Hi Folks: I'm having a problem where localized versions of my local HTML help don't load, and I don't know how

Re: GetMonitorFromWindow

2008-03-07 Thread Gary L. Wade
Also, there are certain other presentation-based applications where this kind of functionality is desired. For example, when you want to go fullscreen with any kind of media, be it from iPhoto, PowerPoint, Keynote, etc., you may indeed wish the presentation window to situate itself fully on a p

Re: Binding Error (accessing value for key) - but works with debugging on

2008-03-07 Thread Jason Kravitz
Thanks mmalc so after reading this, I see that dynamic is not necessary to explicitly specify as it is the default... I also used the "*Copy Obj-C 2.0 Method Declarations to Clipboard*" which spit out my origText as retain (and not copy) as I originally had it so I changed it to retain. Also by

(Solved) Localized Apple Help (HTML) doesn't load

2008-03-07 Thread John Fox
Hi Folks: I discovered the problem was that the tags in the index.html didn't match the title in the InfoPlist.strings. e.g.: CFBundleHelpBookName = "MemoryMiner ヘルプ"; I hope this is helpful to some one at some point. Take care, John___ Cocoa

Re: GetMonitorFromWindow

2008-03-07 Thread John Stiles
DVD Player is a special case—Apple is legally bound to prevent other apps from viewing the decrypted contents of the DVD. Recall that theoretically, DVDs are an encrypted/copy-protected medium. They jump through various hoops to make sure that other apps can't see the decrypted/decoded pixels,

Re: GetMonitorFromWindow

2008-03-07 Thread John Stiles
Well all right then, the OP should check out the NSWindow delegate methods, and NSScreen. :) Randall Meadows wrote: On Mar 7, 2008, at 9:38 AM, John Stiles wrote: I'm going to jump on the bandwagon and say that your client is wrong. Mac apps do not and should not do this. Sorry, I've got t

MEETING: Chicago CocoaHeads/CAWUG - iPhone SDK (duh! what else this month)

2008-03-07 Thread Bob Frank
The Chicago CocoaHeads / Chicago Cocoa and WebObjects User Group (CAWUG) is holding our next meeting Tuesday, March 11th, at 7:00 PM at the Apple Store on Michigan Ave. Agenda: - Introductions & Announcements - Jon on iPhone development - adjournment to O'Toole's

Job Offer: Cocoa iPhone Developer

2008-03-07 Thread Kopec, David
If interested, please contact [EMAIL PROTECTED] The Associated Press is the backbone of the world's information system serving thousands of daily newspaper, radio, television and online customers with coverage in all media and news in all formats. It is the largest and oldest news organization in

NSTextView changes font

2008-03-07 Thread John Stiles
I have an NSTextView in my app. The user can type whatever they want into it. In Interface Builder, I've set a nice large font. I've disabled rich text, font changing, etc., so I was hoping that the font would always stay the same. However, if the user deletes the entire contents of the text

NSCollectionView and default selections ...

2008-03-07 Thread Michael Pringle
Hi, I'm having a small problem with a NSCollectionView. I used Apple's example (Icon Collection) to setup my collection view, and mimicked it in almost all ways. I am happy with everything except that in Apple's example the first item in the collection is always selected, yet on mine I hav

Re: MEETING: Chicago CocoaHeads/CAWUG - iPhone SDK (duh! what else this month)

2008-03-07 Thread Bob Frank
Ooops. Seems like the old map URL suffered a case of bit rot and is a few blocks off. Here is a correct Map: http://tinyurl.com/38by7p http://maps.google.com/maps?f=q&hl=en&geocode=&q=679+North+Michigan +Ave+Chicago,+IL +60611&sll=37.0625,-95.677068&sspn=53.477264,81.035156&ie=UTF8&z=16

problem generating PDF using quartz

2008-03-07 Thread Victor Bovio
Hi, I'm trying to save a test PDF from scratch using the following code: NSString *path = @"~/Desktop/test.pdf"; NSString *fullPath = [path stringByExpandingTildeInPath]; CFStringRef str = CFStringCreateWithCString(kCFAllocatorDefault, [fullPath cString], kCFStringE

Re: NSTextView changes font

2008-03-07 Thread Ben Lachman
I'd use setTypingAttributes: in the text view's delegate whenever needed. In my code at least this often goes along with editing the default paragraph style as well via setDefaultParagraphStyle:. ->Ben -- Ben Lachman Acacia Tree Software http://acaciatreesoftware.com [EMAIL PROTECTED] 740.

Re: Binding Error (accessing value for key) - but works with debugging on (SOLVED)

2008-03-07 Thread Jason Kravitz
I just noticed that I had a rogue NSTextView hidden under the visible one and I was likely binding both of them to he same field which probably explains why it would crash with an error sometimes and other times run just fine. I cleaned up my window and it appears to be working smoothly now. thank

Re: NSCollectionView and default selections ...

2008-03-07 Thread Jens Alfke
On 7 Mar '08, at 10:02 AM, Michael Pringle wrote: in Apple's example the first item in the collection is always selected, yet on mine I have to click into the collection then onto the first item to select it. Make sure the "Avoids empty selection" checkbox is on, in the settings of the a

Re: GetMonitorFromWindow

2008-03-07 Thread Mike
No, you should not implement it. Macintosh HIG are different than for Windows. Windows does a lot of bad, brain-dead stuff. Just because it's done on Windows doesn't mean that is the right way to do it on the Mac. As a *professional developer* it is your job to tell your client when he/she is w

Re: NSCollectionView and default selections ...

2008-03-07 Thread Michael Pringle
Hi Jens, Thanks for getting back to me. I already had that checked as it was something I'd already thought of. Do you have any more ideas ? Perhaps I could email you the code ?? -Mic On 7 Mar 2008, at 20:00, Jens Alfke wrote: On 7 Mar '08, at 10:02 AM, Michael Pringle wrote: in Apple's ex

How to set a custom glyph generator?

2008-03-07 Thread Keith Blount
Hi, I have a custom glyph generator that does some custom glyph stuff (obviously). Setting this up on Leopard is easier - I just call NSLayoutManager's -setGlyphGenerator: to replace the standard glyph generator with my own. However, no such method exists on Tiger, and my application runs on Ti

ANN: Updated GeekGameBoard framework

2008-03-07 Thread Jens Alfke
I've released an updated version of GeekGameBoard, a small framework for building the user interfaces of board and card games using Core Animation: http://mooseyard.com/Jens/2008/03/geekgameboard-getting-closer-to-iphone-ready/ The original version was released by Apple last December as samp

Re: How to set a custom glyph generator?

2008-03-07 Thread Aki Inoue
The interface is publicly available since Mac OS X 10.4 Tiger. Aki On 2008/03/07, at 12:44, Keith Blount wrote: Hi, I have a custom glyph generator that does some custom glyph stuff (obviously). Setting this up on Leopard is easier - I just call NSLayoutManager's -setGlyphGenerator: to re

Changing tab in NSTabView with wantsLayer and Garbage collection problem.

2008-03-07 Thread Mathieu Coursolle
Hi Cocoa dev, I would like to use core animation in an application, so I am investigation on how to use the wantsLayer property of an NSView, but I got confused with some behavior so far... I created a simple window, in which there is a tab view. In the first tab, I added a custom view, a

-[NSMenu popUpContextMenu:withEvent:forView:] crashing in __isSystemFont on 10.5.2

2008-03-07 Thread Ben Lachman
In my custom view I call [NSMenu popUpContextMenu:contextMenu withEvent:theEvent forView:self] during mousDown: in some cases. It sometimes crashes during this call in [NSFont __isSystemFont]. The menu I'm giving it has multiple sizes of the default menu font in it. Any ideas why this is h

NSImageViewing & No Bindings available ...

2008-03-07 Thread Michael Pringle
Hi, I'm trying to add an NSImageView to a window so that I can bind to it, similar to how the icons are displayed in the 'Icon Collection' sample from Apple. However, whenever I add a custom view, and change it's class to NSImageView, I getting a 'dong' sound when I click off and there is

Re: -[NSMenu popUpContextMenu:withEvent:forView:] crashing in __isSystemFont on 10.5.2

2008-03-07 Thread Kyle Sluder
On Fri, Mar 7, 2008 at 4:31 PM, Ben Lachman <[EMAIL PROTECTED]> wrote: > In my custom view I call [NSMenu popUpContextMenu:contextMenu > withEvent:theEvent forView:self] during mousDown: in some cases. It > sometimes crashes during this call in [NSFont __isSystemFont]. The > menu I'm giving it

Re: -[NSMenu popUpContextMenu:withEvent:forView:] crashing in __isSystemFont on 10.5.2

2008-03-07 Thread Ben Lachman
EXC_BAD_ACCESS. But I think I found the issue. I wasn't retaining the font returned by menuFontForSize:. What threw me off was that this never caused a problem in Tiger (perhaps it is a static instance that is returned there) but did on Leopard. No idea of the reason for the change thou

Re: -[NSMenu popUpContextMenu:withEvent:forView:] crashing in __isSystemFont on 10.5.2

2008-03-07 Thread Aki Inoue
One of the biggest changes in Leopard is that NSFont instances are now under normal memory management rules. They deallocate/finalize just as other objects. Up until Tiger, they never got deallocated (and was one of the biggest headaches in resource management). This is an excerpt from AppK

Re: How to set a custom glyph generator?

2008-03-07 Thread Keith Blount
Oh - thank you! It seems that the docs on my computer are wrong, as they clearly state that -setGlyphGenerator: is "Available in Mac OS X v10.5 and later" - but I just checked the online docs and they say it is available in 10.4 and later. It looks like I need to update the documentation on my m

Trying to intentionally create a memory leak

2008-03-07 Thread Jake
I am trying to create a simple Cocoa app that has an intentional memory leak so that I can play with the development tools Instruments, MallocDebug and leaks to learn how to detect memory leaks. I have a Cocoa console application that has code that I was sure would leak - [NSNumber alloc] with

Re: Trying to intentionally create a memory leak

2008-03-07 Thread Sherm Pendley
On Fri, Mar 7, 2008 at 5:45 PM, Jake <[EMAIL PROTECTED]> wrote: > I am trying to create a simple Cocoa app that has an intentional memory > leak so that I can play with the development tools Instruments, MallocDebug > and leaks to learn how to detect memory leaks. I have a Cocoa console > applica

Re: Trying to intentionally create a memory leak

2008-03-07 Thread Jens Alfke
On 7 Mar '08, at 2:45 PM, Jake wrote: I have a Cocoa console application that has code that I was sure would leak - [NSNumber alloc] with no corresponding release. But when I run those tools I detect no leak. If you're just calling literally "[NSNumber alloc]", you're probably just get

Core Data MOM configurations and renaming...

2008-03-07 Thread Martin Linklater
Hi - I'm having some problems with MOM configurations. I have been playing about with some data models and have duplicated and renamed one. When I initialise the MOM using the datamodel name I get results that don't make sense. Here's a snippet of my code: NSURL* dataDumpURL = [[NSURL alloc

Textview not resizing in Leopard

2008-03-07 Thread Ben Lachman
Ok, last question of the day. I have a textview (enclosed in the normal scrollview) that resizes fine in Tiger but in Leopard is clipped on the bottom. The text container is set to track the textview width and the textview is set to be vertically resizable but not horizontally resizable.

force NSTextField to accept only Roman, or the other character codes

2008-03-07 Thread norio
Hi, My app's window has several NSTextFields. Some of them only accept Roman characters, and the others prefer to Japanese. So when the cursor comes to the text field, I want input method to change suitable characters depending on the text field. Not using validation after user types somethi

Re: Trying to intentionally create a memory leak

2008-03-07 Thread Ken Ferry
On Fri, Mar 7, 2008 at 2:59 PM, Sherm Pendley <[EMAIL PROTECTED]> wrote: > On Fri, Mar 7, 2008 at 5:45 PM, Jake <[EMAIL PROTECTED]> wrote: > > > I am trying to create a simple Cocoa app that has an intentional memory > > leak so that I can play with the development tools Instruments, MallocDebug

Re: force NSTextField to accept only Roman, or the other character codes

2008-03-07 Thread Martin Wierschin
Hi Norio, So when the cursor comes to the text field, I want input method to change suitable characters depending on the text field. Not using validation after user types something in it. There's no Cocoa API for switching the keyboard/input method. However, on Leopard you can use Text Inp

Re: NSTextView changes font

2008-03-07 Thread John Stiles
I tried implementing the delegate method –textView:shouldChangeTypingAttributes:toAttributes:, but it was never called. What do you mean by "whenever needed"? If an NSTextField supported scrolling, that would have been ideal… I just want my font to stick. I guess I assumed this would be simple.

Re: Trying to intentionally create a memory leak

2008-03-07 Thread Bill Bumgarner
On Mar 7, 2008, at 6:12 PM, Ken Ferry wrote: Also, it happens that numbers -1 through 12 (I think) are uniqued, so [[NSNumber alloc] initWithInteger:5] won't leak either. This isn't something to count on, of course. In general, if you want to leak something on purpose, leak NSObjects or subc

Re: best time to alter GUIs

2008-03-07 Thread Daniel Child
On Mar 3, 2008, at 2:05 PM, Ken Thomases wrote: On Mar 3, 2008, at 11:12 AM, Daniel Child wrote: On Mar 1, 2008, at 6:15 AM, Ken Thomases wrote: Does your init method do anything else other than calling [super initWithWindowNibName:]? In particular, if it calls [self window], that forces

Re: NSTextView changes font

2008-03-07 Thread Ben Lachman
This seems to be some weirdness with IB. Just set the font programatically instead and you're fine. The sample project I made has a controller with this awakeFromNib in it: - (void)awakeFromNib { [textview setFont:[NSFont systemFontOfSize:36.0]]; [textview setRichText:NO];

Re: Cocoa-dev Digest, Vol 5, Issue 335

2008-03-07 Thread Daniel Child
OK, thanks. But then in Cocoa you normally use alloc and init together, and that's where the problem is, I think. initWithWindowNibName seems to result in the window being shown automatically. I am instantiating the window controller, and am trying to figure out at which point I could gai

Re: Cocoa-dev Digest, Vol 5, Issue 335

2008-03-07 Thread Andrew Merenbach
Hi, Daniel, I haven't been following this thread, unfortunately, but what comes to mind is the checkbox for "Visible at launch" in the window controller's inspector panel. Is that ticked? Cheers, Andrew On Mar 7, 2008, at 7:59 PM, Daniel Child wrote: OK, thanks. But then in Cocoa

Re: Cocoa-dev Digest, Vol 5, Issue 335

2008-03-07 Thread Quincey Morris
On Mar 7, 2008, at 19:59, Daniel Child wrote: OK, thanks. But then in Cocoa you normally use alloc and init together, and that's where the problem is, I think. initWithWindowNibName seems to result in the window being shown automatically. I am instantiating the window controller, and am

NSTableViews, NSArraycontrollers and table selection question

2008-03-07 Thread Lorenzo Thurman
I have two NSTableviews each bound to their own NSArrayControllers. The tables site side by side in a window and are populated simultaneously. That works all well and good. The problem I have is that the first row in each table is selected, but grayed out and clicking on those rows does not fire a

CALayer weirdness

2008-03-07 Thread Francois-Jean De Brienne
I have an NSView which has a CALayer (we will call parent). "parent" seems to work fine, since whenever I draw in it, the results are displayed. This parent CALayer instanciates a number of child CALayers which are actually of a class I created (that derives from CALayer). These child CAL

Re: best time to alter GUIs

2008-03-07 Thread Ken Thomases
On Mar 7, 2008, at 9:38 PM, Daniel Child wrote: On Mar 3, 2008, at 2:05 PM, Ken Thomases wrote: On Mar 3, 2008, at 11:12 AM, Daniel Child wrote: On Mar 1, 2008, at 6:15 AM, Ken Thomases wrote: Does your init method do anything else other than calling [super initWithWindowNibName:]? In pa

[Moderator] No iPhone SDK discussion here please

2008-03-07 Thread Scott Anguish
Reposting this just to be crystal clear. iPhone 2.0 SDK is entirely covered by NDA, including the documentation. All of it requires login to access it at the iPhone Dev Center. Items specifically discussed in the announcement are public. But even still, they're not appropriate for discus

GNUStep, OpenStep, NextStep, Cocoa port?

2008-03-07 Thread William Zumwalt
Anyone have any experience trying to port a Cocoa XCode app to linux? Are the GnuStep or OpenStep libs compatible w/ Cocoa's NextStep? I'd really like to try this if it will work and wondering if anyone else has done the same. It's not a simple command line app in obj-c, but rather, uses Cocoa and