Re: get ref to instance from IB

2009-06-16 Thread Ken Thomases
On Jun 15, 2009, at 11:28 PM, Graham Cox wrote: On 16/06/2009, at 1:55 PM, Paul M wrote: Also: do I need to track and clean up all these wrapper instanes? I'm assuming I dont - I hope I dont otherwise it'll be a complete nightmare. You need to follow normal, standard memory management

Re: get ref to instance from IB

2009-06-16 Thread Graham Cox
On 16/06/2009, at 4:00 PM, Ken Thomases wrote: Actually, I believe a data source has stricter requirements on it than merely following the memory management rules. From

Re: Font Panel and storing font user default

2009-06-16 Thread Stuart Malin
On Jun 15, 2009, at 6:31 PM, Stuart Malin wrote: I am replying to my own posting with updated info, for the archives... I would like for my app to enable the user to set a user default for a Font to be used in a certain part of the application. I have a preferences panel, and within that am

Float Seconds?

2009-06-16 Thread Chunk 1978
concerning animations, why is it that whenever a specific duration in seconds, the animation always seems to be longer than the specified duration? it just doesn't seem precise. i recall to have the same issue with something else other than animations. anyone else notice this?

CoreData and ArrayControllers

2009-06-16 Thread Steve Cronin
Folks; Using 10.5 SDK deploying to 10.4 on an Intel 10.5.7 machine running XC 3.1.2 I have a Core Data model against which I have successfully loaded data. Now I want to display some data in a tableView - so I drag a stock arrayController from IB onto a window. I set the Mode to

Re: Float Seconds?

2009-06-16 Thread Graham Cox
On 16/06/2009, at 7:06 PM, Chunk 1978 wrote: the animation always seems to be longer than the specified duration What do you mean by seems to be? Human beings have a very subjective and usually inaccurate sense of time, so the only way to show whether the effect is real is to measure

Re: Float Seconds?

2009-06-16 Thread Chunk 1978
you're right. i think my prob was i was starting to count at 1, and ending at 6 for animations that were set for 5 seconds... dumb... On Tue, Jun 16, 2009 at 5:55 AM, Graham Coxgraham@bigpond.com wrote: On 16/06/2009, at 7:06 PM, Chunk 1978 wrote: the animation always seems to be longer

Re: Serial port access from C / Objective C

2009-06-16 Thread Tom Hohensee
If you want to access the serial port via Objective-C classes try AMSerialPort. It is a collection of classes to access serial ports. I have used it extensively for my serial programs and it works very well. Tom On Jun 15, 2009, at 5:10 PM, Vansickle, Greg wrote: I'm trying to

Passing events from original receiver / redirecting flow of events

2009-06-16 Thread Chilton Webb
Hi, I have one main view. I want to pop up another view in the middle of it, like the star menu Carbon sample code. Then I want that new view to take over all event processing. And I want to do this without polling for mouse events from the main view, and manually sending them to the

Re: Passing events from original receiver / redirecting flow of events

