Re: Faster adding of files to targets

2009-10-05 Thread Greg Guerin
Sorry, sent to wrong list. Please ignore prior post. -- GG ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com H

Re: Faster adding of files to targets

2009-10-05 Thread Greg Guerin
ML wrote: But the source is already in Xcode and the targets came over blank. Plus the source is nested in many folders. Is there a way I can edit a target in a text editor and paste in the list of files as I was given a list of what files are required for each target. My firs thought

Re: self release

2009-10-05 Thread Graham Cox
On 06/10/2009, at 3:00 PM, Dragos Ionel wrote: When the last page of the chapter is reached and the user tries to get to the next page, the code inside the ChapterViewController has somehow to tell the parent controller, BookViewController that it needs to be released and another chapter

Re: app delegate +initialize

2009-10-05 Thread John Baldwin
OK. I've found a pattern, but I don't know how to debug effectively. Compiling with Snow Leopard seems to have been a red herring. Essentially, I copy my app to the test computer by putting it in a drop box folder in a user's Public folder. If the app is run from this location on the machin

Re: Rounded NSBox/NSView?

2009-10-05 Thread PCWiz
Thanks for the advice everyone. What I ended up doing was just making a plain HUD panel (which is somewhat rounded) On 2009-10-05, at 9:25 PM, Rob Keniger wrote: On 06/10/2009, at 1:07 PM, Graham Cox wrote: Views are defined by their frame/bounds rectangles. But there's nothing to stop y

A question of CFBundleIdentifier & kMDItemContentType

2009-10-05 Thread Timothy Reaves
I have a bundle wit the CFBundleIdentifier set using the form com.mycompany.myapp.mybundle. When I run mdls against it, the kMDItemContentType shows "dyn.ah62d4qmuhk2x42pxsv3g825bsu". I thought it was supposed to show the com.mycompany.myapp.mybundle. Any idea why this is? ___

Re: Bundle is not using icon or CFBundleIdentifier

2009-10-05 Thread Timothy Reaves
> On 04.10.2009, at 06:30, Timothy Reaves wrote: >> I have a bundle defined as a document type for an app. When I build >> one of these bundles, and double-click it, it opens in my app. All >> well and good. Except the following. > > Wait, the bundle is defined as the app's document type? Then

Re: wait for the event?

2009-10-05 Thread Matthew Mashyna
Well, I'm an old fart too so I'll try to make one more point and maybe that will help. Once the bulb goes on over your head you'll love the asynchronous nature of Cocoa. Let asynchronicity work for you. Put things in motion and let them tell you when they are done instead of watching them.

self release

2009-10-05 Thread Dragos Ionel
I have the following scenario: A UIViewController, called BookViewController represents a book. Another UIViewController, ChapterViewController, represents a chapter in the book. BookViewController initializes and displays one ChapterViewController, that represents the current chapter that is rea

Re: How to check if a class derives from another?

2009-10-05 Thread Rick Mann
Well, that's obvious. I wonder why I didn't see that when I was looking at the docs. Thanks! On Oct 5, 2009, at 18:41:38, Jens Alfke wrote: On Oct 5, 2009, at 6:35 PM, Rick Mann wrote: I have a need to tell if a class I'm loading dynamically is derived from another class. How do I do this

Re: Rounded NSBox/NSView?

2009-10-05 Thread Graham Cox
On 06/10/2009, at 2:25 PM, Rob Keniger wrote: On 06/10/2009, at 1:07 PM, Graham Cox wrote: Views are defined by their frame/bounds rectangles. But there's nothing to stop you from setting a round-cornered clipping path at the start of your view's drawRect method to clip the view's content

Two digit dates with NSDateFormatter

2009-10-05 Thread Matthew Lindfield Seager
Hi All, I have a 10.4 style date formatter applied to an NSTextFieldCell. I call setTwoDigitStartDate: (tried with both the epoch date and the "reference" date) but when I type a date with a two digit year in it sets the year to 0009 instead of 2009. Am I missing something obvious? Regards, Matt

Re: Rounded NSBox/NSView?

2009-10-05 Thread Rob Keniger
On 06/10/2009, at 1:07 PM, Graham Cox wrote: Views are defined by their frame/bounds rectangles. But there's nothing to stop you from setting a round-cornered clipping path at the start of your view's drawRect method to clip the view's content to a round-cornered rect. Since the view draws

