On May 1, 2009, at 1:35 AM, Stephen J. Butler wrote:
So what you can do (and there are other ways too) is create a method
called appendTimeAndMessage:(NSArray*)someArguments and call that with
performSelectorOnMainThread and ilk.
Thanks Stephen. That did the trick. Also cleared up a bit of my
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.
Upcoming meetings:
Australia
Melbourne- Thursday, May 14, 2009 18:00.
Canada
Ottawa/Gatineau- Thursday, May
Folks;
Annoyed that something was amiss I have respecified the various bits
of code and it all now works as I knew Cocoa would..
Best explanation I can offer is some spelling error in key handling of
which I was blinded..
Sorry for the nuisance on the list! [:-(
Steve
This code works:
NSM
On Fri, May 1, 2009 at 12:21 AM, Ken Tozier wrote:
> I could see where scrollRangeToVisible might cause a problem, but wouldn't
> "length" be OK since it is just reading a value, not changing it?
Right, but the main thread might be changing it. Or might change it
after you've read it.
> How do y
On May 1, 2009, at 12:59 AM, Michael Ash wrote:
"It locks up" is not a very useful description. Use the debugger and
find out *where* it locks up.
I bracket calls to my KCLog function like so
NSLog(@"about to call KCLog");
KCLog(@"testing 1, 2, 3");
NSLog(@"KCLog exe OK");
And what I see in
On Fri, May 1, 2009 at 12:50 AM, Ken Tozier wrote:
> Hi
>
> I'm trying to write a general purpose console-like view and have most of the
> parts working except the convenience functions for adding attributed strings
> to an NSTextView subclass. Basically, what I want is to have a couple of
> funct
On Thu, Apr 30, 2009 at 7:24 PM, Erg Consultant
wrote:
> One other thing I should mention: the location has to be non-obvious as the
> files being written are DRM files and although I make them invisible, so all
> variants of tmp, etc are out.
It's going to be trivial to track down where you're
On Thu, Apr 30, 2009 at 3:31 PM, Ken Tozier wrote:
>
> On Apr 29, 2009, at 11:48 PM, Michael Ash wrote:
>
>> Seems like you're adding a lot of complication for what is essentially
>> a continually running operation. Instead of that, why not do this?
>>
>> 1. Spawn a thread.
>> 2. Sample files.
>>
Hi
I'm trying to write a general purpose console-like view and have most
of the parts working except the convenience functions for adding
attributed strings to an NSTextView subclass. Basically, what I want
is to have a couple of functions that can be used like NSLog, but am
finding that
Hi Kay.
It might not be as bad as you think to handle cookies yourself. The
methods +[NSHTTPCookie cookiesWithResponseHeaderFields:forURL:] and +
[NSHTTPCookie requestHeaderFieldsWithCookies:] are useful. You should
also be able to archive -[NSHTTPCookie properties]. Thus, it's not an
enor
On Thu, Apr 30, 2009 at 11:38 PM, K. Darcy Otto wrote:
> Option 2: Moving the text displayed by the NSTableView to the right by some
> way other than inserting spaces. This might be the best way, alleviating
> the need for a custom field editor and editing the field editor text prior
> to displa
On Apr 30, 2009, at 6:47 PM, Ali Ozer wrote:
[...]
What I don't get is... why is there NSMutableString and NSString?
#1. It seems weird to me that a string object can't be modified
once it's
created. Why is this?
Immutable objects are useful for various reasons:
- Knowing that they can'
I have an NSTableView subclass that adds a few spaces to data from the
source when it is displayed. So:
Datasource for cell: "A" (1)
NSTableView displays: " A" (2)
Now, when the field editor is called, it edits (2), not (1). Fair
enough. But I need to edit (1). So, how do I do this? I
Perhaps I'm not understanding properly, but are you suggesting that I use
NSOpenPanel to save files?
That doesn't make any sense...
On Thu, Apr 30, 2009 at 3:14 PM, Tom Hohensee wrote:
> HenriettaYou have to use NSFileManager displaynameAtPath: in conjuction
> with NSOpenPanel. Here is so
Thanks to this suggestion:
http://www.cocoabuilder.com/archive/message/cocoa/2009/4/30/235760
I have been able to solve this long-standing problem. The trick with
repositioning the field editor, at least within an NSTableView, is to
create an NSTextFieldCell subclass, and set the table cell
Not sure this was solved.
On 13.Mar, 2009, at 5:45 , Joe Turner wrote:
NSImage *original = [NSImage imageNamed:NSImageNameComputer];
[original setSize:NSMakeSize(10.0f, 10.0f)];
-> this will not make your bitmap 10x10 pixels, but just change the
DPI settings to make sure it
I am pretty new to objective-c, and I've been going over some stuff
in a book I
bought, and there is just something that is really bothering me. I
can't
really ask the author a question about his paragraph, so I thought
I'd write
here instead.
So--- This has to do with arrays, dictionarie
Hi everyone,
I am pretty new to objective-c, and I've been going over some stuff in a book I
bought, and there is just something that is really bothering me. I can't
really ask the author a question about his paragraph, so I thought I'd write
here instead.
So--- This has to do with arrays, dict
On Apr 30, 2009, at 5:29 PM, Ulai Beekam wrote:
Because just adding a key to a dictionary does not make it key-value-
coding compliant with respect to that key. KVC is needed for key
paths like that to work.
From: steve_cro...@mac.com
To: cocoa-de
On 30/04/2009, at 10:10 PM, Alastair Houghton wrote:
You need
[scanner setCharactersToBeSkipped:nil];
D'oh, seems obvious now
Thanks!
--Graham
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or m
I am using PackageMaker 2.1.1 from Xcode 2.5. My installers have to work with
10.4/10.5.
My built installer prompts for an admin password before install, but if my
installer plugin tries to do any file operations on anything inside
/Applications at runtime - such as deleting or moving one of my
Because just adding a key to a dictionary does not make it key-value-coding
compliant with respect to that key. KVC is needed for key paths like that to
work.
> From: steve_cro...@mac.com
> To: cocoa-dev@lists.apple.com
> Date: Thu, 30 Apr 2009 19:00:51
Folks;
I have a mutable dictionary 'myPerson' which has a key=@"address".
The object stored at @"address" is another mutable dictionary.
someCity = [myPerson valueForKeyPath:@"address.city"] --> nil
someCity = [[myPerson valueForKey:@"address"] valueForKey:@"city"] --
> expected value
Why
On 30 Apr 09, at 16:24, Erg Consultant wrote:
One other thing I should mention: the location has to be non-obvious
as the files being written are DRM files and although I make them
invisible, so all variants of tmp, etc are out.
If your DRM depends on the directory being secret, it's not ver
I should have also mentioned I have to support 10.4+ as this is for a casual
home market where lots of users have older configurations.
Erg
From: Stephen J. Butler
To: Cocoa-Dev List
Sent: Thursday, April 30, 2009 4:16:03 PM
Subject: Re: Writable dir for non
One other thing I should mention: the location has to be non-obvious as the
files being written are DRM files and although I make them invisible, so all
variants of tmp, etc are out.
Erg
From: Dave Geering
To: Erg Consultant ; cocoa-dev@lists.apple.com
Sent:
On Thu, Apr 30, 2009 at 5:52 PM, Erg Consultant
wrote:
> Is there any location on the system outside the current user's dir that is
> writable outside the user's domain? I need my app to create some files when
> run under a non-admin acct that I need to persist across boots/logins. But
> every
On Fri, May 1, 2009 at 8:52 AM, Erg Consultant wrote:
> Is there any location on the system outside the current user's dir that is
> writable outside the user's domain? I need my app to create some files when
> run under a non-admin acct that I need to persist across boots/logins. But
> every p
Is there any location on the system outside the current user's dir that is
writable outside the user's domain? I need my app to create some files when run
under a non-admin acct that I need to persist across boots/logins. But every
permanent location seems to be locked except for things inside t
On Apr 30, 2009, at 10:55 AM, Daniel Kennett wrote:
Hi again,
Well, that was quick. With NSZombieEnabled, I get this when
deallocating my context:
*** -[VetVisit_VetVisit_ _hasRetainedStoreResources]: message sent
to deallocated instance 0x16b85600
VetVisit is class that represents an
On Apr 30, 2009, at 6:07 PM, James Pengra wrote:
I would like to play the sound of pure sine waves or combinations
of sine waves, by means of a Cocoa application. NSSound will play
sound files, so the trick seems to be to create the appropriate
files synthetically, using the mathematical f
I would like to play the sound of pure sine waves or
combinations of sine waves, by means of a Cocoa application. NSSound
will play sound files, so the trick seems to be to create the
appropriate files synthetically, using the mathematical functions.
Does anyone know how to create sound files
At 7:22 PM -0500 4/29/09, Ken Thomases wrote:
On Apr 29, 2009, at 6:40 PM, kvic...@pobox.com wrote:
thank you. this solved my problem.
You're welcome. I'm glad I could help.
and (i think) you've helped again. thanx. (see below)
and for the archives (to help anyone in the future), here
Thanks everyone. Guess i was the only mac developer who didn't know
that :)
On Thu, Apr 30, 2009 at 1:06 PM, Jonathan Hess wrote:
> Hey Darren -
>
> Try NSClassFromString.
>
> Animal* anAnimal = [[NSClassFromString(@"Dog") alloc] init]
>
> Jon Hess
>
>
> On Apr 30, 2009, at 12:50 PM, Darren
Hi everyone, I'm wondering if anyone can put me on the right path to
create the following custom view...
I'm trying to write a new view, to displaying hierarchical data which
only uses one column. To navigate though the hierarchy, double
clicking an item in the list loads that items content
Question,
I'm passing a file name such as 'MyTextFile.txt' to NSSavePanel
runModalForDirectory.
When the panel appears the entire string is selected, but I would rather
that just
'MyTextFile' is selected. Is it possible to set the selection to exclude the
file
extension?
Thank you.
On Apr 30, 2009, at 12:36 , Jeffrey Oleander wrote:
%S specifies a null-terminated array of 16-bit unicode
characters. What you're passing is an NSString object.
So the specifier should be the object specifier, %...@.
Yes, that is what I had tried first. Still, the warning
comes and goes.
Hey Darren -
Try NSClassFromString.
Animal* anAnimal = [[NSClassFromString(@"Dog") alloc] init]
Jon Hess
On Apr 30, 2009, at 12:50 PM, Darren Minifie wrote:
Hi everyone.
I have the situation where I need to dynamically create an object
based on
the value held in a string at runtime. I'm
On Apr 30, 2009, at 1:50 PM, Darren Minifie wrote:
Hi everyone.
I have the situation where I need to dynamically create an object
based on
the value held in a string at runtime. I'm pretty sure the dynamic
nature
of objective-c would allow this, but I cant seem to find the right
method o
NSClassFromString does what you want
http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_Functions/Reference/reference.html#/
/apple_ref/c/func/NSClassFromString
On Apr 30, 2009, at 3:50 PM, Darren Minifie wrote:
Hi everyone.
I have the situation wh
On Thu, Apr 30, 2009 at 2:50 PM, Darren Minifie wrote:
> Hi everyone.
>
> I have the situation where I need to dynamically create an object based on
> the value held in a string at runtime. I'm pretty sure the dynamic nature
> of objective-c would allow this, but I cant seem to find the right met
Hi everyone.
I have the situation where I need to dynamically create an object based on
the value held in a string at runtime. I'm pretty sure the dynamic nature
of objective-c would allow this, but I cant seem to find the right method on
NSString or NSObject. I want to do this:
NSString* someC
> On Tue, 2009/04/28, Graham Cox wrote:
>> On 2009/04/29, at 08:34, Jeffrey Oleander wrote:
>> I've been having 2 intermittent compilation errors
>> on 10.3.9 in
>> - (BOOL)loadDataRepresentation:(NSData*)data
>> ofType:(NSString*)fileType
>> {
>> BOOL success;
>> NSString * lowercaseFile
On Apr 29, 2009, at 11:48 PM, Michael Ash wrote:
Seems like you're adding a lot of complication for what is essentially
a continually running operation. Instead of that, why not do this?
1. Spawn a thread.
2. Sample files.
3. Sleep.
4. Goto 2.
Or, in code:
- (void)threadMethod {
while(1)
Ah, that makes sense. I knew the @class thing was working, but it was
so annoying to never know if the method call was correct or not.
Adding the .h files to the respective .m files fixed the issue though.
Thanks so much!
Andre
On 30-Apr-09, at 11:07 AM, Sherm Pendley wrote:
On Thu, Apr 30,
On Apr 30, 2009, at 11:53 AM, Monty wrote:
Is there any natural case that a view controller's view property
would point to something other than the root of a view hierarchy, or
is this just a circuitous way of talking about a view being
displayed or not?
If I understand things correctly
If you look at the documentation for UITextView,
http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UITextView_Class/UITextView_Class.pdf
you'll notice that UITextView instances do not know how to respond to
the -string or -replaceCharactersInRange:withString: messages.
On Apr 30, 2009, at 12:53 AM, Kyle Sluder wrote:
On Thu, Apr 30, 2009 at 1:44 AM, Jeff Johnson
wrote:
On an unrelated note, your use of "self->connection", etc., is non-
standard
and not advised. You should be using direct ivar access "connection",
properties "self.connection", or accessor me
On 29.Apr, 2009, at 21:02 , Charles Srstka wrote:
On 29 Apr 09, at 06:15, Mark Douma wrote:
Carbon and the Finder are displaying the filenames as is, as HFS
allows slashes to be in a filename, and the colon is the separator.
Cocoa and the BSD layer, on the other hand, do swap the slashes a
On Thu, Apr 30, 2009 at 2:55 AM, Andre Doucette <
andre.eckythump.douce...@gmail.com> wrote:
It seems that it doesn't like the double #import, but I thought the whole
> idea behind #import was that it ensured one-time includes.
#import guards against multiple includes, but not circular includes.
Hi again,
Well, that was quick. With NSZombieEnabled, I get this when
deallocating my context:
*** -[VetVisit_VetVisit_ _hasRetainedStoreResources]: message sent to
deallocated instance 0x16b85600
VetVisit is class that represents an Entity in my object model - the
Pet entity has a coll
Thank you to you and Keary for your reply.
This is what the // copy out some data code does:
NSMutableDictionary *dict = [[NSMutableDictionary alloc] init];
[dict setValue:[[[pet valueForKey:@"name"] copy] autorelease]
forKey:@"name"];
[dict setValue:[[[pet valueForKey:@"birthday"] copy] auto
On Apr 30, 2009, at 2:53 AM, Monty wrote:
I'm having some confusion understanding the expected behavior of
UIViewController's response to didReceiveMemoryWarning messages. In
Memory Management Programming Guide for Cocoa|Memory Management of
Nib Objects, it states "Assuming that it does not
Hi Andre,
#import means that the compiler will only include the file once, thus
eliminating re-declaration errors. It does not, however, eliminate
the problems introduced by circular dependencies (which is what you've
got going here).
As a general rule, the only thing you should be #impo
I'm having some confusion understanding the expected behavior of
UIViewController's response to didReceiveMemoryWarning messages. In Memory
Management Programming Guide for Cocoa|Memory Management of Nib Objects, it
states "Assuming that it does not have a superview, the view is disposed of..."
All,
RegexKitLite 3.0 development is wrapping up. I'm looking for feedback
before I freeze things in an actual release, particularly from current
RegexKitLite users. Because it's not released yet, you'll need to grab it
via svn. You can do so from the shell with 'svn co
http://regexkit.svn.sourc
Hi everyone!
I have noticed a problem in a few projects and don't understand why. I
have found a work around, but it seems both unnecessary and a pain due
to warnings.
For one example, I have two classes, AppController and
NetworkController.
For the AppController class:
Hello I'm very new to iphone dev and am having some issues with appending
text from my NSTextView the
the NSTextView name is txvMain
code I have is
[txvMain replaceCharactersInRange:NSMakeRange([[txvMain string]length],0)
withString:@"Hello"]];
and the errors I'm getting are
Warning: "UITextView"
On Apr 30, 2009, at 4:52 AM, Kyle Sluder wrote:
In other words, why not just use the damn API? It's not like you need
to deposit a coin to make a function call.
If you did, we wouldn't have toll-free bridging.
--Andy
___
Cocoa-dev mailing list (Co
On 30 Apr 2009, at 14:13, Thomas Engelmeier wrote:
I have a NSSecureTextField combined with bindings I need to filter
for "allowed" formats like ['0'-'9']* or ['0'-'9''a'-'f']*.
Have you tried setting a custom formatter and implementing
-
isPartialStringValid:proposedSelectedRange:origina
On 30 Apr 2009, at 13:13, Alexander Spohr wrote:
When you call this on another than the first run:
range.location = [scanner scanLocation];
[scanner scanString:[[self class] delimiterString] intoString:NULL];
Your scanner still stands on the space coming from here:
[scanner scan
Hi,
I have a NSSecureTextField combined with bindings I need to filter for
"allowed" formats like ['0'-'9']* or ['0'-'9''a'-'f']*.
The filter is set up like below and according to the NSLog working fine.
According to the documentation "Bindings Message Flow", the following
should occur:
[
Hi list,
I'm using the NSCollectionView to present some my custom data. I'm using a
NSMutableArray which bind to the ArrayController to provide data to the
CollectionView.
Every time I'm using the willChangeValueForKey and didChangeValueForKey to
update the GUI.But some time the NSCollectionView
Hi,
I am trying to programmatically enumerate all available bindings and
their options for a given class. It works fine, except -
optionDescriptionsForBinding: that allways returns an empty array of
options, for any binding.
The routine I have written is:
static void enumerateBindingsForC
When you call this on another than the first run:
range.location = [scanner scanLocation];
[scanner scanString:[[self class] delimiterString] intoString:NULL];
Your scanner still stands on the space coming from here:
[scanner scanUpToCharactersFromSet:[[self class]
keyBreakingC
On 30 Apr 2009, at 12:45, Graham Cox wrote:
The result for the above string should be keys @"city", @"state",
@country" with ranges {0,6}, {7,7} and {15,9} respectively. The
ranges include the delimiter characters while the keys do not. The
results I actually get are correct keys, but range
I'm using a NSScanner to parse a string into a bunch of special keys
for later use. The keys are stored as both the key itself and a
NSRange which indicates its position in the original string. The keys
are parsed as I wish but the ranges are off-by-one except for the
first. I have looped t
On 30 Apr 2009, at 05:02, Charles Srstka wrote:
Carbon and the Finder are displaying the filenames as is, as HFS
allows slashes to be in a filename, and the colon is the separator.
Cocoa and the BSD layer, on the other hand, do swap the slashes and
colons. Presumably the idea is to display
Hi,
I am developing a text editor in which I use to set the font name and font
size by selecting it from popup buttons.
Fonts obtained using the code:
NSArray *path=[[NSFontManager alloc]
availableFonts];
[fontList addItemsWithTitle
Hi,
I am developing a text editor in which I use to set the font name and font
size by selecting it from popup buttons.
Fonts obtained using the code:
NSArray *path=[[NSFontManager alloc]
availableFonts];
[fontList addItemsWithTitles
On Thu, Apr 30, 2009 at 4:32 AM, ERG Consultant
wrote:
> / has been in use since the inception of unix in 1970 that's 39 years. I
> seriously doubt it's going to change anytime soon. In 39 more years, i'll be
> dead.
Cocoa is derived from Openstep (or OPENSTEP, or OpEnStEp, depending on
the sta
On Apr 30, 2009, at 3:06 AM, Kiran Kumar S wrote:
On 30-Apr-09, at 12:03 PM, Ken Thomases wrote:
On Apr 30, 2009, at 12:47 AM, Kiran Kumar S wrote:
I am developing a client/server application using DO. In server an
object is vended to be accessible by clients.In the client side i
am acces
/ has been in use since the inception of unix in 1970 that's 39 years. I
seriously doubt it's going to change anytime soon. In 39 more years, i'll be
dead.
ERG
Sent from my iPod
On Apr 29, 2009, at 8:50 PM, Michael Ash wrote:
On Wed, Apr 29, 2009 at 10:22 PM, Andrew Farmer wrote:
On 29 Ap
Except that I am not calling the mentioned code within awakeFRomNib the first
time - I am calling it from within my own show window routine - and after
animation the two views are in the same locations as they were the first time
ERG
On Apr 29, 2009, at 11:35 AM, Benjamin Stiglitz wrote:
On
On Wed, Apr 29, 2009 at 11:31 PM, Nick Hristov
wrote:
> - (id) initWithURL: (NSURL*) someurl
> {
>self = [super init];
>if (self != nil) {
>self->url = [someurl copy];
>NSURLRequest * request = [NSURLRequest requestWithURL:self->url
> cachePolicy: NSURLRequestUseProtocolCac
75 matches
Mail list logo