Thanks for the help,
Here is what I came up with and from my testing looks to work very well.
- (NSInteger)weekDayFromDate:(NSDate *)aDate
{
NSCalendar *gregorianCal = [[NSCalendar alloc]
initWithCalendarIdentifier:NSGregorianCalendar];
NSDateComponents *components = [gregorianCal
Hello,
I'm trying to calculate next occurrence of a NSDate object. Based on a "Start
Date" ( e.g. 2010-12-10, Friday ) I would like to know the date of the next
Friday occurrence from today ( e.g. 2010-12-30, Thursday ).
Example:
StartDate = 2010-12-10
CurrentDate = 2010-12-30
Next Occurrence
thanks a bunch, this is great!
tom
On Nov 7, 2010, at 2:40 PM, Dave Carrigan wrote:
>
> On Nov 7, 2010, at 2:31 PM, Kyle Sluder wrote:
>
>> On Nov 7, 2010, at 2:24 PM, Tom Jones wrote:
>>
>>> Ops, thanks!
>>>
>>> I have not really done mu
Ops, thanks!
I have not really done much with sockets. Is there an example you know of that
I can learn from?
Thanks,
tom
On Nov 7, 2010, at 2:14 PM, Dave Carrigan wrote:
> On Nov 7, 2010, at 2:02 PM, Tom Jones wrote:
>> Thanks, yes its a tcp port. I tried this but for some reason
.");
}
[port release];
Thanks,
tom
On Nov 7, 2010, at 1:44 PM, Dave Carrigan wrote:
> On Nov 7, 2010, at 1:35 PM, Tom Jones wrote:
>
>> I'm looking for a simple way to ping a host and a specific port on that
>> host. I have SCNetworkCheckReachabilityByName working just
Hello,
I'm looking for a simple way to ping a host and a specific port on that host. I
have SCNetworkCheckReachabilityByName working just fine but I really need to
test to see if the port is active.
Thanks,
tom___
Cocoa-dev mailing list (Cocoa-dev@lis
[errorDetail setValue:@"Failed to find the requested type."
forKey:NSLocalizedDescriptionKey];
*err = [NSError errorWithDomain:@"DataForType" code:1 userInfo:errorDetail];
}
return nil;
Thanks for the help,
tom
- Original Message -
From: "Ken Thomases"
To
Hello,
I'm trying to understand why I'm getting thrown in to the debugger when using
NSError. I have three methods and I'm overloading them and trying to pass the
NSError along the way. What am I doing wrong?
Thanks,
tom
Code:
-(NSString *)getDataForType:(NSString *)aType error:(NSError **)er
Hello, I have been googling on how to convert a CFURLRef to NSURL. But it
always seems to be the oposite that people are searching for.
Thanks,
tom
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator c
if it's a 10.4 I'm using system and on 10.5 and higher I'm
using NSFileManager.
Thanks,
tom
On Aug 14, 2010, at 2:33 PM, Charles Srstka wrote:
> On Aug 14, 2010, at 4:01 PM, lbland wrote:
>
>>
>> On Aug 14, 2010, at 2:28 PM, Tom Jones wrote:
>>
>&
Thanks, this helps a lot. What I'm looking to "remove" is my temp directory
where I'm downloading files un-compressing them etc. Just good house keeping.
I must admit having not been doing this long, and after Kyle's remark on
"collected consulting fees" I'm surprised that there isn't a task a
Hello,
What is the best way to recursively remove a directory and all of it's sub
directories and files, BTW I need to support 10.4 systems.
Thanks,
tom___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or modera
Hello,
I have been googling for a little while now and I'm not finding the answers.
Does Mac OS X have a unzip library to unzip the archives created in the GUI. I
guess I could do the NSTask thing but I would rather not. I would also like to
avoid a framework as well as my app is a Foundation to
uff"];" in any of my classes. I have never
really done this before. Should I just re-init it in each of my classes?
Thanks,
tom
On Nov 27, 2009, at 11:10 PM, Jens Alfke wrote:
>
> On Nov 26, 2009, at 9:18 AM, Tom Jones wrote:
>
>> I thought I could just create a Global
I'm writing a Foundation tool and I want to create a global object which I can
reference any where in my code. This is for logging, so I want to declare my
logging object in my main method and use it in any of my classes.
I thought I could just create a Global variable but that does not work.
W
Hello,
I'm looking to store NSDirectoryEnumerator data in a file, but it seems to
create a really large file. How can I get the file size down?
I have tried both of these methods to save the and while the NSKeyedArchiver
reduces the size by about 1MB to 9.3MB thats still seems really big.
[file
Thanks, I have no idea how I missed that in the docs :-P
tom
- Original Message -
From: "Dave Keck"
To: "Tom Jones"
Cc: cocoa-dev@lists.apple.com
Sent: Sunday, October 11, 2009 10:57:43 AM GMT -08:00 US/Canada Pacific
Subject: Re: Recursively get all fi
Hello,
I'm playing with NSFileManager and I'm trying to get all of the contents of a
directory. When I use "directoryContentsAtPath" it just gives me the one level.
Is there an easy/good way to get all subdirectories and files as well?
Thanks,
tom
___
Thanks Rob. This works great and if Stu is on this list great class!
tom
- Original Message -
From: "Rob Keniger"
To: "cocoa-dev Dev"
Sent: Wednesday, June 24, 2009 7:57:21 PM GMT -08:00 US/Canada Pacific
Subject: Re: Watch for a file
On 25/06/2009, at 12:38 PM, Graham Cox wrote:
>
Thanks Graham. I downloaded Uli's class but I dont see any example code. By any
chance do you have a quick example?
Thanks,
tom
- Original Message -
From: "Graham Cox"
To: "Tom Jones"
Cc: cocoa-dev@lists.apple.com
Sent: Wednesday, June 24, 2009 7:38:54 PM GMT
I'm trying to use NSNotification to watch for a file but I can not seem to get
it to work. Is it possible to use NSNotification to watch for a specific file
on the file system? One example would be to run a method once the file shows up
on the filesystem.
Thanks,
tom
__
This is great, thanks! I think you even covered follow up questions,
now it's off to read the Apple documentation.
Thanks again,
tom
On Dec 12, 2008, at 1:05 AM, Chris Hanson wrote:
On Dec 12, 2008, at 12:16 AM, Kyle Sluder wrote:
On Fri, Dec 12, 2008 at 2:58 AM, Tom Jones
wrote
Hello,
I'm hoping someone could point me in the right direction. Where would
I read up on how to create modules or plugins for a Cocoa application?
I'm not even sure I'm asking the right question :-)
Here is kind of the idea. I would like to write a "plugin" which is
loaded when the app la
>> I'm writing a Foundation tool and I need to run a NSTask in a
>> separate thread.
> An NSTask is a different thing from a thread. Since NSTask provides
> asynchronous notification of its death (and NSFileHandle provides
> asynchronous methods for dealing with I/O), there should be no need
Hello,
I'm writing a Foundation tool and I need to run a NSTask in a separate
thread. I have it working but when the task completes the thread is
still running. I tried issuing a [NSThread exit] but that did nothing.
What am I missing?
Thanks,
tom
This my main code
#import
#import "Thre
atabases,
like MySQL or Oracle.
On Jul 10, 2008, at 10:21 PM, Tom Jones wrote:
Hmm, this is really a shame. I guess I was just looking for a good
framework to use to connect to a database. I think this is a big
hole that Apple should really fill. It would be really cool if we
could c
7:35 PM, Nick Zitzmann wrote:
On Jul 10, 2008, at 7:42 PM, Tom Jones wrote:
I would like to write a app to be able to talk to a couple of
different types of databases (MySQL, Oracle). I'm thinking that
JDBC is the way to go. Does anyone know of any JDBC frameworks and
examples tha
Hello,
I would like to write a app to be able to talk to a couple of
different types of databases (MySQL, Oracle). I'm thinking that JDBC
is the way to go. Does anyone know of any JDBC frameworks and examples
that you can point me towards, I cant seem to really find much.
Thanks,
tom
_
Hello,
I would like to write a app to be able to talk to a couple of
different types of databases (MySQL, Oracle). I'm thinking that JDBC
is the way to go. Does anyone know of any JDBC frameworks and examples
that you can point me towards, I cant seem to really find much.
Thanks,
tom
_
Hello,
I'm fairly new to Cocoa, so please excuse me if I'm not using the
right terminology.
I have an NSArray which contains String values and I want to loop
though it and determine if any of those string contain words I'm
looking for. I have tried but have been unsuccessful.
Example...
30 matches
Mail list logo