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

Re: CATransaction setCompletionBlock - Nested Transactions bug?

2010-11-08 Thread Seth Willits
On Nov 8, 2010, at 8:32 AM, Kyle Sluder wrote: >>> But transactions aren't actions. I'd even argue that putting this >>> convenience method on CATransaction might have been a mistake. >> >> >> It's not merely a convenience. We live in an age of blocks; we want the >> block-based approach to re

Re: Working with C-functions in separate NSThreads: via Stack or Heap?

2010-11-08 Thread Frederick C. Lee
My original reply was too long for Cocoa Dev; then I lost it. So this is another (small draft)... It appears I'll be working with blocks, keeping the data/functioning local to the stack & copying data out to the GUI: typedef sat_t (^MyBlock)(); // C - function: int addFoot(int k) { retur

Re: Red spelling underline draws incorrectly in layer-backed views

2010-11-08 Thread David F.
Kyle -- This probably won't help much. But if the root problem was an unflipped context, then I would expect strikethrough and underline to be off as well. I downloaded your test project and added underline and strikethrough to your text and they looked fine. David On Nov 8, 2010, at 5:05 PM

Red spelling underline draws incorrectly in layer-backed views

2010-11-08 Thread Kyle Sluder
Hi list, We've been trying to track down a bug in our CALayer-based view in which the red dotted underlines for misspellings appear in the wrong place. It looks like they're being drawn in an unflipped graphics context, even though we're drawing the text into a CABitmapContext we've created oursel

Re: Irregular layout of radio buttons

2010-11-08 Thread Lee Ann Rucker
On Nov 8, 2010, at 11:17 AM, vincent habchi wrote: > 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

Re: Calling getter on const object

2010-11-08 Thread Jonny Taylor
On 8 Nov 2010, at 20:11, Greg Parker wrote: >> I now think that what I am seeing is a minor parsing sort of issue within >> the compiler (gcc 4.2) when mixing id with blocks. > The more fundamental problem is that gcc C++ does not fully support blocks, > period. Indeed, as soon as it gets a snif

Re: Calling getter on const object

2010-11-08 Thread Greg Parker
On Nov 8, 2010, at 10:53 AM, Jonny Taylor wrote: > I now think that what I am seeing is a minor parsing sort of issue within the > compiler (gcc 4.2) when mixing id with blocks. The more fundamental problem is that gcc C++ does not fully support blocks, period. -- Greg Parker gpar...@app

Re: Launchd and terminal process launch - is there any difference from that process' viewpoint?

2010-11-08 Thread eveningnick eveningnick
Hi Ken, thanks for the answer > > Does the first one has some restrictions when it calls Accessibility > > functions? > It may, depending on the session type.  Have you set LimitLoadToSessionType > in your agent's launchd plist? > no, i haven't specified that > > > This Launch Agent is supposed

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: Launchd and terminal process launch - is there any difference from that process' viewpoint?

2010-11-08 Thread Ken Thomases
On Nov 8, 2010, at 1:10 PM, eveningnick eveningnick wrote: > what is the difference between a process that was started by launchd and the > same process, started via terminal (without sudo command) in Mac OS 10.5? The execution context, as defined in this tech note: http://developer.apple.com/li

Re: Calling getter on const object

2010-11-08 Thread Jonny Taylor
> On Mon, Nov 8, 2010 at 10:53 AM, Jonny Taylor wrote: >>// Both these have errors: "request for member 'frameNumber' >> in 'm', which is of non-class type 'objc_object* const'" >>// when compiled as ObjC++ (.mm file). > > Aha, this is an important point. That's w

Re: Calling getter on const object

2010-11-08 Thread Kyle Sluder
On Mon, Nov 8, 2010 at 10:53 AM, Jonny Taylor wrote: >                // Both these have errors: "request for member 'frameNumber' > in 'm', which is of non-class type 'objc_object* const'" >                // when compiled as ObjC++ (.mm file). Aha, this is an important point. That's why I didn

Re: Irregular layout of radio buttons

2010-11-08 Thread Quincey Morris
On Nov 8, 2010, at 11:16, vincent habchi wrote: > What I have is a set of mutually exclusive options, but each one enables a > box that is located right under them, giving the user the possibility to > enter parameters needed by the option (s)he selected. For example, imagine it > is a French ;

Re: Understanding the Run loop idea and the updating of controls during long operations

2010-11-08 Thread eveningnick eveningnick
Hello Fritz > You are understood: You want to learn how the high-level application and > event API works by trying to recreate (or at least explain) it using > lower-level API. > > You can't do it. At least not in general. > > To provide the high-level functionality, Apple uses the published low-l

Re: Understanding the Run loop idea and the updating of controls during long operations

