Hang/crash into assembly code

2011-07-16 Thread Adam Gerson
I am having a strange issue with an app I am working on. I get a pinwheel of death. Its not consistently reproducible, but does happen sometimes. When I pause in the debugger it breaks into assembly code so I am not sure how to trace it. Where can I look next?

NSCursor

2011-05-22 Thread Adam Gerson
I am trying to understand NSCursor better. I have an animation that takes place in my view and I dont want to allow any mouse or keyboard interaction while the animation is running. That is easy to do. While this is happening I want to display some kind of custom waiting cursor which I have been

NSCursor - ignore previous (was incomplete)

2011-05-22 Thread Adam Gerson
I am trying to understand NSCursor better. I have an animation that takes place in my view and I don't want to allow any mouse or keyboard interaction while the animation is running. That is easy to do. While this is happening I want to display some kind of custom waiting cursor which I have been

Re: Obscuring an NSString

2010-12-05 Thread Adam Gerson
/ --Richard Somers On Dec 2, 2010, at 6:30 AM, Adam Gerson wrote: I am writing an NSString to a file and I would like to obscure it in a two way reversible fashion. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests

Obscuring an NSString

2010-12-02 Thread Adam Gerson
I am writing an NSString to a file and I would like to obscure it in a two way reversible fashion. It doesn't have to be major hacker proof, just not understandable by an average person. I need to be able to read the value back in from the file and convert it back to clear text. In php I would

NSButton with image

2010-06-14 Thread Adam Gerson
If all I want is an image that acts like a button, do I need to subclass NSButton? I just want my button to show only my image and no Apple style button backgrounds. Thanks, Adam ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not

userDefaultsDidChange is causing a loop with dependent checkbox values

2010-06-12 Thread Adam Gerson
I have set up some NSUserDefaults and used bindings to bind them to some checkboxes and radiobuttons in my nib. I want the act of checking some of the checkboxes to uncheck or check other checkboxes. I did this by registering for a NSUserDefaultsDidChangeNotification. Then inside

#define and if statements

