Re: Non-pageable app

2009-04-05 Thread Stephen J. Butler
On Mon, Apr 6, 2009 at 1:14 AM, Chris Suter wrote: > Right, but someone who has physical access to the machine can do > whatever they like. They could open the box and probe the memory > directly somehow or add a malicious bit of software to get the details > later. My favorite attack involves us

Re: NSButton not responding to click in worker thread

2009-04-05 Thread m
UI events are reported on the main thread. If your main thread is blocked, you will not receive any events. _murat On Apr 5, 2009, at 11:20 PM, Vijay Kanse wrote: Hello All, I have separated my task on thread when my main thread is blocked. I am not able to find where my main thread is bloc

Re: NSButton not responding to click in worker thread

2009-04-05 Thread Kyle Sluder
On Mon, Apr 6, 2009 at 2:20 AM, Vijay Kanse wrote: > I have separated my task on thread when my main thread is blocked. > I am not able to find where my main thread is blocked. Separating my task on > worker thread  i am not able to get button click event. UI events must be handled on the main th

Re: Question re: [NSWindow setFrame:display:]

2009-04-05 Thread Kyle Sluder
On Mon, Apr 6, 2009 at 2:07 AM, wrote: > In my NSDocument subclass, I am trying to set the main window's frame in the > windowControllerDidLoadNib: method. For some reason, I can set the width and > height of the window's frame, but not its origin. Any ideas? I am using the > setFrame:NSMakeRect(

NSButton not responding to click in worker thread

2009-04-05 Thread Vijay Kanse
Hello All, I have separated my task on thread when my main thread is blocked. I am not able to find where my main thread is blocked. Separating my task on worker thread i am not able to get button click event. I think this is because of main thread is blocked. How can i find where my main thread

Re: Non-pageable app

2009-04-05 Thread Chris Suter
Hi Kyle, On Mon, Apr 6, 2009 at 4:03 PM, Kyle Sluder wrote: > On Sun, Apr 5, 2009 at 8:07 PM, Chris Suter wrote: >> What am I missing? > > If the attacker physically powers off the machine while the page is > written out to disk, s/he can just read the page off the swap space on > the HDD.  If t

Question re: [NSWindow setFrame:display:]

2009-04-05 Thread livinginlosangeles
In my NSDocument subclass, I am trying to set the main window's frame in the windowControllerDidLoadNib: method. For some reason, I can set the width and height of the window's frame, but not its origin. Any ideas? I am using the setFrame:NSMakeRect(x, y, w, h) display:YES [

Re: Non-pageable app

2009-04-05 Thread Kyle Sluder
On Sun, Apr 5, 2009 at 8:07 PM, Chris Suter wrote: > What am I missing? If the attacker physically powers off the machine while the page is written out to disk, s/he can just read the page off the swap space on the HDD. If this page contains, say, an initialization vector, then bang you're dead.

Inserting text in UITextView without scrolling animation (2)

2009-04-05 Thread Ignacio Enriquez
Hi... Last week I wrote the same question and there was no answer... I hope this time there is a answer. I am trying to implement a customized Keyboard using UIView, UIButtons, and UITextViewDelegate methods for getting the actual location of the cursor inside of a UITextView object. Everything g

Re: Need localization-proof method of transporting dates.

2009-04-05 Thread Greg Guerin
Michael Ash wrote: Good point. Although this has the disadvantage of temporarily using a bunch of memory, roughly doubling your footprint for this data structure, that's not likely to be a problem for the typical use cases for this thing. I don't see why it should take extra memory. As you sa

"Word Wrap" and "Character Wrap" in NSTextField

2009-04-05 Thread Jerry Krinock
I have an NSTextField, instantiated in Interface Builder 3. In Interface Builder's Inspector > Attributes I've set: Text Field > Layout (popup) > Wraps Control > Line Breaks (popup) > Word Wrap The value binding is bound. The font size in the text field is 11 point, and its height is

Re: Suppressing variable hiding warning in Xcode

2009-04-05 Thread Graham Cox
On 06/04/2009, at 11:06 AM, Bill Bumgarner wrote: 2. How do you get Xcode to not produce this warning? Don't. You'll thank yourself for not doing so after spending a few hours wondering why an iVar didn't get updated only to find that a parameter hid the iVar. Given that good advice h

Re: Need localization-proof method of transporting dates.

2009-04-05 Thread Michael Ash
On Sun, Apr 5, 2009 at 9:18 PM, Greg Guerin wrote: > As a design, it might be more flexible to define a -gc_canonicalData method > that returns an NSData containing unhashed canonical bytes, rather than > -gc_sha1hash that returns a hash.  This would make it easier to use > different secure-hash a

Re: Accessing internal lock for atomic properties

2009-04-05 Thread Eric Hermanson
Yes, I understood that, but I figured if all of the synthesized set methods are using the same lock, then I could probably take advantage of that same lock if it were available to me do to some stuff internally on that object. Anyway, thanks for the confirmation. - Eric On Apr 5, 2009, a

Re: Accessing internal lock for atomic properties

2009-04-05 Thread Bill Bumgarner
On Apr 5, 2009, at 8:50 PM, Eric Hermanson wrote: I want to acquire the lock so that I can run some logic that requires changing a set of variables atomically. I suppose I'm going to have to create a new lock for this. Yes -- the synthesized locks are only designed to ensure that the valu

Re: Accessing internal lock for atomic properties

2009-04-05 Thread Eric Hermanson
I want to acquire the lock so that I can run some logic that requires changing a set of variables atomically. I suppose I'm going to have to create a new lock for this. - Eric On Apr 5, 2009, at 11:48 PM, Bill Bumgarner wrote: On Apr 5, 2009, at 8:43 PM, Eric Hermanson wrote: Is there an

Re: Accessing internal lock for atomic properties

2009-04-05 Thread Bill Bumgarner
On Apr 5, 2009, at 8:43 PM, Eric Hermanson wrote: Is there any way to access the internal lock used when atomic properties are synthesized (assuming a simple @synchronized(self) is not used in this case)? Nope. What are you trying to do? b.bum _

Accessing internal lock for atomic properties

2009-04-05 Thread Eric Hermanson
Hello, Is there any way to access the internal lock used when atomic properties are synthesized (assuming a simple @synchronized(self) is not used in this case)? - Eric ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post a

Re: Beachball on Lengthy Task

2009-04-05 Thread Pierce Freeman
David: Thanks for all your help, it's almost working... Just one more question: Question: I am attempting to "turn" the object returned into a NSDictionary, but it doesn't seem like something that can be turned into a NSDictionary. Am I doing something wrong here? The file is a plist file. Si

Re: Suppressing variable hiding warning in Xcode

2009-04-05 Thread Bradley S. O'Hearne
All, Thanks for the advice. I everyone on the "one extra line of defense" rationale. I've worked in languages other than Objective C for years where using variable hiding is common practice, not flagged by the compiler. But you are right, that is only safe for developers who NEVER make a

Re: Puzzling run loop/autorelease pool question

2009-04-05 Thread m
Having my own autorelease pool in my call-back is an approach that I tried, and it worked, but I was unsatisfied because from my understanding of run loops and autorelease pools, it didn't seem like it should be necessary. Because my app is a Cocoa app, and everything is happening on the ma

Re: Beachball on Lengthy Task

2009-04-05 Thread Dave Keck
> 1. Is there any concern of thread safety using this class? > 2. How can I pass NSFileHandle the file URL of my files? > 3. How could I create a method that will take the contents of the file and > do something with them? 1. No. NSFIleHandle takes care of creating a separate thread for you, and n

Re: Cocoa user pane equivalent?

2009-04-05 Thread Jo Meder
Hi Graham, On 6/04/2009, at 1:07 AM, Graham Cox wrote: On 05/04/2009, at 12:20 PM, Jo Meder wrote: The one thing I'm not really clear on is what the Cocoa equivalent of a Carbon user pane control would be. It seems that there isn't really a direct equivalent in Cocoa and that the best way

Re: Need localization-proof method of transporting dates.

2009-04-05 Thread Greg Guerin
Michael Ash wrote: @implementation NSDictionary (SHA1Hashing) - (NSData *)gc_sha1hash { NSMutableData *subhashes = [NSMutableData data]; for(id key in [[self allKeys] sortedArrayUsingSelector:@selector(compare:)]) { [subhashes appendData:[key gc_sha1hash]]; [subhashes app

Re: Cocoa user pane equivalent?

2009-04-05 Thread Jo Meder
Hi guys, Can you explain what a user pane is (not all of us are that familiar with Carbon) and what exactly you're trying to do? A user pane was a precursor to HIView, that is a view (control is the proper term for the user pane) that could handle user input events, drawing and adding sub-view

Re: Suppressing variable hiding warning in Xcode

2009-04-05 Thread Bill Bumgarner
On Apr 5, 2009, at 5:10 PM, Brad O'Hearne wrote: 1. I get the gist of trying to prevent developers from accidentally hiding variables -- but is this really a major problem? Other than this, is there a compelling reason to keep this warning in tact, and change variable parameter variable name

Re: Suppressing variable hiding warning in Xcode

2009-04-05 Thread Chris Suter
Hi Brad, On Mon, Apr 6, 2009 at 10:10 AM, Brad O'Hearne wrote: > I had a few questions about selectively suppressing a certain warning in > Xcode. I personally find the warning which pertains to local variables > hiding instance variables a real nuisance. For example, if you have a > message sig

RE: Suppressing variable hiding warning in Xcode

2009-04-05 Thread Jeff Laing
> variables hiding instance variables a real nuisance. For example, if > you have a message signature with a parameter name which matches an > instance variable name, and the compiler produces the following message: > > "warning: local declaration of '' hides instance variable" What really ann

Suppressing variable hiding warning in Xcode

2009-04-05 Thread Brad O'Hearne
Hey there, I had a few questions about selectively suppressing a certain warning in Xcode. I personally find the warning which pertains to local variables hiding instance variables a real nuisance. For example, if you have a message signature with a parameter name which matches an instanc

Re: Non-pageable app

2009-04-05 Thread Chris Suter
Hi Finlay, On Sun, Apr 5, 2009 at 6:47 AM, Finlay Dobbie wrote: > -- > Indeed, many types of data, such as hashes, unencrypted versions of > sensitive data, and authentication tokens, should generally not be > written to disk due to the potential for abuse. This raises an > interesting problem.

Re: Puzzling run loop/autorelease pool question

2009-04-05 Thread Chris Suter
Hi Michael, On Mon, Apr 6, 2009 at 9:50 AM, Michael Ash wrote: > On Sun, Apr 5, 2009 at 5:11 PM, m wrote: > The workaround is easy. What you're doing is fine, or you can post a > fake NSEvent, or something similar. Pretty much up to you. Whilst that approach will probably work for ever, I stil

Re: IB 3.1 Panel Has Maximum Size funky - workaround?

2009-04-05 Thread Jonathan Hess
Hey Steve - Is this IB 3.1? Or is it possibly 3.1.1 or 3.1.2? You may want to try this with the 3.1.2 tools. Jon Hess On Apr 5, 2009, at 3:11 PM, Steve Cronin wrote: Folks; I have a panel which I want to allow the user to extend vertically up to 100 pixels. IB 3.1 (xib) Resize flag -

Re: Puzzling run loop/autorelease pool question

2009-04-05 Thread Chris Suter
Hi m, On Mon, Apr 6, 2009 at 8:21 AM, m wrote: > I've uploaded a project that demonstrates the problem to > > The problem is that you set-up your callback and your actual callback is all via C; it's not an Objective-C interface so it makes no guar

Re: Puzzling run loop/autorelease pool question

2009-04-05 Thread Michael Ash
On Sun, Apr 5, 2009 at 5:11 PM, m wrote: > I'm having trouble with autoreleased objects not being released when I > expect them to be released. > > I'm writing an app that observes ui elements of another app using the > Accessibility API. I get a root ui element from the observed application and >

Re: Need localization-proof method of transporting dates.

2009-04-05 Thread Michael Ash
On Sun, Apr 5, 2009 at 7:23 PM, Graham Cox wrote: > This leaves me with a problem - how to generate a SHA-1 hash of an arbitrary > dictionary that is likely to remain stable under different architectures, OS > versions, and so on. Of an *arbitrary* dictionary? Can't be done. Class Foo might not h

Re: Need localization-proof method of transporting dates.

2009-04-05 Thread Graham Cox
On 06/04/2009, at 1:15 AM, Michael Ash wrote: Note that, as far as I know, there is no guarantee that -hash will return the same value for the same object across runs of your program. Apple is free to change their algorithm in an OS update, and could conceivably (although I don't see why) switc

Re: Puzzling run loop/autorelease pool question

2009-04-05 Thread m
I've uploaded a project that demonstrates the problem to _murat ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the m

IB 3.1 Panel Has Maximum Size funky - workaround?

2009-04-05 Thread Steve Cronin
Folks; I have a panel which I want to allow the user to extend vertically up to 100 pixels. IB 3.1 (xib) Resize flag - ON Has Minimum Size - ON (use Current to establish the base size) Has Maximum Size - ON (use Current then add 100 to Height) Now the project won't compile: error: This windo

Re: crash reading archive

2009-04-05 Thread Sean McBride
James Maxwell (jbmaxw...@rubato-music.com) on 2009-04-05 4:24 PM said: >I'm assuming it's trying to release a released object, but I can't >see it... Any you tried any of the follewing: NSZombie? GuardMalloc? leaks checking with Instruments? MallocDebug? Also:

Re: NSString and decoding HTML Entities

2009-04-05 Thread I. Savant
On Apr 5, 2009, at 5:52 PM, Stuart Malin wrote: Thanks, but I understand the difference perfectly, but it's irrelevant. Sorry, I.S., I didn't mean to imply that you didn't understand the difference -- just wanted to be clear for others following this thread as the distinction between perc

Re: Beachball on Lengthy Task

2009-04-05 Thread Andrew Farmer
On 05 Apr 09, at 08:17, Michael Ash wrote: On Sun, Apr 5, 2009 at 9:33 AM, Kirk Kerekes wrote: Along with threads and various asynchronous techniques already mentioned, you should also consider creating a separate UI-less "foundation tool" to perform your lengthy task, controlled with NSTask

Re: NSString and decoding HTML Entities

2009-04-05 Thread Stuart Malin
On Apr 5, 2009, at 11:32 AM, I. Savant wrote: On Apr 5, 2009, at 4:35 PM, Stuart Malin wrote: The source is not HTML tagged, but contains HTML entities. see: http://www.w3schools.com/tags/ref_entities.asp http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references So, for

Re: creating related objects

2009-04-05 Thread David Scheidt
On Apr 4, 2009, at 2:26 AM, Quincey Morris wrote: On Apr 3, 2009, at 09:49, David Scheidt wrote: I have an NSPersistantDocument application. In one one of my sheets to create an object, I need to have a checkbox that, if checked, will bring up the creation sheet for a related object. I

Re: NSXMLParser memory consumption

2009-04-05 Thread Marcel Weiher
On Apr 5, 2009, at 9:35 , George King wrote: Yes, probably. Have you tried initializing it with a memory-mapped NSData instead of an NSURL? Thank you for the suggestion; I was unaware of initWithContentsOfMappedFile:. This worked to a certain extent, in that it kept memory consumption to

Re: Need localization-proof method of transporting dates.

2009-04-05 Thread Marcel Weiher
On Apr 5, 2009, at 8:15 , Michael Ash wrote: Note that, as far as I know, there is no guarantee that -hash will return the same value for the same object across runs of your program. And in fact this has changed in the past. Marcel ___ Cocoa-dev

Unable to save file in Document-Based Application

2009-04-05 Thread cocoa learner
Hi All, I am new to cocoa and GUI programming. I wrote a Document-Based Application. Whose code snippet as follows to write data into a file (this code is taken from Aaron.Hillegass-Cocoa.Programming.for.Mac.OS.X book's Chapter 10 ) - - (NSData *)dataOfType:(NSString *)typeName error:(NSError **)

Newbie question: Cocoa threads within RubyCocoa

2009-04-05 Thread Arcadio Rubio García
Hi all, I'm trying to build a simple Cocoa GUI that acts as an observer to my Ruby text application and reports progress in a window (with a progress bar, etc). I'm using RubyCocoa for creating the GUI, but I guess anyone who does not know Ruby or RubyCocoa might be still able to answer m

Re: NSString and decoding HTML Entities

2009-04-05 Thread I. Savant
On Apr 5, 2009, at 4:35 PM, Stuart Malin wrote: The source is not HTML tagged, but contains HTML entities. see: http://www.w3schools.com/tags/ref_entities.asp http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references So, for instance, I want to convert "-->" to "-->" No

Re: IB Plugin help

2009-04-05 Thread Kevin Cathey
Hi Jon, Here are my responses to your responses to my responses :): [1] INSTALLING THE PLUGIN There are obviously two modes for using an IB Plugin: developing it, and then actually using it as if it was just another plugin on the system. In the case you are developing the plugin, the best w

Re: NSString and decoding HTML Entities

2009-04-05 Thread Stephen J. Butler
On Sun, Apr 5, 2009 at 2:56 PM, Stuart Malin wrote: > I need to convert strings that contain HTML entities (e.g., ’ or > &#gt;). I can't seem to find an NSString method to do so (not that I > sometimes don't easily miss the obvious). So, I created a category on > NSString and made two trivial m

Puzzling run loop/autorelease pool question

2009-04-05 Thread m
I'm having trouble with autoreleased objects not being released when I expect them to be released. I'm writing an app that observes ui elements of another app using the Accessibility API. I get a root ui element from the observed application and register for the kAXMainWindowChangedNotifica

Re: NSString and decoding HTML Entities

2009-04-05 Thread Stuart Malin
On Apr 5, 2009, at 10:19 AM, I. Savant wrote: On Apr 5, 2009, at 3:56 PM, Stuart Malin wrote: I need to convert strings that contain HTML entities (e.g., ’ or &#gt;). To what? If you want it to be an attributed string, there's always the - [NSAttributedString initWithHTML:...] methods

Re: NSString and decoding

2009-04-05 Thread Stuart Malin
On Apr 5, 2009, at 10:22 AM, Jack Carbaugh wrote: it would have helped if I read & digested the WHOLE message. my apologies ! what i referenced and what he wanted were two different things. my apologies, jack no worries. this notion of escaping HTML entities seems often confused with U

Re: NSString and decoding HTML Entities

2009-04-05 Thread Bryan Henry
The HTML entities that Stuart is talking about aren't "percent escapes", and aren't replaced by - stringByReplacingPercentEscapesUsingEncoding:. - Bryan On Apr 5, 2009, at 4:19 PM, Jack Carbaugh wrote: Why don't you just use the features of NSString ? stringByReplacingPercentEscapesUsingEn

crash reading archive

2009-04-05 Thread James Maxwell
I'm trying to read a "default" configuration-type file when my app loads. It's worked, on and off, for the last couple of days, but it's just started complaining again. This is the code I'm using to load the object. It seems pretty straightforward, so I can't figure out what's up. I'm assum

re: NSString and decoding

2009-04-05 Thread Jack Carbaugh
it would have helped if I read & digested the WHOLE message. my apologies ! what i referenced and what he wanted were two different things. my apologies, jack ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin request

Re: NSString and decoding HTML Entities

2009-04-05 Thread Jack Carbaugh
Why don't you just use the features of NSString ? stringByReplacingPercentEscapesUsingEncoding: http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSString.html#/ /apple_ref/doc/uid/2154-BCIECHFE On Apr 5, 2009, at 3:56 PM, Stuart Malin wr

Re: NSString and decoding HTML Entities

2009-04-05 Thread I. Savant
On Apr 5, 2009, at 3:56 PM, Stuart Malin wrote: I need to convert strings that contain HTML entities (e.g., ’ or &#gt;). To what? If you want it to be an attributed string, there's always the - [NSAttributedString initWithHTML:...] methods (in the NSAttributedString AppKit additions)

NSString and decoding HTML Entities

2009-04-05 Thread Stuart Malin
I need to convert strings that contain HTML entities (e.g., ’ or &#gt;). I can't seem to find an NSString method to do so (not that I sometimes don't easily miss the obvious). So, I created a category on NSString and made two trivial methods that take advantage of toll- free bridging betw

Re: IB Plugin help

2009-04-05 Thread jmunson
Namaste! Is this the proper way to do that: - (NSImage *)ibDefaultImage { NSBundle *myBundle = [NSBundle bundleWithIdentifier:@"com.MyCompany.MyPluginName"]; NSString *someString = [myBundle pathForResource:@"SomePic" ofType:@"png"]; NSImage *someImage = [[[NSImage alloc] initWit

Re: Automating reading classes with InterfaceBuilder

2009-04-05 Thread Joey Hagedorn
Josef, While there is not an API for communicating to Interface Builder directly, Interface Builder syncs with header files in the Xcode project associated with a xib or nib file. I presume you're still using Xcode to manage and build the project. If you include the converted Objective-C

Re: Need localization-proof method of transporting dates.

2009-04-05 Thread Michael Ash
On Sun, Apr 5, 2009 at 11:58 AM, Uli Kusterer wrote: > On 05.04.2009, at 17:15, Michael Ash wrote: >> >> Note that, as far as I know, there is no guarantee that -hash will >> return the same value for the same object across runs of your program. > >  Good point. It's not too likely that a hash wou

Re: Beachball on Lengthy Task

2009-04-05 Thread Pierce Freeman
Dear Kirk: While I probably won't be using that in my current project, it sounds like a good idea and I will probably look into it if I ever have a need... On 4/5/09 6:33 AM, "Kirk Kerekes" wrote: > Along with threads and various asynchronous techniques already > mentioned, you should also con

Re: Beachball on Lengthy Task

2009-04-05 Thread Pierce Freeman
David: Thanks for your help, this seems like a class that will be perfect for what I am doing! Just a few questions: 1. Is there any concern of thread safety using this class? 2. How can I pass NSFileHandle the file URL of my files? 3. How could I create a method that will take the contents of t

Re: Beachball on Lengthy Task

2009-04-05 Thread Pierce Freeman
Stuart: That sounds like it could work, however, pointed out by someone else - I think NSFileHandle's readToEndOfFileInBackgroundAndNotify could work better as I am dealing with reading files. On 4/4/09 8:45 PM, "Stuart Malin" wrote: > > On Apr 4, 2009, at 5:36 PM, Pierce Freeman wrote: > >>

Re: IB Plugin help

2009-04-05 Thread Brandon Walkin
I haven't yet made an IB plugin with a custom formatter, but I'd assume you change that image the same way you change the image that appears in the document window. Return your own image in the - ibDefaultImage method in your integration category. On 5-Apr-09, at 9:31 AM, jmun...@his.com wro

Re: Need localization-proof method of transporting dates.

2009-04-05 Thread Greg Guerin
Graham Cox wrote: My app encodes expiry dates for demo versions, etc. If you posted the URL where one could obtain the demo version of your app, I think several people on the list would be able to try it under different languages and locales, as well as different bitness and CPU flavors

Re: PackageMaker Script

2009-04-05 Thread Jean-Daniel Dupas
Is it related in anyway to Cocoa ? You should try installer-dev instead of cocoa-dev. http://lists.apple.com/mailman/listinfo/installer-dev Le 5 avr. 09 à 18:35, John Nairn a écrit : I cannot get my app installation to run a postflight script. 1. The script runs fine in terminal app and exi

Re: Beachball on Lengthy Task

2009-04-05 Thread Greg Guerin
Michael Ash wrote: Processes are a somewhat scarce resource on OS X (only 266 per user by default, looks like) That's a raisable (soft) limit. The hard limit is higher. See man setrlimit. In bash, the command 'ulimit -Sa' lists the soft limits, and 'ulimit - Ha' lists the hard ones.

Re: Need localization-proof method of transporting dates.

2009-04-05 Thread Greg Guerin
Graham Cox wrote: Sure, I understand that. Actually the SHA-1 hash is derived from the - hash of several objects, not just the date. My take is that the combination of the several objects (typically about 8 different pieces of information) is sufficiently unique to be unspoofable in pract

PackageMaker Script

2009-04-05 Thread John Nairn
I cannot get my app installation to run a postflight script. 1. The script runs fine in terminal app and exits with 0 2. It put in the my install package (at path Scripts/postflight) and choose that file in the Scripts panel in the postflight field 3. The script is in the built package (when I

Re: NSXMLParser memory consumption

2009-04-05 Thread George King
I hit a stumbling block when passing large files (multi-GB) to NSXMLParser. Are you doing this in 64 bit? Yes, I switched to building x86_64 because NSXMLParser was refusing files over 4GB. It appears that NSXMLParser's initWithContentsOfURL: method loads the contents of the entire file

Re: Very interesting ordering caveat with NSArray arrayWithObjects:

2009-04-05 Thread Uli Kusterer
On 04.04.2009, at 02:30, Eric Hermanson wrote: Now, one would expect that the array would contain: element 1: MyCounterInstance.oid=1 element 2: MyCounterInstance.oid=2 However, this is NOT the case. Either the compiler or the runtime executes the SECOND call to [MyCounterCla

Re: Need localization-proof method of transporting dates.

2009-04-05 Thread Uli Kusterer
On 05.04.2009, at 17:15, Michael Ash wrote: Note that, as far as I know, there is no guarantee that -hash will return the same value for the same object across runs of your program. Good point. It's not too likely that a hash would be different between launches (after all, a hash is of the

Re: Beachball on Lengthy Task

2009-04-05 Thread Michael Ash
On Sun, Apr 5, 2009 at 9:33 AM, Kirk Kerekes wrote: > Along with threads and various asynchronous techniques already mentioned, > you should also consider creating a separate UI-less "foundation tool" to > perform your lengthy task, controlled with NSTask in your main app. This > yields all of the

Re: Very interesting ordering caveat with NSArray arrayWithObjects:

2009-04-05 Thread Jean-Daniel Dupas
This is not the var arg, it append with all functions (on Intel Mac). Evaluation order in argument passing is undefined. Someone in this thread (Mike IIRC) quoted the sentence in the C standard that states this. Le 4 avr. 09 à 08:14, Eric Hermanson a écrit : A comma is a sequence yet the o

Re: Need localization-proof method of transporting dates.

2009-04-05 Thread Michael Ash
On Sun, Apr 5, 2009 at 5:24 AM, Graham Cox wrote: > > On 05/04/2009, at 5:02 AM, Greg Guerin wrote: > >> An object's -hash method is not guaranteed to return a unique value. >>  Different objects can have the same hash as other objects of the same type, >> or of different types.  Therefore, if you

RE:Beachball on Lengthy Task

2009-04-05 Thread Kirk Kerekes
Along with threads and various asynchronous techniques already mentioned, you should also consider creating a separate UI-less "foundation tool" to perform your lengthy task, controlled with NSTask in your main app. This yields all of the benefits of a thread, with none of the threading pit

Re: IB Plugin help

2009-04-05 Thread jmunson
Namaste! Thank you Kevin and Josh! Josh: To clear up the assertion error, "Clean All Targets." There was some junk not getting dumped out of the project on successive builds. Also, you nailed it with the "TextLength" key. Doh! I took Apple's file comment of "MyFirstKey" literally. Whil

Re: Linking the "document edited" flag to the Undo menu item state

2009-04-05 Thread Graham Cox
On 04/04/2009, at 3:22 AM, Ashley Clark wrote: As far as I know returning the undo manager via your window delegate's windowWillReturnUndoManager: only keeps the window from creating its' own undo manager, it does not set up the mechanisms to update the window's dirty state. Yes, I stan

Re: Cocoa user pane equivalent?

2009-04-05 Thread Graham Cox
On 05/04/2009, at 12:20 PM, Jo Meder wrote: The one thing I'm not really clear on is what the Cocoa equivalent of a Carbon user pane control would be. It seems that there isn't really a direct equivalent in Cocoa and that the best way to do things would be to have a custom view inheriting

Re: IB Plugin help

2009-04-05 Thread josh hughes
Hi Jon, I tried compiling the project you attached but I was still getting Assertion Failures so I built the project from scratch again and it loads into IB without Assertion Failures (I think there is definitely something not setup right in the project you attached!). O.k First off, just

Re: Toll-free bridge type at runtime

2009-04-05 Thread Ryan Joseph
I think you misunderstand, this check can't be made at compile time. Also the moderator said: this thread has passed it's usefulness. It certainly isn't appropriate for cocoa-dev anyways. so I think that means it has been banned. ;) What you said sparks some ideas anyway that I will keep

Re: Need localization-proof method of transporting dates.

2009-04-05 Thread Uli Kusterer
On 05.04.2009, at 11:24, Graham Cox wrote: However it does seem as if writing out the date as seconds since 1970 (or a string, as Tommy suggested) might be safer and cut out any potential gotchas that I haven't realised existed. Keep us posted whether that fixes it. Have you got a copy o

Re: Need localization-proof method of transporting dates.

2009-04-05 Thread Uli Kusterer
On 04.04.2009, at 19:50, Greg Guerin wrote: timeIntervalSince1970 -timeIntervalSinceReferenceDate sounds like a longer-lasting, more modern alternative :-) Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de

Re: Need localization-proof method of transporting dates.

2009-04-05 Thread Graham Cox
On 05/04/2009, at 5:02 AM, Greg Guerin wrote: An object's -hash method is not guaranteed to return a unique value. Different objects can have the same hash as other objects of the same type, or of different types. Therefore, if you are calculating a SHA-1 hash of the -hash value returned

Re: Error: mutating method sent to immutable object

2009-04-05 Thread Graham Cox
On 05/04/2009, at 4:50 AM, Priscila J.V. wrote: Can you please suggest me something to fix it? Why not try randomly changing the code without thinking about the problem until it stops throwing errors? Yes you're right, that would be stupid. So why are you doing it? You need to develop t

Re: Toll-free bridge type at runtime

2009-04-05 Thread Uli Kusterer
On 03.04.2009, at 09:22, Ryan Joseph wrote: The Pascal compiler I'm using would need some extra runtime support (like telling me if a pointer is an object) to accomplish what you are talking about, but yes that is the way it should work. I think the Ruby and Python bridges made changes to th

Re: NSXMLParser memory consumption

2009-04-05 Thread Marcel Weiher
On Apr 4, 2009, at 9:02 , George King wrote: I hit a stumbling block when passing large files (multi-GB) to NSXMLParser. Are you doing this in 64 bit? It appears that NSXMLParser's initWithContentsOfURL: method loads the contents of the entire file into memory, which is causing virtual