Re: Non-editable TableView and the Evil NSEditorBinder

2008-08-02 Thread Ken Thomases
On Aug 2, 2008, at 10:00 PM, Gerriet M. Denkmann wrote: Well, I looked at the nib again, and the only binding I can see is the value of the TableColumn bound to arrangedObjects.Values of some NSArrayController. What is the setting of the Conditionally Sets Editable option for that binding

Re: Coding around a known bug - SOLVED (acceptably)

2008-08-02 Thread Steve Cronin
Andrew & Aaron Yes I have read the discussion in the docs related to TransformProcessType(). My bad - here's a more complete snippet: if (...some condition..) { ProcessSerialNumber psn = { 0, kCurrentProcess }; OSStatus returnCode = TransformProcessType(&psn, kPro

Re: NSArrayController and NStableView Binding

2008-08-02 Thread Ken Thomases
On Aug 1, 2008, at 6:53 PM, Revant Jain wrote: Now my Question was that when I double click on a cell in NSTableView to edit it what method does it call in the MyDocument class(if any) to reflect the edit onto the particular Person object? If it does not call a method in MyDocument class ho

Re: Some crash.

2008-08-02 Thread Sandro Noel
Chris. Thank you for the explaination!! but it leaves me with a question, where should i use it. I'm actually adding objects to the array, using addObject message, in the model, where should i use the mutableArrayValueForKey, and what keyPath should I use. the workflow is quite simple, th

Re: reloading an NSTreeController

2008-08-02 Thread Gerriet M. Denkmann
On 3 Aug 2008, at 05:51, Jonathan Dann wrote: On 1 Aug 2008, at 14:04, Gerriet M. Denkmann wrote: But all disclosure triangels are now closed. Is there some way to reopen them to the previous state? I have the strong feeling that I will have to handle this myself. Ok. So be it. It's a c

Re: Faster alternative to NSImage draw/composite?

2008-08-02 Thread John Harper
Hi, If you have a fixed set of images you're repeatedly flipping through you can have CoreAnimation do the animation for you, something like this: CAKeyframeAnimation *anim; NSMutableArray *images; CGImageRef im; int i; images = [NSMutableArray array]; f

Re: Launch Path Not Accessible

2008-08-02 Thread Omar Qazi
Steve: You don't need to chmod the file NSTask is really meant for executing Mach-I executables, so the launch path needs to be the interpreter. For example, if this is a ruby script your launch path would be /usr/ bin/ruby and your first argument would be the first argument. If it's a shell scrip

Re: Non-editable TableView and the Evil NSEditorBinder

2008-08-02 Thread Gerriet M. Denkmann
On 3 Aug 2008, at 04:21, Keary Suska <[EMAIL PROTECTED]> wrote: 8/2/08 7:30 AM, also sprach [EMAIL PROTECTED]: [...] Then I tried to use an NSArrayController instead of the DataSource. But now some evil NSEditorBinder comes and makes my cells editable again. Most annoying! Well, it looks

NSBrowser redraw issues

2008-08-02 Thread Martin Redington
Here's another NSBrowser issue ... I'm allowing multiple selection in my NSBrowser. When my NSBrowser loses focus, the multiple selected cells correctly change to have a grey background, but when it regains focus, only the last selected cell gets updated correctly to the active selection colour.

-[NSBrowser scrollToVisible] not making all of the column visible

2008-08-02 Thread Martin Redington
I've got an app with a NSOutlineView and NSBrowser view of the same data (the file system). I preserve the user's selection between when switching between views. A lot of the time, the NSBrowser scrolls to show the entire selected column. However, sometimes, only a portion of the selected column

Re: Faster alternative to NSImage draw/composite?

2008-08-02 Thread Ken Ferry
Hi Matt, If you want to post a test app that shows your performance issue, that might help. However, no, going under NSImage doesn't make things faster unless there's are other issues. Certainly before trying OpenGL, try setting the setPreferredBackingLocation: for your NSWindow to be NSWindowBa

Re: Some crash.

