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
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
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
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
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
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
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
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,
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
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. HomerDoh!/Homer I
took Apple's file comment of MyFirstKey literally.
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
On Sun, Apr 5, 2009 at 5:24 AM, Graham Cox graham@bigpond.com 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.
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
On Sun, Apr 5, 2009 at 9:33 AM, Kirk Kerekes kkere...@cox.net 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
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
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
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
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
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
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.
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
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
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
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 stu...@zhameesha.com wrote:
On Apr 4, 2009, at 5:36 PM, Pierce
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
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 kkere...@cox.net wrote:
Along with threads and various asynchronous techniques already
mentioned, you
On Sun, Apr 5, 2009 at 11:58 AM, Uli Kusterer
witness.of.teacht...@gmx.net 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
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
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]
I need to convert strings that contain HTML entities (e.g., #8217;
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
On Apr 5, 2009, at 3:56 PM, Stuart Malin wrote:
I need to convert strings that contain HTML entities (e.g., #8217;
or #gt;).
To what?
If you want it to be an attributed string, there's always the -
[NSAttributedString initWithHTML:...] methods (in the
NSAttributedString AppKit
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
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
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
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 ?
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
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.,
#8217; or #gt;).
To what?
If you want it to be an attributed string, there's always the -
[NSAttributedString initWithHTML:...]
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
On Sun, Apr 5, 2009 at 2:56 PM, Stuart Malin stu...@zhameesha.com wrote:
I need to convert strings that contain HTML entities (e.g., #8217; 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
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
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 --gt; to --
No
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
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
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
___
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
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
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,
On 05 Apr 09, at 08:17, Michael Ash wrote:
On Sun, Apr 5, 2009 at 9:33 AM, Kirk Kerekes kkere...@cox.net 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,
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
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:
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
I've uploaded a project that demonstrates the problem to
http://uielement.muratnkonar.com/UIElement.zip
_murat
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the
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)
On Sun, Apr 5, 2009 at 7:23 PM, Graham Cox graham@bigpond.com 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.
On Sun, Apr 5, 2009 at 5:11 PM, m mlist0...@gmail.com 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
Hi m,
On Mon, Apr 6, 2009 at 8:21 AM, m mlist0...@gmail.com wrote:
I've uploaded a project that demonstrates the problem to
http://uielement.muratnkonar.com/UIElement.zip
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
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 -
Hi Michael,
On Mon, Apr 6, 2009 at 9:50 AM, Michael Ash michael@gmail.com wrote:
On Sun, Apr 5, 2009 at 5:11 PM, m mlist0...@gmail.com 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
Hi Finlay,
On Sun, Apr 5, 2009 at 6:47 AM, Finlay Dobbie finlay.dob...@gmail.com 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
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
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 'variable name' hides instance
variable
What
Hi Brad,
On Mon, Apr 6, 2009 at 10:10 AM, Brad O'Hearne
br...@bighillsoftware.com 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
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
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
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
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
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
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
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
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.
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
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
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
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
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,
On Sun, Apr 5, 2009 at 9:18 PM, Greg Guerin glgue...@amug.org 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
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
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 45
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
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
80 matches
Mail list logo