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? https://img.skitch.com/20110716-8dmku

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

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

Re: Obscuring an NSString

2010-12-13 Thread Adam Gerson
: > On Dec 5, 2010, at 2:31 PM, Adam Gerson wrote: > >> Thanks to all who responded. Let me explain my situation a little >> better. I am storing several string values into an XML file. I want to >> obscure one of them. When I encrpyt the NSString to an NSdata I can >>

Re: Obscuring an NSString

2010-12-05 Thread Adam Gerson
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) P

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 ju

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 po

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 userDefaultsDidCh

Re: #define and if statements

2010-02-26 Thread Adam Gerson
... } > > It's going 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 &g

#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 Fr

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 b

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? v

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 ch

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 (Coco

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 mainMenu

Re: Full Screen Mode With MenuBar

2009-02-06 Thread Adam Gerson
creating a Kiosk? > > BTW, how does 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

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 archiv

Re: NSView behaves different on 10.4 vs 10.5?

2009-01-28 Thread Adam Gerson
on, Jan 19, 2009 at 10:40 PM, Jim Correia 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 supp

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. T

Re: NSView behaves different on 10.4 vs 10.5?

2009-01-19 Thread Adam Gerson
ml On Mon, Jan 19, 2009 at 10:36 PM, Adam Gerson 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 s

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 individual

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 ___ Coco

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
like many other new Image Kit items, it's buggy as heck. > > 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.

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] mainWindo

Re: NSTreeController / CoreData still broken in 10.5?

2008-04-07 Thread Adam Gerson
However, I am using CoreData with my TreeController bound to a Managed Object Context. Can I still supply a contentArray in this situation? Adam On Sun, Apr 6, 2008 at 9:36 AM, Jonathan Dann <[EMAIL PROTECTED]> wrote: > Hi Adam, > > I've just finished a blog post on this, it's not about using it

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
ing that presentation 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

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,

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: Name of NSTableView

2008-04-02 Thread Adam Gerson
All good ideas from Andy. I sometimes get arround this issue by using the "tag" in IB. It has to be an int so I define #define TABLE1 1 #define TABLE2 2 #define TABLE3 3 Then you can get a reference to your table with if ([tableView tag] == TABLE3) { //code } On Wed, Apr 2, 2008 at 6:07 PM, Je

Re: NSManagedObject data only shows up in view sometimes

2008-04-02 Thread Adam Gerson
fter awakeFromNib and windowControllerDidLoadNib:. Remedy: You can execute the fetch "manually" 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 NS

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 insertNewObjectForEntity

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 appears

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 <[EM

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: 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 PR

[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 lot

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. So

Re: outlineViewSelectionDidChange not called

2008-03-29 Thread Adam Gerson
Adam On Thu, Mar 27, 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 obj

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-27 Thread Adam Gerson
> Ah.. I'm not quite sure you got what I meant. In a (document-based) > app set up an NSArray *selectionIndexPaths ivar, so the > NSTreeController then binds its @"selectionIndexPaths" binding to the > keypath @"File's Owner.selectionIndexPaths" where file's owner is the > owner of the nib co

Re: Core Data/IB questions

2008-03-27 Thread Adam Gerson
ler, arrangedObjects, but this is a dead end. I can't see how > to make the combobox choose the entry. The combo box doesn't have the > same binding options as a popup menu. > > Any advice as to how to approach this would be great. > > Ian. > > > > > O

Re: Core Data/IB questions

2008-03-26 Thread Adam Gerson
AIL PROTECTED]> wrote: > > On Mar 26, 2008, at 11:06 PM, Adam Gerson wrote: > > Each table should have its own ArrayController if the two tables > > represent the data from two different entities. Since you entities are > > related I am assuming one entity ha

Re: Core Data/IB questions

2008-03-26 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 th

Re: outlineViewSelectionDidChange not called

2008-03-25 Thread Adam Gerson
I take that back. [outlineView selectedRow] does appear to tell the absolute truth. So I should now be able to try what you said and tie the tree controller's @"selectionIndexPaths" to [outlineView selectedRow]. I will report back my results... Adam On Tue, Mar 25, 2008 at 11:12

Re: outlineViewSelectionDidChange not called

2008-03-25 Thread Adam Gerson
ble and you cab then see > each time the variable changes. 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. &g

Re: outlineViewSelectionDidChange not called

2008-03-24 Thread Adam Gerson
Hey Jens, Thanks for getting back to me. > > 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. > > II

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 manuall

Re: NSTreeController / CoreData still broken in 10.5?

2008-03-23 Thread Adam Gerson
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?&quo

Re: NSTreeController / CoreData still broken in 10.5?

2008-03-23 Thread Adam Gerson
bjects. > > 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, Ma

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 NSTreeContr

Re: populate a custom sub-class with data from bindings - SOLVED

2008-03-21 Thread Adam Gerson
:(NSOutlineView *)outlineView willDisplayCell:(id)cell forTableColumn:(NSTableColumn *)tableColumn item:(id)item to update the values in the custom cell from the data in my item. On Wed, Mar 19, 2008 at 7:05 PM, Adam Gerson <[EMAIL PROTECTED]> wrote: > I want to use the custom Apple

populate a custom sub-class with data from bindings

2008-03-19 Thread Adam Gerson
I want to use the custom Apple subclass ImageAndTextCell.h in my NSOutlineView. How would I hook up the Text and Images used by this custom sub-class to a TreeController's data? The "value" binding already populates the text of the cell. Is there away for me to add a second binding to the sub-class

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

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 throu

IKSlideshow

2008-03-12 Thread Adam Gerson
I am looking at the code to create an automatic slideshow inside my application. When I start the slideshow playing with runSlideshowWithDataSource:inMode:options: the slide show controls (next, previous, end show, etc..) are showing. I would like to hide these by default when the slideshow starts.

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

2008-03-03 Thread Adam Gerson
PROTECTED] > > Disclaimer: I've never tried this myself, I've only read about it. > You can read more at: > > > http://developer.apple.com/documentation/Cocoa/Conceptual/KeyValueCoding/Concepts/ArrayOperators.html > > > On Feb 26, 2008, at 7:34 PM, Adam Ge

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