2010-11-08 Thread eveningnick eveningnick
> > On >10.6 you can safely execute Apple scripts from a secondary thread (see > previous thread on this matter). > > Well, I just checked this using an NSOperation object which executes a > script. The operation can be alternatively executed on the main thread > scheduled by the global queue [NSOp

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

Launchd and terminal process launch - is there any difference from that process' viewpoint?

2010-11-08 Thread eveningnick eveningnick
what is the difference between a process that was started by launchd and the same process, started via terminal (without sudo command) in Mac OS 10.5? Does the first one has some restrictions when it calls Accessibility functions? Here is the Preface to my problem. (i apologize that it is a little

Re: Calling getter on const object

2010-11-08 Thread Jonny Taylor
> I'm new at this too, so perhaps I am completely off here. My guess is that it > isn't the const that is messing this up, but the non-class type. The problem > I see is that "frame" is a pointer to an objc_object and objc_objects aren't > the same as NSObjects (but, like I said, I'm new, so may

Re: Calling getter on const object

2010-11-08 Thread Jonny Taylor
Thankyou everybody for your help (and patience!) with this one. I have indeed been making some wrong assumptions and as I result much of what I was writing was incorrect. From the various helpful replies I have received, I have (I hope!) got a much clearer understanding of what is and isn't goin

Re: Irregular layout of radio buttons

2010-11-08 Thread Quincey Morris
On Nov 8, 2010, at 07:01, Vincent Habchi wrote: > 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 radi

Re: Irregular layout of radio buttons

2010-11-08 Thread Keary Suska
On Nov 8, 2010, at 8:01 AM, Vincent Habchi wrote: > 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 butto

Re: Understanding the Run loop idea and the updating of controls during long operations

2010-11-08 Thread Andreas Grosam
On Nov 7, 2010, at 4:35 PM, eveningnick eveningnick wrote: >> - Multiple threads, figure out your bug with synchronization around >> AppleScripts (there is no reason the library would run slower just because >> you add a new thread). >> > I am not doing no synchronization at all, nor i need any

Re: Calling getter on const object

2010-11-08 Thread Kyle Sluder
On Mon, Nov 8, 2010 at 8:37 AM, Jonny Taylor wrote: > I'm afraid I'm not sure if I understand exactly what you're asking. I would > like to be able access the "frame number" property (which is in fact stored > as a variable within the class, and is fixed soon after instantiation) in > spite of

Re: MapKit on iPad

2010-11-08 Thread Fritz Anderson
On 7 Nov 2010, at 8:41 PM, William Squires wrote: > 1) I know that an MKMapView can display a location given GPS coords, and that > it can do reverse geo-caching to get the nearest address to a GPS coordinate. > Can it go the other way - i.e. can I feed it an address (in an NSString) of > the f

Re: Calling getter on const object

2010-11-08 Thread David Duncan
On Nov 8, 2010, at 9:04 AM, Jonny Taylor wrote: > In this particular case I don't have much choice in the matter - the standard > behaviour of blocks is to provide 'const' access to variables declared > outside the block (and with good reason I think). In the example I gave, I > want to access

Re: Interrupt copyItemAtPath

2010-11-08 Thread Kyle Sluder
On Mon, Nov 8, 2010 at 8:36 AM, gMail.com wrote: > Something like >    if(stage == kFSOperationStageComplete){ >        go and copy the next file >    } > > would make me redesign all of my code... > So it doesn't sound as the best solution for me. Sometimes you have to realize that the design yo

Re: Calling getter on const object

2010-11-08 Thread Jonny Taylor
In this particular case I don't have much choice in the matter - the standard behaviour of blocks is to provide 'const' access to variables declared outside the block (and with good reason I think). In the example I gave, I want to access the property from within a block. I can work around it as

RE: Ping host and port

2010-11-08 Thread Shawn Bakhtiar
http://www.ntop.org It is your friend. It is open source, and IMHO it incorporates a LOT of what you are asking for. I would simply run it in the background with the output redirected to a NSScanner, or something that could pars it out. At a deeper level, you can probably integrated direct

Re: Calling getter on const object

2010-11-08 Thread David Duncan
My question is why do you need to have a 'const' pointer. On Nov 8, 2010, at 8:37 AM, Jonny Taylor wrote: > I'm afraid I'm not sure if I understand exactly what you're asking. I would > like to be able access the "frame number" property (which is in fact stored > as a variable within the class,

Re: Calling getter on const object

2010-11-08 Thread Jonny Taylor
I'm afraid I'm not sure if I understand exactly what you're asking. I would like to be able access the "frame number" property (which is in fact stored as a variable within the class, and is fixed soon after instantiation) in spite of the fact that I only have a 'const' pointer to the object at

Re: Interrupt copyItemAtPath

2010-11-08 Thread gMail.com
I have verified that the waiting loop while(!gFileCopiedDone && !mUserPressedStop){ CFRunLoopRunInMode(kCFRunLoopDefaultMode, 5.0, true); } slows down the copy speed 3 times and more. I can't use that. I have to copy a hierarchical list of files, and let the user make his choice

Re: Synchronizing iOS redraw

2010-11-08 Thread Matt Neuburg
On Sun, 7 Nov 2010 21:04:36 -0800, Rick Mann said: >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. > >Since I don't really have control of when the

Re: CATransaction setCompletionBlock - Nested Transactions bug?

2010-11-08 Thread Kyle Sluder
On Nov 8, 2010, at 8:26 AM, Matt Neuburg wrote: > On Sun, 7 Nov 2010 14:28:46 -0800, Kyle Sluder said: > >> But transactions aren't actions. I'd even argue that putting this >> convenience method on CATransaction might have been a mistake. >> > > It's not merely a convenience. We live in an

Re: Calling getter on const object

2010-11-08 Thread David Duncan
It might be useful to know what you expect to get from the const reference in the first place? Primarily because I highly suspect that it is not necessary to ensure the semantics that you desire. On Nov 8, 2010, at 4:59 AM, Jonny Taylor wrote: > I have encountered what I presume is a common new

Re: Synchronizing iOS redraw

2010-11-08 Thread David Duncan
On Nov 7, 2010, at 11:46 PM, Kyle Sluder wrote: > Your solution is probably going to involve using OpenGL and a > CADisplayLink:http://developer.apple.com/library/ios/#documentation/QuartzCore/Reference/CADisplayLink_ClassRef/Reference/Reference.html While you probably will need CADisplayLink, y

Re: CATransaction setCompletionBlock - Nested Transactions bug?

2010-11-08 Thread Matt Neuburg
On Sun, 7 Nov 2010 14:28:46 -0800, Kyle Sluder said: >But transactions aren't actions. I'd even argue that putting this convenience >method on CATransaction might have been a mistake. > It's not merely a convenience. We live in an age of blocks; we want the block-based approach to replace the

Re: CAShapeLayer curved path animation

2010-11-08 Thread David Duncan
Could you share the before & after curves then? On Nov 6, 2010, at 6:36 PM, Gideon King wrote: > Sorry, I must have not been clear - these are not before and after curve > definitions. They are two approaches I tried. First I was using the curve to > approach, and when that wasn't working nicel

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: Mock the internet

2010-11-08 Thread Scott Andrew
There are a couple of options I have used.. 1.) User your mac's local web server. 2.) MAMP which includes a full Web Server with mySQL. http://www.mamp.info/en/index.html. I use this later a lot for creating and testing custom backend services and client calls locally. Scott Andrew On Nov 8, 2

