Re: Auto layout semantics?

2013-08-16 Thread Izak van Langevelde
On 15 aug. 2013, at 20:16, Fritz Anderson wrote: Do I understand correctly that you have a row in your form that looks like: |--Label1-Field1--Label2-Field2 --| ? (Not intended to be a constraint-specification format.) And you want Label1 and Label2 to be of fixed (identical?) size, and

Re: Auto layout semantics?

2013-08-16 Thread Izak van Langevelde
On 16 aug. 2013, at 19:18, Kyle Sluder wrote: [bringing this back on-list] On Aug 16, 2013, at 1:10 PM, Izak van Langevelde eezac...@xs4all.nl wrote: Dear Kyle, On 16 aug. 2013, at 18:38, Kyle Sluder wrote: What I am looking for is the algorithm that determines a layout based

Auto layout semantics?

2013-08-15 Thread Izak van Langevelde
I wasted some time trying to use auto layout to maintain the layout of a form, to make sure that fields are horizontally resized with the form, while labels maintain their size. However, when two fields are sitting next to each other, having the same priority, only one of them resizes with the

Re: Is it possible to define class from interface builder?

2013-08-14 Thread Izak van Langevelde
On 13 aug. 2013, at 20:43, Scott Ribe wrote: On Aug 13, 2013, at 12:34 PM, Izak van Langevelde eezac...@xs4all.nl wrote: Is there any way to derive a subclass of NSView from this form, so that it can be reused? NSViewController, combined with a window nib containing the form, so you'd

Is it possible to define class from interface builder?

2013-08-13 Thread Izak van Langevelde
A user interface contains several instances of a specific form, which is easily created in Interface Builder. Is there any way to derive a subclass of NSView from this form, so that it can be reused? Thanks, Izak --- Grinnikend door het leven... ___

Week of month confusion?

2013-03-19 Thread Izak van Langevelde
I'm working on a small week-based calendar, but for some reason, the week number within the month of the first day of the month is either 0 or 1, while I would expect it to be 1. NSDateComponents *components = [[NSDateComponents alloc] init]; NSDateFormatter *formatter =

Re: Week of month confusion?

2013-03-19 Thread Izak van Langevelde
On 2013-03-19, at 3:59 PM, Kyle Sluder wrote: On Mar 19, 2013, at 6:21 AM, Izak van Langevelde eezac...@xs4all.nl wrote: I'm working on a small week-based calendar, but for some reason, the week number within the month of the first day of the month is either 0 or 1, while I would expect

Re: Week of month confusion?

2013-03-19 Thread Izak van Langevelde
On 2013-03-19, at 3:59 PM, Kyle Sluder wrote: On Mar 19, 2013, at 6:21 AM, Izak van Langevelde eezac...@xs4all.nl wrote: I'm working on a small week-based calendar, but for some reason, the week number within the month of the first day of the month is either 0 or 1, while I would expect

Re: recomendations for creating a beta with date to expire

2011-08-15 Thread Izak van Langevelde
On 2011-08-15, at 3:08 AM, Charles Srstka wrote: On Aug 14, 2011, at 9:04 PM, Jerry Krinock wrote: One more thing. Remember to leave some kind of back door for yourself. I've wanted to punch myself in the nose when I needed to reproduce a bug report and my app told me that it wouldn't

Re: Core Animation for Dummies?

2011-08-13 Thread Izak van Langevelde
On 2011-08-13, at 8:40 PM, William Squires wrote: Did you set a duration over which to animate? Also, if you return NO, won't the window NOT close after all, thus defeating the purpose of animating it disappearing? I believe you need to return YES after a synchronous operation which will

Core Animation for Dummies?

2011-08-12 Thread Izak van Langevelde
I cannot possibly get Core Animation to work, while I did play with it in the past to get some simple things animated. I reduced my problem to a simple window fade: - (BOOL)windowShouldClose:(id)window{ [self.window.animator setAlphaValue:0.0]; return NO; } The relevant view has its

Re: Core Animation for Dummies?

2011-08-12 Thread Izak van Langevelde
On 2011-08-12, at 6:40 PM, Jens Alfke wrote: On Aug 12, 2011, at 3:19 PM, Izak van Langevelde wrote: - (BOOL)windowShouldClose:(id)window{ [self.window.animator setAlphaValue:0.0]; return NO; } The relevant view has its Core Animation Layer, as checked in X-Code