2009-06-16 Thread Graham Cox
On 16/06/2009, at 10:58 PM, Chilton Webb wrote: What I have already done: When the user clicks on a popup area, I create my popup menu, display it as a subview of the main view, then (remember I'm still in my mouse event in the main view) poll for all mouse events until the user is done

UndoManager for NSApplication

2009-06-16 Thread Reza Farhad
Hi I would like to have the facility of undoing deleting of a window. The best way that I thought I could do this is was to use the UndoManager belonging of my NSApplication. However when I try to get the undoManager for the application by calling: [ NSApp undoManager ] I get a

Re: Any Good Core Animation Tutorials?

2009-06-16 Thread Chunk 1978
i actually just finished reading bill dudney's book. however, there was no mention of CGAffineTransform in the book, which is my (brief) previous understanding on how to rotate, scale and move image objects on screen. there is a section in the book dealing with grouping, but i guess i'd just

Re: Safari-4-like Pulldown List

2009-06-16 Thread Sean Murphy
On Jun 14, 2009, at 5:01 AM, Dong Feng wrote: I want to implement a pulldown list like what FireFox does with its address bar (or its Google search bar). I think it involves to open a borderless window and draw items through Cocoa drawing APIs. But when I saw Safari 4, its pulldown list's

[MODERATOR} Re: XCode and Safari Block Issues?

2009-06-16 Thread Scott Anguish
This group isn't for the support of Input Manager's or haxies that mess up third party applications. [moderator] ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the

Re: UndoManager for NSApplication

2009-06-16 Thread Keary Suska
On Jun 16, 2009, at 7:45 AM, Reza Farhad wrote: I would like to have the facility of undoing deleting of a window. The best way that I thought I could do this is was to use the UndoManager belonging of my NSApplication. However when I try to get the undoManager for the application by

Re: Any Good Core Animation Tutorials?

2009-06-16 Thread Chunk 1978
so is CGAffineTransform considered Cocoa Animation, while CATransform3D is Core Animation? but they essentially do the same thing? just trying to get things straight. On Tue, Jun 16, 2009 at 10:06 AM, Graham Coxgraham@bigpond.com wrote: On 16/06/2009, at 11:51 PM, Chunk 1978 wrote: i

Re: Any Good Core Animation Tutorials?

2009-06-16 Thread Graham Cox
On 17/06/2009, at 1:27 AM, Chunk 1978 wrote: so is CGAffineTransform considered Cocoa Animation, while CATransform3D is Core Animation? but they essentially do the same thing? just trying to get things straight. Not sure what you mean by Cocoa Animation. CGAffineTransform is a Core

Re: Any Good Core Animation Tutorials?

2009-06-16 Thread Chunk 1978
humm... ok, so CA is 3D, which means X (length), Y (height) and Z (depth, or width), while CG is 2D so it only uses X and Y... so if i want to only have one layer on the screen at one time, is there still an advantage to using Z for enlargements in the 3D space over simply scaling the image

Re: Any Good Core Animation Tutorials?

2009-06-16 Thread Jean-Daniel Dupas
Le 16 juin 09 à 17:49, Chunk 1978 a écrit : humm... ok, so CA is 3D, which means X (length), Y (height) and Z (depth, or width), while CG is 2D so it only uses X and Y... so if i want to only have one layer on the screen at one time, is there still an advantage to using Z for enlargements in

Re: Serial port access from C / Objective C

2009-06-16 Thread Vansickle, Greg
Sorry, Thanks for asking. On the write, errno = 2 and strerrno(errno) returns No such device or file. On the read, errno = 35 and strerrno(errno) returns Resource temporarily unavailable. Clearly the write is the issue, but the errno isn't making sense to me. On 6/16/09 12:19 AM, Andrew

Re: Any Good Core Animation Tutorials?

2009-06-16 Thread Chunk 1978
hey, thanks for that explanation, Kluas... i guess my real Cocoa question was when i asked if there was an advantage to using CA over CG when for enlarging only one image object... On Tue, Jun 16, 2009 at 12:04 PM, Klaus Backertklaus.back...@t-online.de wrote: On 16. Jun 2009, at 17:49, Chunk

Re: Any Good Core Animation Tutorials?

2009-06-16 Thread Graham Cox
On 17/06/2009, at 2:09 AM, Chunk 1978 wrote: i guess my real Cocoa question was when i asked if there was an advantage to using CA over CG when for enlarging only one image object... This is what you originally posted in this thread: does anyone know off hand any good online tutorials

Re: Serial port access from C / Objective C

2009-06-16 Thread Vansickle, Greg
I have to re-cant this. Write() doesn't set errno, errno is 2 before write() is called, so the No such file or device is not relevant. Since write() returns the correct value, I'll persue Marco's suggestion to look at the canonical vrs non-canonical issue. Greg On 6/16/09 12:04 PM, Greg

Re: Any Good Core Animation Tutorials?

2009-06-16 Thread Kyle Sluder
On Tue, Jun 16, 2009 at 9:21 AM, Graham Coxgraham@bigpond.com wrote: Are you asking whether it's better (by some definition of better) to change the Z position of an image in CA, thus moving it further away or nearer, or to just scale it in 2D? Ultimately, these two things are equivalent,

using performSelectorInBackground

2009-06-16 Thread Rick C.
hello, i have the following nstimer method which works fine in my project: + (NSTimer *)scheduledTimerWithTimeInterval:(NSTimeInterval)seconds target:(id)target selector:(SEL)aSelectoruserInfo:(id)userInfo repeats:(BOOL)repeats however i need to use a separate thread for other reasons and i

Re: using performSelectorInBackground

2009-06-16 Thread Nick Zitzmann
On Jun 16, 2009, at 10:53 AM, Rick C. wrote: + (NSTimer *)scheduledTimerWithTimeInterval:(NSTimeInterval)seconds target:(id)target selector:(SEL)aSelectoruserInfo:(id)userInfo repeats:(BOOL)repeats however i need to use a separate thread for other reasons and i have now placed a call to

Re: to NIB or not to NIB

2009-06-16 Thread Mac First
On Jun 15, 2009, at 3:56 AM, Chunk 1978 wrote: what are your thoughts? are developers who don't use IB masochists, or is it a wise choice? IB is a power tool, and a fairly decent one. It has matured quite a bit over the years and can make short work of a lot of otherwise long tedious

Bindings and nested preferences

2009-06-16 Thread Andy Klepack
I'm curious about what patterns exist for binding to nested sets of preferences such as a dictionary value at the top level of the user defaults. I've seen a couple of questions similar to this, but no one appears to have received the definitive answer. My scenario is that I have an

Re: Bindings and nested preferences

2009-06-16 Thread Keary Suska
On Jun 16, 2009, at 11:25 AM, Andy Klepack wrote: I'm curious about what patterns exist for binding to nested sets of preferences such as a dictionary value at the top level of the user defaults. I've seen a couple of questions similar to this, but no one appears to have received the

Re: Any Good Core Animation Tutorials?

2009-06-16 Thread Gordon Apple
CALayer does have setAffineTransform: which is what I mostly use. It just does the 3D transform for you and is adequate for translation, scaling, (planer) rotation, skew, and a few other things. On 6/16/09 12:18 PM, cocoa-dev-requ...@lists.apple.com cocoa-dev-requ...@lists.apple.com wrote: so

processing AppleEvents if a modal window is open?

2009-06-16 Thread Steve Christensen
I am working on a plugin that runs inside a host app. Some of its configuration is handled inside a modal window ([NSApp runModalForWindow:window]) since the host app doesn't directly support more complicated configuration options. As part of the process, the plugin needs to query the host

Re: to NIB or not to NIB

2009-06-16 Thread Erik Buck
I have a pet theory about why IB is totally obvious at the first encounter for some people and prompts other people to write about ...5 failed attempts (over the  years) to learn IB...   Before I share my theory and bias the responses, I hereby ask those readers who resisted IB for a long time

UndoManager for NSApplication

2009-06-16 Thread Reza Farhad
The problem with my situation is that the application might not have a window up as it has been deleted, so I can not use the NSUndoManager associated with the window system. I would like to have the facility of undoing deleting of a window. The best way that I thought I could do this is

Re: UndoManager for NSApplication

2009-06-16 Thread Kyle Sluder
So essentially you want to mimic IB? Register your window creation/deletion methods with an NSUndoManager that lives in your app delegate (or elsewhere in the responder chain). Then your deletion is really just hiding the window from view. If the user undoes the deletion, the window is shown

Re: get ref to instance from IB

2009-06-16 Thread Paul M
Thanks for all the good information here. It's helping a lot. My data is largely static, if it does change it all changes, so if I save references to all my wrappers, I can just dump the lot and start over if there are changes. I'll probably create them on an 'as required' basis to prevent a

Re: get ref to instance from IB

2009-06-16 Thread Andy Lee
On Tuesday, June 16, 2009, at 08:10PM, Paul M l...@no-tek.com wrote: Thanks for all the good information here. It's helping a lot. My data is largely static, if it does change it all changes, so if I save references to all my wrappers, I can just dump the lot and start over if there are

Detecting Threading Design Errors in Core Data

2009-06-16 Thread Jerry Krinock
The Core Data application I'm working on uses NSOperation and NSOperationQueue for managing tasks. Since I don't want multiple managed object contexts and all that entails, I handle the threading issues by wrapping methods that require Core Data database access with

Re: CoreData and ArrayControllers

2009-06-16 Thread Steve Steinitz
Hi Steve On 16/6/09, Steve Cronin steve_cro...@mac.com wrote: A quick scan of your email leads me to think you've done everything correctly. Two questions: 1. are you sure the Window Controller's managedObjectContext exists? 2. what is the name (and maybe the description) of the exception?

Notification/callback of successful CGEventPost?

2009-06-16 Thread Dave DeLong
Hey everyone, I want to take a snapshot of the NSPasteboard, put my own information on it, programmatically invoke a paste operation, and then restore the pasteboard to its original state. I have this mostly working, but it's not a satisfactory solution. My problem is with posting the

Re: Notification/callback of successful CGEventPost?

2009-06-16 Thread Ken Thomases
On Jun 16, 2009, at 8:22 PM, Dave DeLong wrote: I want to take a snapshot of the NSPasteboard, put my own information on it, programmatically invoke a paste operation, and then restore the pasteboard to its original state. I have this mostly working, but it's not a satisfactory solution.

Re: using performSelectorInBackground

2009-06-16 Thread Rick C.
thank you very much i believe i got it working ok now. rick From: Nick Zitzmann n...@chronosnet.com To: Rick C. jo_p...@yahoo.com Cc: cocoa-dev@lists.apple.com Sent: Wednesday, June 17, 2009 12:59:22 AM Subject: Re: using performSelectorInBackground On Jun

Re: to NIB or not to NIB

2009-06-16 Thread Chunk 1978
i also wonder about the disk space or resources required to run and app with an nib/xib, especially for simple apps on iPhone OS. is it true that while including a nib/xib is time saving convenience, it's not as ideal for distribution or even launch time based on size and resources? On Tue, Jun

Re: to NIB or not to NIB

2009-06-16 Thread Graham Cox
On 17/06/2009, at 12:25 PM, Chunk 1978 wrote: i also wonder about the disk space or resources required to run and app with an nib/xib, especially for simple apps on iPhone OS. is it true that while including a nib/xib is time saving convenience, it's not as ideal for distribution or even

Re: Notification/callback of successful CGEventPost?

2009-06-16 Thread Dave DeLong
That, my friend, is a seriously slick idea. I will try that out and report back. Dave On Jun 16, 2009, at 7:49 PM, Ken Thomases wrote: On Jun 16, 2009, at 8:22 PM, Dave DeLong wrote: I want to take a snapshot of the NSPasteboard, put my own information on it, programmatically invoke a

How to fill rectangle under vertical scroller?

2009-06-16 Thread Sumin Kim
Hi, all. I am drawing custom scroller for my application and could change color and looks of knob, arrows, and knob slot. But I still cannot change the color of a rectangle located in right bottom corner under vertical scroller. I could not find out how to handle the area. Any advice will be

Re: How to fill rectangle under vertical scroller?

2009-06-16 Thread Graham Cox
On 17/06/2009, at 9:43 AM, Sumin Kim wrote: I am drawing custom scroller for my application and could change color and looks of knob, arrows, and knob slot. But I still cannot change the color of a rectangle located in right bottom corner under vertical scroller. I could not find out how

Re: How to fill rectangle under vertical scroller?

2009-06-16 Thread Andrew Farmer
On 16 Jun 2009, at 16:43, Sumin Kim wrote: I am drawing custom scroller for my application and could change color and looks of knob, arrows, and knob slot. But I still cannot change the color of a rectangle located in right bottom corner under vertical scroller. I could not find out how to

Can't figure our Tableview details

2009-06-16 Thread Mark Bateman
Hi, I'm trying to get my table view to open a lower level webview window but I can't figure out the best method to show the webview. if I use self.view = mywebview it shows the next window ok but it won't allow be to migrate back to the table view. the top level is a tab bar

Re: How to fill rectangle under vertical scroller?

2009-06-16 Thread Sumin Kim
That's not part of the scroller. Assuming you're working with NSTableView, this is the cornerView, which you can set up separately. Yes, you are right. I am working with table. Of course I tried to use cornerView. But as far as I understood with my experience dealing with cornerView, it