Re: display Mac id

2009-06-24 Thread Finlay Dobbie
On Tue, Jun 23, 2009 at 8:04 AM, Kiran Kumar wrote:
> Hi all,
>
> i am doing project to change MAC Address ,i want to display MACID in
> a single textbox like 00:15:e9:4c:c3:d7
>
> or 00-15-e9-4c-c3-d7 can any one help me plz ...

Apple has sample code for this:

http://developer.apple.com/samplecode/GetPrimaryMACAddress/

 -- Finlay
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: webDAV (lite) framework?

2008-07-21 Thread Finlay Dobbie
On Mon, Jul 21, 2008 at 3:37 PM, William Bates
<[EMAIL PROTECTED]> wrote:
> Is there an objective-C webDAV framework around? I've been rolling my own (I
> only need some basic functionality) but can't image it hasn't been done
> already...

ConnectionKit has basic functionality for WebDAV. And HTTP, FTP, SFTP,
.Mac and Amazon S3...

http://opensource.utr-software.com/connection/

 -- Finlay
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Being notified of changes to a file

2008-07-21 Thread Finlay Dobbie
On Mon, Jul 21, 2008 at 8:56 AM, Yann Disser <[EMAIL PROTECTED]> wrote:
> What I am trying to figure out, is how to respond right away to every single
> line that is written on stdout without waiting for the process to be
> finished.

There are many examples of this. See
 for one
of them. You need to get an NSPipe, create a corresponding
NSFileHandle and use -readInBackgroundAndNotify.

 -- Finlay
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Read/Write to info.plist's LSEnvironment

2008-07-21 Thread Finlay Dobbie
On Mon, Jul 21, 2008 at 5:50 PM, Lee, Frederick
<[EMAIL PROTECTED]> wrote:
> Simple need: to store NSString values (UserName, PW) in a Dictionary
> format within my application's .plist.
>
> I've read Apple's Cocoa literature and found that .plist's LSEnvironment
> is the way to go.
>
> Using the .plist editor to add LSEnvironment dictionary and member keys
> is straight forward.
>
> But I'm having trouble figuring out how to programmatically
> update/retrieve these values.

You cannot guarantee that the user of your application will have write
access to your bundle. Why are you trying to store them within your
application rather than using, for example, NSUserDefaults? It doesn't
sound like LSEnvironment is what you want at all.

 -- Finlay
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Application control

2008-08-08 Thread Finlay Dobbie
On Thu, Aug 7, 2008 at 8:51 PM, falcon <[EMAIL PROTECTED]> wrote:
> I have application written using Qt library. I have a network of about 40
> mac minis. Now I have to connect to each of these macs using ARD and change
> one parameter on main window of the application.  I have tried to use UI
> scripting, but it doesn't work because it is not a cocoa application.

That's not really fair - you can implement Accessibility within
Carbon, it just takes some effort.

> Is there any way to make that from another application?

You could potentially generate the requisite events (clicks and
keystrokes), but this seems fairly fragile.

 -- Finlay
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: How to create a GUID?

2008-09-06 Thread Finlay Dobbie
On Sat, Sep 6, 2008 at 10:55 PM, I. Savant <[EMAIL PROTECTED]> wrote:
>  At the bottom of the page, there's this:
>
> - (NSString *)uuid
> {
>CFUUIDRef uuidRef = CFUUIDCreate(NULL);
>CFStringRef uuidStringRef = CFUUIDCreateString(NULL, uuidRef);
>CFRelease(uuidRef);
>NSString *uuid = [NSString stringWithString:(NSString *)
> uuidStringRef];
>CFRelease(uuidStringRef);
>return uuid;
> }

Why the unnecessary copy?

- (NSString *)uuid
{
   CFUUIDRef uuidRef = CFUUIDCreate(NULL);
   CFStringRef uuidStringRef = CFUUIDCreateString(NULL, uuidRef);
   CFRelease(uuidRef);
   return [(NSString *)uuidStringRef autorelease];
}

 -- Finlay
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Non-pageable app

2009-04-04 Thread Finlay Dobbie
On Fri, Apr 3, 2009 at 11:57 PM, Rich Collyer  wrote:
> My primary interest is to ensure that the content of an NSSecureTextField
> and any times I extract the string from it, the memory is not paged out, or
> cached.

http://developer.apple.com/documentation/Darwin/Conceptual/KernelProgramming/security/security.html
says:

--
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. There is no good way to deal with this in user
space (unless a program is running as root).
--

 -- Finlay
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Programatically hiding file extensions in Finder

2009-05-04 Thread Finlay Dobbie
On Fri, May 1, 2009 at 8:30 AM, Erg Consultant  wrote:
> Is there a way to do this? I checked all the File Manager docs and would have 
> thought there would have been something in the cat info to do it, but 
> apparently not.

OSStatus LSSetExtensionHiddenForRef (
   const FSRef *inRef,
   Boolean inHide
);
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com