Re: NSTableView: move rows through drag and drop?

2011-08-10 Thread Izak van Langevelde
On 2011-08-10, at 10:40 AM, Peter Hudson wrote: I would do this as follows :- At the same time that you write rows to the pasteboard in the source table, store locally ( perhaps in the source table data source ) the row indexes that were written to the pasteboard. Set observation for a

Re: NSTableView: move rows through drag and drop?

2011-08-10 Thread Izak van Langevelde
On 2011-08-10, at 5:11 PM, Jens Alfke wrote: On Aug 9, 2011, at 8:43 PM, Izak van Langevelde wrote: Now I want to allow drag and drop from one document to another, and my first guess was to write the row data to the pasteboard. What puzzles me, is how to delete the row data from

Re: NSTableView: move rows through drag and drop?

2011-08-10 Thread Izak van Langevelde
On 2011-08-10, at 5:37 PM, Jens Alfke wrote: On Aug 10, 2011, at 2:30 PM, Izak van Langevelde wrote: I considered it, but it seems to have been available since Lion, and am looking for something which works on older systems. No, Lion just added a new equivalent method

NSTableView: move rows through drag and drop?

2011-08-09 Thread Izak van Langevelde
I implemented drag and drop in an NSTableView by writing the row indexes of the rows to be copied/moved to the pasteboard, which works. Now I want to allow drag and drop from one document to another, and my first guess was to write the row data to the pasteboard. What puzzles me, is how to

Re: Debugging CGImageCreate: invalid image provider: NULL?

