Re: Xcode 10 and disable layer backed windows in Mojave

2018-10-25 Thread Guillaume Laurent
> On 25 Oct 2018, at 14:31, Georg Seifert wrote: > > When I build my app with Xcode 10, Mojave uses the new layer backed windows. > My view drawing is (not yet) able to dealt with layer backed views. > > So is there a way to disable the new window system? The only way I fond is > not to lin

Re: is there a way to determine if an NSButton is toggleable ?

2018-08-21 Thread Guillaume Laurent
ny combination of bits configured, but > none of the built-in NSButtonTypes set both at once. Thank you very much for your reply. > > - Jeff > >> On Aug 20, 2018, at 3:04 AM, Guillaume Laurent > <mailto:glaur...@telegraph-road.org>> wrote: >> >> Hi

is there a way to determine if an NSButton is toggleable ?

2018-08-20 Thread Guillaume Laurent
Hi all, For a custom UI I’ve had to write a custom control deriving from NSButton, which highlights itself in a special way on mouse-over. In the method which does the highlighting, I check if the button’s state is either .on or .off, so I know which title or alternateTitle to display. But I r

Re: Carbon -> Cocoa

2018-08-20 Thread Guillaume Laurent
> On 17 Aug 2018, at 19:51, Jeremy Hughes wrote: > >> Of course, the C++ business logic doesn't need any changes. The concern is, >> how long will it last? Seems like the future is an entirely Swift-based API >> that replaces Objective-C Cocoa in 5 years, with no easy way to link to >> other

capturing the content of a SpriteKit SKView (or SKScene, SKNode) to an NSImage ?

2014-01-19 Thread Guillaume Laurent
Hi, Has anyone tried and succeeded in capturing the contents of an SKView to an NSImage ? Techniques working for a regular NSView won't work apparently because an SKView is based on OpenGL. I tried taking advantage of the fact that an SKScene is an SKEffectNode and used a custom CIFilter which

Re: CoreData and undo/redo : how to add a managed object with attributes already set in the undo/redo stack ?

2010-07-08 Thread Guillaume Laurent
On Jun 27, 2010, at 4:08 , Jerry Krinock wrote: > > On 2010 Jun 26, at 16:01, Guillaume Laurent wrote: > >> I'm having difficulties with the undo/redo mechanism and my Core Data >> objects. > > Uh-huh. > >> The problem is that I create a CoreData ob

Re: CoreData and undo/redo : how to add a managed object with attributes already set in the undo/redo stack ?

2010-07-08 Thread Guillaume Laurent
On Jun 28, 2010, at 12:33 , Mike Abdullah wrote: > > On 27 Jun 2010, at 00:01, Guillaume Laurent wrote: > >> Hi all, >> >> I'm having difficulties with the undo/redo mechanism and my Core Data >> objects. The problem is that I create a CoreData object (

Re: CoreData and undo/redo : how to add a managed object with attributes already set in the undo/redo stack ?

2010-07-08 Thread Guillaume Laurent
On Jun 29, 2010, at 22:47 , Sean McBride wrote: > I don't believe that's the right pattern. In awakeFromInsert/Fetch, one > should be using primitive setters. The docs say "If you want to set > attribute values in an implementation of this method, you should > typically use primitive accessor me

CoreData and undo/redo : how to add a managed object with attributes already set in the undo/redo stack ?

2010-06-26 Thread Guillaume Laurent
Hi all, I'm having difficulties with the undo/redo mechanism and my Core Data objects. The problem is that I create a CoreData object (say a rectangle), then set some of its attributes according to some controls values (the position and size of a CALayer the user has just created in a view). Th

example of a NSScrollView where scrolling is overridden ?

2010-05-30 Thread Guillaume Laurent
OK this isn't very clear so I'll try to explain my problem. I need to scroll over a potentially very large area, that area has CALayers, which will themselves "be" very large. That is, they will appear so. So I need to have control over the scrolling so that those "large" CALayers will appear t

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: HUD-Style buttons

2009-04-09 Thread Guillaume Laurent
On Thu, 9 Apr 2009 15:24:29 +0100, "jonat...@mugginsoft.com" wrote: > Check out the BWToolkit. > http://www.brandonwalkin.com/blog/2008/11/13/introducing-bwtoolkit/ > Naive beginner question : why aren't these UI elements/styles available in IB by default ? Apple decision ? -- Guillaume http://

Referencing a controller from one NIB to another ?

2009-03-30 Thread Guillaume Laurent
Following up on my question about putting several windows in a single NIB, as it seems it's a bad idea, I'm now confronted to binding controllers from one NIB to another. To give a quick example, take the TwoManyControllers sample : http://developer.apple.com/SampleCode/TwoManyControllers/in

Re: several windows in a NIB ?

2009-03-27 Thread Guillaume Laurent
On Mar 27, 2009, at 17:34 , Sean McBride wrote: On 3/27/09 12:11 PM, I. Savant said: ... it suddenly occurs to me that nothing prevents me from having several top-level windows in a single NIB, i.e. the Track Editor Panel may just as well be defined in the same NIB as the main window, an

several windows in a NIB ?

2009-03-27 Thread Guillaume Laurent
Hi all, I'm in the process of writing a proof-of-concept music sequencer. At the moment all I'm aiming for is putting note events into tracks. I'm using a Core Data model, which defines a Composition holding multiple Tracks, each holding multiple Events. I've already done a basic NIB for

Re: 'Prepare Content' not working for Object Controllers ?

2009-02-28 Thread Guillaume Laurent
On Feb 26, 2009, at 21:36 , Guillaume Laurent wrote: I seem to be having a problem getting the 'Prepares Content' flag to work in the case of an NSObjectController. Following up on this, I was pointed to the fact that :prepareContent does not actually create content, as I was

