Re: NSView/NSTableView question

2010-12-09 Thread Benjamin Stiglitz
> Great thanks for the replies. I was also thinking about this but I might try > to add a little bit of graphics too using NSBezierPath would it still work? > But at least these 2 ideas can keep me going until I get this working right. > Thanks! You can also do this in a subclass of NSTableV

Re: ImageAndTextCell still the way to go for icons in outline views?

2009-12-17 Thread Benjamin Stiglitz
>> The old ImageAndTextCell doesn’t handle the background style, and that alone >> makes a modified version of the ATImageTextCell worth using. > > What do you mean by 'the background style'? I don't need the cell to draw a > background at all; it's in an outline view. Take a look at the backgr

Re: ImageAndTextCell still the way to go for icons in outline views?

2009-12-16 Thread Benjamin Stiglitz
> I looked at ATImageTextCell, but it does things I don't need (fill color) and > has dependencies on a bunch of other classes from that sample. I'll stick > with ImageAndTextCell since it's simpler and standalone. The old ImageAndTextCell doesn’t handle the background style, and that alone mak

Re: Question about touchesBegan

2009-12-16 Thread Benjamin Stiglitz
> I'll elaborate a little more. I have a main view with some source buttons > (UIButton) at the top. When I click one, I bring up a radio style tuner bar > in a subview (animates up from the bottom). I am using touches to move the > "pointer" in that subView. Works great, however because the subVie

Re: [iPhone] Sample code for live camera stream?

2009-12-15 Thread Benjamin Stiglitz
> Erm, Ustream Live Broadcaster does it just fine. Are you suggesting > they are circumventing API restrictions? > > http://www.techcrunch.com/2009/12/09/iphone-live-streaming-ustream/ There was recently a clarification in the developer forums from Michael Jurewitz; I’d suggest you take a look t

Re: Problem with setMarkedText:selectedRange:

2009-12-13 Thread Benjamin Stiglitz
> Hi, I have a view which implements the NSTextInputClient protocol, and my > implementation of > > - (void)setMarkedText:(id)aString selectedRange:(NSRange)selectedRange > replacementRange:(NSRange)replacementRange > > creates an NSTextView, adds it as a subview, makes it first responder, >

Re: Instruments UI Recorder and Screenshots

2009-11-11 Thread Benjamin Stiglitz
> I've been playing around with the UI Recorder functionality in > Instruments and I'm interested in taking a screenshot after a UI > Recorder playback has occurred. Does anyone know if this is possible? It > looks like you can create your own instruments which can run scripts, so > I thought

Re: Right-to-Left / Bidi / Arabic / Hebrew support in my app

2009-08-31 Thread Benjamin Stiglitz
> It looks like I'll just have to use other controls to do the same effect in > IB, and just check of locale.name == "ar" || "he" in code to do the reverse > drawing. On 10.6 your heuristic should instead mirror the value of the new -userInterfaceLayoutDirection accessor in NSApplication (and NSCe

Re: NSSplitView resizing

2009-08-26 Thread Benjamin Stiglitz
> I have a window containing a NSSplitView. When the window is resized, both > panes of the split view resize proportionally. I would like one pane to > remain fixed while the other resizes. Xcode does this, as well as iCal and > other apps. > > Is there a delegate method that does this or must

Re: Title Bar of Key Window

2009-08-14 Thread Benjamin Stiglitz
I was just wondering if it was possible to control this behavior and not have the title bar highlighted for a particular window, but still allow it to be the key window. The particular kind of window I am interested in is a NSPanel. Is it an inspector-type window? You may want to make it no

Re: How do I track down an OSStatus error code?

