Re: How to highlight only part of the text in a text field?

2010-09-13 Thread Vincent Habchi
Le 13 sept. 2010 à 16:46, Ulf Dunkel a écrit : > The myTextField content has already be composed (like e.g. @"foo: bar"). > > I would like to see only "bar" preselected when the window opens and the > myTextField is selected for editing. > > I guess you folks know how to, while I poke through t

Round slider size

2010-09-15 Thread Vincent Habchi
Hi there, can someone confirm me there is no way to increase the size of a round NSSlider beyond what is provided by the "regular" choice? Thanks a lot, Vincent___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests o

CAScrollLayer rotation through -setAffineTransform

2010-09-15 Thread Vincent Habchi
Hi everybody, I'm trying to rotate a drawing made up of multiples contiguous CALayers, each one sublayer of a CAScrollLayer superlayer. If I set up an affine transform in the scroll layer, which seems the only practical way to do a global rotation of all sublayers, I get very strange results: t

Why would [NSArrayController setSelectionIndex] fail?

2010-10-27 Thread vincent habchi
Hi there, sorry for being rather terse these days, I am conscious I tend to tap too much and help too few. Small question: I have a NSArrayController managing a Core data entity array. I want to alter the selection via -setSelectionIndex, and it fails (the index won't change). The documentation

Re: Why would [NSArrayController setSelectionIndex] fail?

2010-10-27 Thread vincent habchi
Le 28 oct. 2010 à 00:02, Keary Suska a écrit : > On Oct 27, 2010, at 3:30 PM, vincent habchi wrote: > >> Small question: I have a NSArrayController managing a Core data entity >> array. I want to alter the selection via -setSelectionIndex, and it fails >> (the

Re: Why would [NSArrayController setSelectionIndex] fail?

2010-10-27 Thread vincent habchi
Le 28 oct. 2010 à 00:02, Keary Suska a écrit : Forget it: I am a moron. I had an old KVO method, that I thought had gone, which was forcing the selection to a specified index upon change. Conclusion: never post a message at 11pm without a prior deep slumber pause. Sorry for the noise and thank

NSColorWell in a NSTableView

2010-11-04 Thread vincent habchi
Hi to all, I would like to put a NSColorWell into a column of a NSTableView. If what I have dug out on the net is not wrong, I can infer there are two main ways to achieve this: 1. Subclass a NSImageCell, draw a custom rectangle inside and handle actions in order to mimic a NSColorWell; 2. Wri

Re: Cannot find protocol declaration for 'NSTableViewDelegate'

2010-11-04 Thread vincent habchi
Le 5 nov. 2010 à 05:48, Thomas Wetmore a écrit : > I've been staring at this error message for the past hour. > > When trying to compile the code ... > > - > #import > > @interface TWInterpreterController : NSWindowController > ... > @end > ---

Re: Switching app type from background only to full UI, and back?

2010-11-04 Thread vincent habchi
Le 5 nov. 2010 à 01:46, Jim Wintermyre a écrit : > I have an app that needs to always be running in the background. Most of the > time it is just a faceless daemon, but for some complicated reasons, > sometimes it needs to display various windows, and I can't easily factor out > these UI eleme

Re: Threads and run loops

2010-11-05 Thread Vincent Habchi
Le 5 nov. 2010 à 08:29, Oleg Krupnov a écrit : > Hi, > > I've got a couple of questions: > > 1. What happens if I send a message via -performSelector:onThread: > from one thread to another, before the other thread has time to enter > its run loop? Is the message going to be lost? > > 2. Is ther

Re: NSColorWell in a NSTableView

2010-11-06 Thread vincent habchi
Le 6 nov. 2010 à 00:46, Corbin Dunn a écrit : […] > See the AnimatedTableView demo I wrote for WWDC a few years ago. > > http://developer.apple.com/library/mac/#samplecode/AnimatedTableView/Introduction/Intro.html Thanks Corbin, have a nice week-end! Vincent

Re: Synchronizing iOS redraw

2010-11-07 Thread vincent habchi
Le 8 nov. 2010 à 06:04, Rick Mann a écrit : > I have a need to synchronize the actual display update of a UIView hierarchy > with real time. In my case, I update the display once per second, and I want > the display to update *on* the second. Maybe you could set a timer to fire every second, a

Re: NSTextFieldCell multi-line

2010-11-08 Thread Vincent Habchi
Le 8 nov. 2010 à 09:55, Micha Fuhrmann a écrit : > But how can I compute the amount screen pixels my NSString that's going into > the cell will take to return a height with the proper number of lines? I must > be missing something, it's just too silly. Assuming that "font" is a NSFont * ivar on

Irregular layout of radio buttons

2010-11-08 Thread Vincent Habchi
Hi everybody, roughly, I would like to set up a view with radio buttons laid out on random places (well, actually not random, but from the buttons point of view, yes). I suppose I can't use a NSMatrix, so I'll have to use regular buttons (mimicking radio ones) and simulate radio behavior in my

Re: Irregular layout of radio buttons

2010-11-08 Thread vincent habchi
Quincey: > It sounds like you're trying to do something roughly analogous to pins in > MapKit. That is, you have a number of indicators, only one of which is in > some kind of distinguished state. I think it's a mistake to think of these as > radio buttons, even though radio button sets also ha

Re: Irregular layout of radio buttons

2010-11-08 Thread vincent habchi
Le 8 nov. 2010 à 18:35, Keary Suska a écrit : > Well, kind of. You can still use radio buttons--you will simply have to mimic > the "radio" effect across the unrelated buttons. Not difficult really... Indeed, that's not very hard to do. But I just expected to be able to define radio button grou

Re: Irregular layout of radio buttons

2010-11-08 Thread vincent habchi
Quincey: > Ah, I see -- I think. You're saying that the radio buttons are aligned > normally (left alignment), but are unevenly spaced vertically due to > interspersed auxiliary controls for each button? That's correct. > In that case, I agree that you still have proper radio button behavior,

Re: Irregular layout of radio buttons

2010-11-08 Thread vincent habchi
Le 8 nov. 2010 à 22:22, Lee Ann Rucker a écrit : > It is annoying that you can't do it; Java let you make a group of radio > buttons without affecting their layout. Well… I've banned Java from my world a long time ago! :) > We have several places where we need this, so I created a custom NSView

NSController controllerEditor:didCommit:… exception

2010-11-14 Thread vincent habchi
Hi everybody, this is a minor annoyance but I'm still puzzled about it. When I launch my application, after -applicationWillFinishLaunching: completes, I get an exception started by -[NSController controllerEditor:didCommit:contextInfo:]. I cannot get a decent traceback to pinpoint what object

Re: NSController controllerEditor:didCommit :… exception

2010-11-14 Thread vincent habchi
Quincey, Kyle: >> While it is true the MOC is not initialized at this point, I don't see what >> could cause this message appear at such an early stage. Can it be linked >> somehow with the initialization of a static object embedded in the >> "MainMenu" NIB? > > If, as it happens, your MainMen

Re: NSController controllerEditor:didCommit :… exception

2010-11-15 Thread Vincent Habchi
Kyle: > The main menu nib is kind of funny. It's loaded differently (or at > least at a different time) than the other nibs. It's much more > sensitive to timing issues like this. > > Who provides the MOC for the controller (another object in the nib?), > and how is it provided (bindings, -setMan

Re: NSController controllerEditor:didCommit :… exception

2010-11-15 Thread vincent habchi
Kyle: > If your app is simple enough, your app delegate could initialize the MOC and > act as the nib's File's Owner. In more complicated applications, I would > instead recommend the app delegate still be in charge of creating the MOC, > but also creating an NSWindowController that loaded the

Re: Get current caret position

2010-11-16 Thread Vincent Habchi
Le 16 nov. 2010 à 15:18, eveningnick eveningnick a écrit : > Basically i want to get the text caret position in Word 2011 active > document window. I want to place a popup window on that location. > Microsoft Word 2011 SDK is not available to public (i am not even sure > if this SDK includes such

Calling a class method with the runtime ObjC API

2010-11-18 Thread vincent habchi
Hi there, this is more a style question than anything else, but I'm sometimes perfectionist. ;) I am also aware it is somewhat borderline with Cocoa (belongs more to ObjC in general); sorry for this. I have designed a kind of a fake class which is, in reality, a simple collection of algorithms

Re: Calling a class method with the runtime ObjC API

2010-11-18 Thread vincent habchi
Le 18 nov. 2010 à 22:31, Joar Wingfors a écrit : >> I supposed I couldn't do such a simple thing as [MyClass perform:selector] >> because the perform: method is an instance one. > > [MyClass performSelector:theSelector]; > Works like a charm. Thanks Joar, next time I shall be more adventu

Custom NSCell and target/action

2010-11-19 Thread Vincent Habchi
Hi there, I'm beginning to figure out something but I'd like to have some (even terse) comments. I have created a custom subclass of NSCell that duplicates the behavior of a NSColorWell: It draws a small colored rectangle inside of its frame, and responds to a click by opening the shared color

Re: Custom NSCell and target/action

2010-11-19 Thread Vincent Habchi
Le 19 nov. 2010 à 15:39, Graham Cox a écrit : > 1. Playing nice with the color panel requires a little care, because it's > shared by not only any color wells in your app, but by any responders that > implement -changeColor: You're right, I'll try to be cautious. > 2. A table column only has o

Re: Custom NSCell and target/action

2010-11-20 Thread vincent habchi
Corbin: > You should just check out the example: > > http://developer.apple.com/library/mac/#samplecode/AnimatedTableView/Introduction/Intro.html > > It will answer a lot of questions. I've done that. It is a nice example, but I think it is meant to people that have already tinkered a bit with

Re: Custom NSCell and target/action

2010-11-20 Thread vincent habchi
Hi Sean! > Do I remember correctly that you're trying to make a cell version of > NSColorWell, so that you can use it in a table? Yes, this (screenshot from my app) : <> > I tried that a few months ago, and got something basically working (with > Corbin's help), but never did get it working ve

Re: Custom NSCell and target/action

2010-11-20 Thread vincent habchi
Oops. Sorry for the few missing -s here and there and the last sentence that should read "so it should not be too intricate". Cheers Vincent___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments

Core data fetch and multithreading

2010-11-21 Thread vincent habchi
Hi there, briefly speaking, I have a Core Data Entity bearing a to-many relationship (therefore an NSSet * iVar). A dialog on the main thread can modify this set, while it may be simultaneously enumerated on a background GCD thread. I have therefore used the managed object context provided mute

Re: Loading NSManagedObjects across NSManagedObjectContexts in an unsaved NSPersistentDocument

2010-11-21 Thread vincent habchi
Le 21 nov. 2010 à 20:09, Dave Zwerdling a écrit : > The issue lies in this: I have a background-thread reader of entities. > Because it is multithreaded, it uses a separate MOC for the entities to be > read. These MOCs have their persistent store coordinator the same as the > document. The b

Re: Core data fetch and multithreading

2010-11-21 Thread vincent habchi
Le 21 nov. 2010 à 21:39, Quincey Morris a écrit : > It's not an ivar, it's a property. You're perfectly right. > You can't modify a NSSet. I suspect you mean "modify this relationship", but > the ambiguity leads me to wonder if you're trying to do something funky here. > Not that it's relevant

Re: Core data fetch and multithreading

2010-11-21 Thread vincent habchi
Quincey: > I think the point is that it's far *less* complex because the code to deal > with a second MOC should be a lot simpler than the thread locking code. Plus, > the chances are that your locking code is wrong. :) (Trust me, that's not a > dig at you personally. But multithreading interlo

Re: Loading NSManagedObjects across NSManagedObjectContexts in an unsaved NSPersistentDocument

2010-11-21 Thread vincent habchi
Le 22 nov. 2010 à 00:38, Dave Zwerdling a écrit : > I have a fetcher which provides managed objects into the persistent store. I > also have a class which needs to read the objects from another MOC because it > is being run in a background thread. You've somehow run into the same issue than

Re: Core data fetch and multithreading

2010-11-22 Thread vincent habchi
Quincey: I am a bit in a hurry, so I will answer quickly: > I think maybe you have more design options here. For example, you can [in > principle, I think] multithread with a single MOC without locks if you pass > "ownership" of the MOC around between threads that make changes, so that > owner

Re: Core data fetch and multithreading

2010-11-23 Thread vincent habchi
Chris, thanks for your answer. > Don't do this. If you're using bindings or KVO at all in your main thread, > you CANNOT lock your context every place you need to in order to make this > safe. Furthermore, I suspect you may not be locking your context on the > background thread because you're

Re: Core data fetch and multithreading

2010-11-23 Thread vincent habchi
Le 24 nov. 2010 à 05:53, Chris Hanson a écrit : > If your code actually looks like this, it's a bug: You're using entityInMOC1 > in another thread. Pass JUST its object ID, not the object itself, from one > thread to the other. I had not thought about this. Thanks for pointing it out. I have n

Re: Core data fetch and multithreading (sequel)

2010-11-25 Thread vincent habchi
Le 24 nov. 2010 à 05:53, Chris Hanson a écrit : > If your code actually looks like this, it's a bug: You're using entityInMOC1 > in another thread. Pass JUST its object ID, not the object itself, from one > thread to the other. Well, it turns out it is caused by something else. But never mind,

CALayers, GCD, CATransaction flush and CGContextFlush

2010-12-09 Thread vincent habchi
Hi there, apparently, it is still mandatory to use - [CALayer setNeedsDisplay] and - [CALayer display], followed by +[CATransaction flush] in order to properly display a CALayer in a background GCD queue. However, it seems that, in -[CALayer drawInContext:], if I don't call explicitly CGContex

Re: Rotated and scaled CALayer

2010-12-11 Thread vincent habchi
> I have discovered, that if I use only CA layers transformations (via > setTransform:), I am getting the same rotated pixels when zooming in. > The only way, which does what I want is: > a) use core image filter to rotate layer (simple CIAffineTransform) > b) use second CI filter to tell renderer

