CoreData regression or performance problem, anyone?

2014-11-12 Thread Vincent Habchi
Folks, the sqlite version installed on OS X machines has been bumped to 3.8.x in OS X 10.10. This apparently had the unfortunate side (or collateral) effect of plummeting performance of some requests (specifically, some Macports related database operations now take forever while they were

Re: CoreData regression or performance problem, anyone?

2014-11-12 Thread Vincent Habchi
Jens, If you're using CoreData I'm not sure if you'll be able to fix your database schema, since presumably CoreData manages it and not you. So I'm not sure how you'd work around the problem. Good luck! In fact, the Macports search engine is not, so I guess we’ll figure out a way to fix

Re: 64-bit iOS

2013-09-11 Thread Vincent Habchi
Mostly, this is not going to change anything. You will see your code size increase, because unless you use PIC, you’ll have to store 64-bit addresses instead of 32. There will be more cache misses as your memory space becomes sparse. It will surely run faster, but not because the bus size has

Re: 64-bit iOS

2013-09-11 Thread Vincent Habchi
Thanks for this remainder, but I think we all already know that 620k is enough for anyone… Frankly, Jean-Daniel, I don’t want to get involved in a pointless bickering, but all I need on a phone was almost already running twenty-five years ago on my first Atari 520ST with, yes, 512 KiB of

Re: 64-bit iOS

2013-09-11 Thread Vincent Habchi
Scott, No, but it's great to device to access data, perhaps even bits pulled out from a huge pile, and preferably pulled out extremely quickly. And, anyway, why shouldn't it be a huge database machine??? I meant, it is not designed to serve as a database machine. I can’t possibly imagine

Initializing a NSMutableString an odd way

2013-07-31 Thread Vincent Habchi
Folks, I apologize if this question looks stupid or contrived. Here it is: is it permissible to use [@“” mutableCopy] to initialize (or reset) a NSMutableString instead of the more classical [[NSMutableString alloc] init]? Thanks a lot! Vincent

Re: Initializing a NSMutableString an odd way

2013-07-31 Thread Vincent Habchi
Le 31 juil. 2013 à 20:15, Mike Abdullah mabdul...@karelia.com a écrit : I apologize if this question looks stupid or contrived. Here it is: is it permissible to use [@“” mutableCopy] to initialize (or reset) a NSMutableString instead of the more classical [[NSMutableString alloc] init]?

Re: Initializing a NSMutableString an odd way

2013-07-31 Thread Vincent Habchi
Thanks to all for answering, Why would there be? Your just asking for a mutable copy of an empty string. It should be equivalent to [[NSMutableString alloc] initWithString:@« »] But much slower I expect, since it creates a NSString, takes a mutable copy, then implicitly releases the

Re: Initializing a NSMutableString an odd way

2013-07-31 Thread Vincent Habchi
Greg, thanks for diverting some of your time testing this. As someone already commented, the results are somehow consistent with “common sense”, whatever that means (cf. below). ARC and non-ARC scores are the same within measurement noise, except for [NSMutableString string] where ARC can

Re: Initializing a NSMutableString an odd way

2013-07-31 Thread Vincent Habchi
Le 31 juil. 2013 à 22:38, Greg Parker gpar...@apple.com a écrit : Not necessarily. If you have long string and you want to clear it and re-fill it with another long string, then it may be faster to use -deleteCharactersInRange: in order to avoid memory re-allocation overhead. But that

Mixing Obj-C and C methods

2013-07-30 Thread Vincent Habchi
Hi everybody, I have a very simple question: if I embed a C-function (more precisely, a callback from an external C-library) in an Obj-C object, can I expect this function to behave like a regular method? I.e. can it freely access ‘self’ and other attributes? Thanks a lot! Vincent

Re: Mixing Obj-C and C methods

2013-07-30 Thread Vincent Habchi
Rick, thanks for answering, because what I found on the Internet seems contradictory. Some say that if the C function is placed inside the implementation block, then it can access attributes as if it were a true Obj-C method; some say otherwise. So it’s a bit difficult to find a definitive

Re: Mixing Obj-C and C methods

2013-07-30 Thread Vincent Habchi
Hi and thanks a lot to anybody! I posted some answer before, but since it included a screenshot I’m afraid it didn’t make it through. I was just trying to show that when I access an iVar of ‘self’ in the C-function (e.g. self - _egg), Xcode autocompletion pop-up shows the iVars list, but each

Re: Apple Developer Update

2013-07-25 Thread Vincent Habchi
Kyle, Following that line of thought, how many of you actually think griping on this list is going to accomplish anything other than filling up everyone else's inboxes from what would otherwise be one of the remaining useful channels? While I agree with you, I think it is also essential to

Re: developer.apple.com under maintenance for a few days now?

2013-07-21 Thread vincent habchi
On 21 juil. 2013, at 17:04, Eric E. Dolecki edole...@gmail.com wrote: Outside of doing that, I'm not sure why things would be down for such an extended period of time. The fact that the main page is still accessible means the server did not crash. Could be the database with all developers

Re: The cost of using objects rather than plain C variables

2013-07-12 Thread Vincent Habchi
Hi! Sorry for this late answer, I was a bit swamped lately. NSData wouldn't let you, but NSMutableData would, with methods like appendBytes:length:, appendData:, increaseLengthBy:, etc. The underlying buffer might have to move around if it cannot be extended in place, just as it would if

Re: The cost of using objects rather than plain C variables

2013-07-08 Thread Vincent Habchi
On 8 juil. 2013, at 18:04, Jens Alfke j...@mooseyard.com wrote: On Jul 7, 2013, at 1:37 PM, Frederick Bartram bartr...@acm.org wrote: Have you tried using NSData to store C-arrays? No, since my initial problem was to be able to extend the buffer as the number of primitive read grew. NSData

Another curiosity: IB warnings misplaced view

2013-07-08 Thread Vincent Habchi
Hi again, when I compile my storyboard, I get a bunch of these warnings, one for each subview. For example: Explo3D/Explo3D/Base.lproj/Main_iPhone.storyboard Frame for Label - Label will be different at run time. Explo3D/Explo3D/Base.lproj/Main_iPhone.storyboard Horizontal position will be

The cost of using objects rather than plain C variables

2013-07-07 Thread Vincent Habchi
Hi everybody, the tiny iOS app I work on currently begins by decoding 3D data in the form of a TIN: vertices, normals then triangles. There are about 200 000 of the two formers, and 400 000 of the latters (needless to say, at a later stage, I am going to improve speed by using some kind of

Re: The cost of using objects rather than plain C variables

2013-07-07 Thread Vincent Habchi
Hi! Thanks to all for your quick and kind answers. You're comparing apples to oranges. That’s a nice way of putting it! You were storing strings for each numeric value, now you're storing doubles. Actually just floats, in order to save space. You could have tried NSNumber objects instead

Re: The cost of using objects rather than plain C variables

2013-07-07 Thread Vincent Habchi
Quincey, Each NSString has at least 4 bytes of overhead (the 'isa' pointer); each character is UTF-16; each object is a multiple of 16 bytes. Your values may not fit in the remaining 12 bytes of the smallest object (an input format something like '0.xe-nn', which isn't an unlikely format,

Re: The cost of using objects rather than plain C variables

2013-07-07 Thread Vincent Habchi
Hi! You’re right to point that CFtypes exist: I often overlook these and that’s stupid of me. Why? What's wrong with a simple array? Nothing. Well, at first, I was looking for a self expanding array, given that I didn’t know the size beforehand. (Or, I would argue, though it's not a

Re: iOS OpenGL ES woes

2013-07-03 Thread Vincent Habchi
David, BTW, is it possible to add subviews to a CAEAGLLayer backed view? I have been fighting all day to show a progress indicator atop this backed view, in vain. Thanks! Vincent ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not

Re: iOS OpenGL ES woes

2013-07-03 Thread vincent habchi
David, Yes, […] Thanks for your quick answer and your kindness, as usual! Then something is wrong with my setup, I’ll investigate further. Have a great day! Vincent ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin

iOS OpenGL ES woes

2013-07-02 Thread Vincent Habchi
Hi folks, I am trying to develop a demo application (DEM viewer) on iOS for educational purposes. I am fairly fluent with OpenGL but this my first try at an iOS app (I usually do OS X development). My problem is that albeit I seem to have abided by all terms of what’s described in the ‘Drawing

Re: iOS OpenGL ES woes

2013-07-02 Thread vincent habchi
Uh, I just realized I had overlooked the call to EAGLContext presentRenderbuffer. It should work better when I add it. Sorry for the noise, but this is a bit confusing at start! Vincent ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please

Re: iOS OpenGL ES woes

2013-07-02 Thread Vincent Habchi
On 2 juil. 2013, at 17:54, Vincent Habchi vi...@macports.org wrote: Uh, I just realized I had overlooked the call to EAGLContext presentRenderbuffer. It should work better when I add it. It doesn’t work even with that call added. I don’t really grasp when the CAEAGLLayer gets somehow hooked

Re: iOS OpenGL ES woes

2013-07-02 Thread Vincent Habchi
Hi David, I made it work eventually. I just figured out both the frame buffer and the render buffer must be bound before drawing. Now I have a fine blue screen, so I guess I can go ahead after a good sleep. :) Honestly my first question would be why not use GLKit (which the Xcode OpenGL ES

Re: Accelerate Framework?

2013-06-16 Thread vincent habchi
Hi Rick, Where to go for questions about the Accelerate Framework? I have a fairly good knowledge of the Accelerate framework and its opensource counterpart, Atlas. If I might be of any help, don’t hesitate. Vincent ___ Cocoa-dev mailing list

Re: LTO and debugging

2013-03-21 Thread vincent habchi
On 21 mars 2013, at 16:45, Andreas Grosam agro...@onlinehome.de wrote: On 21.03.2013, at 15:05, Luca Ciciriello wrote: Is it normal that no breakpoint is reached (disabled?) when the Link-Time Optimization is enabled? Luca. This is probably the effect of the optimizer: there is

Re: Floating-point differences between ARM processors

2013-01-07 Thread vincent habchi
On 7 janv. 2013, at 20:22, Greg Parker gpar...@apple.com wrote: IEEE 754 guarantees exact results for + - * / sqrt. Everything else is implementation-defined. That’s why I suggested a mixed approach combining exact table lookup and a refinement via only multiplications and divisions. It

Re: Floating-point differences between ARM processors

2013-01-05 Thread vincent habchi
On 5 janv. 2013, at 09:02, Rick Mann rm...@latencyzero.com wrote: Well, that shouldn't matter. If a double is a double, then even if it can't do it in hardware, it should be done in software, and the result should be the same. Of course. But, if I am not mistaken, the IEEE norm does not

Re: Floating-point differences between ARM processors

2013-01-04 Thread vincent habchi
On 5 janv. 2013, at 03:38, Rick Mann rm...@latencyzero.com wrote: So, we've run into an issue in our physics simulation where the floating point results from cos() (and probably other intrinsics) are different between Apple ARM 5 and Apple ARM 6 processors. This is not much of a surprise.

Re: MKMapView compositing

2012-11-05 Thread Vincent Habchi
Hi Eve, Use overlays. Look into ClassicMap: https://github.com/kishikawakatsumi/ClassicMap which is doing about the same thing using likely illegally obtained Google tiles. I’ll have a look. It is actually displaying maps *over* a cartographic background (and not some cartographic layer

Re: MKMapView compositing

2012-11-05 Thread Vincent Habchi
Eve, When you have alpha transparency you can either blend the aerial tiles into the map view or blend the entire map view into the aerial tiles. Either way, I think, you can get something that looks good. Semitransparent overlays consisted of aerial tiles might actually work, and it is

MKMapView compositing

2012-11-04 Thread vincent habchi
Hi folks, for a demo app, think of it as some kind of “geographic mashup”, I’d like to display a MKMapView on an aerial photographic background that I fetch from a remote server, and be able to vary its transparency. Before diving into it, is there any other option except embedding the

Re: Extremely low fps during transparent NSWindow resize

2012-11-04 Thread Vincent Habchi
Andrea, if (self = [super initWithContentRect: contentRect styleMask: NSBorderlessWindowMask backing: bufferingType defer: flag]) Sei sicuro bufferingType è uguale a NSBackingStoreBuffered?

Re: Event loop expiration date insight

2012-10-31 Thread Vincent Habchi
I'm handling some mouse dragging tasks modally by implementing my own modal event loop using [NSApp nextEventMatchingMask:untilDate:inMode:dequeue:]. I'm wondering what is the usual correct thing to pass for the 'untilDate' parameter. For a long time I've been using [NSDate distantFuture],

Re: printing Utf8

2012-10-31 Thread Vincent Habchi
Le 31 oct. 2012 à 16:17, lbland lbl...@vvi.com a écrit : hi- On Oct 31, 2012, at 10:41 AM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote: NSString *s = @ร่วมรส; Not supported. The compiler should be issuing a warning. You need to escape the characters using a UTF encoding. I

Re: how to clip inside a path

2012-10-30 Thread Vincent Habchi
On 30 oct. 2012, at 01:24, Jens Alfke j...@mooseyard.com wrote: There was a pretty serious proposal floated on objc-language earlier this year (by a non-Apple person), but as far as I can tell it devolved into a bunch of arguing over details, and didn’t go anywhere. (And further discussion

Re: how to clip inside a path

2012-10-30 Thread Vincent Habchi
On 30 oct. 2012, at 07:25, Vincent Habchi vi...@macports.org wrote: http://www.eerolanguage.org. I maintain the package on MacPorts, if you want to have a try. Should be http://eerolanguage.org. There is no leading www. V. ___ Cocoa-dev mailing list

ARC question

2012-10-29 Thread Vincent Habchi
Hi folks, before aught else, all my thoughts to those of you in the Eastern coast that are preparing themselves for a bunch of bleak days… I’ve just a silly question (I know, I don’t post very often and I apologize for that): I need to convert a HTML style string, with “ escapes” to normal

Re: More NSFileManager Issues

2012-10-29 Thread Vincent Habchi
Since I am here… Le 29 oct. 2012 à 10:56, Andreas Grosam agro...@onlinehome.de a écrit : With NSFileManager I've created a file in the temporary directory. Attempting to delete it, fails: NSFileManager* fm = [[NSFileManager alloc] init]; NSLog(@tmp file: %@,

Re: ARC question

2012-10-29 Thread Vincent Habchi
Le 29 oct. 2012 à 12:34, Mike Abdullah cocoa...@mikeabdullah.net a écrit : The code is a fairly inefficient to start with, but no, it's not going to leak. Thanks. I am aware of this, but since this code is going to be part of a didactic article on writing a WMS client, I emphasize clarity

Re: ARC question

2012-10-29 Thread Vincent Habchi
Le 29 oct. 2012 à 12:53, Roland King r...@rols.org a écrit : Does CFURLCreateStringByReplacingPercentEscapes() not do this for you? I often use it going the other way from text to escaped text, not just for URLs. AFAIK, CFURLCreateStringByReplacingPercentEscapes() substitues special chars

Re: createDirectoryAtPath:withIntermediateDirectories:attributes:error: Returns NO when it exists

2012-10-29 Thread Vincent Habchi
Le 29 oct. 2012 à 13:23, Andreas Grosam agro...@onlinehome.de a écrit : T$ ls -al total 816 drwx-- 10 me staff 340 29 Okt 13:15 . Did you try with your . directory having permissions drwxr-xr-x? V. ___ Cocoa-dev mailing list

Re: ARC question

2012-10-29 Thread Vincent Habchi
Le 29 oct. 2012 à 14:34, Mike Abdullah cocoa...@mikeabdullah.net a écrit : Well, you can ask CFXMLCreateStringByUnescapingEntities() to do this on OS X, although if I recall all the CFXML functions have now sadly been deprecated. The source code for it should still be available if you search

Re: ARC question

2012-10-29 Thread Vincent Habchi
Le 29 oct. 2012 à 15:00, Kyle Sluder k...@ksluder.com a écrit : On Oct 29, 2012, at 6:55 AM, Vincent Habchi vi...@macports.org wrote: Actually, it's not. From the docs: Note: Currently, only the standard predefined entities are supported; passing NULL for entitiesDictionary is sufficient

Re: how to clip inside a path

2012-10-29 Thread Vincent Habchi
Le 29 oct. 2012 à 15:26, Roland King r...@rols.org a écrit : Doesn't help I'm afraid. If I only have that one, single, path, the even-odd rule returns odd inside the path/circle so it's inside and the non-zero returns either 1 or -1 depending on the order of the control points so either

Re: ARC question

2012-10-29 Thread Vincent Habchi
Le 29 oct. 2012 à 15:30, glenn andreas gandr...@me.com a écrit : Given that there are also decimal (#DD;) and hexadecimal escape sequences (#x;) in HTML, trying to support those through the use of a dictionary of sequence - replacement is going to be impractical. Hopefully, I have only

Re: ARC question

2012-10-29 Thread Vincent Habchi
That’s blatant. […] I meant obvious. I just read the use of “blatant” for “obvious” was incorrect. My bad. Vincent ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact

Re: how to clip inside a path

2012-10-29 Thread Vincent Habchi
Roland, Someone suggested a clip mask, that might work if I can't get the paths to go; I feel for some reason that a clip mask would be less efficient and this should be totally do-able with paths and paths are what I naturally have here. I am not sure if would be less efficient. If I

Re: ARC question

2012-10-29 Thread Vincent Habchi
Mike: How are those accented characters represented in your HTML? Thanks for pointing this. It turns out, after examination, that the accented chars are already provided in UTF-8, and that only amp; and apos; need to be translated. Strange. I was sure I saw other escapes around on some

Re: Classes incompatible with weak references

2012-08-16 Thread Vincent Habchi
On 16 août 2012, at 03:11, Britt Durbrow bdurb...@rattlesnakehillsoftworks.com wrote: objects must be 16-byte aligned - and that alignment requirement isn't likely to go down, but rather up in the future; using the low bits doesn't really cause the same issue that using the high bits did.

Re: Classes incompatible with weak references

2012-08-15 Thread Vincent Habchi
Le 13 août 2012, à 23:47, Mike Abdullah cocoa...@mikeabdullah.net scripsit: An idea I've vaguely wondered about would be turning the isa variable into a tagged pointer. If you know nothing is accessing it directly (to do so was deprecated with the modern runtime), then, say, the last 4 bits

Re: 32-bit on 10.8

2012-08-12 Thread Vincent Habchi
Le 12 août 2012, à 04:09, koko k...@highrolls.net écrivit : Is 64-bit the end or will there be 128-bit? The term 64-bit is misleading. There are several parameters that can be quantified by a number of bits: internal width of registers, of the data and address buses, both internal and

Re: 32-bit on 10.8

2012-08-11 Thread Vincent Habchi
Le 11 août 2012, à 05:05, Eric Wing ewmail...@gmail.com écrivit: There are actually other compelling reasons to move to 64-bit that have nothing to do with the amount of addressable memory or max int. For example, i386 is register starved which has implications on performance. The modern CPU

Re: Stupid block syntax!

2012-07-12 Thread Vincent Habchi
Le 5 juil. 2012 à 20:23, Greg Parker gpar...@apple.com a écrit : Note that C++ allows overloading of almost everything, including binary ^, but it doesn't allow creation of new operators like unary ^. Thanks Greg for that precision. Vincent ___

Re: Stupid block syntax!

2012-07-09 Thread Vincent Habchi
On 5 juil. 2012, at 02:45, Graham Cox graham@bigpond.com wrote: I read recently that the '^' was the only possible operator that could be used due to the inherent grammar of C meaning that anything else would have introduced ambiguity If I remember correctly, it has more to do with C++

Re: NSInteger vs int vs int32_t

2012-07-09 Thread Vincent Habchi
On 5 juil. 2012, at 07:41, Nathan Day nathan_...@mac.com wrote: It must if 64bits is read in that mean you have just read in two 32bit words. So to put a 32bit word in a 64bit register some bit must be ditched, in some way, and if the CPU is optimise to only work with 64bit word alignment

Re: NSInteger vs int vs int32_t

2012-07-09 Thread vincent habchi
On 9 juil. 2012, at 20:40, Greg Parker gpar...@apple.com wrote: On Jul 9, 2012, at 5:44 AM, Vincent Habchi vi...@macports.org wrote: Modern CPU do not enforce strict alignment for integer access. You can perfectly access a Dword (64 bits) at any address, even or odd. It is just more

Transparent NSTextField

2012-06-28 Thread Vincent Habchi
Hi everybody, I’m trying to add a transparent editable NSTextField to a view. As long as the field is not editable (e.g. a label), everything is fine; but with an editable field, I get a background fill. I imagine this is under the window NSTextView responsibility. Has someone already

Re: Transparent NSTextField

2012-06-28 Thread Vincent Habchi
My next step (which is my way of saying I haven't tried it) would be to investigate -[NSWindowDelegate windowWillReturnFieldEditor:toObject:], and set the field editor's backgroundColor (it's in NSText) to the transparent color. I'll do that, yes. Besides, I need to override the cursor to

Re: Transparent NSTextField

2012-06-28 Thread Vincent Habchi
Le 28 juin 2012 à 18:30, Charlie Dickman 3tothe...@comcast.net a écrit : In IB you can set the Draws Background property to no (uncheck the box) or send the NSTextField a SetDrawsBackground: NO message. Yep, but that’s working only for non-editable fields. In an editable field, I get a

CALayer coordinates question

2012-06-25 Thread Vincent Habchi
Hi there, briefly speaking, I have a sublayer that I draw using various Bezier paths and other goodies (code generated by PaintCode™). No matter where I set the frame of my sublayer, or what I do with bounds, the drawing always appear in the lower left corner of the parent NSView. Is that

Re: WWDC

2012-04-25 Thread vincent habchi
•••—•— On 25 avr. 2012, at 19:19, Rick Mann rm...@latencyzero.com wrote: Is WWDC really sold out already? That was faster than the eye can wink. I wonder how many tickets are actually offered. Vincent ___ Cocoa-dev mailing list

Re: WWDC

2012-04-25 Thread Vincent Habchi
On 25 avr. 2012, at 20:41, Mikkel Islay my.inputstr...@googlemail.com wrote: apps and frameworks. I agree it is a pity many who really want to go, can't. Having said that, there are a number of community-organised conventions in the US and Europe throughout the year, if you can't attend

Re: Stenography

2012-04-02 Thread vincent habchi
Le 2 avr. 2012 à 14:37, Reaves, Timothy trea...@silverfieldstech.com a écrit : He wants to write an app that will take a picture of shorthand and turn it in to text. Stenography (Greek stenos-: reduced) is an obsolete system of script secretaries used to take notes on the fly. I’m not sure,

Re: Xcode - An Apple Embarrassment

2012-03-02 Thread vincent habchi
not everyone uses Xcode. I vaguely remember hearing that the Kernel folks mainly use Makefiles. Which makes sense considering how much of that is open source, cross-platform etc. I recently bought a book on OpenCL partly written by some guy at Apple (can’t remember the title right now since

Re: Formatter for angle display?

2012-01-18 Thread Vincent Habchi
Mike, The best you can hope for there is either: A) Subclass NSNumberFormatter. Use IB to set an existing number formatter to use your subclass B) Subclass NSFormatter directly. Drag a plain NSObject into the xib from the library. Set it to be your subclass. Hook up the formatter

Formatter for angle display?

2012-01-17 Thread Vincent Habchi
Hi everybody, I’m trying to display decimal angles in DMS format (e.g. : 10,5 - 10° 30'). Apparently, NSNumberFormatter does not know about angles. Has anybody heard of a third party NSFormatter class (NSAngleFormatter?) or do I have to develop a custom formatter from scratch? If nothing

Re: Formatter for angle display?

2012-01-17 Thread vincent habchi
Sean, NSNumberFormatter does not support that. But writing such a custom formatter would be a few dozen line of code, and pretty straightforward. I agree this is fairly simple; I just wanted to avoid the task altogether! :) BTW, such custom formatter would, of course, not be usable in IB,

Does NSOpenGLView override -isOpaque?

2012-01-06 Thread Vincent Habchi
Hi there, and happy new year to everybody! I had to battle to correctly display an NSOpenGLView whose context was set to draw under (Glint swapInt = 1; [[self openGLContext] setValues:swapInt forParameter:NSOpenGLCPSwapInterval];). It seems that NSOpenGLView silently overrides the -isOpaque

Re: Does NSOpenGLView override -isOpaque?

2012-01-06 Thread Vincent Habchi
I had to battle to correctly display an NSOpenGLView whose context was set to draw under (Glint swapInt = 1; [[self openGLContext] setValues:swapInt forParameter:NSOpenGLCPSwapInterval];). It seems that NSOpenGLView silently overrides the -isOpaque method of NSView Oops, that was not the

Re: Does NSOpenGLView override -isOpaque?

2012-01-06 Thread vincent habchi
Corbin, Yes, NSOpenGLView has: - (BOOL)isOpaque { return YES; } Thanks for your answer! Could the documentation then mention than when an NSOpenGLView occupies the whole frame of its parent window, and when its context is set to draw under, one should override -isOpaque to return NO,

Re: NSString looses Umlaute

2011-12-22 Thread vincent habchi
Le 22 déc. 2011 à 09:13, Alexander Reichstadt l...@mac.com a écrit : Yes, you are right, but it does not make a difference, I tried all encodings. Did you try UTF-8 encoding? Besides, if you open your file with an external application, e.g. OpenOffice or TextWrangler, what happens? Vincent

Re: NSString looses Umlaute

2011-12-22 Thread Vincent Habchi
Yes, tried NSUTF8StringEncoding, I really tried all the ones I found in the NSString encoding documentation. When I import this file as DBF into FileMaker Pro it looks just as bad. But when I import it into a MySql it works fine. Here an example of what NSLog says: R\U0094h.,

Re: NSString looses Umlaute

2011-12-22 Thread Vincent Habchi
OK, I found a way to import it into FileMaker. It looks good when I use DOS Encoding. But when I use kCFStringEncoding derivates I had no luck. I know CF and NSString is toll free bridged, but does this apply to the encodings as well? There is some post from 2000 by Ali Ozer that would

Re: Carousel - like control for Mac OS

2011-12-21 Thread Vincent Habchi
And then, I do not have much space on the window to put this coverflow (while a strip can be small and still look good), plus a strip can display more than 1 item at once, and the user can click on any of these items without too much of scrolling). Why don’t you use CALayers (more

Re: Carousel - like control for Mac OS

2011-12-21 Thread vincent habchi
Nick, I cannot elaborate much on this and give you code (not because it is somehow confidential, but just because it is a general idea I don’t have implemented, though I’m familiar with CAScrollLayers). The idea is thus: 1. Draw a normal NSView that you back with a CAScrollLayer. Give it the

Does NSImageBitmapRep -drawInRect:fromRect:…hints: takes hints into account?

2011-11-18 Thread Vincent Habchi
Hi there, I’m trying to draw a flipped NSImageBitmapRep object (data comes out of an OpenGL depth buffer) in a NSView. I thought I could set up an appropriate affine transform (x’ = x, y’ = height - y), embed it in a dictionary and put that in the hints parameter of a

Re: Does NSImageBitmapRep -drawInRect:fromRect:…hints: takes hints into account?

2011-11-18 Thread Vincent Habchi
PS : Of course, a workaround is to flip the view coordinates thus: [myView translateOriginToPoint:NSMakePoint(0, [self frame].size.height)]; [myView scaleUnitSquareToSize:NSMakeSize(1, -1)]; but it still does not explain why -drawInRect:fromRect:…hints: seems to ignore the hints. Vincent

Re: Does NSImageBitmapRep -drawInRect:fromRect:…hints: takes hints into account?

2011-11-18 Thread vincent habchi
Kyle, Re-read the NSImage: deprecating -[NSImage setFlipped:], adding a drawing method that respects context flippedness section of the 10.6 AppKit release notes to make sure you're correctly using the flipped property and the respectFlipped: argument to -drawInRect:: : I’ve tried

Re: Does NSImageBitmapRep -drawInRect:fromRect:…hints: takes hints into account?

2011-11-18 Thread vincent habchi
Le 18 nov. 2011 à 19:45, Kyle Sluder a écrit : Yes, that would indeed be true. I just assumed you were adding the image rep to an NSImage and using -[NSImage drawInRect::]. I considered that for a while, but since -drawInRect exists for NSBitmapImageRep, I thought it was useless.

Re: CFURLWriteDataAndPropertiesToResource as root?

2011-08-08 Thread vincent habchi
Some apps, including iTunes, using /Users/Shared/ for DRM. It may still be world-writable in Lion [which I can't confirm as I haven't switched yet...come on 10.7.2...]. I can confirm /Users/Shared is world writable on 10.7; besides, it has the sticky (8) bit set, just like /tmp. Vincent

Re: Menu Item Key Equivalent

2011-08-05 Thread vincent habchi
Le 5 août 2011 à 08:42, Kyle Sluder kyle.slu...@gmail.com a écrit : Not being an Aperture user myself: Is Aperture a Cocoa app? Do these key equivalents work if the main content view isn't first responder. Are they even assigned in the menus? Aperture runs in 64-bit mode and, AFAIK is built

Re: Return causes EXC_BAD_ACCESS

2011-07-31 Thread vincent habchi
Memory is virtual, the addresses you appear to be working with are not real (i.e. they don't refer to the real address of the physical RAM underneath). Instead, a bit of hardware translates these to the real addresses as needed at some level far below the perception of your program. You

Re: Return causes EXC_BAD_ACCESS

2011-07-31 Thread vincent habchi
Le 31 juil. 2011 à 09:27, Ron Hunsinger a écrit : When a process forks, the child and parent get different virtual memory maps that, for the time being, happen to point to the same physical memory pages. The sharing is an implementation detail, for optimization. Conceptually, the parent's

Re: A trap with full screen in Lion

2011-07-29 Thread vincent habchi
Le 29 juil. 2011 à 04:50, Gideon King a écrit : Sorry - missed an important bit of info - this applies for a view that is in the toolbar. So far as I am aware, it The toolbar is supposed to disappear in full screen mode, no? V. ___ Cocoa-dev

Re: Does anyone else dislike Xcode 4?

2011-07-25 Thread vincent habchi
Well, I wouldn’t want to throw more oil on the fire, as the French saying goes, but, in my opinion, this looks like tycoons arguing about the color of their Ferraris or which Bordeaux grand cru (or whatever else). I used to be a Unix (NetBSD) developer, coding with vi(m), and managing projects

Re: Does anyone else dislike Xcode 4?

2011-07-25 Thread vincent habchi
Salut Jean-Daniel, (It is always fun talking to other French speaking people in English :)) Xcode is a tool we have to use all the day. This is not just a luxury product we don't need at all. I disagree. You can still code any Apple application with vi, make, clang, dyld, ar, whatever else

Re: Writing global preferences file into /Library/Preferences (OS X Lion)

2011-07-21 Thread vincent habchi
Le 21 juil. 2011 à 07:24, Peter C a écrit : Vincent, I meant changing to write to ~/Library/Preferences, user directory. Ah, okay. But do not forget to use the proper API to get the ad hoc ROOT directory! Vincent___ Cocoa-dev mailing list

Re: Windows get released on 10.6, leak on 10.7

2011-07-21 Thread vincent habchi
I'm looking for ideas on what might cause this behavior: an existing app that was compiled with 10.6 SDK runs fine on 10.6 and 10.5. When run on 10.7, document windows (and their window controllers and NSDocuments) do not get released when the window is closed. NSDocuments on 10.7 are

Re: Lion changes

2011-07-21 Thread vincent habchi
Hi, NSString *tempFilePath = @/Users/john/OutCocoa.txt; NSString *commandLine = [NSString stringWithFormat:@/sbin/ifconfig en0 | grep ether | cut -d' ' -f 2 \%@\ 21, tempFilePath]; sprintf(cmd, /bin/sh -c %s, [commandLine UTF8String]); Quote the command. sprintf (cmd, /bin/sh -c

Re: Timing some code execution outside Instruments

2011-07-21 Thread vincent habchi
I'm curious if there is a way to NSLog how long some code takes to execute (outside of using Instruments). In Flash one can use getTimer and see how much time passed inline. Is there a way to do this in Obj-C? You can use the basic old std C routines like clock (). Vincent

Re: Modal panel and -initialFirstResponder

2011-07-20 Thread Vincent Habchi
Hi Quincey, What does shows (modally) mean? It's a modal panel, displayed though a -[NSApp runModalForWindow:]. The initial first responder is the view that's *going to be* the first responder, when it's window becomes key. Panels don't become key at the same times as regular windows, so

Re: Writing global preferences file into /Library/Preferences (OS X Lion)

2011-07-20 Thread vincent habchi
I have think of authorization code but it seems now Apple does not want others to write into this directory. Better to change code to adapt to new settings. You will have to. Sandboxing, if you adopt it, won’t let you write in there anyway. Vincent

Re: Why are these objects still faults?

2011-07-19 Thread vincent habchi
Le 19 juil. 2011 à 07:21, Gideon King gid...@novamind.com a écrit : But I told it to pre-fetch the view relationship. Any ideas why it wouldn't work? Maybe a silly answer, but isn’it a side effect of lazy loading? V. ___ Cocoa-dev mailing list

Re: Optimizing a loop

2011-07-19 Thread Vincent Habchi
I have an NSMutableArray that contains a MPMediaItem and song title as it's key. I then take a search string and loop through the entire NSMutableArray looking for a fuzzy match. It works very well, the problem is that the array contains 1,777 items (could contain more) and the search takes

Re: Optimizing a loop

2011-07-19 Thread Vincent Habchi
Oops - I meant to say it's an NSMutableDictionary! What might a quick stubbed example of that be? Not sure I am following. How much speed would it generally gain? Simple example. Init a NSMutableDictionary. For each string, compute a hash key as the sum of all chars composing it (in a

  1   2   3   4   >