Re: converting a characer to a keycode

2009-05-11 Thread Jean-Daniel Dupas
Le 9 mai 09 à 22:29, kvic...@pobox.com a écrit : At 9:14 PM -0700 5/8/09, glgue...@amug.org wrote: ken wrote: the only way i can think to perform this conversion is to itereate over the virtual key codes 0-127 (with various combinations of shift and option keys) until i find the one tha

Re: Subject: detect option key on startup

2009-05-11 Thread Jean-Daniel Dupas
Try in - applicationDidFinishLaunching: Le 10 mai 09 à 00:58, Mitchell Livingston a écrit : In what method would that need to be in to get the key on startup? I tried without luck in init and awakeFromNib. On Saturday, May 09, 2009, at 06:48PM, "Kirk Kerekes" > wrote: How About: (

Re: Help debugging bindings issues

2009-05-11 Thread Alexander Spohr
Am 08.05.2009 um 18:44 schrieb Alex Smith: [ addObserver:forKeyPath:options:context:] is not supported. Key path: personName Please post the complete line. This looks like something is missing. Are you sure you entered the right path in IB? atze ___

Re: NSTask temrinationStatus always == 1?

2009-05-11 Thread marc hoffman
Jim, i have an odd issue with NSTask. for some reason, no matter what result code my executable returns (im running xcodebuild, if that matters), NSTask's terminationStatus always reports back as 1. if instead i use system() to run the exact same command, i get bak proper error codes (0 for

Re: NSString to bit pattern

2009-05-11 Thread erappy
Thanks Alastair, it was a good hint and help.Cheers, On Sat, May 9, 2009 at 4:51 AM, Alastair Houghton < alast...@alastairs-place.net> wrote: > On 8 May 2009, at 10:00, erappy wrote: > > Hi, I am trying to find way to convert the NSString object into its bit >> pattern and convert that bit pat

Re: Packages vs bundles vs folders etc

2009-05-11 Thread Chris Idou
I'm surprised that frameworks act like folders in Finder, yet don't conform to public.folder. To be more explicit, I'm writing some code that synchronises two folders. If directory A contains file X and directory B contains file Y, then synchronising them depends on what kind of directory it

Re: Packages vs bundles vs folders etc

2009-05-11 Thread Peter Ammon
Frameworks act like folders so that users can browse their header files in Finder. As a developer, I think I would want that frameworks be treated atomically for synchronization purposes. My understanding is that Finder decides that frameworks are user browsable because they're directories

Re: Packages vs bundles vs folders etc

2009-05-11 Thread Alastair Houghton
On 11 May 2009, at 13:42, Peter Ammon wrote: My understanding is that Finder decides that frameworks are user browsable because they're directories, but not packages. Applications are not user browsable because they descend from com.apple.package. The bundle type says something about how

Re: [iPhone] UITableViewController headache

2009-05-11 Thread Matthew Mashyna
On May 11, 2009, at 12:20 AM, James Lin wrote: Hi all, This is strange, i don't know what to make of it. I have a view with a TableView in it. If i use UITableViewController class, which is supposed to be the correct class to use, the tableview (which has 1 UILabel and 1 UITextField combine

Re: Renaming a file repositions icon in Finder

2009-05-11 Thread Jim Turner
On Fri, May 8, 2009 at 5:45 PM, Sean McBride wrote: > On 5/8/09 2:52 PM, Jim Turner said: > >>It appears that renaming a file will cause the Finder to reposition >>the icon for the file if it's currently displayed in a icon view >>somewhere.  Is there any way to prevent that from happening?  It lo

Re: Help debugging bindings issues

2009-05-11 Thread Alex Smith
Here is the full error listing. 2009-05-11 08:22:55.043 RaiseMan[2935:10b] [ addObserver:forKeyPath:options:context:] is not supported. Key path: personName 2009-05-11 08:22:55.062 RaiseMan[2935:10b] [ addObserver:forKeyPath:options:context:] is not supported. Key path: personName 2009-05

Re: [iPhone] UITableViewController headache

2009-05-11 Thread Alex Curylo
On 11-May-09, at 6:21 AM, cocoa-dev-requ...@lists.apple.com wrote: UITableViewController is mostly a convenience class that stubs the required protocol for UITableView when you create a new subclass using Xcode. It doesn't really matter what controller class you use if you implement the protoco

Re: Help debugging bindings issues

2009-05-11 Thread Alexander Spohr
The docs for NSArray say: Special Considerations NSArray objects are not observable, so this method raises an exception when invoked on an NSArray object. Instead of observing an array, observe the to-many relationship for which the array is the collection of related objects. It looks lik

Re: Help debugging bindings issues

2009-05-11 Thread Quincey Morris
On May 11, 2009, at 07:43, Alex Smith wrote: Here is the full error listing. 2009-05-11 08:22:55.043 RaiseMan[2935:10b] [ addObserver:forKeyPath:options:context:] is not supported. Key path: personName 2009-05-11 08:22:55.062 RaiseMan[2935:10b] [ addObserver:forKeyPath:options:context:] i

Re: converting a characer to a keycode

2009-05-11 Thread kvic...@pobox.com
At 9:27 AM +0200 5/11/09, Jean-Daniel Dupas wrote: Le 9 mai 09 à 22:29, kvic...@pobox.com a écrit : At 9:14 PM -0700 5/8/09, glgue...@amug.org wrote: ken wrote: the only way i can think to perform this conversion is to itereate over the virtual key codes 0-127 (with various combinations of

Creating NSAttributedString objects using WebKit in secondary thread

2009-05-11 Thread Dragan Milić
Hello all, Is there any way to initialise and use WebKit out of the main thread? I know this message may look like good candidate for the Webkit-dev mailing list, but I actually don't want to use WebKit directly, it's just a consequence of trying to create NSAttributedString instance from

Re: Creating NSAttributedString objects using WebKit in secondary thread

2009-05-11 Thread Douglas Davidson
On May 11, 2009, at 10:53 AM, Dragan Milić wrote: Is there any way to initialise and use WebKit out of the main thread? No, there isn't. This is a fundamental restriction on the use of WebKit. Douglas Davidson ___ Cocoa-dev mailing list (Co

Re: Packages vs bundles vs folders etc

2009-05-11 Thread Sean McBride
On 5/11/09 1:55 PM, Alastair Houghton said: >> My understanding is that Finder decides that frameworks are user >> browsable because they're directories, but not packages. >> Applications are not user browsable because they descend from >> com.apple.package. The bundle type says something about h

Re: Packages vs bundles vs folders etc

2009-05-11 Thread Dave Carrigan
On May 11, 2009, at 11:08 AM, Sean McBride wrote: Are you sure the Finder consults the bundle bit? I would think that it's Launch Services doing that. Yes, it does: mkdir -p /tmp/foo/bar/bat SetFile -a B /tmp/foo open /tmp Note that finder thinks foo is a single item, not a folder. If

Re: Packages vs bundles vs folders etc

2009-05-11 Thread Sean McBride
On 5/11/09 11:47 AM, Dave Carrigan said: >> Are you sure the Finder consults the bundle bit? I would think that >> it's Launch Services doing that. > > >Yes, it does: > > mkdir -p /tmp/foo/bar/bat > SetFile -a B /tmp/foo > open /tmp > >Note that finder thinks foo is a single item, not a folder

NSFileHandleDataAvailableNotification problems

2009-05-11 Thread Todd Heberlein
Hi all, I have a problem reading periodic data from a file descriptor, and I am wondering if I am using the methods wrong. The basic code is below, but essentially I (1) register my object to be called when an NSFileHandleDataAvailableNotification is sent to the notification center;

Re: Packages vs bundles vs folders etc

2009-05-11 Thread Alastair Houghton
On 11 May 2009, at 19:08, "Sean McBride" wrote: On 5/11/09 1:55 PM, Alastair Houghton said: I'm not sure whether this is now classed as legacy behaviour, but on HFS+ at least, Finder looks at the "bundle bit" to determine whether something is treated as a bundle or just an ordinary folder.

[iPhone] UITableView with state?

2009-05-11 Thread Eric E. Dolecki
I am using my own graphics for a tableview's cell background and selected background (grouped tableview). I am using UILabels added to the contentView, so I'm not setting the cell text directly at all. I have tagged the labels (3 in each cell) so I can get to them later within the selection callbac

Re: Attr Str drawing vs Layout Manager drawing

2009-05-11 Thread Martin Wierschin
"You can release the text container because the layout manager retains it, and you can release the layout manager because the text storage object retains it." It's fine as long as you don't continue to use the objects directly. The sample code amounts to this: id obj1 = [Bar new], obj2 = [B

Re: [iPhone] UITableView with state?

2009-05-11 Thread Luke the Hiesterman
First of all, it's generally discouraged as a UI design to allow cells to stay selected. That is, inside your tableView:didSelectRowAtIndexPath: method, you should call [tableView deselectRowAtIndexPath:indexPath animated:YES] so that you get the nice animated highlight fade-away that peopl

Re: Creating NSAttributedString objects using WebKit in secondary thread

2009-05-11 Thread Dragan Milić
On pon 11. 05. 2009., at 20:07, Douglas Davidson wrote: On May 11, 2009, at 10:53 AM, Dragan Milić wrote: Is there any way to initialise and use WebKit out of the main thread? No, there isn't. This is a fundamental restriction on the use of WebKit. Yes, I know. I just hoped there was so

Re: Attr Str drawing vs Layout Manager drawing

2009-05-11 Thread Kyle Sluder
On Mon, May 11, 2009 at 5:32 PM, Martin Wierschin wrote: > So technically you're correct, but maybe paranoid :P Seth and I discussed this off-list... it essentially amounts to this: I tend to stick very much to the general rules, rather than saying "well I know that Foo is going to retain Bar wh

Re: Packages vs bundles vs folders etc

2009-05-11 Thread Mike Abdullah
Also, I don't think the bundle bit is 'legacy'. I should explain what I meant a bit better. My point was more that the bundle bit is HFS specific, so like the type and creator codes, while it's good to set it, I'm not sure anything should be relying on it. The main reason for setting i

Re: [iPhone] UITableView with state?

2009-05-11 Thread Eric E. Dolecki
Actually now that I think about it, I wouldn't really need to keep the cell selected, as I plan on displaying another view at that time, so the initial UI change itself will be okay... but how do I reset the view with the table in it so that all the cell reset themselves? reloadData? E On Mon, May

Re: Creating NSAttributedString objects using WebKit in secondary thread

2009-05-11 Thread Stephen J. Butler
2009/5/11 Dragan Milić : > So, I assume creating attributed strings is not thread safe, but I don't > remember anything like that stated in the documentation. In my opinion, that > looks like a bug. It is thread safe... if you stick to the Foundation methods. The method you're trying to use, howev

Re: [iPhone] UITableView with state?

2009-05-11 Thread Luke the Hiesterman
reloadData is potentially fine. Presumably, though, you really only have one cell you need to reset (the one that was tapped to cause you to animate in another view), so all you need to do is reset that cell. Again, probably easy to keep around a reference to that cell, and you could do wha

Re: Listing running process

2009-05-11 Thread Ken Thomases
On May 9, 2009, at 1:29 PM, Arivan S. Bastos wrote: How do I list the running processes of the operating system? And how get info about that processes? http://developer.apple.com/qa/qa2001/qa1123.html Cheers, Ken ___ Cocoa-dev mailing list (Coco

Re: NSFileHandleDataAvailableNotification problems

2009-05-11 Thread Ken Thomases
On May 11, 2009, at 2:35 PM, Todd Heberlein wrote: I have a problem reading periodic data from a file descriptor, and I am wondering if I am using the methods wrong. The basic code is below, but essentially I (1) register my object to be called when an NSFileHandleDataAvailableNotificati

Re: Packages vs bundles vs folders etc

2009-05-11 Thread Ken Thomases
On May 11, 2009, at 1:02 AM, Peter Ammon wrote: If so, I think you're on the right track. On Leopard, I would get the UTI of a file via -[NSWorkspace typeOfFile: error:], and then see if it conforms to kUTTypeFolder via -[NSWorkspace type:fileType conformsToType:(NSString *)kUTTypeFolder].

Re: NSToolbarItem with custom view in Interface Builder 3 (Leopard)

2009-05-11 Thread Jonathan Hess
Hey Gunnar - You won't be able to make this work with an instance of "custom view" dragged from the library. Here are a couple of suggestions for workarounds: You could add an outlet to the toolbar item you'd like to use a custom view with, and then place the custom view at the top level

CURLHandle - getting header status

2009-05-11 Thread Charles E. Heizer
Hello, I'm trying to use CURLHandle to get the header status of the request just made but I'm unable to get the status code. I'm trying to use "headerStatus" but I get a "unrecognized selector" error. What am I missing? Thanks, Charles NSURL *url = [NSURL URLWithString:myURL]; CURLHandle *

Re: Creating NSAttributedString objects using WebKit in secondary thread

2009-05-11 Thread Dragan Milić
On uto 12. 05. 2009., at 00:16, Stephen J. Butler wrote: 2009/5/11 Dragan Milić : So, I assume creating attributed strings is not thread safe, but I don't remember anything like that stated in the documentation. In my opinion, that looks like a bug. It is thread safe... if you stick to

Re: Creating NSAttributedString objects using WebKit in secondary thread

2009-05-11 Thread Gwynne Raskind
On May 11, 2009, at 7:42 PM, Dragan Milić wrote: So, I assume creating attributed strings is not thread safe, but I don't remember anything like that stated in the documentation. In my opinion, that looks like a bug. It is thread safe... if you stick to the Foundation methods. The method you

Re: Creating NSAttributedString objects using WebKit in secondary thread

2009-05-11 Thread Michael Ash
2009/5/11 Dragan Milić : > On pon 11. 05. 2009., at 20:07, Douglas Davidson wrote: > >> On May 11, 2009, at 10:53 AM, Dragan Milić wrote: >> >>> Is there any way to initialise and use WebKit out of the main thread? >> >> No, there isn't.  This is a fundamental restriction on the use of WebKit. > >

Re: Creating NSAttributedString objects using WebKit in secondary thread

2009-05-11 Thread Michael Ash
2009/5/11 Gwynne Raskind : > This is workable, but make sure you use a fork()/exec() pair to re-execute > yourself in that case, and use argc/argv in your main() to determine which > mode to run in. Don't just use fork() by itself - there are severe limits to > what you can do in an only-fork()ed p

Re: Creating NSAttributedString objects using WebKit in secondary thread

2009-05-11 Thread Dragan Milić
On uto 12. 05. 2009., at 01:52, Michael Ash wrote: 2009/5/11 Dragan Milić : On pon 11. 05. 2009., at 20:07, Douglas Davidson wrote: On May 11, 2009, at 10:53 AM, Dragan Milić wrote: Is there any way to initialise and use WebKit out of the main thread? No, there isn't. This is a fundamen

DVDPlayer & Deinterlacing

2009-05-11 Thread Brad Gibbs
Hi, It looks like the Scripting Bridge header file for Apple's DVD Player offers nearly the same options as the DVDPlayer framework, and neither seem to offer control over the deinterlacing options present in the DVD Player app itself. Apple's deinterlacing actually became pretty respect

Re: Creating NSAttributedString objects using WebKit in secondary thread

2009-05-11 Thread Dragan Milić
On uto 12. 05. 2009., at 01:55, Michael Ash wrote: 2009/5/11 Gwynne Raskind : This is workable, but make sure you use a fork()/exec() pair to re- execute yourself in that case, and use argc/argv in your main() to determine which mode to run in. Don't just use fork() by itself - there are seve

Re: Help debugging bindings issues

2009-05-11 Thread Alex Smith
Thank you so much for your help. I took a closer look at my ArrayController and found that I had bound the ArrayController.ContentObject to the NSMutableArray that was supposed to be bound to the ArrayControler.ContentArray. So I guess it was using something provided by a base class to pro

Re: Creating NSAttributedString objects using WebKit in secondary thread

2009-05-11 Thread Adam R. Maxwell
On May 11, 2009, at 2:56 PM, Dragan Milić wrote: On pon 11. 05. 2009., at 20:07, Douglas Davidson wrote: On May 11, 2009, at 10:53 AM, Dragan Milić wrote: Is there any way to initialise and use WebKit out of the main thread? No, there isn't. This is a fundamental restriction on the use

Re: NSToolbarItem with custom view in Interface Builder 3 (Leopard)

2009-05-11 Thread Gunnar Proppe
Howdy Jon, Thanks for the tips, I'll give that a try. The first suggestion sounds close to where I was going to go, except I hadn't thought of instantiating the view in the NIB file. Great idea. Your alternative suggestion sounds interesting but I'm not sure I understand it. Would I then set

Resolving address on 10.4 (ppc) - problem with endianness

2009-05-11 Thread Alexander Hartner
I am using the following to resolve a Bonjour discovered service address. However it seems that getnameinfo on 10.4 (ppc) does not translate correctly. However using inet_ntoa correctly resolved to an IP address. Ideally I am after the hostname, and if that cannot be resolved then the IP a

Re: quick and dirty NSData implosion

2009-05-11 Thread Graham Cox
On 12/05/2009, at 6:20 AM, jon wrote: @property(readwrite, assign) int bookMarkCount; @property(readwrite, assign) NSString *bookMarkurlString; @property(readwrite, assign) NSString *bookMarkTitle; 'assign' means the property is a simple assignment, such as ivar = foo; Therefore your string

Re: quick and dirty NSData implosion

2009-05-11 Thread Adam R. Maxwell
On May 11, 2009, at 6:11 PM, Graham Cox wrote: On 12/05/2009, at 6:20 AM, jon wrote: - (id)initWithCoder:(NSCoder *)c { [super init]; You do not and should not call [super init] here. In this case it's harmless as it happens, but in the general case it's not. The only thing in

NSAccessibilityAttributeValue exception raised when hovering mouse over top menu bar

2009-05-11 Thread Kevin Ross
Hi everyone, I'm experiencing a strange exception that is being thrown when I start the app in the debugger. It loads the symbols fine and even starts the app okay. But when I use the top menu at all (even just hovering the mouse over the menu bar does it) it raises this exception. Durin

custom NSViews and subviews - creating in IB

2009-05-11 Thread Jack Carbaugh
I'm not sure if this is possible, but here goes: I would like to "create" a subview with various controls in IB. Then, in code, make a copy of that object and in turn make modifications to some of the objects in that view. For example, set a text field to a value. Then, i'd like to add it

Debugger's "global browser" does not show any globals?

2009-05-11 Thread jon
I'm hoping someone has an easy answer for this, or has seen it, Most of the time, when i'm in the debugger, if i go to the "global" option, and i see the list of frameworks and my application, if i click on anything, it shows 0/0 global variables... basically nothing. but every once i

Re: LaunchAgent Creation

2009-05-11 Thread Pierce Freeman
Thanks for your reply Jerry. I'll try putting the -Rf before listing the paths. You mentioned newer and better methods in 10.4 and 10.5 and since I am only planning to support these, could you give me a bit more detail to what you are referring to. -- In reply to: You've almost got it. I be

Re: quick and dirty NSData implosion

2009-05-11 Thread Graham Cox
On 12/05/2009, at 11:36 AM, Adam R. Maxwell wrote: On May 11, 2009, at 6:11 PM, Graham Cox wrote: On 12/05/2009, at 6:20 AM, jon wrote: - (id)initWithCoder:(NSCoder *)c { [super init]; You do not and should not call [super init] here. In this case it's harmless as it happens,

NSString and retain.

2009-05-11 Thread jon
from my very limited Objective-C programing experience of all of 10 days... it appears to me that my assignments to NSStrings seem to, at random, disappear. (i, being a new Objective-C programmer coming from pascal and C, like to have a "global" string in several places, not that it

Re: custom NSViews and subviews - creating in IB

2009-05-11 Thread Kevin Cathey
Hi Jack, Your best bet is probably to create a new nib file that contains a top- level view which is your "subview". Then, have outlets on the File's Owner that connect to your various controls like the text field (or just use bindings). In your code, then you would instantiate this nib as

Re: NSToolbarItem with custom view in Interface Builder 3 (Leopard)

2009-05-11 Thread Jonathan Hess
On May 11, 2009, at 6:03 PM, Gunnar Proppe wrote: Howdy Jon, Thanks for the tips, I'll give that a try. The first suggestion sounds close to where I was going to go, except I hadn't thought of instantiating the view in the NIB file. Great idea. Your alternative suggestion sounds interes

Re: custom NSViews and subviews - creating in IB

2009-05-11 Thread Erik Buck
Do you have a question ? Why don't you just create a subview with various controls in IB. Then, in code, make a copy of that object and in turn make modifications to some of the objects in that view. For example, set a text field to a value. Then, add it to a super view. You seem to kno

Re: NSString and retain.

2009-05-11 Thread Clark Cox
On Mon, May 11, 2009 at 7:15 PM, jon wrote: > from my very limited Objective-C programing experience of all of 10 days... > > it appears to me that my assignments to NSStrings seem to, at random, > disappear. (i, being a new Objective-C programmer coming from pascal and > C,  like to have a "g

Re: NSString and retain.

2009-05-11 Thread Andy Lee
On May 11, 2009, at 10:15 PM, jon wrote: my wild guess right now is to do this below when ever i have the "NSString" instance assignment to prevent, for instance, "theTitle" from "randomly disappearing"... I hope the following doesn't sound harsh, because I'm not trying to be... I'd seco

Disabling menu item

2009-05-11 Thread Nikhil Khandelwal
Hi all, I want to disable the complete menu item means it should not show any submenu when clicked on. Like in any application if I disable the file menu it should get disabled and not show any submenu related to it. Please reply ASAP. Thanks, Nikhil DISCLAIMER == This e-mail may cont

IKImageBrowserView is not reloading data.

2009-05-11 Thread Kenny Carruthers
Hi, Given an IKImageBrowserView that is populated with valid IKImageBrowserItem, calling 'reloadData' on the image browser view does not actually reload the data for me. The documentation says that it "Marks the receiver as needing its data reloaded" but how and when does the reload actua

Save dictionary to local file please help!

2009-05-11 Thread Ben Spam
Please help me, I'm in serious trouble if I do not sort this out! I am trying to save a dictionary to a local file, but inserting a new record crashes my app and I can not fathom why, here is my code...please let me know if you see anything im doing wrong.. PS: the random key is purely for testi

Creating an NSInvocation from an NSMethodSignature

2009-05-11 Thread Mike Mangino
I'm working on some changes to the OCMock framework to better support partial mocks and I'm a little stuck. In short, I'm trying to write a single method that I can attach to a class. I'm trying to make that method call through to the existing Mock recording code. It's based on NSProxy and

Drawing 1 pixel line with zoom change

2009-05-11 Thread Sahana A
Hi There, We have a feature in our application wherein we have to draw a 1 pixel line. This drawing also varies relative to the zoom factor of our view. For example if we are drawing at a zoom factor of 200% we draw 0.5 pixel line. ( basically: 1/zoomfactor width of line; 1 if the zoomfa

beginner's question: having problems with saving/loading

2009-05-11 Thread Gabriel Roth
In my attempt to learn Cocoa programming, I’m working on a tiny app to practice saving and loading files. Each document window contains a text field, a label, and a button. The user types a string into the text field and clicks the button, and the same text appears in the label. When the document i

Re: quick and dirty NSData implosion

2009-05-11 Thread jon
On May 8, 2009, at 6:56 PM, Graham Cox wrote: You can help yourself out with this type of thing by declaring your classes properly. If you need it to be NSCoding compliant (as you do), then ensure it subscribes to the protocol: @interface BookMark : NSObject I think i have the Protocol

instance management in IB

2009-05-11 Thread Chris Carson
Hello, I've been scratching my head trying to get a basic delegate/data source Cocoa/AppKit program working and feel that I'm misunderstanding something basic (I've included the code is at the end). I set a breakpoint within the if statement in the init method of MyModel and see it called mor

Re: Drawing 1 pixel line with zoom change

2009-05-11 Thread Graham Cox
On 12/05/2009, at 12:44 AM, Sahana A wrote: We have a feature in our application wherein we have to draw a 1 pixel line. This drawing also varies relative to the zoom factor of our view. For example if we are drawing at a zoom factor of 200% we draw 0.5 pixel line. ( basically: 1/zoomfac

Re: beginner's question: having problems with saving/loading

2009-05-11 Thread Graham Cox
On 12/05/2009, at 5:42 AM, Gabriel Roth wrote: I don’t know what’s calling the generic init method So, set a breakpoint on it and have a look. It sounds like you may have two instances of app controller being made, maybe one from code and the other from a nib. Maybe. Your memory managem

Re: Save dictionary to local file please help!

2009-05-11 Thread Graham Cox
On 11/05/2009, at 7:10 PM, Ben Spam wrote: dataDict = [NSMutableDictionary dictionaryWithContentsOfFile:destinationPath]; You do not own after this line, so later access to it is accessing a stale pointer, and ...kablooey... it falls over. RTFDOMMA. (Read The Documentation On Memor

Re: Creating NSAttributedString objects using WebKit in secondary thread

2009-05-11 Thread Michael Ash
2009/5/11 Dragan Milić : > On uto 12. 05. 2009., at 01:55, Michael Ash wrote: > >> 2009/5/11 Gwynne Raskind : >>> >>> This is workable, but make sure you use a fork()/exec() pair to >>> re-execute >>> yourself in that case, and use argc/argv in your main() to determine >>> which >>> mode to run in.

Re: Creating an NSInvocation from an NSMethodSignature

2009-05-11 Thread Michael Ash
On Mon, May 11, 2009 at 9:04 AM, Mike Mangino wrote: > I'm working on some changes to the OCMock framework to better support > partial mocks and I'm a little stuck. In short, I'm trying to write a single > method that I can attach to a class. I'm trying to make that method call > through to the ex

Re: quick and dirty NSData implosion

2009-05-11 Thread Michael Ash
On Mon, May 11, 2009 at 10:00 PM, Graham Cox wrote: > What's a slight nuisance with this rule is that if I change what my class > inherits from, I will have to revisit my -initWithCoder: method to possibly > call super's initWithCoder: instead of super's designated initializer. If my > method was

Re: Disabling menu item

2009-05-11 Thread Graham Cox
On 11/05/2009, at 4:53 PM, Nikhil Khandelwal wrote: I want to disable the complete menu item means it should not show any submenu when clicked on. Like in any application if I disable the file menu it should get disabled and not show any submenu related to it. If the parent item of a su

Re: instance management in IB

2009-05-11 Thread Jonathan Hess
Hey Chris - This line "pointPath = [NSBezierPath bezierPath];" in the init method creates an NSBezierPath instance that may (will!) be destroyed with the next autorelease pool flush. You should be creating your bezier path with "pointPath = [[NSBezierPath alloc] init];" and then add a "[p

Re: instance management in IB

2009-05-11 Thread Patrick Mau
Hallo Chris The NIB loading guide states that custom objects, like your model object, are created using 'initWithCoder' and not plain 'init'. I would advise you to implement 'awakeFromNib' in your view and use NSLog() to print your datasource and its buffer or simply to set a breakpoint there

Re: quick and dirty NSData implosion

2009-05-11 Thread Andy Lee
On May 11, 2009, at 4:20 PM, jon wrote: bookMarkurlString = [c decodeObjectForKey:@"bookMarkurlString"]; bookMarkTitle = [c decodeObjectForKey:@"bookMarkTitle"]; You need to retain these. The doc for decodeObjectForKey: says "Decodes and returns an autoreleased Objective-C ob

Re: instance management in IB

2009-05-11 Thread Chris Carson
Hi Jon, Thanks! That did the trick -- I was way off. Chris - Original Message > From: Jonathan Hess > To: Chris Carson > Cc: cocoa-dev@lists.apple.com > Sent: Tuesday, May 12, 2009 1:19:11 AM > Subject: Re: instance management in IB > > Hey Chris - > > This line "pointPath = [NSBe

Re: Creating NSAttributedString objects using WebKit in secondary thread

2009-05-11 Thread Dragan Milić
On uto 12. 05. 2009., at 06:54, Michael Ash wrote: I think you've misunderstood. There is no problem with the fork/exec approach here. You actually are spot on with that remark, my knowledge of UNIX system calls is not very broad, on the contrary it's rather limited I'd say. Thank you all

Resolution Independent View?

2009-05-11 Thread Chunk 1978
Is it possible to have a view, say a simple square that is 5cm x 5cm, always maintain it size regardless of the mac's resolution? it seems the only way possible to produce a square of 5cm x 5cm programatically is to include the screens resolution into the equation. but besides having different res

Re: Resolution Independent View?

2009-05-11 Thread WT
A trivial search of XCode's developer documentation, with the string "resolution independence", resulted in this document, among others: Introduction to Resolution Independence Guidelines http://developer.apple.com/documentation/UserExperience/Conceptual/HiDPIOverview/HiDPIOverview.pdf On May