2008-08-02 Thread Chris Hanson
On Aug 2, 2008, at 2:07 PM, Sandro Noel wrote: when the Array is filled on application init, the data displays fine, but if I add to the array "programatically" the new data is not displayed, i've tried: [self didChangeValueForKey:@"transactions"]; and [transactionTableView reloadData];

Re: Coding around a known bug

2008-08-02 Thread Andrew Merenbach
On Aug 2, 2008, at 9:40 AM, Steve Cronin wrote: Folks: I'm looking for some advice on how to code around a Leopard bug (radar 5905139 & 5599887). Leopard broke the following: OSStatus returnCode = TransformProcessType(&psn, kProcessTransformToForegroundApplication); TransformProcessType

Re: reloading an NSTreeController

2008-08-02 Thread Jonathan Dann
On 1 Aug 2008, at 14:04, Gerriet M. Denkmann wrote: But all disclosure triangels are now closed. Is there some way to reopen them to the previous state? I have the strong feeling that I will have to handle this myself. Ok. So be it. It's a common problem. Can I point you here: http://www

Re: Faster alternative to NSImage draw/composite?

2008-08-02 Thread Joseph Heck
I've been doing exactly this recently, and have had excellent success with using CALayers (Core Animation). An NSTimer with a fast repeat rate is triggering a method that assigns in one of an array of CGImageRef's to the layer's contents property has made for a really decent "flipbook" styl

Re: Faster alternative to NSImage draw/composite?

2008-08-02 Thread Charles Steinman
--- On Sat, 8/2/08, Matt R <[EMAIL PROTECTED]> wrote: > I have read through Apple's drawing optimization guide > and have been > searching for a way of speeding these operations up, they > are unacceptably > slow. I have several 72dpi PNG image files (about 1024x768 > each) which I > need to draw

Re: Launch Path Not Accessible

2008-08-02 Thread Michael Ash
On Sat, Aug 2, 2008 at 5:20 PM, Steve Cronin <[EMAIL PROTECTED]> wrote: > Andrew: > > Thanks for the slap on the head! > So I chmod'ed the file and no longer get the 'not accessible error' YEAH! > > BUT now I get: > *** NSTask: Task create for path '/Users/steve/Library/Application > Support/XYZ/S

Re: Coding around a known bug

2008-08-02 Thread Charles Srstka
On Aug 2, 2008, at 1:58 PM, Steve Cronin wrote: Charles; Because I need to convert the app from a background (LSUIElement=1) application. I am not aware of an AppleScript way to do that. If there is one, can you share a pointer? Ah, sorry, I misunderstood what you were trying to do. Charl

Re: how to release my window controller

2008-08-02 Thread Michael Ash
On Sat, Aug 2, 2008 at 12:50 PM, Torsten Curdt <[EMAIL PROTECTED]> wrote: >> How many of these are you creating, one? > > In this very case just one. In fact I am trying to replace what was a modal > dialog before now with non-modal window. So the AppController would need to > make sure there is on

Faster alternative to NSImage draw/composite?

2008-08-02 Thread Matt R
I have read through Apple's drawing optimization guide and have been searching for a way of speeding these operations up, they are unacceptably slow. I have several 72dpi PNG image files (about 1024x768 each) which I need to draw repeatedly into a standard NSView subclass over time. I would like to

Re: Some crash.

2008-08-02 Thread mm w
Hi let me suggest you the good question: what's actually triggering the -copyWithZone call? On Sat, Aug 2, 2008 at 12:32 PM, Sandro Noel <[EMAIL PROTECTED]> wrote: > I've tried enumerating the objects to the log, with a button on the > interface. > and they are all still in memory, they are not be

Re: pointers in objective-c?

2008-08-02 Thread mm w
in a more accurate way: #include long __auto_increment = 0; typedef struct { long *addr; void *value; } Object; Object ObjectNew(void *value) { Object obj; long i = __auto_increment++; obj.addr = &i; obj.value = value; r

Re: Some crash.

2008-08-02 Thread mm w
maybe a retain problem On Sat, Aug 2, 2008 at 11:03 AM, Sandro Noel <[EMAIL PROTECTED]> wrote: > Greetings, > > I don't quite know how to explain this.. :) so please excuse me if I'm not > very precise. > > In my application controller i have an object "statement" that contains an > array of "tran