Re: Core Data: Error while saving. Multiple validation errors occurred.

2010-12-14 Thread vincent habchi
Le 14 déc. 2010 à 20:21, "Ayers, Joseph" a écrit : >> I changed a couple attributes of three properties in my data model. Even if >> I trash the previous store, I get the error: >> Error while saving >> Multiple validation errors occurred. >> >> Any idea what is causing this or where to look f

Re: Rotated and scaled CALayer

2010-12-14 Thread Vincent Habchi
Hi Ramas, > No I hadn't. I not quite sure which action (and how) I could use in > addition with Core Animation. I need (near) real-time drawing for > scaling and rotating. So dealing with pixels data for every update is > quite expensive. Unless I am missing something? It is written in the basic

Drawing to two CALayers at once (or pretend to)?

2010-12-27 Thread vincent habchi
Hi everybody – well, I don't have a precise question but rather a general advice. I need to draw a path on a CALayer and simultaneously lay out a text along this same path (that can be made up of straight lines and/or arcs) on another layer (CATextLayer, presumably). Knowing that the path is co

Re: Drawing to two CALayers at once (or pretend to)?

2010-12-27 Thread vincent habchi
Le 27 déc. 2010 à 21:34, Fritz Anderson a écrit : > On 27 Dec 2010, at 2:04 PM, vincent habchi wrote: > >> Knowing that the path is computed by reading values in a database, I'd like >> to avoid a double reading that costs some time (even if there is a cache)