2009-07-20 Thread Benjamin Stiglitz
> Looking for the meaning behind the value -43. Try MacErrors.h in CarbonCore. -Ben ___ 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(

Re: NSCondition (unlocked when not locked)

2009-07-10 Thread Benjamin Stiglitz
> > What’s the value of SLEEP? -waitUntilDate: can return NO indicating that the > > timeout elapsed and the lock is not locked; you probably want -wait. > > No, I do want the waitUntilDate because I do not solely want to wait > for the signal. In that case you probably want to use an NSCondition

Re: NSCondition (unlocked when not locked)

2009-07-10 Thread Benjamin Stiglitz
I have a worker thread that is only slowly polling. I would like to be able wake him up from a different thread though. A bit like the select(2) pattern. So what I do is: ... pollingCondition = [[NSCondition alloc] init]; ... - (void) pollNow { [pollingCondition lock]; [

Re: Font matching

2009-07-06 Thread Benjamin Stiglitz
> Hi, I have an application where I need to be able to find the closest > equivalent font should a font be missing. e.g. someone creates a file > and sends it to someone else, who doesn't have the font that was used to > create the original file installed on their system. > > I thought that ma

Re: MDSchemaCopyAllAttributes() returning nil

2009-06-18 Thread Benjamin Stiglitz
Why is the privileged process asking Spotlight for anything? Try to factor as much code as possible out of your privileged tool. This is the root tool that powers the Mozy backup product. One of the features is that users can specify queries to determine which files to back up. However, i

Re: MDSchemaCopyAllAttributes() returning nil

2009-06-18 Thread Benjamin Stiglitz
I'm working on a project that works a lot with Spotlight, and we're trying to get a list of all the attributes that Spotlight knows about. We found a really nice function called MDSchemaCopyAllAttributes that returns a CFArrayRef of CFStringRefs, each one corresponding to a spotlight attri

Re: issues encoding MailMessage and NSData

2009-05-22 Thread Benjamin Stiglitz
that works fine, but when I go to decode the object I get the following error: exception raised:*** -decodeObjectForKey: only defined for abstract class. Define -[NSKeyedArchiver decodeObjectForKey:]! You need to use an NSKeyedUnarchiver, not an NSKeyedArchiver, to decode the object. -

Re: Capturing key events in a menu

2009-05-19 Thread Benjamin Stiglitz
>> When a menu is open the Menu Manager in HIToolbox handles incoming >> events on its own. You be able to capture the events with an embedded >> NSView, but I first need to ask the standard question: what are you >> trying to achieve? > > Well, I want to know what the user typed when a menu is ope

Re: Capturing key events in a menu

2009-05-18 Thread Benjamin Stiglitz
> Basically, I want to do quite a simple thing: capture a "keyDown" event > when a menu is opened. So the user opens a menu, presses a key and I want > to know what key it was. > Unfortunately NSMenu isn't an NSResponder, so I can't capture it there. > Also, the event isn't passed down to NSApp

Re: Interpreting -underlinePosition and -underlineThickness

2009-05-14 Thread Benjamin Stiglitz
> How should NSFont's -underlinePosition and -underlineThickness values be > interpreted? Are they fixed values, indicating an absolute offset, or are > they some proportion of the pointSize or something else? In the optimal case (I’ll explain shortly), the underlinePosition is the number of poi

Re: Centering a window ... not in the usual way!

2009-05-13 Thread Benjamin Stiglitz
> I am not sure of Mic's intent, but [window center] is only useful for the > main screen. If you need per-screen windows, I am not sure how to have the > OS do it. Given a few different resolutions though, it should not be hard to > deduce the OS positioning algorithm. For what it's worth: the ce

Re: Breaking underlining on descenders

2009-05-13 Thread Benjamin Stiglitz
> When standard text lays out with underlining, the underline is > interrupted around descenders, which is nice. Unfortunately my > underlining code doesn't do this, and I can't see a simple way or layout > manager delegate method I could use to figure out where the breaks should > go. Is the

Re: Bindings related NSUndoManager problem

2009-05-05 Thread Benjamin Stiglitz
> Now I have come to implement Undo. It actually works, but there is a > problem (see below). The code to implement Undo is in my view class: > > - (void)removePath:(PathElement *)oldPath > { > NSUndoManager *undo = [[self window] undoManager]; > > [undo registerUndoWithTarge

Re: CA -animator animation only works the first time

2009-04-29 Thread Benjamin Stiglitz
On Tue, Apr 28, 2009 at 02:49:23PM -0700, Erg Consultant wrote: > I have two standard Cocoa objects in my window that I animate using CA's > AppKit -animator method. When my nib loads, I get the original NSRects of the > two items by sending them the -frame message. I then recalc the rects to mov

Re: NSLocalizedStringFromTableInBundle Questions

2009-04-10 Thread Benjamin Stiglitz
> If I do a NSBundle *thisBundle = [NSBundle bundleForClass:[self class]]; > it won't compile. That code should work. Can you be more specific about the error? E.g. your exact code and compiler error logs. -Ben ___ Cocoa-dev mailing list (Cocoa-dev@l

Re: Strange NSCell subclass issue ...

2009-03-31 Thread Benjamin Stiglitz
On Tue, Mar 31, 2009 at 07:37:03PM +0100, Mic Pringle wrote: > Hi, > > I have subclassed NSCell and implemented only the following method ... > > - (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView > { > NSImage *separator = [NSImage imageNamed:@"Separator.png"]; > [s

Re: Programmatically opened NSPanel not responding to actions

2009-03-31 Thread Benjamin Stiglitz
> I am adding the NSPanel with the addWindowsItem, and display it consequently > with > a deminiaturize call. You should instead just orderFront: the window or showWindow:, depending on whether you have an NSWindowController. -Ben ___ Cocoa-dev mailing

Re: [BUG?] - [NSLayoutManager usedRectForTextContainer:] returns incorrect value

2009-03-30 Thread Benjamin Stiglitz
> I'm running the code below. I have a single NSWindow with a checkbox and > a button. In the awakeFromNib method of the main controller, I change the > attribute of the checkbox string. In the compute: method, I compute the > height requested to display a string for a specific font and maximum

Re: Custom NSCell issues

2009-03-26 Thread Benjamin Stiglitz
> hello I'm using a custom NSCell in order to draw some elements in an > NSTableView. I've created a simple tableview with 2 row. However my > draws is always put on first row while the second one is empty. > This my code for NSOutlineView delegate http://pastebin.com/m7f5f8a0f > while this is for

Re: Implementing a many-to-many ("reflexive") relationship using bindings and an NSTableView

2009-03-26 Thread Benjamin Stiglitz
> To implement the proposed interface, one cannot solely use bindings to > accomplish this w/o modeling the intermediary join table. The relationship > management is instead accomplished via code (through NSSets and so on as per > mmalc's example). Correct; not with a straight tableview. You can

Re: Implementing a many-to-many ("reflexive") relationship using bindings and an NSTableView

2009-03-25 Thread Benjamin Stiglitz
> > For the sake of this discussion, here's a sample entity layout: > > Two entities, one named A, the other named B. A and B have a reflexive > relationship with each other (that would be a many-to-many type). The > backend is a SQLite store (not that it should matter). > > I'd like my interf

Re: signal(SIGUSR2, SIG_IGN) not respected by Xcode/GDB?

2009-03-25 Thread Benjamin Stiglitz
> Why can't Unix be a "modern" OS with dynamically allocated > and named signals? :-) Signal-handling behavior is so restricted to begin with that more signals would just end up with more code making non-async-signal-safe calls. Pipes are easy to create, and can easily be passed from process to pr

Re: signal(SIGUSR2, SIG_IGN) not respected by Xcode/GDB?

2009-03-25 Thread Benjamin Stiglitz
I'm not completely satisfied using signals (especially since they are not dynamically allocated and I may want to use more in the future) but signals was the lowest level alternative I could think about. This code will be used _very_ frequently and I want to use the lowest possible level, mainly f

Re: need advice on subclassing NSScrollVIew

2009-03-20 Thread Benjamin Stiglitz
> In a similar situation, I didn't subclass NSScrollView. I subclassed NSView > and inserted an NSScroller directly as its subview. I tracked the position > with a 64-bit variable which I converted to a range suitable for the > NSScroller just for setting its thumb position and size. I set my vi

Re: problems with CAAnimation

2009-03-19 Thread Benjamin Stiglitz
> - if I rollover, then midanimation, rollout again, it should animate > back to original position *from where it was at the moment I rolled > out*, NOT snapping to the hover position (which is why I can't use > FromValues). You can use the layer's presentationLayer to get the info you need

Re: NSGradient draws incorrectly in PDF context?

2009-03-12 Thread Benjamin Stiglitz
> I've noticed I'm getting different results with NSGradient when drawing > to screen and when drawing in a PDF context, e.g. printing, or write PDF > to clipboard. If the gradient contains colours with transparency, it > draws correctly on-screen (allowing what's drawn behind to come through),

Re: problems with NSTextField destroying background

2009-03-11 Thread Benjamin Stiglitz
> My problem is, I want the NSTextField to be transparent (and show the > NSBox behind), but instead it's making a hole in the NSBox to show the > desktop, what am I missing? For historical reasons the NSTextField fills its content with NSRectFill, which uses the NSCompositeCopy compositing op

Re: MVC, storing VIEW-specific information and core data

2009-03-09 Thread Benjamin Stiglitz
> While I do realize that I will have to get this data into the Managed > Context somehow in order for it to be stored automatically with the > document, I want to be able to make my model completely and utterly UI > independent. You could have a NodeViewState, joined to the Node by a relationship

Re: [Q] NSObject's poseAsClass - Replacement?

2009-03-05 Thread Benjamin Stiglitz
> I have a need to use poseAsClass, but I see that it has been deprecated > in 10.5 and won't be available for 64-bit applications. > > So, is there a replacement? WAYTTD: What are you trying to do? Maybe you don’t need to pose. -Ben ___ Cocoa-dev mai

Re: Advice on building a complex user custom control

2009-03-03 Thread Benjamin Stiglitz
> I'm working on a small game engine, and as such, I want to create a > level editor for the game. I love the old style Doom level editors, so > that's what I'm going for [1]. Notice in that screenshot the amount > the user can interact with - moving vertices on the grid, creating > lines between v

Re: NSSplitView splitViewDidResizeSubviews

2009-03-03 Thread Benjamin Stiglitz
> Also, if I want to know when the user has completed the divider > movement, how would I find that out? I suspect I'd need to subclass > NSSplitView method that handles the mouse events... Yes; specifically, you should look at -mouseDown:, since NSSplitView runs an event loop instead of using

Re: Is there any Objective C supported code review tool?

2009-01-30 Thread Benjamin Stiglitz
> Please name me code review tool (Freeware preferred) that is commonly used > by Mac/ObjectiveC/XCode developer community. Review Boards supports any code, and I believe supports Objective-C syntax highlighting. -Ben ___

Re: -finstrument-functions and program startup

2009-01-29 Thread Benjamin Stiglitz
> How is this instrumentation done? I guess the text segment is modified > in RAM when the pid provider is attached to the process? Yes, when a probe is enabled a small thunk is dropped in that calls out to the DTrace pieces in the kernel and logs the event. USDT probes work similarly, but insert

Re: -finstrument-functions and program startup

2009-01-29 Thread Benjamin Stiglitz
Actually, a probe of 'pidnnn:::entry' works just great (where nnn is the target process' pid.) Check out the pid provider documentation: Only for code that has such probes compiled into functions / methods. Apple has th

Re: -finstrument-functions and program startup

2009-01-29 Thread Benjamin Stiglitz
> I don't believe an Apple provider exist (or can exist) for general > probing of C++ or C function entry and exit. You will have to > instrument C++ methods and C function (aka make your own provider) to > be able to use DTrace for what I think you are attempting to do. Actually, a probe of 'pidn

Re: Context Menu in NSBrowser

2009-01-27 Thread Benjamin Stiglitz
> All NSViews show, when control-clicked, their context menu. > But not the NSView subclass NSBrowser. > > Is this a documented feature or a bug? This is a bug in the Leopard and earlier versions of AppKit. For now, you can loop through the matrices using -matrixForColumn: and set their menus ind

Re: AudioFileOpen Error

2009-01-15 Thread Benjamin Stiglitz
When I build the project I get one error on the AudioFileOpen line. This is log:"_AudioFileOpen", referenced from: It sounds like you haven’t linked against the AudioToolbox framework. You can add the framework by bringing up the context menu in the Xcode group tree and selecting Add >

Re: drag and drop with "snapping"

2009-01-15 Thread Benjamin Stiglitz
I'd like to implement drag and drop behavior with "snapping" to guides in my application. I have looked at both the NSDraggingSource and NSDraggingDestination protocols and there seems to be no obvious way of modifying the position of the dragged image. Do I need to make my own transparent windo

Re: Quick (?) NSCell question: getting the drawing (inner) rectangle

2009-01-15 Thread Benjamin Stiglitz
Perhaps this method is only intended to provide information to the system by the NSCell implementation and is not intended for the purpose I need. In which case, is there a way to achieve what I want without having to ask for the NSTableColumn width and working out what proportion of this

Re: NSDictionary key from the content of a set

2009-01-15 Thread Benjamin Stiglitz
I'm trying to create an NSDictionary that uses key based upon the contents of a NSSet (specifically a set of NSManagedObjectID's). I'm currently at a bit loss as to how to do it. My various attempts at a hash based solution (see below) don't appear to be working. Are you creating a map from

Re: File association

2009-01-15 Thread Benjamin Stiglitz
Document Tyoe Name : myApplication CFBundleTypeExtensions : prp Document OS Type : Role : Editor Handler rank : Owner Then run it and saved the project. Then I double click the saved project, but it opens in TextEdit. Is there any other keys I need to set? You need to set a unique document

Re: How font size managed without affecting the font? Please help

2009-01-14 Thread Benjamin Stiglitz
> I use this code to change the fontsize: > > NSFont *font1 = [NSFont fontWithName:[pop1 titleOfSelectedItem] size:[[pop2 > titleOfSelectedItem] doubleValue]]; In the second popup’s action method, you should be invoking -[NSFontManager convertFont:toSize:] to convert the fonts to the right size.

Re: How to center a custom NSView in a NSScrollView

2009-01-14 Thread Benjamin Stiglitz
> I've already tried with a custom NSClipView, as explained here: > > http://www.bergdesign.com/missing_cocoa_docs/nsclipview.html This is the standard way to do this. > The question is, how can I center a custom NSView in a NSScrollView, if > the visible width and/or height is greater than the

Re: File association

2009-01-14 Thread Benjamin Stiglitz
> I saved the project using NSArchiver with an extension say .myExtension. And > also I opened the saved project by unachieved it from menu. Now I need to > open the saved project when double clicking on it. > > How can I do this file association? See the Runtime Configuration Guidelines:

Re: Arggg...overrelease in table view cell, but where?

2008-12-11 Thread Benjamin Stiglitz
I have implemented -copyWithZone in my NSTFC subclass as such: - (id)copyWithZone:(NSZone *)zone { MyTableCell *copy = [super copyWithZone:zone]; copy.cellObject = [self.cellObject copy]; copy.gridController = [self.ViewController copy]; return copy; } NSCells use NSCopyObject to do

Re: Cant Load an Image into a CALayer

2008-12-03 Thread Benjamin Stiglitz
NSImage * image = [[NSImage alloc] initByReferencingFile:@"Destroyer.png"]; Your conditional statement is failing because the image can't be located; you need to pass the path to your image relative to the current working directory; see the documentation:

Re: Creating a Bottom Bar on NSWindow

2008-12-03 Thread Benjamin Stiglitz
If you're targeting Leopard, you can put these 2 lines in your controller's -awakeFromNib: method: [[self window] setAutorecalculatesContentBorderThickness:YES forEdge:NSMinYEdge]; [[self window] setContentBorderThickness: 32.0 forEdge: NSMinYEdge]; If you create a textured window NSWindow

Re: tracking down a table column...

2008-12-02 Thread Benjamin Stiglitz
OK, I gave that a shot...got nada. First, I got: No symbol "id" in current context. So, I took (id) out of the call. Then I got: Cannot access memory at address 0x0 I did try the call for the tableView, but got the same as "id" above. Did you paste the lines exactly as they were, o

Re: tracking down a table column...

2008-12-02 Thread Benjamin Stiglitz
I’m getting an “ambiguous” error in my log that I can’t readily resolve. The error is: Cocoa bindings error: Error accessing bound property of object : [ valueForUndefinedKey:]: this class is not key-value coding compliant for the key value I’d like to know to which column (in human terms

Re: Textured Window Responder Issue

2008-12-01 Thread Benjamin Stiglitz
> When the view uses NSOpenGLView a mouse drag in the view will send > events to the view. It works properly. > > When the view uses CAOpenGLLayer a mouse drag in the view will move the > window! The mouse events are being sent to the view but are apparently > being picked up and acted upon by

Re: displaying huge log files

2008-12-01 Thread Benjamin Stiglitz
On Sun, Nov 30, 2008 at 12:48:26AM -0800, Andrew Farmer wrote: > On 29 Nov 08, at 14:23, Nick Zitzmann wrote: >> On Nov 29, 2008, at 5:39 AM, Mudi Dandan wrote: >>> Is it possible to to display a memory mapped file in an NSTextView >> >> Of course. > > With one caveat: When creating a memory mappin

Re: Core Data/Bindings issue

2008-11-24 Thread Benjamin Stiglitz
The popup button has: Content bound to MyArrayController.arrangedObjects Content Values bound to MyArrayController.arrangedObjects.name Sometimes, and is vaguely seems to be related to changing the XIB, the labels of the cells in the popup are what I would expect from calling -description on

Re: [Q] How to add nested items to NSOutlineView?

2008-11-05 Thread Benjamin Stiglitz
However, if I get reference of an item in existing view and insert new item in its data source, NSMutableArray, it can't display the newly added nested items. I tried NSTreeController's rearragneObjects and the NSOutlineView's reloadItem:reloadChildren, but it doesn't seem to work for me.

Re: Key Paths @count and mutablestrings

2008-11-05 Thread Benjamin Stiglitz
I've cleared out all my other code and associated problems, and I'm at the same point, key path orderReference works, but [EMAIL PROTECTED] doesn't? [Session started at 2008-11-05 20:42:25 +.] 2008-11-05 20:42:28.462 powizard[22921] [<_NSFaultingMutableSet 0x165e910> addObserver:forKeyP

Re: About Ink drawing with wacom tablet

2008-11-04 Thread Benjamin Stiglitz
> Did I miss something, or I was doing something wrong? I have > InkSetApplicationWritingMode (kInkWriteAnywhereInApp); > > InkSetApplicationRecognitionMode (kInkRecognitionGesture | > kInkRecognitionText); You don’t want to turn on Ink in your case, since you want to capture the tablet events o

Re: Key Paths @count and mutablestrings

2008-11-04 Thread Benjamin Stiglitz
On Mon, Nov 03, 2008 at 06:55:24PM +, Amy Heavey wrote: > PurchaseOrder is an Entity, with a relationship called products to the > PurchaseOrderItems Entity which lists the actual items on the order. I'd > like a column in my Purchase Order tabel to display the number of items > in the order

Re: [OT] How do people use and contribute to this list?

2008-10-20 Thread Benjamin Stiglitz
> Can anyone offer any advice or suggestions? Or should I settle for the > cumbersome digest mode? I’ve found that a combination of procmail rules on my IMAP box and Mutt compiled with the ignore-thread patch [1] work quite well for me. I haven’t found a MUA which beats Mutt for reading mailing li

Re: UI elements in custom view mess up drawing

2008-10-14 Thread Benjamin Stiglitz
> When I turn off the progress indicator > however, or when I update the string value of the text field, the drawing > from the drawRect method above is drawn offset from its origin, instead > drawing at the origin of either of the subviews, resulting in spurious > lines being drawn where there

Re: waiting for an NSThread

2008-10-13 Thread Benjamin Stiglitz
> I've another n00b Cocoa question: How can I wait for a thread to finish > without depending on a flag that may be reset and set before the thread > i'm waiting for has time to check it? Take a look at NSConditionLock in Foundation. -Ben ___ Cocoa-d

Re: IKImageView and delegate callback/notification of image changes

2008-10-07 Thread Benjamin Stiglitz
Has anyone come across a solution for knowing when the image has been edited? You should be able to use KVO to be notified when the image property of the IKImageView changes. -Ben ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do

Re: Problems with loose ViewController coupling and KVO to-many relationships

2008-10-07 Thread Benjamin Stiglitz
There's a design flaw here somewhere, but I can't quite figure out what it is. It's highlighted by trying to reorder widgets. With KVC to-many relationships, there's no atomic way of moving an object from one position in an array to another : you remove the object, then re-insert it at the new l

Re: NSLevelIndicator - setEnabled not respected

2008-09-30 Thread Benjamin Stiglitz
I've googled for over a week, and I can't find out what I'm missing here. See the AppKit release notes for 10.5 at In short, the enabled property only works if you link your app against 10.5+. -Ben

Re: Always allowing drags from WebView inside a global NSPanel

2008-09-23 Thread Benjamin Stiglitz
> The problem I am having is that to drag out of the WebView the panel has > to be main (i.e. the close/minimize/zoom buttons are filled in). > However, if you hold down the command key, the drag out of that window > works fine. > > Where do I start looking to make this work without having to

Re: How to create a new window initially zoomed to the maximal size?

2008-09-20 Thread Benjamin Stiglitz
On Sat, Sep 20, 2008 at 12:22:52PM -0700, j o a r wrote: >> Alternatively, you can set its frame to [[window screen] >> defaultFrame], which is the same frame >> that -zoom: will use, subtracting space for any visible drawers. > > I think that should be: > > "-[NSScreen visibleFrame]" Yes,

Re: How to create a new window initially zoomed to the maximal size?

2008-09-20 Thread Benjamin Stiglitz
> What I want to achieve is that when a new window is created, it has > the maximal size allowed by the screen, menu and the dock, exactly > like if someone clicked the green zoom button in the window's title > bar. I don't want any resizing animation or flickering though. Before ordering the wind

Re: Core data fetch returns no objects

2008-09-18 Thread Benjamin Stiglitz
On Thu, Sep 18, 2008 at 02:05:03PM +0200, Tomaž Kragelj wrote: > If I use the same code for fetching immediately after adding the objects > to the context, the fetching works... It looks like the problem might be > related to fact that I use different persistent store for Project than > for Meas

Re: NSXMLParser and multithreading

2008-09-16 Thread Benjamin Stiglitz
Excerpts from Mark Thomas's message of Tue Sep 16 11:36:41 -0400 2008: > Was wondering if somebody could answer how thread safe NSXMLParser is, as > I need to use it with NSURL set to remote server and the response could take > a while, so this why I want to put off into another thread. Instance

Re: Do I Need Multiple NSArrayControllers For This?

2008-09-15 Thread Benjamin Stiglitz
> I found this > information ngs/Tasks/filtering.html#//apple_ref/doc/uid/20002302-128168-CJBCJCAI>about > overriding -arrangeObjects: Since I need to return several different > arrays of objects (active, new, and prior) how is

Re: async NSOperation and NSOperationQueue

2008-09-15 Thread Benjamin Stiglitz
Excerpts from John Love's message of Mon Sep 15 11:02:21 -0400 2008: > I must be doing something terribly wrong, because when I start up the > NSOperationQueue that does some time consuming calculations, I do not > get back control of my application until after the lengthy calculation > is co

Re: Question about dataWithPDFInsideRect:

2008-09-12 Thread Benjamin Stiglitz
Suppose I have a model (myModel) and its view (myModelView) which is a subclass of NSView. myModel has an update method that updates the model, and changes in the view are all drawn inside the drawRect: method of myModelView. If I have the following sequence: [ myModel update ]; [ myModelVi

Re: Do I Need Multiple NSArrayControllers For This?

2008-09-11 Thread Benjamin Stiglitz
Just want to clarify this a bit. In the Bindings inspector, when I assign a value transformer, that gets applied to the Controller Key and then the Model Key Path portion applies to the transformed value. Am I understanding that correctly? The value transformer gets applied immediately bef

Re: Do I Need Multiple NSArrayControllers For This?

2008-09-11 Thread Benjamin Stiglitz
Just want to clarify this a bit. In the Bindings inspector, when I assign a value transformer, that gets applied to the Controller Key and then the Model Key Path portion applies to the transformed value. Am I understanding that correctly? The value transformer gets applied immediately bef

Re: Do I Need Multiple NSArrayControllers For This?

2008-09-10 Thread Benjamin Stiglitz
I have a Core Data entity that has a date and relationship. I want to create a label like. "25 Foos (12 New)" A Foo is active if it its relationship is null and it is new if its date is within the startDate and endDate specified by the user. My intuition is that this does require two NSArr

Re: NSTableView bindings and current selection

2008-09-08 Thread Benjamin Stiglitz
I have a tableView (showing query results) that has its values bound to an array controller; that works fine. I also have a NSPathControl showing the path of the selected item; this works fine too. I have implemented a right-click contextual menu to "Show in Finder..." the selected item in

Re: Creating a runloop to handle specific mouse events

2008-09-04 Thread Benjamin Stiglitz
At one point, my application blocks the runloop and I have to poll for mouse events by calling [NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]. I'm not happy with the polling. It seems to me that creating a separate thread and configuring its runloop to process the events I'

Re: NSOutlineView developer example

2008-09-03 Thread Benjamin Stiglitz
Hi Guys, i tried to understand the NSOutlineView developer example which is in /Developer/Examples/AppKit/OutlineView. It simply shows the entire filesystem. I tried to alter it, so it shows any relative path of the filesystem, but whatever i do, it does not work. Does anybody have an idea, w

Re: Best 'native' formats for NSImage and NSSound?

2008-09-02 Thread Benjamin Stiglitz
In running Shark on my app recently I noticed that by far, my app spent most of its time in: CGSConvertBGR888toRGBA. I'm having trouble understanding what this means. It appears that CoreGraphics is having to convert some of my non-alpha channel images to have an alpha, and perhaps re-or

Re: Simulating menu bar blink in Cocoa

2008-04-19 Thread Benjamin Stiglitz
If I understand well, your trying to catch event that match a menu item shortcut minus the shift key. Isn't it possible to override - [NSApp sendEvent:] as you did, but instead of taking care of the event yourself, create a new event that match the menu item and then call super with this new

Re: Simulating menu bar blink in Cocoa

2008-04-18 Thread Benjamin Stiglitz
As previously explained here, I'm handling hotkeys in my app via custom code in order to work around some AppKit bugs. How can I simulate the menu-title blink effect using Cocoa? In Carbon, it's FlashMenuBar(menuID) but I don't see a Cocoa equivalent. What’s the actual bug? Maybe there is a

Re: NSMapTable with pointer keys ?

2008-03-27 Thread Benjamin Stiglitz
[NSMapTable mapTableWithKeyOptions:NSMapTableObjectPointerPersonality valueOptions:NSMapTableStrongMemory] (reading the doc for NSMap, I figured these are the right options) However, when trying to fetch an object with a void* key to check for its presence (using the C api as recommended)

Re: reading data from a UDP port - questions

2008-03-17 Thread Benjamin Stiglitz
(2) But in any case, NSString doesn't mind embedded null bytes. (It's not null-terminated like a C string; the string object remembers the length separately.) That doesn't mean you should store binary data in an NSString, though. NSData is better for that. NSString isn’t really too happy wi

Re: SCT classes

2008-03-04 Thread Benjamin Stiglitz
I am playing with dynamic class loading... When my test apps starts, I am creating a list of all classes (about 1700 for my ultra simple example). After a while I am recreating the same list. This time the list is longer (about 1800 classes) and contains lasses with "STC" prefix - like SCTC

Re: Best way to hook up Font Panel to floater (that isn't first responder)?

2008-03-04 Thread Benjamin Stiglitz
Is there a way to hook up the Font Panel directly? This needs to be "spring loaded" so that the Font Panel follows the user's focus most of the time, but switches to my panel when the user clicks the Font button but returns to the original 1stR when they go back to the main document. Or may

Re: Tabless NSTabView IB3 Bug

2008-03-04 Thread Benjamin Stiglitz
I'm trying to use a tabless NSTabView in IB3. Before Leopard, you could double-click the space towards the top of the view and select the tabs, even though there was no visible tab. I also believe there was a control in the inspector to specify current tab? Anyway, none of these methods wor

Re: Dropping into One of Several Columns

2008-03-03 Thread Benjamin Stiglitz
I've got an NSTableView with multiple text column and I'd like to be able to control where a drop of some text goes based on in which column the user is making the drop. Since the validateDrop: member function of the table's data source does not provide a 'proposed column', I'm going to gue