Re: pointers in objective-c?

2008-08-02 Thread mm w
Hi I'm sorry, it's not a confusion, it's only a bad knowledge of C, and "pointers" are not understood, NS and what about CF or every-prefix in the world of frameworks gtk_object ... kobject ... #include long __auto_increment = 0; typedef struct { long *addr; void *value; } Obje

Re: Launch Path Not Accessible

2008-08-02 Thread Steve Cronin
Andrew: Thanks for the slap on the head! So I chmod'ed the file and no longer get the 'not accessible error' YEAH! BUT now I get: *** NSTask: Task create for path '/Users/steve/Library/Application Support/XYZ/Scripts/myUseful.o' failed: 88, "Malformed Mach-o file" So I must be missing so

NSImage size vs. representations' sizes

2008-08-02 Thread Jacob Bandes-Storch
I'm trying to use my application icon (icns) in a custom view to be draw in the background of a window, like Installer.app does. I can do all this just fine, but when I draw the image using - drawInRect:fromRect:operation:fraction:, it comes out at 128x128 instead of the full 512x512. -size

Re: Some crash.

2008-08-02 Thread Sandro Noel
Greetings. I Do Have another question. when the Array is filled on application init, the data displays fine, but if I add to the array "programatically" the new data is not displayed, i've tried: [self didChangeValueForKey:@"transactions"]; and [transactionTableView reloadData]; But bot

Re: pointers in objective-c?

2008-08-02 Thread Keary Suska
8/2/08 1:09 AM, also sprach [EMAIL PROTECTED]: > This is important for encapsulation. Every change of an object made > through a pointer will change the object for every other user of this > object, who refers using a different pointer. > > Person* person = Š > Person* person2 = person; // two po

Re: Some crash.

2008-08-02 Thread Sandro Noel
Thanks guy's. I figured it out, i'm using an array controller and my dataSource for the table view was set to my application controller. instead of being set to the array controller. the matter was resolved... Sandro. On 2-Aug-08, at 3:43 PM, Adam R. Maxwell wrote: On Aug 2, 2008, at 11

Re: how to release my window controller

2008-08-02 Thread Chris Hanson
On Aug 2, 2008, at 8:23 AM, Torsten Curdt wrote: Let's say in my AppController a new Non-modal window is getting opened like this - (IBAction) buttonOpen:(id)sender { MyWindowController *controller = [[MyWindowController alloc] init]; [controller showWindow:self]; } Of cours

Re: Launch Path Not Accessible

2008-08-02 Thread Andrew Farmer
On 02 Aug 08, at 13:01, Steve Cronin wrote: I'm trying to do something that seems like it should be easy, but I'm stymied by what I think is a permissions error I don't understand. I'm trying to run a script using NSTask. I have the static script stored as a separate file in my bundle. I have

Re: Non-editable TableView and the Evil NSEditorBinder

2008-08-02 Thread Keary Suska
8/2/08 7:30 AM, also sprach [EMAIL PROTECTED]: > I have a TableView with DataSource who's columns are set (in IB) to > Editable. > When the thing gets loaded from its nib I do for its columns: > NSTextFieldCell *aCell = [ aTableColumn dataCell ]; > [ aCell setEditable: NO ]; > [ aCell setSelectabl

How to debug Core Data save-as failure

2008-08-02 Thread Quincey Morris
Anyone got any suggestions about how to debug the following situation? I have a Core Data document application where saving the document works fine. But if I try to do a Save As instead (even a Save As immediately after opening or saving the document) Core Data throws an exception: #0

Launch Path Not Accessible

2008-08-02 Thread Steve Cronin
Folks; I'm trying to do something that seems like it should be easy, but I'm stymied by what I think is a permissions error I don't understand. I'm trying to run a script using NSTask. I have the static script stored as a separate file in my bundle. I have created a folder in my "Applications

Re: 2 outline views, selection changes