Re: Interrupt copyItemAtPath

2010-11-08 Thread gMail.com
Sherm, I verified, if I quit, the file being copied gets properly deleted, because before quitting, in the metho ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the mod

Re: Mock the internet (with my crumby native English corrected)

2010-11-08 Thread Jerry Krinock
On 2010 Nov 08, at 04:56, jonat...@mugginsoft.com wrote: Jonathan gave good answers but you're probably going to need a little more help. > During development can you not target a local httpd instance that doesn't > support the full API but simply returns an acknowledgment/error response? Thes

Re: Mock the internet (with my crumby native English corrected)

2010-11-08 Thread jonat...@mugginsoft.com
On 8 Nov 2010, at 09:53, Yung-Luen Lan wrote: > Hi, > > I'm writing a framework for web API like flickr. However, I don't want > my test failed depending on the server status. > (And I don't want it hit the server every time I build my project.) > > Is there any easy way to "fake" the network

Calling getter on const object

2010-11-08 Thread Jonny Taylor
I have encountered what I presume is a common newcomer's problem, but I haven't had any luck with google (maybe I'm using the wrong search terms?). Suppose I have a const id, e.g. "const id frame". If I attempt to call a getter for the object I get the following compiler error: request for membe

Re: NSTextFieldCell multi-line

2010-11-08 Thread jonat...@mugginsoft.com
On 8 Nov 2010, at 08:55, Micha Fuhrmann wrote: > Dear All, > > I'm stuck here and it seems so trivial... > > I'm using NSTextFieldCell in a tableview and when the text takes the whole > cell, the cell size doesn't resize and add a line (which I would expect!!!). > Setting the text properties

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

Re: Mock the internet

2010-11-08 Thread jonat...@mugginsoft.com
On 8 Nov 2010, at 09:53, Yung-Luen Lan wrote: > Hi, > > I'm writing a framework for web API like flickr. However, I don't want > my test failed depending on the server status. > (And I don't want it hit the server every time I build my project.) > > Is there any easy way to "fake" the network l

Mock the internet

2010-11-08 Thread Yung-Luen Lan
Hi, I'm writing a framework for web API like flickr. However, I don't want my test failed depending on the server status. (And I don't want it hit the server every time I build my project.) Is there any easy way to "fake" the network layer? I don't think swizzle the NSURLConnection is enough beca

NSTextFieldCell multi-line

2010-11-08 Thread Micha Fuhrmann
Dear All, I'm stuck here and it seems so trivial... I'm using NSTextFieldCell in a tableview and when the text takes the whole cell, the cell size doesn't resize and add a line (which I would expect!!!). Setting the text properties in NSCell doesn't cut it either. So I've tried using - (CGFl