Re: Making a opaque copy of an NSImage

2009-10-05 Thread Graham Cox
On 02/10/2009, at 6:39 AM, David Alter wrote: *I have an NSImage that I would like to make a transparent version for dragging. I have used - (void)dissolveToPoint:(NSPoint)aPoint fraction:(CGFloat)delta to do this in the past. That appears to be getting deprecated and I would like to update m

Re: Checking whether a file is a genuine PDF file

2009-10-05 Thread Charles Srstka
On Oct 5, 2009, at 9:02 PM, James Walker wrote: FWIW, in the classic Mac OS, it was not uncommon to see a PDF with NO extension, but with the file type set to 'PDF '. Yes. Fortunately, if you have your application check the UTI instead of the filename extension, you'll always detect that it

Re: Rounded NSBox/NSView?

2009-10-05 Thread Graham Cox
On 04/10/2009, at 4:35 AM, PCWiz wrote: I want to create a NSBox or an NSView (doesn't matter which one) that has rounded corners. Now I know about NSBox's setCornerRadius method, and using NSBezierPath in an NSView subclass to draw a rounded rect. The problem with these 2 methods is that

Re: wait for the event?

2009-10-05 Thread Scott Ribe
> I unfortunately have it ingrained for 25 > years of straight pascal in MacOS... OK, so you already have some "event-driven" experience when dealing with user events, now you need to extend that thinking to other sources of data, such as the network, in addition to mouse & keyboard. -- Scott Ri

Re: Checking whether a file is a genuine PDF file

2009-10-05 Thread Kyle Sluder
On Mon, Oct 5, 2009 at 6:30 PM, Graham Cox wrote: > This is true, but how far are you prepared to go? Others have suggested > checking a few bytes into the file's header which should be reasonable > enough, but I could create a file having a valid PDF header and garbage > thereafter... you cannot

Re: Checking whether a file is a genuine PDF file

2009-10-05 Thread James Walker
Graham Cox wrote: On 04/10/2009, at 11:07 PM, Squ Aire wrote: But that isn't good enough really, because a file can have the pdf extension without being a true PDF file. This is true, but how far are you prepared to go? Others have suggested checking a few bytes into the file's header whi

Re: re: CoreData async fetch request

2009-10-05 Thread enki1711
I am doing a simple query search for a text string pattern (ie 'SELF like foo') on ~10 million small records stored persistently using sqlite. This is a performance test to make sure I get reasonable performance from my database engine before I commit too much code to it. The query is takin

Re: Checking whether a file is a genuine PDF file

2009-10-05 Thread John Joyce
Google magic number This is unix and there is a ver nifty tool for such things. Ultimately u just have to ask yourself how you will handle files that seem wrong. You could also ask yourself how you would handle an unreasonably large PDF file... Then u can ask yourself if it is really necessar

Re: wait for the event?

2009-10-05 Thread jon
oh you've got that right, I unfortunately have it ingrained for 25 years of straight pascal in MacOS... i could destroy a runloop with the best of them... I wish i started cocoa 7 years ago, but it was not to be. My brain is trying to refactor, and it is fighting mightily... trying

Re: NSOutlineView - Automatically select newly added item - Help needed

2009-10-05 Thread Charles Srstka
On Oct 5, 2009, at 7:49 PM, Colin Howarth wrote: On 6 Oct, 2009, at 01:44, Mario Kušnjer wrote: ... [lsOutlineView selectRowIndexes:[NSIndexSet indexSetWithIndex: [lsOutlineView rowForItem:[Parent new]]] byExtendingSelection:NO]; It is the last line that trouble's me. It should select new

Re: Checking whether a file is a genuine PDF file

2009-10-05 Thread Charles Srstka
On Oct 5, 2009, at 8:30 PM, Graham Cox wrote: Most people would draw it with a simple check of the extension and maybe for files that traditionally have been subject to extension abuse (I don't think pdf is one of them) Well, in this day and age I believe you should actually be checking t

Re: wait for the event?

2009-10-05 Thread Matthew Mashyna
Well, all I can say is that you need some time to come around to a different way of thinking. You are thinking too linearly. You need to set up your loads and listens and coordinate them. You don't want to design your app to sit and spin on the main thread. It's job is to handle all the bas

Re: How to check if a class derives from another?

2009-10-05 Thread Colin Howarth
On 6 Oct, 2009, at 03:35, Rick Mann wrote: I have a need to tell if a class I'm loading dynamically is derived from another class. How do I do this? Perhaps NSObject's class method +superclass might help? ___ Cocoa-dev mailing list (Cocoa-dev@lis

Re: How to check if a class derives from another?

2009-10-05 Thread Jens Alfke
On Oct 5, 2009, at 6:35 PM, Rick Mann wrote: I have a need to tell if a class I'm loading dynamically is derived from another class. How do I do this? Class justLoadedClass = ... ; if ([justLoadedClass isSubclassOfClass: [MyBaseClass class]]) { ... } —Jens

How to check if a class derives from another?

2009-10-05 Thread Rick Mann
I have a need to tell if a class I'm loading dynamically is derived from another class. How do I do this? TIA, Rick ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact

Re: Checking whether a file is a genuine PDF file

2009-10-05 Thread Graham Cox
On 04/10/2009, at 11:07 PM, Squ Aire wrote: But that isn't good enough really, because a file can have the pdf extension without being a true PDF file. This is true, but how far are you prepared to go? Others have suggested checking a few bytes into the file's header which should be re

Re: NSOutlineView - Automatically select newly added item - Help needed

2009-10-05 Thread Graham Cox
On 06/10/2009, at 10:44 AM, Mario Kušnjer wrote: [sourceListLevelZero addObject:[Parent new]]; [lsOutlineView selectRowIndexes:[NSIndexSet indexSetWithIndex: [lsOutlineView rowForItem:[Parent new]]] byExtendingSelection:NO]; Assuming -addObject: in the first line adds th

Re: NSOutlineView - Automatically select newly added item - Help needed

2009-10-05 Thread Colin Howarth
On 6 Oct, 2009, at 01:44, Mario Kušnjer wrote: ... [lsOutlineView selectRowIndexes:[NSIndexSet indexSetWithIndex: [lsOutlineView rowForItem:[Parent new]]] byExtendingSelection:NO]; It is the last line that trouble's me. It should select newly added item in the list (right ?), but it does

Re: wait for the event?

2009-10-05 Thread Jens Alfke
On Oct 5, 2009, at 5:34 PM, jon wrote: and i put the rest in the selector method like so... to be executed when the page is fully loaded, which works... but the thing is, the code immediately following the main call to "loadThePage" isn't waiting, it keeps on executing... which defeats

Re: wait for the event?

2009-10-05 Thread jon
well there seems to be a problem, I do the main Method like so, - (void)loadThePage { URLToLoad = [NSURL URLWithString:theUrlString]; [offScreenWebView setFrameLoadDelegate:self]; [[offScreenWebView mainFrame] loadRequest:[NSURLRequest requestWithURL:URLToLoad]]; } @end an

Re: NSOutlineView - Automatically select newly added item - Help needed

2009-10-05 Thread Stamenkovic Florijan
On Oct 05, 2009, at 19:44, Mario Kušnjer wrote: Hello to the list ! Request for help regarding a little problem. So I have this piece of code: - (IBAction)addNewItem:(id)sender { if ([lsOutlineView selectedRow] < 0) { [sourceListLevelZero addObject:[Parent new]

NSOutlineView - Automatically select newly added item - Help needed

2009-10-05 Thread Mario Kušnjer
Hello to the list ! Request for help regarding a little problem. So I have this piece of code: - (IBAction)addNewItem:(id)sender { if ([lsOutlineView selectedRow] < 0) { [sourceListLevelZero addObject:[Parent new]]; [lsOutlineView reloadItem:nil re

Re: How to manage creation of an unknown number of windows?

2009-10-05 Thread Jens Alfke
On Oct 5, 2009, at 7:20 AM, Rui Pacheco wrote: I've a class that extends NSWindowController and that class lists an unknown number of entries. Double clicking on an entry will open a window where it will be possible to interact with the real world object that entry represents. I plan to mak

re: whether to use core data...

2009-10-05 Thread Ben Trumbull
But the Core Data documentation starts like this: ... Core Data is not an entry-level technology. ... You should not simply try to read [The Core Data Programming Guide] straight through to understand Core Data. ... Do not attempt the NSPersistentDocument Core Data Tutorial unless or until you al

Re: [Performance issue] Resizing an alert sheet => blinks

2009-10-05 Thread Jens Alfke
On Oct 5, 2009, at 3:12 PM, Iceberg-Dev wrote: Is it the intended behavior that resizing an Alert Sheet in Mac OS X 10.5.8 on a MacBook Pro produces a lot of blinking? I have a custom alert sheet that can be resized and when I resize it on a MacBook Pro (either 9400 or 9600 GPU), the resize

re: CoreData async fetch request

2009-10-05 Thread Ben Trumbull
Is there a way to do an asynchronous fetch request against Core data returning partial results? That depends on whether it's the query part that's expensive (e.g. WHERE clause with complex text searching and table scans) or simply the quantity of the row data that's your problem. For the la

Re: How to prevent the user from clicking 'Test' in Screen Savers (Was: ScreenSaverView gets instantiated several times)

2009-10-05 Thread Paul M
This is a much better approach IMO. If your user is trying out a bunch of options to find a particular combination that works for them, and the machine goes away for ~30 secs each time they test a new change, the'll get pretty irriated with your screen saver pretty quickly. Showing the resul

Re: wait for the event?

2009-10-05 Thread Mike Abdullah
I've got a method which does something like this, feel free to pillage :) - (BOOL)loadUntilDate:(NSDate *)date; { BOOL result = NO; NSRunLoop *runLoop = [NSRunLoop currentRunLoop]; while (!result && [date timeIntervalSinceNow] > 0) { [runLoop runUntilDate:[NSDate distan

[Performance issue] Resizing an alert sheet => blinks

2009-10-05 Thread Iceberg-Dev
Is it the intended behavior that resizing an Alert Sheet in Mac OS X 10.5.8 on a MacBook Pro produces a lot of blinking? I have a custom alert sheet that can be resized and when I resize it on a MacBook Pro (either 9400 or 9600 GPU), the resize operation produces flicking. I tried with s

Re: wait for the event?

2009-10-05 Thread Jerry Krinock
On 2009 Oct 05, at 14:46, Matthew Mashyna wrote: I could be wrong but I think you might actually be blocking the notification by doing the sit 'n spin bit with [[NSRunLoop currentRunLoop] runUntil... we get that darn message?]; Indeed, Matthew is correct. This is part of the Wonderland yo

Re: wait for the event?

2009-10-05 Thread jon
I had a bunch of arguments in the method and a returning boolean value, which hampered the effort... I'm in the process of making them variables in the class, so i can get it down to a void method with no arguments, and am putting the rest of the method into the selector as you suggest

Re: wait for the event?

2009-10-05 Thread Jerry Krinock
You can get the behavior you want by running the run loop, preferably in a custom mode, but it will require retesting in 10.5 and 10.6 since much of the run loop stuff has changed. It was suggested to me, and I now believe, that a more robust and comprehensible approach is to use an NSCond

Re: grouping undo across method calls in CoreData

2009-10-05 Thread Jerry Krinock
On 2009 Oct 05, at 06:10, Jim Thomason wrote: But the problem is, if the user undoes the creation of a new object, two undos are required Welcome to what I call "Core Data Undodoodoo" :) How can I deal with this? I've been trying various combinations of begin/endUndoGrouping, The seco

Re: wait for the event?

2009-10-05 Thread Matthew Mashyna
On Oct 5, 2009, at 12:51 PM, jon wrote: i have a webView loading, and need to wait until it is finished loading... so far i've set up this notification in the wakeFromNib: NSNotificationCenter *center = [NSNotificationCenter defaultCenter]; [center addObserver:self selector:@sel

NSInvocation: Restrictions Adding and Retaining Args : Undocumented??

2009-10-05 Thread Jerry Krinock
--> The documentation for -retainArguments states... "If the receiver hasn’t already done so, retains the target and all object arguments of the receiver and copies all of its C-string arguments Discussion: Before this method is invoked, argumentsRetained returns NO; after, it returns

Re: NSToolbarGroupItem not showing labels of subitems

2009-10-05 Thread Peter Ammon
Hi Brad, The group item will use its own label, if it has been set. Probably creating the toolbar in IB caused the item to acquire an empty label. Calling [groupItem setLabel:nil] should cause it to discard its own label and use its children. Let me know if that doesn't work, -Peter On

Re: Storing UInt64 in a Core Data attribute ?

2009-10-05 Thread Sean McBride
On 10/5/09 8:31 PM, Guillaume Laurent said: >Apparently, Core Data only handles signed int types for attributes. I Yes, this has annoyed me too. I believe the reason is because that's how SQL does things. >need to store UInt64 ones (MIDITimeStamp, more precisely), and to show >these in a table

Re: GLSLBasicsCocoaDL sample code

2009-10-05 Thread Sean McBride
On 10/5/09 9:27 AM, McLaughlin, Michael P. said: >I downloaded the sample code > >http://developer.apple.com/mac/library/samplecode/GLSLBasicsCocoaDL/index.ht >ml > >It built and "ran" under Mac OS 10.5.8 and Xcode 3.1.3. However, the result >showed a *black*, rotating object on a not-quite-so-bl

[MEET] : Los Angeles CocoaHeads this Thursday 10/8 7:30pm

2009-10-05 Thread Rob Ross
Greetings LA CocoaHeads. This Thursday, David Hodge will be discussing his experiences with making public transit applications for the iPhone. Starting with iBART and iBART Live in the Bay Area, now "CDTA iRide" that he made on contract for New York state, and a few other related applicatio

Re: NSTableView: no display until header clicked

2009-10-05 Thread Quincey Morris
On Oct 5, 2009, at 11:54, Stuart Malin wrote: An NSMutableArray is not KVO compliant for addition and deletion of entries. You must either provide manual notification or create a class with a To-Many property that is KVO compliant. From the "Key Value Observing Programming Guide" -- Automa

Re: NSLayoutManager and best override point for temporary attributes

2009-10-05 Thread Keith Blount
Hi, I spent the weekend on this and the only thing I'm still having problems with is finding the best place to apply the underline and strikethrough temporary attributes so that they get applied automatically and efficiently (using the showPackedGlyphs:... method worked perfectly for the text i

Re: [Solved] Re: NSTableView: no display until header clicked

2009-10-05 Thread Quincey Morris
On Oct 5, 2009, at 10:52, David Hirsch wrote: This seems to be precisely the solution. The problem was that the bound object didn't know about changes to the array. There are two ways to inform it: manipulate the array through the controller, or fire my own KVO. In fact, here is the lat

Re: NSTableView: no display until header clicked

2009-10-05 Thread Stuart Malin
On Oct 5, 2009, at 1:13 PM, David Hirsch wrote: Thanks, Volker. rearrangeObjects did work, but I don't understand why that call should be necessary. If anybody out there wants to educate me, I'd appreciate it. (More info: I have my ArrayController in IB bound to an array (phases) of File's

Re: Checking whether a file is a genuine PDF file

2009-10-05 Thread Sean McBride
On 10/5/09 7:49 AM, Squ Aire said: >Thanks for the reply. However=2C of course a file can start with %PDF witho= >ut being a valid PDF file (and not openable by Preview). > >I think I found an acceptable way of doing my thing. Just include the Quart= >z framework and do > >PDFDocument *pdfDoc =3D

Re: Address Book-style editing

2009-10-05 Thread Ben Lachman
Brad: My app, SousChef, does this. The way adress book and SousChef do it is to use a customized textview. You add custom attributes to mark the different fields (textview's NSTextStorage is a subclass of NSAttributedString). Then you control selection based on these attributes when in

Storing UInt64 in a Core Data attribute ?

2009-10-05 Thread Guillaume Laurent
Hi all, Apparently, Core Data only handles signed int types for attributes. I need to store UInt64 ones (MIDITimeStamp, more precisely), and to show these in a table column. Of course the displayed values are signed, some negative some not. Google didn't bring anything useful on that topi

Re: [Solved] Re: NSTableView: no display until header clicked

2009-10-05 Thread Kyle Sluder
On Mon, Oct 5, 2009 at 11:16 AM, Stamenkovic Florijan wrote: > That is one of it's uses. It is also commonly used to add, insert and delete > objects in it's content. In a KVO friendly way. Okay perhaps I misunderstood. If you have an array or another ordered property, you typically don't go bac

Re: grouping undo across method calls in CoreData

2009-10-05 Thread Fritz Anderson
On 5 Oct 2009, at 8:10 AM, Jim Thomason wrote: -(void) awakeFromInsert { [super awakeFromInsert]; [self performSelector:@selector(createOrder:) withObject:nil afterDelay:0]; } -(void) createOrder { int highOrderIndex = [self getHighestIndexSomeHow]; [self setValue:[NSNumber numberWithInt

Re: [Solved] Re: NSTableView: no display until header clicked

2009-10-05 Thread Stamenkovic Florijan
On Oct 05, 2009, at 14:05, Kyle Sluder wrote: On Mon, Oct 5, 2009 at 10:39 AM, David Hirsch wrote: NSArrayController has things like insert: or add: Okay... not sure what that has to do with anything. NSArrayController's content is usually bound to an ordered property (itself often an NSArr

Re: [Solved] Re: NSTableView: no display until header clicked

2009-10-05 Thread Kyle Sluder
On Mon, Oct 5, 2009 at 10:39 AM, David Hirsch wrote: > NSArrayController has things like insert: or add: Okay... not sure what that has to do with anything. NSArrayController's content is usually bound to an ordered property (itself often an NSArray) and is usually used to provide data for UI ele

Re: [Solved] Re: NSTableView: no display until header clicked

2009-10-05 Thread David Hirsch
NSArrayController has things like insert: or add: -Dave On Oct 5, 2009, at 10:36 AM, Kyle Sluder wrote: On Oct 5, 2009, at 10:26 AM, David Hirsch wrote: I (now) realize that I could use the arrayController to populate the array, but retaining my direct array manipulation and doing the KVO

Re: [Solved] Re: NSTableView: no display until header clicked

2009-10-05 Thread Kyle Sluder
On Oct 5, 2009, at 10:26 AM, David Hirsch wrote: I (now) realize that I could use the arrayController to populate the array, but retaining my direct array manipulation and doing the KVO notification myself is less rewriting, and in fact entails fewer KVO calls. This seems backwards. You

Re: [Solved] Re: NSTableView: no display until header clicked

2009-10-05 Thread David Hirsch
I (now) realize that I could use the arrayController to populate the array, but retaining my direct array manipulation and doing the KVO notification myself is less rewriting, and in fact entails fewer KVO calls. -Dave On Oct 5, 2009, at 10:21 AM, Volker in Lists wrote: maybe it works

Re: [Solved] Re: NSTableView: no display until header clicked

2009-10-05 Thread Volker in Lists
Hi, maybe it works even without these two lines - how are you populating the array controller in code ? Cheers, Volker Am 05.10.2009 um 19:19 schrieb David Hirsch: That's right on the money: The array was indeed bound to the contentArray in IB (otherwise it would never have been able to

[Solved] Re: NSTableView: no display until header clicked

2009-10-05 Thread David Hirsch
That's right on the money: The array was indeed bound to the contentArray in IB (otherwise it would never have been able to show any data), but I needed to surround my populating of the array with: [phaseController willChangeValueForKey:@"arrangedObjects"] and [phaseController didChangeVal

Re: NSTableView: no display until header clicked

2009-10-05 Thread Stamenkovic Florijan
On Oct 05, 2009, at 13:08, Volker in Lists wrote: so you seemed to have populated the array controller in a non KVO way... but still, w/o code not to be discussed. I think that is the problem. If you bind the content of an NSArrayController to someObject.variable, then the controller will b

Re: NSTableView: no display until header clicked

2009-10-05 Thread Quincey Morris
On Oct 5, 2009, at 09:47, David Hirsch wrote: (More info: I have my ArrayController in IB bound to an array (phases) of File's Owner (which is my NSDocument subclass). In the document's init method, I make phases an empty NSMutableArray, and in the document's windowControllerDidLoadNib met

NSToolbarGroupItem not showing labels of subitems

2009-10-05 Thread Brad Gibbs
Hi, I'm trying to create a toolbar with NSSegmentedControl as a custom view for an NSToolbarItemGroup in 10.6, but I can't get the labels for the subitems to appear. I added an NSSegmentedControl to the toolbar item in IB and set images in the segmented control in IB. I did not give the

Re: NSTableView: no display until header clicked

2009-10-05 Thread Volker in Lists
Hi, - have you bound contentArray of the ArrayController in IB? - how do you populate with data? In general: Bindings work by the magic of KVO (key value observing). This means, that whenever calls to KVO compliant setters are made, in the background willchangevalueforkey/didchangevaluefor

Re: grouping undo across method calls in CoreData

2009-10-05 Thread Quincey Morris
On Oct 5, 2009, at 06:10, Jim Thomason wrote: I've got a CoreData document based application, and I'm trying to undo my object creation in a single step. Here's the issue - I'm storing an ordered index on my entities so I can keep track of the order of creation. To do this, upon object creation

wait for the event?

2009-10-05 Thread jon
i have a webView loading, and need to wait until it is finished loading... so far i've set up this notification in the wakeFromNib: NSNotificationCenter *center = [NSNotificationCenter defaultCenter]; [center addObserver:self selector:@selector(webViewProgressFinished:) name:W

Re: NSTableView: no display until header clicked

2009-10-05 Thread David Hirsch
Thanks, Volker. rearrangeObjects did work, but I don't understand why that call should be necessary. If anybody out there wants to educate me, I'd appreciate it. (More info: I have my ArrayController in IB bound to an array (phases) of File's Owner (which is my NSDocument subclass). In t

Re: NSTableView: no display until header clicked

2009-10-05 Thread Volker in Lists
Hi, without knowing how you add objects to the ArrayController - and when, and without knowing what and how is bound exactly - guessing is most that can be done. It seems the bindings are okay from the beginning, but the changes to the ArrayControllers content are only observed when the s

NSTableView: no display until header clicked

2009-10-05 Thread David Hirsch
My window has two NSTableViews. Each has two columns, each of which is bound to a field in Phases, an NSArrayController. When my window is displayed, I calculate my model, and the NSTableViews show the headers, but blank data cells. However, when I click the header of one table, all four

Re: Screen saver for Snow Leopard and previous OS (Was: ScreenSaverView gets instantiated several times)

2009-10-05 Thread David Duncan
On Oct 5, 2009, at 9:24 AM, Gabriel Zachmann wrote: So, is there any way to compile the screen saver into *one* bundle (or exec) such that it runs under SL with 64-bit proc's *and* 10.5/ Intel ? You need to build a universal binary (the default Xcode universal config of PPC/i386/x86_64 sh

Screen saver for Snow Leopard and previous OS (Was: ScreenSaverView gets instantiated several times)

2009-10-05 Thread Gabriel Zachmann
As Uli pointed out previously, calling -initWithFrame: (or any init method) multiple times on one object is not a pattern you find in other classes/frameworks. You might have assumed a call to -setFrame:, Sorry, that was what I meant, of course (setFrameSize is the name, I think). if you

Re: How to prevent the user from clicking 'Test' in Screen Savers (Was: ScreenSaverView gets instantiated several times)

2009-10-05 Thread Michael Babin
On Oct 5, 2009, at 10:45 AM, Gabriel Zachmann wrote: The problem I'm having is the following: is there an elegant way to prevent the user from clicking the 'Test' button in the Screen Savers panel in System Preferences? The reason why I'm asking: when the user changes the configuration in

Re: How to prevent the user from clicking 'Test' in Screen Savers (Was: ScreenSaverView gets instantiated several times)

2009-10-05 Thread Jack Carbaugh
Why not just "fake it" ... in other words ... since it's a test, just supply some generic data for the screen saver to display. Then, when they truly activate it, you provide the "real" data. Seems that's what others have done, that i've experienced. Not knowing for sure or not, but i believ

How to prevent the user from clicking 'Test' in Screen Savers (Was: ScreenSaverView gets instantiated several times)

2009-10-05 Thread Gabriel Zachmann
Thanks a lot for all the responses, and sorry for bothering you again with this. The problem I'm having is the following: is there an elegant way to prevent the user from clicking the 'Test' button in the Screen Savers panel in System Preferences? The reason why I'm asking: when the user

Re: ScreenSaverView gets instantiated several times

2009-10-05 Thread Michael Babin
On Oct 5, 2009, at 3:39 AM, Gabriel Zachmann wrote: When the user clicks 'Test' in System Preferences, it "just" creates a new instance of your subclass of ScreenSaverView! Do you really find that fact to be "shocking"? Yes, I do. [snip] If only Apple would have said so in big letters a

How to manage creation of an unknown number of windows?

2009-10-05 Thread Rui Pacheco
Hi, I've a class that extends NSWindowController and that class lists an unknown number of entries. Double clicking on an entry will open a window where it will be possible to interact with the real world object that entry represents. I plan to make the editing window extends NSDocument but I am s

[MEETING] Toronto Area Cocoa & WebObjects Developer Group - October 13

2009-10-05 Thread Karl Moskowski
The next meeting of tacow/Toronto CocoaHeads will be held on Tuesday, October 13 at 6:30 PM at Ryerson University. After a C4 recap, Jim Dovey wlll be talking about GCD and blocks. Details and directions are available at . Karl Moskowski Voodoo

[Xgrid] GridMandelbrot Sample gone?

2009-10-05 Thread Stefan Wolfrum
Hi all, I wanted to dive into Xgrid and read that the Mandelbrot sample would be a good start and that it's located at /Developer/Examples/Xgrid/ GridMandelbrot. However, after installing the lastest Xcode dmg (3.2) on my 10.6.1 system I couldn't find such a folder. :-( Neither could I f

Re: grouping undo across method calls in CoreData

2009-10-05 Thread Stamenkovic Florijan
Jim, An interesting situation. I do not have anything definitive, but just some ideas and comments On Oct 05, 2009, at 09:10, Jim Thomason wrote: -(void) createOrder { int highOrderIndex = [self getHighestIndexSomeHow]; [self setValue:[NSNumber numberWithInt:highOrderIndex] forKey:@

GLSLBasicsCocoaDL sample code

2009-10-05 Thread McLaughlin, Michael P.
I downloaded the sample code http://developer.apple.com/mac/library/samplecode/GLSLBasicsCocoaDL/index.ht ml It built and "ran" under Mac OS 10.5.8 and Xcode 3.1.3. However, the result showed a *black*, rotating object on a not-quite-so-black background. I'm guessing that it should not look lik

grouping undo across method calls in CoreData

2009-10-05 Thread Jim Thomason
I've got a CoreData document based application, and I'm trying to undo my object creation in a single step. Here's the issue - I'm storing an ordered index on my entities so I can keep track of the order of creation. To do this, upon object creation, I yank out the highest order parameter for my e

Re: ScreenSaverView gets instantiated several times

2009-10-05 Thread Roland King
Yes, I do. In particular, because it has a major impact on the way one has to design the code. For instance, if changing the configuration causes some longish computations. I tried pretty hard to hide this from the user, so that after applying the changes of the configuration of my screen

Re: Keeping NSWindow below all other windows

2009-10-05 Thread Uli Kusterer
On 03.10.2009, at 20:04, PCWiz wrote: The lowest constant I could find was 0 (NSNormalWindowLevel) and it still positioned itself above other windows. Is there a constant for -1 ? They're CGWindowLevels. Look for kCGDesktopWindowLevel or whatever it was called, that's a better choice.

Re: Bundle is not using icon or CFBundleIdentifier

2009-10-05 Thread Uli Kusterer
On 04.10.2009, at 06:30, Timothy Reaves wrote: I have a bundle defined as a document type for an app. When I build one of these bundles, and double-click it, it opens in my app. All well and good. Except the following. Wait, the bundle is defined as the app's document type? Then of cou

Re: ScreenSaverView gets instantiated several times

2009-10-05 Thread Uli Kusterer
On 05.10.2009, at 10:39, Gabriel Zachmann wrote: I supposed that the screen saver manager would just call - initWithFrame: again. -init... methods are only called once on an instance, when it is alloced and inited. Calling it several times on the same instance that has already been initial

Re: ScreenSaverView gets instantiated several times

2009-10-05 Thread Gabriel Zachmann
When the user clicks 'Test' in System Preferences, it "just" creates a new instance of your subclass of ScreenSaverView! Do you really find that fact to be "shocking"? Yes, I do. In particular, because it has a major impact on the way one has to design the code. For instance, if changing

Re: rangeOfString & UTF8 - SOLVED

2009-10-05 Thread Alastair Houghton
On 4 Oct 2009, at 22:45, Steve Cronin wrote: I had managed to convince myself that there was something about the utf8 umlats and all that I wasn't understanding … FWIW, NSString always acts as if the string is represented in UTF-16 (even if the underlying representation is something else),

RE: Checking whether a file is a genuine PDF file

2009-10-05 Thread Squ Aire
Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Thanks for the reply. However=2C of course a file can start with %PDF witho= ut being a valid PDF file (and not openable by Preview). I think I found an acceptable way of doing my th