2008-08-02 Thread Keary Suska
8/1/08 8:08 PM, also sprach [EMAIL PROTECTED]: > I've been wracking my brain over this and after having too much > caffeine and little results ... > > I have 2 outline views and I'd like to have them operate such that > selecting an item in OV#1, deselects any item(s) in OV#2 and vice versa. > >

Re: Some crash.

2008-08-02 Thread Adam R. Maxwell
On Aug 2, 2008, at 11:03 AM, Sandro Noel wrote: Greetings, I don't quite know how to explain this.. :) so please excuse me if I'm not very precise. [...] 2008-08-02 13:52:23.411 OFXImport[27702:10b] *** -[OFXTransaction copyWithZone:]: unrecognized selector sent to instance 0xf4fb80 H

Re: Some crash.

2008-08-02 Thread Sandro Noel
I've tried enumerating the objects to the log, with a button on the interface. and they are all still in memory, they are not being released. all the items report. anything else ? Sandro. On 2-Aug-08, at 2:06 PM, mm w wrote: maybe a retain problem On Sat, Aug 2, 2008 at 11:03 AM, Sandro N

Re: NSTableView Question

2008-08-02 Thread Markus Spoettl
On Aug 2, 2008, at 12:10 PM, Eric Lee wrote: So, here's my question. How do you have two table view's in the same .h/.m file? I try to reimplement the needed protocols, but I can't, so I then try to add the code to adding data to the same protocols that the 1st table view is implementing, bu

NSTableView Question

2008-08-02 Thread Eric Lee
I have two table views with two different data, and I have two buttons so that when you press one button, something is added to the first table view, and when you press the second button, some info is added to the second table view. You can't press the 1st one to add it to the 2nd table vie

Re: Coding around a known bug

2008-08-02 Thread Steve Cronin
Charles; Because I need to convert the app from a background (LSUIElement=1) application. I am not aware of an AppleScript way to do that. If there is one, can you share a pointer? Thanks for your time! Steve On Aug 2, 2008, at 1:40 PM, Charles Srstka wrote: On Aug 2, 2008, at 11:40 AM, St

Re: Putting a spinning progress indicator in a outline

2008-08-02 Thread Markus Spoettl
On Aug 2, 2008, at 6:15 AM, Andreas Mayer wrote: which doesn't seem to work, can one even mix binding and datasource driven columns on a NSOutline? I think that should be possible. Turns out that if you mix binding and datasource, you have to implement not only - (id)outlineView:(NSOutli

Re: Coding around a known bug

2008-08-02 Thread Charles Srstka
On Aug 2, 2008, at 11:40 AM, Steve Cronin wrote: Folks: I'm looking for some advice on how to code around a Leopard bug (radar 5905139 & 5599887). Leopard broke the following: OSStatus returnCode = TransformProcessType(&psn, kProcessTransformToForegroundApplication); TransformProcessTyp

Re: My own listbox

2008-08-02 Thread Vitaly Ovchinnikov
Thanks Mark, I know what you are talking about. But as I told before, this control is only acts like listbox. It shows group of my objects in one column. And shows scroller if they don't fit. It has nothing with windows listbox or NSTableView, it fully drawn by hands, has transparent background and

Some crash.

2008-08-02 Thread Sandro Noel
Greetings, I don't quite know how to explain this.. :) so please excuse me if I'm not very precise. In my application controller i have an object "statement" that contains an array of "transactions" called transactions. here is the structure of transaction. @interface OFXTransaction : NSOb

Re: My own listbox

2008-08-02 Thread Vitaly Ovchinnikov
Unfortunately, I need completely different behavior... But I almost finished with cells and NSTableView and now it looks exactly as I need. So thanks to all who helped. On Sat, Aug 2, 2008 at 8:29 PM, Bertil Holmberg <[EMAIL PROTECTED]> wrote: > I have implemented a custom control, the ListView. P

Re: how to release my window controller

2008-08-02 Thread Torsten Curdt
How many of these are you creating, one? In this very case just one. In fact I am trying to replace what was a modal dialog before now with non-modal window. So the AppController would need to make sure there is only one instance. But this raised the general question how to deal with this

