Re: NSCalendar date calculation anomaly

2010-04-28 Thread Kubernan
Le 28 avr. 2010 à 05:45, Scott Ribe a écrit : > > It seems as though some calls are using one time zone and some are using > another??? I do not do anything in my app to set a local or default time > zone, and I have not changed the time zone in my system preferences in a very > long time. (M

Re: Finder file label from cocoa?

2010-04-28 Thread Jean-Daniel Dupas
Le 28 avr. 2010 à 02:14, Rainer Standke a écrit : > Hello, > > is there a way to get to the finder label of a file from Cocoa? I'd like to > be able to get & set them. To get and set it, you can probably use the NSURLLabelNumberKey property (introduced in 10.6) and the URL Resource API: - (B

Re: Make About window respond to ⌘W in UI-le ss application

2010-04-28 Thread Jens Miltner
Am 27.04.2010 um 21:06 schrieb Michael Dippery: >> Sorry, didn't read your email properly. If you've already created a menu in >> your MainMenu nib and it's not working, perhaps you haven't actually made >> the connection in the nib. If that's the case, then you just need to >> Control-drag

Re: Finder file label from cocoa?

2010-04-28 Thread Uli Kusterer
On 28.04.2010, at 02:14, Rainer Standke wrote: > is there a way to get to the finder label of a file from Cocoa? I'd like to > be able to get & set them. If you need to support older MacOS versions, my UKDirectoryEnumerator class also includes a category to get/set Carbon-specific file attribute

Re: white screen windows at first

2010-04-28 Thread vincent habchi
Bill, > my windows are NSBackingStoreBuffered > is that what you mean by background property? i am just using a subclassed > NSView & a CGContext for drawing Yes. Please verify that you set the opaque property of your backing layer to YES : [[self layer] setOpaque:YES], otherwise you might get

Re: white screen windows at first

2010-04-28 Thread Paul Sanders
> this problem must be because i am using core graphics I don't know if this is relevant, but I noticed that there is a Core Graphics function called CGContextFlush. The docs say you shouldn't need to call this but maybe in your case you do. There's also a flushGraphics method of NSGraphicsCo

Re: white screen windows at first

2010-04-28 Thread vincent habchi
Le 28 avr. 2010 à 10:10, Paul Sanders a écrit : >> this problem must be because i am using core graphics There is no problem using Core Graphics, especially if your NSView is backed by a CALayer. I do that routinely on the small GIS I try to develop. Vincent_

NSKeyedArchiver and NSPoints

2010-04-28 Thread Gerriet M. Denkmann
The following code raise an exception: NSPoint p = NSMakePoint( 47, 11 ); NSValue *v = [ NSValue valueWithPoint: p ]; NSArray *a = [ NSArray arrayWithObject: v ]; NSData *d = [ NSKeyedArchiver archivedDataWithRootObject: a ]; // *** -[NSKeyedArchiver e

Re: Drawing glitches in NSTableView with variable row hight (just like Console.app)

2010-04-28 Thread Marco Masser
On 21.04.2010, at 05:47, Adam R. Maxwell wrote: > > On Apr 19, 2010, at 8:56 AM, Marco Masser wrote: > >> I'm trying to implement a logging facility for an app that should behave >> quite the same as OS X's Console.app in terms of displaying the log, i.e. an >> NSTableView with varying row he

Re: NSKeyedArchiver and NSPoints

2010-04-28 Thread Graham Cox
On 28/04/2010, at 8:00 PM, Gerriet M. Denkmann wrote: > // *** -[NSKeyedArchiver encodeValueOfObjCType:at:]: this archiver > cannot encode structs > > Using NSArchiver (without the "Keyed") works fine. > > How am I supposed to save my array of points? > 10.6.3. I find the easiest

Re: NSKeyedArchiver and NSPoints

2010-04-28 Thread Jean-Daniel Dupas
Le 28 avr. 2010 à 13:09, Graham Cox a écrit : > > On 28/04/2010, at 8:00 PM, Gerriet M. Denkmann wrote: > >> // *** -[NSKeyedArchiver encodeValueOfObjCType:at:]: this archiver >> cannot encode structs >> >> Using NSArchiver (without the "Keyed") works fine. >> >> How am I supposed

Re: NSKeyedArchiver and NSPoints

2010-04-28 Thread Graham Cox
On 28/04/2010, at 9:18 PM, Jean-Daniel Dupas wrote: > > Le 28 avr. 2010 à 13:09, Graham Cox a écrit : > >> >> On 28/04/2010, at 8:00 PM, Gerriet M. Denkmann wrote: >> >>> // *** -[NSKeyedArchiver encodeValueOfObjCType:at:]: this archiver >>> cannot encode structs >>> >>> Using NSAr

Core Data and Inheritance

2010-04-28 Thread Billy Flatman
Hi all, I have a situation where I have a parent entity "Animal" and inheriting entities "Fish", "Mammal". I need to be able to select the corresponding Fish from it's array controller by binding it with the selection from the Animal array controller. The problem is the index counts for Animal a

Re: [iPhone] File coping application

2010-04-28 Thread Arun
Hi, I was thinking of an application that can mount the iPhone as a drive with read/write access. Using this app i would have had an file system interface which is inline with finder and makes easy to use the device. Thanks Arun KA On Mon, Apr 26, 2010 at 10:30 PM, Mark Ritchie wrote: > Hey! >

Re: [iPhone] File coping application

2010-04-28 Thread Joanna Carter
Hi Arun Le 28 avr. 2010 à 13:53, Arun a écrit : > I was thinking of an application that can mount the iPhone as a drive with > read/write access. > Using this app i would have had an file system interface which is inline > with finder and makes easy to use the device. Try this :http://avatron.co

Re: NSCalendar date calculation anomaly

2010-04-28 Thread glenn andreas
On Apr 27, 2010, at 10:45 PM, Scott Ribe wrote: > I have an int representing the number of days since 1/1/2001, and wish to get > an NSDate representing that date in the system's local time zone: > > NSDateComponents *dc = [[[NSDateComponents alloc] init] autorelease]; > [dc setDay: numdays]; >

Woes with an NSBox

2010-04-28 Thread vincent habchi
HI there, I have a standard NSBox inside a NSView. I set its border radius and width all right. But when I enable backing layer, the border disappear. Is this normal? Vincent___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post ad

Re: NSCalendar date calculation anomaly

2010-04-28 Thread Scott Ribe
On Apr 28, 2010, at 8:11 AM, glenn andreas wrote: > MDT is -0600 so this is correct - MST is -0700. (stupid "spring forward, fall > back" clock resetting... You're right about that (I was tired), but it's a read herring, the values are still wrong. Reference date is at midnight 1/1/2010 UTC, ad

Re: NSCalendar date calculation anomaly

2010-04-28 Thread Scott Ribe
On Apr 28, 2010, at 1:04 AM, Kubernan wrote: > Did you try to use NSDateComponents for building your reference date > (2001/01/01) such as : No, reasonable idea though. But even better, I should have been logging the reference date after I created it. When I do that, I get: 2000-12-31 17:00:00

Re: NSCalendar date calculation anomaly

2010-04-28 Thread Matt Gough
On 28 Apr 2010, at 15:37:59, Scott Ribe wrote: > On Apr 28, 2010, at 1:04 AM, Kubernan wrote: > >> Did you try to use NSDateComponents for building your reference date >> (2001/01/01) such as : > > No, reasonable idea though. But even better, I should have been logging the > reference date af

Re: NSCalendar date calculation anomaly

2010-04-28 Thread Dave DeLong
Yes. Yes it is. Dave (who also lives in MDT) On Apr 28, 2010, at 8:45 AM, Matt Gough wrote: > ... isn't that due to Daylight savings being different in December and May? smime.p7s Description: S/MIME cryptographic signature ___ Cocoa-dev mailing li

Re: NSCalendar date calculation anomaly

2010-04-28 Thread Roland King
On 28-Apr-2010, at 10:37 PM, Scott Ribe wrote: > On Apr 28, 2010, at 1:04 AM, Kubernan wrote: > >> Did you try to use NSDateComponents for building your reference date >> (2001/01/01) such as : > > No, reasonable idea though. But even better, I should have been logging the > reference date af

Re: NSCalendar date calculation anomaly

2010-04-28 Thread Scott Ribe
OK, I get it. It's keeping the time of day the same in my local time zone, not UTC. To get the result I want, I need to: create the reference date subtract it's utc offset add days Instead of: create the reference date add days subtract the utc offset of the result. -- Scott Ribe scott_r...@

Re: Finder file label from cocoa?

2010-04-28 Thread Adam R. Maxwell
On Apr 27, 2010, at 5:14 PM, Rainer Standke wrote: > Hello, > > is there a way to get to the finder label of a file from Cocoa? I'd like to > be able to get & set them. In addition to Uli's solution, I have a class that specifically deals with Finder labels, and works at least back to 10.4:

Differences in NSFileWrapper -initSymbolicLinkWithDestination: and -initSymbolicLinkWithDestinationURL:?

2010-04-28 Thread Keith Blount
Hello, I'm updating some code in which images get added to text as symbolic links, and I'm a little confused about some differences I am seeing in code I thought should act the same. Specifically, in 10.6, NSFileWrapper's -initSymbolicLinkWithDestination: method has been replaced with -iniSymb

Quicklook preview generator and OpenGL

2010-04-28 Thread Mads Paulin
Hi All, I am getting really frustrated with a weird problem of rendering OpenGL from a quicklook generator plugin. I hope some of you can give me a hint about what I am doing wrong. I am working with some 3D files for which I want to create a quicklook generator for creating previews of the geome

Cocoa Newbie & MySQL

2010-04-28 Thread Joshua Tidsbury
Hello everyone, I'm in the process of developing one of my first Cocoa applications, and I'm looking for some advice to keep myself from wandering into the wrong direction. The application I am going to be writing ultimately needs to access MySQL as a datastore. I'd love to go with Core Data an

UIView, UILabel, and sizeToFit

2010-04-28 Thread Matt James
Hi everyone, This is probably a stupid question, but I can't seem to figure it out for the life of me. On the iPad, I'm using a UIView containing a UILabel. I set the text property of the UILabel (which seems to update display right away) and then say [label sizeToFit] and [containerView sizeToF

Re: UIScrollView Sizing

2010-04-28 Thread Scott Anguish
The one thing you have to set in code _is_ the size. So you can easily do that based on content. On Apr 27, 2010, at 1:58 PM, Bob Barnes wrote: > Hi, > > I have a UIScrollView that can contain a variable number of other UIViews > (UILabels, UIImageViews, etc), but I'm confused as to how

[Moderator] Re: menu madness with retain count

2010-04-28 Thread Scott Anguish
Please, all involved, take this off-list. This is a list for civil discussion and it’s clear this has passed that. Scott [moderator]___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the l

Re: UIView, UILabel, and sizeToFit

2010-04-28 Thread Fritz Anderson
On 27 Apr 2010, at 8:56 PM, Matt James wrote: > Unfortunately, NSLog-ing the values of label.frame.size.width and > containerView.frame.size.width shows that the values are "0". Show us your code, particularly all the lines that call NSLog. The first thing I'm looking to see is whether you're tr

Re: Cocoa Newbie & MySQL

2010-04-28 Thread Dru Satori
Well, the short version is CoreData & SQLLite will not help you in any way with MySQL. As to using another framework or rolling your own, that largely depends upon your needs. Obviously the GPL is not an issue if you are going against MySQL anyways, so I would probably look hard at not reinven

Re: Differences in NSFileWrapper -initSymbolicLinkWithDestination: and -initSymbolicLinkWithDestinationURL:? [SOLVED]

2010-04-28 Thread Keith Blount
Typically, as soon as I posted my question I figured out the answer. So, to answer my own question, the difference between NSFileWrapper's -deprecated -initSymbolicLinkWithDestination: method and its new -initSymbolicLinkWithDestinationURL: method is that the older method automatically sets the

Re: UIView, UILabel, and sizeToFit

2010-04-28 Thread Luke the Hiesterman
Usually for logging this sort of thing, you're behooved to use the convenience methods provided in UIGeometry.h, namely NSStringFromCGRect() or NSStringFromCGPoint(). Luke On Apr 28, 2010, at 9:50 AM, Fritz Anderson wrote: > On 27 Apr 2010, at 8:56 PM, Matt James wrote: > >> Unfortunately, NS

Re: Cocoa Newbie & MySQL

2010-04-28 Thread Rui Pacheco
Are you trying to write a MySQL client or are you trying to store stuff into MySQL? On 28 April 2010 17:58, Dru Satori wrote: > Well, the short version is CoreData & SQLLite will not help you in any way > with MySQL. As to using another framework or rolling your own, that largely > depends upon

Re: Core Data and Inheritance

2010-04-28 Thread Quincey Morris
On Apr 28, 2010, at 05:27, Billy Flatman wrote: > I have a situation where I have a parent entity "Animal" and inheriting > entities "Fish", "Mammal". > I need to be able to select the corresponding Fish from it's array controller > by binding it with the selection from the Animal array controll

Re: Cocoa Newbie & MySQL

2010-04-28 Thread Jens Alfke
On Apr 27, 2010, at 6:04 PM, Joshua Tidsbury wrote: > The application I am going to be writing ultimately needs to access MySQL as > a datastore. I'd love to go with Core Data and SQLite, but based on some > reading, SQLite wouldn't be ideal if multiple clients were to be accessing > the same

Re: Cocoa Newbie & MySQL

2010-04-28 Thread Bill Bumgarner
On Apr 28, 2010, at 10:35 AM, Jens Alfke wrote: > SQLite works fine with multiple clients — it uses file locking to support > transactions and ACID properties. I’ve used it that way myself. It just > doesn’t scale as well as a full server-based system, because doing locking > via the filesyste

Re: NSKeyedArchiver and NSPoints

2010-04-28 Thread Quincey Morris
On Apr 28, 2010, at 04:28, Graham Cox wrote: > Well, there is - (void)encodePoint:(NSPoint)point forKey:(NSString *)key, but > you can only use that from within a call to -encodeWithCoder:. If you have a > need to archive something from "outside", as in the OP's code, wrapping it in > a NSValue

Re: Cocoa Newbie & MySQL

2010-04-28 Thread Joshua Tidsbury
Thank you all for your helpful replies so far - greatly appreciated! To add some clarity: The application is essentially a server side app that will manage various background file moving/archiving processes and store metadata about the files in a database. The heavy lifting in terms of file ana

Re: Finder file label from cocoa?

2010-04-28 Thread Rainer Standke
That's exactly what I was looking for - thank you very much! Rainer On Apr 28, 2010, at 0:08 , Jean-Daniel Dupas wrote: > > Le 28 avr. 2010 à 02:14, Rainer Standke a écrit : > >> Hello, >> >> is there a way to get to the finder label of a file from Cocoa? I'd like to >> be able to get & set

Re: awakeFromFetch Called Multiple Times

2010-04-28 Thread Sean McBride
On Mon, 26 Apr 2010 11:04:17 +0100, Milen Dzhumerov said: >I've been under the impression that awakeFromFetch / awakeFromInsert >were supposed to be called in pairs with will/didTurnIntoFault (i.e., >never have two consecutive awakeX calls). I'm now observing that >awakeFromFetch is getting called

Re: Creating temporary NSManagedObjects

2010-04-28 Thread Hal Mueller
On Apr 27, 2010, at 10:42 AM, vincent habchi wrote: > There is a simple reason: the objects in the Managed object context get > "represented" on a third window, whose contents are drawn from an Entity mode > NSArrayController that prepares its contents automatically. If I add my > temporary ob

Re: NSCalendar date calculation anomaly

2010-04-28 Thread Greg Guerin
Scott Ribe wrote: > NSDate * cd = [[NSCalendar currentCalendar] dateByAddingComponents: dc toDate: [NSDate dateWithString: @"2001-01-01"] options: 0]; I think the dateWithString: is wrong. From the NSDate reference: "You must specify all fields of the format string, including the time z

Re: white screen windows at first

2010-04-28 Thread Bill Appleton
hi all, i have been working on this a lot & have some new information previously i was using carbon and core graphics when i draw to the screen, sometimes it is in the update event but sometimes it was in response to a mouse click, or some other event this always worked: * QDBeginCGContext(gra

Getting filename in NSDocument readFromData

2010-04-28 Thread Pascal Harris
How do I get the filename of the source document when using NSDocument readFromData? By and large, readFromData works excellently. My app is able to get the NSData object and process it and all works well. But now I want to write a refinement which would require my app to pass details (i.e. t

Re: Quicklook preview generator and OpenGL

2010-04-28 Thread Kyle Sluder
On Tue, Apr 27, 2010 at 10:43 AM, Mads Paulin wrote: > Anyone got any ideas why I cannot allocate OpenGL pixel formats and > NSOpenGLContext from a quicklook generator ? I believe QuickLook plugins (more accurately the generator processes they're run in) are sandboxed. It would be very bad for a

Re: Getting a bezier path for a character

2010-04-28 Thread Douglas Davidson
On Apr 27, 2010, at 6:45 PM, danc...@rebelbase.com wrote: > Hi, I been trying to figure out how to get the Bezier path for a character > in different fonts, We actually have a developer sample that covers this, . Take a look at

Re: Getting filename in NSDocument readFromData

2010-04-28 Thread Kyle Sluder
On Wed, Apr 28, 2010 at 11:37 AM, Pascal Harris <45rpmli...@googlemail.com> wrote: > How do I get the filename of the source document when using NSDocument > readFromData? Just override -readFromURL:ofType:error: instead. The documentation is quite clear about this method's implementation simply

Re: white screen windows at first

2010-04-28 Thread Bill Appleton
hi all, some more information if i call *cgcontext = [[myNSWindowPtr graphicsContext] graphicsPort];* *CGContextSaveGState(cgContext);* *draw with core graphics here... CGContextRestoreGState(cgContext);* cgcontextsynchronize(thecontext): cgcontextflush(thecontext): then this code works on no

Re: NSKeyedArchiver and NSPoints

2010-04-28 Thread Kyle Sluder
On Wed, Apr 28, 2010 at 10:55 AM, Quincey Morris wrote: > I would really hope that the last statement *isn't* true. :) If my point's X > and Y are not integral, using a string would in general not preserve the > floating point values precisely. Er? Unless there's some documentation about the pr

Re: white screen windows at first

2010-04-28 Thread Paul Sanders
If you want to draw outside of drawRect:, try calling lockFocus on your content view first. Then, to get an NSGraphicsContext, call [NSGraphicsContext currentContext]. When you are done drawing, call unlockFocus, again on your content view. Also, in my experience, if you draw outside of drawR

advancementForGlyph problem

2010-04-28 Thread David F.
The information I am getting back from advancementForGlyph doesn't seem to be correct. Here are the glyph bounds and advancement for the capital letter 'A' in Georgia 36pt: == A == bounds x: -0.720703 bounds y: 0.00 bounds w: 25.699219 bounds h: 25.294922 advance w: 24.152344 advance h:

Re: NSKeyedArchiver and NSPoints

2010-04-28 Thread Quincey Morris
On Apr 28, 2010, at 11:42, Kyle Sluder wrote: > Er? Unless there's some documentation about the precision of > NSStringFromPoint being less than that of the members, > NSStringFromPoint could certainly include just as much precision as > the actual float. Assuming that the string contains a decim

CFUUID question

2010-04-28 Thread Philip Mobley
Is my assumption correct that the CFUUID class only generates RANDOM UUID values? (i.e. UUID version 4) I am interested in creating a reproducible UUID based on a string input value (such as UUID version 3 or 5), and this doesn't seem possible with CFUUID. _

Re: NSKeyedArchiver and NSPoints

2010-04-28 Thread Kyle Sluder
On Wed, Apr 28, 2010 at 12:31 PM, Quincey Morris wrote: > Assuming that the string contains a decimal floating point number, then both > the conversion to and from binary floating point involve (in general) > imprecision from rounding and/or truncation, since in both cases the result > could th

Re: NSKeyedArchiver and NSPoints

2010-04-28 Thread Raffael Cavallaro
On Apr 28, 2010, at 3:31 PM, Quincey Morris wrote: > So my original point stands: I want my original bit pattern back again after > unarchiving, and I don't believe that a finite decimal string will guarantee > that. As a practical matter, a simple test shows that converting the point: 3.1415

Re: CFUUID question

2010-04-28 Thread Douglas Davidson
On Apr 28, 2010, at 12:37 PM, Philip Mobley wrote: > Is my assumption correct that the CFUUID class only generates RANDOM UUID > values? (i.e. UUID version 4) > > I am interested in creating a reproducible UUID based on a string input value > (such as UUID version 3 or 5), and this doesn't se

Re: NSCalendar date calculation anomaly

2010-04-28 Thread Greg Guerin
A couple suggestions: If you always calculate using noon on any given date, rather than midnight, then DST transitions won't affect the year/month/day components. If you don't want to use noon, then NSTimeZone daylightSavingTimeOffsetForDate: should be taken into account. -- GG _

Archiving NSBlockPredicate and NSPredicate date functions

2010-04-28 Thread Dave DeLong
Hi everyone, I've figured out a way to do an "date in the last X days" predicate, but I'm having to do it as a block predicate. This works fine, but I've run up against another situation: NSBlockPredicates don't support archiving. This is a problem, since I need to store this predicate in a

Re: CFUUID question

2010-04-28 Thread Philip Mobley
On Apr 28, 2010, at 12:49 PM, Douglas Davidson wrote: >> Is my assumption correct that the CFUUID class only generates RANDOM UUID >> values? (i.e. UUID version 4) >> >> I am interested in creating a reproducible UUID based on a string input >> value (such as UUID version 3 or 5), and this doe

Re: Cocoa Newbie & MySQL

2010-04-28 Thread Jens Alfke
On Apr 28, 2010, at 10:57 AM, Joshua Tidsbury wrote: I haven't yet decided on the framework for the web app (often use Rails for standalone web apps, may use PHP), but just don't want to box myself into a corner by a bad decision early on. Obviously, the notion of being able to use Core D

Re: CFUUID question

2010-04-28 Thread Jens Alfke
On Apr 28, 2010, at 1:15 PM, Philip Mobley wrote: MD5 is more of what I am looking for, but in the UUID format to avoid the MD5 collisions. For example a new UUID based on something like [NSString stringWithFormat:@"%...@%@%@", machineUUID, [game description], [player name]]. The result

Re: NSKeyedArchiver and NSPoints

2010-04-28 Thread Jean-Daniel Dupas
Le 28 avr. 2010 à 21:45, Raffael Cavallaro a écrit : > > On Apr 28, 2010, at 3:31 PM, Quincey Morris wrote: > >> So my original point stands: I want my original bit pattern back again after >> unarchiving, and I don't believe that a finite decimal string will guarantee >> that. > > As a prac

Re: NSKeyedArchiver and NSPoints

2010-04-28 Thread Clark S. Cox III
On Apr 28, 2010, at 12:31 PM, Quincey Morris wrote: > On Apr 28, 2010, at 11:42, Kyle Sluder wrote: > >> Er? Unless there's some documentation about the precision of >> NSStringFromPoint being less than that of the members, >> NSStringFromPoint could certainly include just as much precision as >

Field editors in layer-hosting views

2010-04-28 Thread Kyle Sluder
Hi all, We have a layer-hosting view that needs to contain a field editor. Opinion is split on whether adding subviews to a layer-hosting (*not* layer-backed) view is allowed but frowned upon [1,2] or just plain verboten [n,n+1]. In our layer-hosting view, we configure the view's layer with geome

Floating window on iPhone OS?

2010-04-28 Thread Laurent Daudelin
I've seen in a few apps a little rounded corners status window appearing, often with a progress indicator. I tried to reproduce the same with a plain view with a 50% opacity but it doesn't seem to look as nice as the others. Anybody knows how to do that? -Laurent. -- Laurent Daudelin AIM/iChat

Re: Floating window on iPhone OS?

2010-04-28 Thread Sixten Otto
On Wed, Apr 28, 2010 at 6:11 PM, Laurent Daudelin wrote: > I've seen in a few apps a little rounded corners status window appearing > [snip] > Anybody knows how to do that? http://github.com/jdg/MBProgressHUD ? Sixten ___ Cocoa-dev mailing list (Coco

Re: white screen windows at first

2010-04-28 Thread Shawn Erickson
On Wed, Apr 28, 2010 at 11:29 AM, Bill Appleton wrote: > *this appears to only work from inside the drawRect routine, if i get here > from some other event it doesn't work Cocoa drawing is centered around doing all of your drawing under drawRect: (or drawInContext: if using CALayers, etc.). When

Re: Floating window on iPhone OS?

2010-04-28 Thread Laurent Daudelin
On Apr 28, 2010, at 15:25, Sixten Otto wrote: > On Wed, Apr 28, 2010 at 6:11 PM, Laurent Daudelin > wrote: >> I've seen in a few apps a little rounded corners status window appearing >> [snip] >> Anybody knows how to do that? > > http://github.com/jdg/MBProgressHUD ? > > Sixten Hey, thanks, S

Re: white screen windows at first

2010-04-28 Thread Paul Sanders
> Paul outlined a way to draw outside of drawRect: however I > think it > would be better to use lockFocusIfCanDraw instead of > lockFocus. Yes, I agree, although it begs the question of what to do if lockFocusIfCanDraw returns NO. In my experience, that only happens when the view (or any of

Change management using CFRunLoopObserver

2010-04-28 Thread Kiel Gillard
Hi there, My application's model is observing a particular stage of the run loop. When this stage occurs, pending changes to my model are applied. Which stage of the run loop is best to do this? I cannot seem to find a recommendation in the documentation. Thanks in advance for your time, Kiel

Re: UIView, UILabel, and sizeToFit

2010-04-28 Thread Matt James
On Apr 28, 2010, at 12:50 PM, Fritz Anderson wrote: > On 27 Apr 2010, at 8:56 PM, Matt James wrote: > >> Unfortunately, NSLog-ing the values of label.frame.size.width and >> containerView.frame.size.width shows that the values are "0". > > Show us your code, particularly all the lines that call

[MEET] May CocoaHeads Mac Developer Meetings

2010-04-28 Thread Stephen Zyszkiewicz
Greetings, CocoaHeads is an international Mac programmer's group. Meetings are free and open to the public. We specialize in Cocoa, but everything Mac programming related is welcome. Canada Ottawa/Gatineau, Ontario - Thursday, May 13, 2010 19:00 Germany Frankfurt - Monday, May 3, 2010 19:00 S

Re: UIView, UILabel, and sizeToFit

2010-04-28 Thread Roland King
- (void)setRepresentedObject:(NSString *)aString { name.text = aString; [name sizeToFit]; [self sizeToFit]; NSLog(@"Container size: %d, %d", self.frame.size.width, self.frame.size.height); NSLog(@"UILabel size: %d, %d", name.frame.size.width, name.frame

Re: white screen windows at first

2010-04-28 Thread Graham Cox
On 29/04/2010, at 4:29 AM, Bill Appleton wrote: > so is it "legal" to draw on an NSWindow from some other event? Yes, but only under specific, controlled conditions. The intended model is to draw *everything* in -drawRect:. If you arrange your code to do this, not only will life be easy, but

Re: advancementForGlyph problem

2010-04-28 Thread Graham Cox
On 29/04/2010, at 4:49 AM, David F. wrote: > Any ideas on what I am doing/understanding wrong? I think that when glyphs are rendered on screen they are tweaked so as to take advantage of sub-pixel rendering and so on. That means that what you see is not exactly the same as the font values sug

Re: NSKeyedArchiver and NSPoints

2010-04-28 Thread Graham Cox
On 29/04/2010, at 5:45 AM, Raffael Cavallaro wrote: > > On Apr 28, 2010, at 3:31 PM, Quincey Morris wrote: > >> So my original point stands: I want my original bit pattern back again after >> unarchiving, and I don't believe that a finite decimal string will guarantee >> that. > > As a pract

Re: UIView, UILabel, and sizeToFit

2010-04-28 Thread Matt James
On Apr 28, 2010, at 9:14 PM, Roland King wrote: >> - (void)setRepresentedObject:(NSString *)aString >> { >> name.text = aString; >> [name sizeToFit]; >> [self sizeToFit]; >> NSLog(@"Container size: %d, %d", self.frame.size.width, >> self.frame.size.height); >> NSLog(@"UILa

Re: advancementForGlyph problem

2010-04-28 Thread David F.
On Apr 28, 2010, at 7:33 PM, Graham Cox wrote: > > On 29/04/2010, at 4:49 AM, David F. wrote: > >> Any ideas on what I am doing/understanding wrong? > > I think that when glyphs are rendered on screen they are tweaked so as to > take advantage of sub-pixel rendering and so on. That means that

Re: NSKeyedArchiver and NSPoints

2010-04-28 Thread Michael Ash
On Wed, Apr 28, 2010 at 3:31 PM, Quincey Morris wrote: > On Apr 28, 2010, at 11:42, Kyle Sluder wrote: > >> Er? Unless there's some documentation about the precision of >> NSStringFromPoint being less than that of the members, >> NSStringFromPoint could certainly include just as much precision as

Font Metrics?

2010-04-28 Thread Rick Mann
Is there any tool on the Mac that will tell me the widths of various glyphs of a font? For example, I want to see if Helvetica Bold numerals 0-9 are all the same width or not. Thanks! -- Rick ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Re: NSKeyedArchiver and NSPoints

2010-04-28 Thread Quincey Morris
On Apr 28, 2010, at 20:49, Michael Ash wrote: > Actually, while there are finite decimal numbers with no finite binary > representation, the reverse is not true. Every binary number can be > represented by a finite number of decimal digits. I believe this is > because 2 is a factor of 10. To prove

Re: Change management using CFRunLoopObserver

2010-04-28 Thread Laurent Cerveau
I think it dépends more of what you application does. If you want to be more in the situation where it is sure that all you want to observe is "here" then I woulf advice kCFRunLoopBeforeWaiting Laurent Sent from my road phone On Apr 29, 2010, at 2:27 AM, Kiel Gillard wrote: Hi there,