2011-08-02 Thread Izak van Langevelde
Just noticed that using the CGDataProviderRef with callback for data release yields a memory leak: CGDataProviderRef provider = CGDataProviderCreateWithData(NULL, buffer, len, imageDataRelease); CGColorSpaceRef space = CGColorSpaceCreateDeviceRGB(); cgImageRef = CGImageCreate(width,

Re: Debugging CGImageCreate: invalid image provider: NULL?

2011-08-02 Thread Izak van Langevelde
On 2011-08-02, at 6:02 PM, David Duncan wrote: On Aug 2, 2011, at 2:52 PM, Izak van Langevelde wrote: However, Instruments shows a leaked Malloc of 236K with as responsible Caller CGDataProviderCopyData, which makes no sense to me. Something else (possibly out side of your control

Re: Debugging CGImageCreate: invalid image provider: NULL?

2011-08-02 Thread Izak van Langevelde
On 2011-08-02, at 6:57 PM, David Duncan wrote: On Aug 2, 2011, at 3:34 PM, Izak van Langevelde wrote: On 2011-08-02, at 6:02 PM, David Duncan wrote: On Aug 2, 2011, at 2:52 PM, Izak van Langevelde wrote: However, Instruments shows a leaked Malloc of 236K with as responsible Caller

Debugging CGImageCreate: invalid image provider: NULL?

2011-07-31 Thread Izak van Langevelde
I get this error when using CGImageCreate to recreate an image from the bytes I previously got from the image. A quick comparison shows that the amount of bytes is the same, the bytes are the same, and the various parameters of CGImageCreate correspond to the original image, so I'm running out

Re: Debugging CGImageCreate: invalid image provider: NULL?

2011-07-31 Thread Izak van Langevelde
On 2011-07-31, at 9:11 PM, Graham Cox wrote: On 01/08/2011, at 10:44 AM, Izak van Langevelde wrote: I get this error when using CGImageCreate to recreate an image from the bytes I previously got from the image. A quick comparison shows that the amount of bytes is the same, the bytes

Re: Debugging CGImageCreate: invalid image provider: NULL?

2011-07-31 Thread Izak van Langevelde
On 2011-07-31, at 9:28 PM, Graham Cox wrote: On 01/08/2011, at 11:25 AM, Izak van Langevelde wrote: Are you passing the bytes (or CFData) to the 'data provider' parameter? If so, that's wrong - you need to pass a CGDataProviderRef. Create one using CGDataProviderCreateWithData

Two NSTableViews, two data sources, one data model?

2011-07-26 Thread Izak van Langevelde
I currently have a single NSDocument subclass, which is also a data source for two different tables. Because the two tables show different aspects of the data and the code gets a little cluttered up, I am thinking about implementing two separate data sources, one for each table, both fetching

Re: Matching the style of a HUD?

2010-05-01 Thread Izak van Langevelde
On 2010-05-01, at 6:04 PM, Flavio Donadio wrote: So, I ask you to think about your app and consider if even the HUD panels are needed. From the Apple Human Interface Guidelines: In general, therefore, you should use transparent panels only when at least one of the following statements is

Matching the style of a HUD?

2010-04-30 Thread Izak van Langevelde
I like the look and feel of a HUD, but I am a little disappointed there are no other GUI elements that match the HUD style. I played with the BWToolkit, which provides transparent controls that go with a HUB, but don't see how to create matching black windows. Any clues? Thanks, Izak ---

Re: Matching the style of a HUD?

2010-04-30 Thread Izak van Langevelde
On 2010-04-30, at 2:12 PM, Seth Willits wrote: On Apr 30, 2010, at 11:05 AM, Izak van Langevelde wrote: I like the look and feel of a HUD, but I am a little disappointed there are no other GUI elements that match the HUD style. I played with the BWToolkit, which provides transparent

Re: Matching the style of a HUD?

2010-04-30 Thread Izak van Langevelde
On 2010-04-30, at 3:21 PM, Jens Alfke wrote: On Apr 30, 2010, at 12:02 PM, Izak van Langevelde wrote: Maybe I'm overlooking something trivial, but an NSPanel with HUD style is still an NSPanel, and not a window: I cannot seem to get the minimize and maximize buttons in the title bar

Re: Matching the style of a HUD?

2010-04-30 Thread Izak van Langevelde
On 2010-04-30, at 3:22 PM, Murat Konar wrote: On Apr 30, 2010, at 12:02 PM, Izak van Langevelde wrote: Maybe I'm overlooking something trivial, but an NSPanel with HUD style is still an NSPanel, and not a window: I cannot seem to get the minimize and maximize buttons in the title bar

Re: Matching the style of a HUD?

2010-04-30 Thread Izak van Langevelde
On 2010-04-30, at 4:57 PM, Sean McBride wrote: On Fri, 30 Apr 2010 16:52:56 -0400, Izak van Langevelde said: - if so, roll your own That brings me back to my question: how do I create matching black windows? By writing code to draw a custom window. You might start here: http

NSTableview background image for column?

2010-04-24 Thread Izak van Langevelde
An NSTableView needs a column with one single image, spanning the entire column. I have got this working by setting as the background colour of the NSTableView a pattern, consisting of the background image, scaled big enough so it does not tile. However, this is somewhat limiting with respect

Re: NSTableview background image for column?

2010-04-24 Thread Izak van Langevelde
. Are the columns of your table sortable, and if so, does the image remain the same? --Andy On Apr 24, 2010, at 2:28 PM, Izak van Langevelde wrote: An NSTableView needs a column with one single image, spanning the entire column. I have got this working by setting as the background colour

Wave form graph through Core Audio?

2010-04-22 Thread Izak van Langevelde
I'm working on generating a wave form for a sound bite, but I'm stuck in Core Audio, which seems to be not over-documented, so to speak. All I need for now is an array of integers, based on some sample rate, for a given sound file, but most of Core Audio seems to target more complex

Blend mode 'darken' for NSImage?

2010-04-18 Thread Izak van Langevelde
I need to combine a number of NSImages such that each pixel of the result is the darkest of the corresponding pixels of the NSImages. Blend mode 'darken' does exactly what I need to, but I'm clueless about how to efficiently apply blend modes to NSImages. An alternative is to use an

Re: Blend mode 'darken' for NSImage?

2010-04-18 Thread Izak van Langevelde
On 2010-04-18, at 11:00 PM, Ken Ferry wrote: Ah, so your problem is that not every CG blend mode is available as an NSCompositingOperation? If you would, please file a quick bug mentioning that you needed this. From the documentation: The compositing operations are related to (but

Table with cells as dragging destination?

2010-04-11 Thread Izak van Langevelde
What I need is a table where some columns show images as data. It should be possible to drag images and image files onto these cells. I implemented the table as an NSTableView with NSImageCells, I know about the standard drag and drop for table rows. However, I am clueless about how to use cells