Coding around a known bug

2008-08-02 Thread Steve Cronin
Folks: I'm looking for some advice on how to code around a Leopard bug (radar 5905139 & 5599887). Leopard broke the following: OSStatus returnCode = TransformProcessType(&psn, kProcessTransformToForegroundApplication); TransformProcessType used to bring a background app to the foreground,

Re: how to release my window controller

2008-08-02 Thread Michael Ash
On Sat, Aug 2, 2008 at 11:23 AM, Torsten Curdt <[EMAIL PROTECTED]> wrote: > Hey guys, > > Let's say in my AppController a new Non-modal window is getting opened like > this > > - (IBAction) buttonOpen:(id)sender > { >MyWindowController *controller = [[MyWindowController alloc] init]; >

Re: My own listbox

2008-08-02 Thread Bertil Holmberg
I have implemented a custom control, the ListView. Perhaps this might be useful for you. Code and example here – http://mac.tidings.nu/Soft/ListView.shtml Regards, Bertil___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admi

how to release my window controller

2008-08-02 Thread Torsten Curdt
Hey guys, Let's say in my AppController a new Non-modal window is getting opened like this - (IBAction) buttonOpen:(id)sender { MyWindowController *controller = [[MyWindowController alloc] init]; [controller showWindow:self]; } Of course I will have to release the control

Re: [Q] is NSFileHandle's writeData method faster than the FSWriteFork?

2008-08-02 Thread James Bucanek
JongAm Park wrote (Friday, August 1, 2008 7:27 PM -0700): The function will write about 19200 bytes per every call. I'm going to write XDCAM 35 or 50 video data. What is curious was that saving files as QuickTime movie format from the Final Cut Pro takes about 20 secs f

Re: Putting a spinning progress indicator in a outline

2008-08-02 Thread Andreas Mayer
Am 02.08.2008 um 01:42 Uhr schrieb Markus Spoettl: I think Mail uses a custom cell type. There's a 3rd party open- source implementation by Andreas Mayer, at http://www.harmless.de/cocoa-code.php Thanks, that looks pretty good. I can't get it to work with binding right now, not sur

Non-editable TableView and the Evil NSEditorBinder

2008-08-02 Thread Gerriet M. Denkmann
I have a TableView with DataSource who's columns are set (in IB) to Editable. When the thing gets loaded from its nib I do for its columns: NSTextFieldCell *aCell = [ aTableColumn dataCell ]; [ aCell setEditable: NO ]; [ aCell setSelectable: YES ]; So I have a table with selectable, but not e

Re: My own listbox

2008-08-02 Thread Steve Christensen
On Aug 2, 2008, at 3:52 AM, Vitaly Ovchinnikov wrote: Is it possible to get rid of blue "focus" border for NSTableView when I select it? In IB's inspector window, one of NSTableView's attributes is Focus Ring. Just set it to "none." ___ Cocoa-de

Re: My own listbox

2008-08-02 Thread Vitaly Ovchinnikov
The second question is how to hide highlight marker? I created my own cell, implemented it's -drawWithFrame - all seems to work fine. My drawing code draws selected and non-selected cells exactly as I need. But my cells have rounded corners and transparent background and I see highlight marker bene

Re: My own listbox

2008-08-02 Thread Vitaly Ovchinnikov
Is it possible to get rid of blue "focus" border for NSTableView when I select it? On Sat, Aug 2, 2008 at 12:45 PM, Jack Carbaugh <[EMAIL PROTECTED]> wrote: > in a word, yes. > > you would use subclasses for the table cell which would tell it what to > draw in the cell. > > see http://www.sethwil

why does it matter where I get the mutableArrayForKey:

2008-08-02 Thread Roland King
Still struggling with the nuts and bolts of KVC. I understood eventually that just observing a property (test) which was an NSMutableArray and then mutating it with removeObjectAtIndex: isn't KVC compliant, didn't give the observers callbacks, and implemented the removeObjectFromTestAtIndex

Re: My own listbox