Re: Drawing to two CALayers at once (or pretend to)?

2010-12-27 Thread vincent habchi
Le 27 déc. 2010 à 23:12, Seth Willits a écrit : > That, but I also don't see why the two layers would need to read the data > separately. For example, their delegate can be the one to fetch and read the > data and create the path from it, then save that CG path. When either layer > draws, it wo

Re: Drawing to two CALayers at once (or pretend to)?

2010-12-28 Thread vincent habchi
Raphael, Seth, > I think a single model instance, storing a parsed path, accessed by both > layers sounds like the best approach. If you have lots and lots of paths, > then the memory problem would be secondary to the problem of the time it > would take to parse them from your DB. > > If you h

Re: Stenography

2012-04-02 Thread vincent habchi
Le 2 avr. 2012 à 14:37, "Reaves, Timothy" 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, but I think it is a syll

Re: WWDC

2012-04-25 Thread vincent habchi
•••—•— On 25 avr. 2012, at 19:19, Rick Mann 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 (Cocoa-dev@lists.apple.com) Please

Re: WWDC

2012-04-25 Thread Vincent Habchi
On 25 avr. 2012, at 20:41, Mikkel Islay 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 WWDC, those > provide great op

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 norma

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 succeeded

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 -[ 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 make it look

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

Re: Stupid block syntax!

2012-07-09 Thread Vincent Habchi
On 5 juil. 2012, at 02:45, Graham Cox 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++ overloading. ^ is no

Re: NSInteger vs int vs int32_t

2012-07-09 Thread Vincent Habchi
On 5 juil. 2012, at 07:41, Nathan Day 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 (don't > know how

Re: NSInteger vs int vs int32_t

2012-07-09 Thread vincent habchi
On 9 juil. 2012, at 20:40, Greg Parker wrote: > On Jul 9, 2012, at 5:44 AM, Vincent Habchi 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 efficient to a

Re: Stupid block syntax!

2012-07-12 Thread Vincent Habchi
Le 5 juil. 2012 à 20:23, Greg Parker 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 ___ Cocoa-dev mailing

Re: 32-bit on 10.8

2012-08-11 Thread Vincent Habchi
Le 11 août 2012, à 05:05, Eric Wing é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 architectures co

Re: 32-bit on 10.8

2012-08-12 Thread Vincent Habchi
Le 12 août 2012, à 04:09, koko é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 external, of the variou

Re: Classes incompatible with weak references

2012-08-15 Thread Vincent Habchi
Le 13 août 2012, à 23:47, Mike Abdullah 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 of the > pointer could

Re: Classes incompatible with weak references

2012-08-16 Thread Vincent Habchi
On 16 août 2012, at 03:11, Britt Durbrow 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. Well, I partly disagree. There is n

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 UTF

Re: More NSFileManager Issues

2012-10-29 Thread Vincent Habchi
Since I am here… Le 29 oct. 2012 à 10:56, Andreas Grosam 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: %@", [_input1000 path]); >

Re: ARC question

2012-10-29 Thread Vincent Habchi
Le 29 oct. 2012 à 12:34, Mike Abdullah 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 over performance (this is

Re: ARC question

2012-10-29 Thread Vincent Habchi
Le 29 oct. 2012 à 12:53, Roland King 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 for % in U

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

2012-10-29 Thread Vincent Habchi
Le 29 oct. 2012 à 13:23, Andreas Grosam 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 (Cocoa-dev@lists.apple.com)

Re: ARC question

2012-10-29 Thread Vincent Habchi
Le 29 oct. 2012 à 14:34, Mike Abdullah 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 around. I wasn’t awar

Re: ARC question

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

Re: how to clip inside a path

2012-10-29 Thread Vincent Habchi
Le 29 oct. 2012 à 15:26, Roland King 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 > way so that'

Re: ARC question

2012-10-29 Thread Vincent Habchi
Le 29 oct. 2012 à 15:30, glenn andreas 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 to address

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 t

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 & and ' need to be translated. Strange. I was sure I saw other escapes around on some contents bef

Re: how to clip inside a path

2012-10-29 Thread Vincent Habchi
On 30 oct. 2012, at 01:24, Jens Alfke 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 thereof should

Re: how to clip inside a path

2012-10-30 Thread Vincent Habchi
On 30 oct. 2012, at 07:25, Vincent Habchi 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 (Coc

Re: Event loop expiration date insight

2012-10-30 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 distantFutu

Re: printing Utf8

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

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 MKMapVie

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 NSBackingStoreBuffere

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

Re: Floating-point differences between ARM processors

2013-01-04 Thread vincent habchi
On 5 janv. 2013, at 03:38, Rick Mann 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. Afaik, only 6 inclu

Re: Floating-point differences between ARM processors

2013-01-05 Thread vincent habchi
On 5 janv. 2013, at 09:02, Rick Mann 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 define by itself th

Re: Floating-point differences between ARM processors

2013-01-07 Thread vincent habchi
On 7 janv. 2013, at 20:22, Greg Parker 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 should give, if not

Re: LTO and debugging

2013-03-21 Thread vincent habchi
On 21 mars 2013, at 16:45, Andreas Grosam 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 simply no >

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 (Co

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 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 to the

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: 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 r

The cost of using objects rather than plain C variables

2013-07-06 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 tili

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 inste

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 forma

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 popul

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 wrote: > On Jul 7, 2013, at 1:37 PM, Frederick Bartram 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 would not do that. Alternatively

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 1

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

2013-07-11 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

<    1   2   3   4   >