'Prepare Content' not working for Object Controllers ?

2009-02-26 Thread Guillaume Laurent
Hi, I seem to be having a problem getting the 'Prepares Content' flag to work in the case of an NSObjectController. I'm trying to have a single Core Data entity bound to a couple of widgets (the entity has two attributes, a string and an int, and I've created a simple UI with Interface Bu

Doc on Controller Content vs. Parameters in Interface Builder Bindings panel ?

2009-02-22 Thread Guillaume Laurent
Hi all, I've googled around quite a bit but can't seem to find a full reference on all the settings of the Bindings panel in Interface Builder. In particular, in the case of a controller object (NSArrayController) and a Core Data model, I'm not sure what the distinction is between the "Co

Re: NSTableView with complex cells ?

2009-01-16 Thread Guillaume Laurent
On Jan 16, 2009, at 16:38 , j o a r wrote: For creating custom complex cells, see: An alternative to using cells in a table view might be to use views in a NSCollectionView:

NSTableView with complex cells ?

2009-01-16 Thread Guillaume Laurent
Hi, I'm currently toying with the idea of writing a very basic music sequencer. The main window would, like all sequencers, display a list of music tracks (e.g. Garage Band's main window). Apparently, an NSTableView with two columns (one for the track's various parameters and the other fo

Re: Cocoa equivalent of std::vector ?

2008-12-14 Thread Guillaume Laurent
On Dec 14, 2008, at 14:05 , Ken Thomases wrote: It's not the Cocoa way of doing things, for a whole raft of reasons. However, if you use Objective-C++, you can just go ahead and use std::vector. Thanks, I'll first try the "Cocoa way", and go C++ if I really have to. -- Guillaume http://t

Re: Cocoa equivalent of std::vector ?

2008-12-14 Thread Guillaume Laurent
On Dec 14, 2008, at 13:52 , jonat...@mugginsoft.com wrote: You can of course use straight ahead C but if it's a Cocoa app then it's most effective to use the standard classes. NSValue can used to wrap data types of constant length. That was my first thought but I still have an array of poin

Re: Cocoa equivalent of std::vector ?

2008-12-14 Thread Guillaume Laurent
On Dec 14, 2008, at 13:45 , Jean-Daniel Dupas wrote: Le 14 déc. 08 à 13:34, Guillaume Laurent a écrit : Hi all, I need to create an array of values of a specific type, and I'd prefer to have it as a set of values rather than pointer to values (mostly performance reasons), so n

Cocoa equivalent of std::vector ?

2008-12-14 Thread Guillaume Laurent
Hi all, I need to create an array of values of a specific type, and I'd prefer to have it as a set of values rather than pointer to values (mostly performance reasons), so not an NSMutableArray. I couldn't find anything in Cocoa to do this, am I missing something or is it just not a "Coco

Re: Cocoa "canvas" view ?

2008-11-22 Thread Guillaume Laurent
On Nov 21, 2008, at 17:20 , Kyle Sluder wrote: On Fri, Nov 21, 2008 at 9:50 AM, Guillaume Laurent <[EMAIL PROTECTED]> wrote: Indeed I could :-). This is a very impressive work, thank you for it. Can you tell me more about its scalability ? What I'm planning to write is a musi

Re: Cocoa "canvas" view ?

2008-11-21 Thread Guillaume Laurent
On Nov 21, 2008, at 14:15 , Paul Tomlin wrote: On 21 Nov 2008, at 2:36 PM, Guillaume Laurent wrote: I'm currently looking for a Cocoa NSView-like object which would manage several (read lots of) objects of various shape and kind (lines, polygons, ellipses, sprites, text...) placed

Re: Cocoa "canvas" view ?

2008-11-21 Thread Guillaume Laurent
On Nov 21, 2008, at 15:17 , Graham Cox wrote: There is nothing in Apple's frameworks, but you could look at my DrawKit project: http://apptree.net/drawkitmain.htm Indeed I could :-). This is a very impressive work, thank you for it. Can you tell me more about its scalability ? What I'm

Cocoa "canvas" view ?

2008-11-21 Thread Guillaume Laurent
Hi all, I'm currently looking for a Cocoa NSView-like object which would manage several (read lots of) objects of various shape and kind (lines, polygons, ellipses, sprites, text...) placed on a large view, dealing with redisplay, collision detection (so it can tell me which object a user

Re: NSMapTable with pointer keys ?

2008-03-27 Thread Guillaume Laurent
On Mar 27, 2008, at 18:17 , Guillaume Laurent wrote: On Mar 27, 2008, at 17:54 , A.M. wrote: I think you would have an easier time with NSMutableDictionary and [NSValue valueWithPointer:&x] as the key. Thanks, I'll try that too. Indeed, that seem to be the simplest so

Re: NSMapTable with pointer keys ?

2008-03-27 Thread Guillaume Laurent
On Mar 27, 2008, at 17:54 , A.M. wrote: On Mar 27, 2008, at 11:24 AM, Guillaume Laurent wrote: Hi all, I need to build a map of NSObjects indexed by void* pointers. Apparently the right way to do this is to use NSMapTable with the appropriate options : [NSMapTable

Re: NSMapTable with pointer keys ?

2008-03-27 Thread Guillaume Laurent
On Mar 27, 2008, at 17:51 , Benjamin Stiglitz wrote: [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 ch

NSMapTable with pointer keys ?

2008-03-27 Thread Guillaume Laurent
Hi all, I need to build a map of NSObjects indexed by void* pointers. Apparently the right way to do this is to use NSMapTable with the appropriate options : [NSMapTable mapTableWithKeyOptions:NSMapTableObjectPointerPersonality valueOptions:NSMapTableStrongMemory] (reading the doc for N