2010-02-26 Thread Adam Gerson
I have the following constant set up. I have tried all three of these variations and none of them work in an if statement in cocoa. I get error: expected `)' before ';' token #define IsDemo NO; #define IsDemo false; #define IsDemo 0; if (IsDemo) { bla... } Same problem, when I try: #define

Re: #define and if statements

2010-02-26 Thread Adam Gerson
to become: if (NO;) { ... } See the problem?  You've got a semicolon in there.  Generally, you don't end a #define with a semicolon unless you want a semicolon in the place where the #define will be used. Dave On Feb 26, 2010, at 11:22 PM, Adam Gerson wrote: I have the following constant

Lack of Manpower May Kill VLC For Mac

2009-12-16 Thread Adam Gerson
The Video Lan dev team has recently come forward with a notice that the number of active developers for the project's MacOS X releases has dropped to zero, prompting a halt in the release schedule. There is now a disturbing possibility that support for Mac will be dropped as of 1.1.0. As the most

NSMutableArray initWithCapacity and insertObject:atIndex

2009-08-09 Thread Adam Gerson
I would like to insert objects out of order into an NSMutableArray. I create the array with NSMutableArray* cards = [[NSMutableArray alloc] initWithCapacity:5]; When I try to call [cards insertObject:card atIndex:4]; I get the error: *** -[NSCFArray insertObject:atIndex:]: index (4) beyond

Bindings and nested checkboxes and enabled

2009-03-15 Thread Adam Gerson
I have two checkboxes in a preferences window which are bound to user defaults. The second checkbox should only be enabled if the first checkbox its true. I have this working great with bindings. The second checkboxe's enabled binding is bound to the value of the first one. However, if the first

Bindings and radio buttons and enabled

2009-03-15 Thread Adam Gerson
I have a radiobutton set. If the second radio button (index = 1) is checked I would like a checkbox to become enabled. Is there any way with bindings to conditionally say If radiobuttonset.index = 1 then enable yourself, If radiobuttonset.index=0 (or anything else) unenable and uncheck yourself?

NSView bottom part is cut off

2009-03-05 Thread Adam Gerson
I have a view that looks just fine in interface builder. When I display it in a window in my app it cuts off the bottom part of the content. Visual: http://screencast.com/t/YEXgqlAcP What could cause this? Thanks, Adam ___ Cocoa-dev mailing list

Re: Empty window appears when going fullscreen in awakeFromNib

2009-02-07 Thread Adam Gerson
Hey John, Does this help? I am hiding the dock elsewhere with SetSystemUIMode. // Calculate the size to make the new screen. NSRect fullScreenRect = [[[NSScreen screens] objectAtIndex:0] frame]; // Uses the menu bar screen. -mainWindow has problems. fullScreenRect.size.height -= [[NSApp

Re: Full Screen Mode With MenuBar

2009-02-06 Thread Adam Gerson
the Dock fit into your idea of what fullscreen mode is? regards, douglas PS: as for -enterFullScreenMode:options: being buggy, please see the discussion here: http://www.cocoabuilder.com/archive/message/cocoa/2009/1/6/226850 On Feb 4, 2009, at 8:26 PM, Adam Gerson wrote: I am looking

Full Screen Mode With MenuBar

2009-02-04 Thread Adam Gerson
I am looking to implement a fullscreen window while showing the menubar. The consensus is that NSView's enterFullScreenMode is buggy and doesn't support showing the menu bar. What is the alternative? Are there any good examples out there? I have done many google searches and read through the

Re: NSView behaves different on 10.4 vs 10.5?

2009-01-28 Thread Adam Gerson
, 2009 at 10:40 PM, Jim Correia jim.corr...@pobox.com wrote: On Jan 19, 2009, at 10:36 PM, Adam Gerson wrote: The cards in the hand are drawn overlapping. [...] Could anyone shed some slight on what could be occurring? Overlapping sibling views are supported on 10.5 and later. If you need

Re: NSView behaves different on 10.4 vs 10.5?

2009-01-21 Thread Adam Gerson
Hey Kyle, Thanks for the suggestion. Can you tell me more about this idea. It doesn't look like I can set an NSButton's NSButtonCell and NSButtonCell isn't a child of NSView so I can't draw it directly as a sub view. Once I have my sub class of NSButtonCell how do I render into onto the screen.

NSView behaves different on 10.4 vs 10.5?

2009-01-19 Thread Adam Gerson
I am trying to help someone solve a problem with their code. I did not write the code myself. As far as I can tell they have a custom NSView subclass that has some subviews. The view represents a hand of playing cards. The subviews themselves are custom NSButton subclasses that represent

Re: NSView behaves different on 10.4 vs 10.5?

2009-01-19 Thread Adam Gerson
19, 2009 at 10:36 PM, Adam Gerson agers...@gmail.com wrote: I am trying to help someone solve a problem with their code. I did not write the code myself. As far as I can tell they have a custom NSView subclass that has some subviews. The view represents a hand of playing cards. The subviews

Re: Bring app to front

2008-06-14 Thread Adam Gerson
Thanks Andy. Kyle, you make a good point. It dangerious to allow an app to annoy the user. I am building a menu extra that always shows up in the menu bar, but its icon is hidden from the dock and is never consider front by the OS. When these choose an item from my menu it cuases a window to open

Bring app to front

2008-06-08 Thread Adam Gerson
I want to be able to pop up an alert message even when my app is not the front most app. How can I bring my app to the front, or how can I cause the system to display an alert window in front of all open windows of any application? Thanks, Adam ___

Advanced Mac OS X Bootcamp

2008-06-01 Thread Adam Gerson
I signed up for the Advanced Mac OS X Bootcamp at The Big Nerd Ranch. They don't yet have enough people to hold the class and I want it to happen so I am hoping more people will sign up. I took the Objective-C Cocoa Bootcamp at the BNR and it was a fantastic experience. Dec 8 - 12 Advanced Mac

Re: How to use bindings with IKImageBrowserView?

2008-04-27 Thread Adam Gerson
. Adam Knight Co-founder; CTO [EMAIL PROTECTED] On Apr 4, 2008, at 11:39 PM, Adam Gerson wrote: I know its a hybrid approach, but the upside is I did not have to call reloadData. As soon as I added an object to the arraycontroller it became available in the view. Adam On Sat, Apr 5

is this badly written code?

2008-04-14 Thread Adam Gerson
In cocoa its very tempting to write a single line of code like: NSManagedObject *selectedTreeObject = [self delegate] mainWindowController] treeController] selectedObjects] objectAtIndex:0]; or to flush it out in to individual lines: NSWindowController *mainWindow = [[self delegate]

Re: Beginner reading, etc.

2008-04-06 Thread Adam Gerson
http://pmougin.wordpress.com/2008/03/26/become-an-xcoder-leopard-edition/ http://www.amazon.com/Cocoa-Programming-Mac-OS-X/dp/B000OZ0N94/ On Sun, Apr 6, 2008 at 7:01 PM, andy knasinski [EMAIL PROTECTED] wrote: I searched the archives and found some old posts, but i'm wondering what current

Re: NSTreeController / CoreData still broken in 10.5?

2008-04-05 Thread Adam Gerson
implementation down into my model objects. The proxy approach is a little more work, but it's not all that bad if you remember to use the Force (the wonderful-ness of key-value observing). I hope this helps; if I can clarify please let me know. Doug K; On Sun, Mar 23, 2008 at 7:55 PM, Adam Gerson

Re: How to use bindings with IKImageBrowserView?

2008-04-04 Thread Adam Gerson
It does work. I have defined a core data entity that conforms to IKBrowerItem protocol and my IKImageBrowserView is working with bindings. I think you still need to point the delegate and data source outlets to an object that implements the datasource methods: //

Re: How to use bindings with IKImageBrowserView?

2008-04-04 Thread Adam Gerson
I know its a hybrid approach, but the upside is I did not have to call reloadData. As soon as I added an object to the arraycontroller it became available in the view. Adam On Sat, Apr 5, 2008 at 12:28 AM, Steve Weller [EMAIL PROTECTED] wrote: On Apr 4, 2008, at 2:18 PM, Adam Gerson wrote

Re: Bindings for NSComboBox?

2008-04-02 Thread Adam Gerson
You could set up a delegate for the combo box and implement controlTextDidEndEditing. Then programatically add the value to your array controller: NSManagedObjectContext * context = [[NSApp delegate] managedObjectContext]; NSManagedObject *yourObject = [NSEntityDescription

Re: NSManagedObject data only shows up in view sometimes

2008-04-02 Thread Adam Gerson
with fetchWithRequest:merge:error:—see Core Data and Cocoa Bindings. On Wed, Apr 2, 2008 at 12:42 AM, Adam Gerson [EMAIL PROTECTED] wrote: I have a classic NSTreeController / NSOutlineView situation. The TreeController has a SortDescriptor on it. I am programatically adding a leaf node to a group node

Re: KVO question on Tree Controllers

2008-04-01 Thread Adam Gerson
What is bound to your NSTreeController? If its something like an OutlineView you can have the delegate impliment outlineViewSelectionDidChange. I tested it in my app and it does get called when the OutlineView selection is changes to empty. Adam On Tue, Apr 1, 2008 at 3:11 PM, Jeff LaMarche

NSManagedObject data only shows up in view sometimes

2008-04-01 Thread Adam Gerson
I have a classic NSTreeController / NSOutlineView situation. The TreeController has a SortDescriptor on it. I am programatically adding a leaf node to a group node. It does not appear in the OutlineView when I first add it. When I inspect the CoreData .xml file the leaf node is there and it

Re: outlineViewSelectionDidChange not called

2008-03-30 Thread Adam Gerson
, 2008 at 3:07 PM, Hamish Allan [EMAIL PROTECTED] wrote: On Thu, Mar 27, 2008 at 5:17 PM, Adam Gerson [EMAIL PROTECTED] wrote: Ok, I understand. So I bind both the OutlineView and the TreeController to a third object that keeps them both in sync to the same SelectionIndexPath value

OutlineView please remember you selection

2008-03-30 Thread Adam Gerson
I have an OutlineView bound to an NSTreeController. I would like to set the selected row of the OutlineView at the applications launch to the second row. It defaults to the first. I have tried many combination of the code below to no avail. If I trigger the code from a button it works just fine.

[Apple Example] NSOutlineView

2008-03-30 Thread Adam Gerson
I just came across this great Apple NSTreeController / NSOutlineView example. It incorporates a lot of 10.5 style techniques into one example. -Image and text cells -iTunes like groups in OutlineView -10.5 Window styles -CoreAnimation If this is comenly known I appologize, but I have spent a

Re: NSOutlineView / NSSplitView redraw delay

2008-03-30 Thread Adam Gerson
I had some problems with OutlineView and SplitView redraws. I switched over to RBSplitView and its worked great since. I think the general consensus is that NSSplitView can behave strangely. http://www.brockerhoff.net/src/rbs.html Adam On Sat, Mar 29, 2008 at 7:57 PM, Milen Dzhumerov [EMAIL

Re: Cocoa Tutoring in SF Bay Area

2008-03-30 Thread Adam Gerson
CocoaHeads is a group devoted to discussion of Apple Computer's Cocoa Framework for programming on MacOS X. During monthly meetings, members present on their projects and offer tutorials on various programming topics. http://cocoaheads.org/us/SiliconValleyCalifornia/index.html On Sat, Mar 29,

Re: Core Data/IB questions

2008-03-27 Thread Adam Gerson
On Wed, Mar 26, 2008 at 10:31 PM, Rick Mann [EMAIL PROTECTED] wrote: Question 2: I can see how a text field gets populated when you select an item in the table. How can I get a one table to populate based on the selection in another? Each table should have its own ArrayController if the two

Re: Core Data/IB questions

2008-03-27 Thread Adam Gerson
have the same binding options as a popup menu. Any advice as to how to approach this would be great. Ian. On 27/03/2008, at 7:34 PM, Adam Gerson wrote: I think that internally when you create a to-many core-data relationship the group of objects is stored as an NSSet as opposed

embed screen sharing in a cocoa app?

2008-03-27 Thread Adam Gerson
With 10.5's new screen sharing ability is there away to embed screen sharing into my app? I would like to pop up a window in my cocoa app that allows a user to remote view or control the desktop of another mac. I know I can launch the screen sharing app externally with vnc:// Thanks, Adam

Re: outlineViewSelectionDidChange not called

2008-03-25 Thread Adam Gerson
. Not sure if it will cover all the bases you need though. You'd get an array if selection index paths and then just see if the count of the array is 1 for single selection or more if you have multiple. Jonathan Dann On 25 Mar 2008, at 05:42, Adam Gerson [EMAIL PROTECTED] wrote

outlineViewSelectionDidChange not called

2008-03-24 Thread Adam Gerson
I have an NSOutlineView column bound to an NSTreeController. When I remove an object from the TreeController the row representing the deleted object disappears and OutlineView selects the next row, but does not send a notification to the delegate method outlineViewSelectionDidChange. When I

NSTreeController / CoreData still broken in 10.5?

2008-03-23 Thread Adam Gerson
A general question: I have read a lot of discouraging posts on this list and out on the blogs about the trio of NSTreeController, NSOutlIneView and CoreData. Most of them come from the 10.4 era. Under 10.5 is this something that is working better now? A specific question: A lot of the

Re: NSTreeController / CoreData still broken in 10.5?

2008-03-23 Thread Adam Gerson
. The proxy approach is a little more work, but it's not all that bad if you remember to use the Force (the wonderful-ness of key-value observing). I hope this helps; if I can clarify please let me know. Doug K; On Sun, Mar 23, 2008 at 7:55 PM, Adam Gerson [EMAIL PROTECTED] wrote

Re: NSTreeController / CoreData still broken in 10.5?

2008-03-23 Thread Adam Gerson
an NSManagedObject? Adam On Sun, Mar 23, 2008 at 10:08 PM, Chris Hanson [EMAIL PROTECTED] wrote: On Mar 23, 2008, at 4:55 PM, Adam Gerson wrote: A specific question: It is always good to ask specific questions. Is still broken in 10.5? is not a very specific question, especially since

Can core data save to a remote file?

2008-03-13 Thread Adam Gerson
I would like multiple copies of my coredata app to read from and save to the same XML file located on a server. I see that persistentStoreCoordinator just uses an NSURL which is great for remote reading because I can pass it an http url. However, Is there a good way to establish writableility

Re: IKSlideshow - SOLVED

2008-03-13 Thread Adam Gerson
http://developer.apple.com/samplecode/CocoaSlides/ On Wed, Mar 12, 2008 at 11:09 PM, Adam Gerson [EMAIL PROTECTED] wrote: I am looking at the code to create an automatic slideshow inside my application. When I start the slideshow playing with runSlideshowWithDataSource:inMode:options

Re: Can CoreData return only unique results of an attribute - SOLVED

2008-03-03 Thread Adam Gerson
://developer.apple.com/documentation/Cocoa/Conceptual/KeyValueCoding/Concepts/ArrayOperators.html On Feb 26, 2008, at 7:34 PM, Adam Gerson wrote: Thanks for the example. What I am looking for is slightly diferent. Lets say I have a entity called FavoriteWebsites with the attributes

When in the launch cycle does coredata data become available.

2008-03-02 Thread Adam Gerson
I am trying to programatically get some data from an array controller when my program launches. NSArray *allServers = [serverLibraryArrayController arrangedObjects]; This code works just fine with I invoke it with a button click. However, if I put it in awakeFromNib or

Re: When in the launch cycle does coredata data become available.

2008-03-02 Thread Adam Gerson
] wrote: On Mar 2, 2008, at 6:36 PM, Adam Gerson wrote: NSArray *allServers = [serverLibraryArrayController arrangedObjects]; This code works just fine with I invoke it with a button click. However, if I put it in awakeFromNib or ApplicationDidFInishLaunching it returns nil

Re: Table column index

2008-02-25 Thread Adam Gerson
Those methods return NSInteger's. To get a reference to the NSTableColumn you should call something like int column = [[yourTableView selectedColumn] intValue]; NSTableColumn myColumn = [[yourTableView tableColumns] objectAtIndex:column]; Adam On Mon, Feb 25, 2008 at 3:46 PM, Quincey Morris

Drag and Drop with Core Data bound NSTableViews almost works

2008-02-23 Thread Adam Gerson
I think I have this very close to working. My understanding is that for drag and drop to work I have to set some object as the NSTableView's data source even though technically the table columns are bound to an NSArrayController for data. In my data source object I have implemented the nessesery