2008-03-03 Thread Adam Gerson
> > Thanks, this does directly address my question. Not exactly sure what > > to do with it. I tried calling fetchWithRequest:merge:error: in > > awakeFromNib and then trying to access the managed object, but that > > didn't work. > > > Is the outlet to the array controller connected? > > mm

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

2008-03-02 Thread Adam Gerson
ROTECTED]> 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 awakeFrom

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 ApplicationDidFInishLaunchi

Re: Can CoreData return only unique results of an attribute

2008-02-26 Thread Adam Gerson
eir > salary limit key. > > I hope I have been of assistance. > > Good luck, > > Phil. > > > > > On 27 Feb 2008, at 00:01, Adam Gerson wrote: > > I did look into NSPredicate and the Predicate Programming Guide. I > understand the concept of filtering th

Re: Can CoreData return only unique results of an attribute

2008-02-26 Thread Adam Gerson
NSPredicate. Then bind the controller's filter predicate to the > file owners predicate method. This will automatically filter your > controllers values. > > Hope this helps. > > Phil. > > On 26 Feb 2008, at 22:00, Adam Gerson wrote: > > > > I have a core data object

Can CoreData return only unique results of an attribute

2008-02-26 Thread Adam Gerson
I have a core data object. I would like to populate a TableView with only the unique entires for a specific property. Clearly I could filter the results in code, I was wondering if there was away for core data and bindings to do it. Adam ___ Cocoa-dev m

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 <[EM

Example: Drag and Drop with Core Data Relationships

2008-02-24 Thread Adam Gerson
In this example you are able to use drag and drop to change the order of items in a single tableview, and to change group membership of nested items in objects with relationships, all with Core Data. The behavior is like iTunes style Playlist / Song relationships. A few other bonuses: -an "instan

Re: Drag and Drop with Core Data bound NSTableViews - SOLVED

2008-02-23 Thread Adam Gerson
My Appologies. This is working now. Can't exactly explain how. I set the NSTableView's delegate outlet to my window controller and then it worked. Adam On 2/23/08, Adam Gerson <[EMAIL PROTECTED]> wrote: > I think I have this very close to working. My understanding is that &

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 me

Re: bind tableview to arraycontroller

2008-02-23 Thread Adam Gerson
Your NSArray needs to be an array of KVC compliant objects. Is this the case? Do you have the NSTableColumn's value binding set to the controller key "arrangedObjects" and the model key path set to an attribute of your KVC class? You could use a CoraData object to do some of the heavy lifting for