2008-08-02 Thread Vitaly Ovchinnikov
The problem with -setFrameSize is that it wants width too. I want my control to use the whole width of the scrollview's client area. But this whole width depends on vertical scrollbar, that may be hidden. And this depends on height that I should pass to -setFrameSize... On Sat, Aug 2, 2008 at 1:5

Re: My own listbox

2008-08-02 Thread Phil
On Sat, Aug 2, 2008 at 8:40 PM, Vitaly Ovchinnikov <[EMAIL PROTECTED]> wrote: > The problem is that my control will work like listbox, but don't > exactly. Actually I need to draw every row myself. And these rows will > have some padding and many graphics stuff inside. And they will have > adjustab

Re: My own listbox

2008-08-02 Thread Boris Remizov
To draw custom rows you should implement your ownNSCell class and set it to your NSTableView's column with IB or programmatically (invoke NSTableColumn's setDataCell). But if your control is 'really' so much 'Custom' and you decide that NSTableView is not sufficient for your purpose, to allow

Re: My own listbox

2008-08-02 Thread Matthew Schinckel
You should be able to get close by using a different type of object for the Cells. That's a much nicer way of doing it. On 02/08/2008, at 6:10 PM, Vitaly Ovchinnikov wrote: The problem is that my control will work like listbox, but don't exactly. Actually I need to draw every row myself. And

Re: My own listbox

2008-08-02 Thread Vitaly Ovchinnikov
The problem is that my control will work like listbox, but don't exactly. Actually I need to draw every row myself. And these rows will have some padding and many graphics stuff inside. And they will have adjustable height... And so on. I don't think that it is possible to do this with standard con

Re: My own listbox

2008-08-02 Thread Matthew Schinckel
NSTableView in NSScroll View. THere is one in the IB palette. You can tell it to only have one column, and scrollbars if you want. Do everything you can in Interface Builder. The less code you write the better. Matt. On 02/08/2008, at 5:51 PM, Vitaly Ovchinnikov wrote: Hello, In windows

Re: My own listbox

2008-08-02 Thread Boris Remizov
Hello, You shouldn't do this over work by implementing your own Control. You may use NSTableView or NSOutlineView instead. These visual classes allow to implement ListBox's look-and-feel and behavior in much much easier manner. On Aug 2, 2008, at 12:21 PM, Vitaly Ovchinnikov wrote: Hello,

My own listbox

2008-08-02 Thread Vitaly Ovchinnikov
Hello, In windows there is a control called "Listbox". It looks like grid with single column without header. Several rows and maybe a scrollbar. Example is here: http://www.java2s.com/Tutorial/VBImages/ListBoxSelectionEventAddValue.PNG I need to create control that works similar way. It will not b

reloading an NSTreeController

2008-08-02 Thread Gerriet M. Denkmann
I have myContentArray, bound to the contentArray of an NSTreeController. And an OutlineView which has its columns bound to the same NSTreeController. I do [ myContentArray addObject: someObject ] and this is shown in the OutlineView. Everything works very nicely. - (IBAction)revertDocume

Use the CATransition to switch one layer from another layer with Core Image effects?

2008-08-02 Thread Cloud Strife
Hi everyone. Maybe the idea as the topic mentioned sounds a little crazy, I really want to realize it. For example, I created two layer with ImageA and ImageB. Now I am displaying ImageA in LayerA to users. After the user click some button, I should display ImageB in LayerB to the user with the Cor

Re: pointers in objective-c?

2008-08-02 Thread Negm-Awad Amin
… and there is a semantical difference: Changing a pointer does not change the object. changing the object does not change the pointer. This is important for encapsulation. Every change of an object made through a pointer will change the object for every other user of this object, who ref

Re: pointers in objective-c?

2008-08-02 Thread Negm-Awad Amin
Hi, Am Fr,01.08.2008 um 22:07 schrieb Giulio Cesare Solaroli: On Fri, Aug 1, 2008 at 10:01 PM, Clark Cox <[EMAIL PROTECTED]> wrote: On Fri, Aug 1, 2008 at 12:38 PM, Arthur Coleman <[EMAIL PROTECTED]> wrote: I hate to be dense, but what about C structs like NSRect? There are initialized on