CGEventRef with function key

2011-07-21 Thread Joe Turner
is not virtually pressed. As far as I can tell kCGEventFlagMaskSecondaryFn is for the function key modifier, so I'm not sure why this isn't working. Any help would be appreciated! Thanks, Joe Turner ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com

Re: CGEventRef with function key

2011-07-21 Thread Joe Turner
it any different for Fn. Thanks, Joe On Jul 21, 2011, at 5:22 PM, Joe Turner wrote: So I've been having some issues with posting a CGEvent with a function key as a modifier (or flag). If I call CGEventSetFlags(eventDown, kCGEventFlagMaskSecondaryFn), and then post the event, all I get

Create pinch/magnify event

2010-08-20 Thread Joe Turner
Hey, I'm trying to use CGEvent to create a pinch/magnify event, but I can't find any info on how to do it. I see there's a NSEventTypeMagnify for NSEvent, but the magnification factor does not seem settable. Even if it was, weird things happen when you try to convert an NSEvent to a CGEvent.

Re: CGEvent with double click

2010-08-19 Thread Joe Turner
Wow, when I glanced over that I assume the state would mean up or down, so I didn't look into it. Thanks so much man! I owe you one :) Joe ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments

CGEvent with double click

2010-08-18 Thread Joe Turner
Hello, I'm trying to post an event (using CGEventRef) that at least behaves like a double click (even if it's not officially one). What I do now is immediately have a down click, then .01 second later have an up click, then .1 second later have a down click, and then .01 second later have an

NSStatusItemthreading

2010-07-25 Thread Joe Turner
Hello, I recently realized that when the user opens the NSStatusItem in my app, the main run loop gets blocked up until they close it. This is a big issue for parts of my app, so I need a way to thread the NSStatusItem. I tried to create it in a new thread, hoping it would then do all of its

Re: NSStatusItemthreading

2010-07-25 Thread Joe Turner
Hey, Thanks man! That worked perfectly :) Joe On Jul 25, 2010, at 7:35 PM, Graham Cox wrote: On 26/07/2010, at 4:53 AM, Joe Turner wrote: I recently realized that when the user opens the NSStatusItem in my app, the main run loop gets blocked up until they close it. This is a big issue

Re: NSPropertyListSerialization and string encoding

2010-07-23 Thread Joe Turner
at 9:22 AM, Joe Turner joetur...@me.com wrote: The reason I need to convert it to a string is to put it into the post string of a url request. However, would it be possible instead to just use NSMutableData, and just append this data block where it needs to go? That way, I wouldn't have to deal

Re: NSPropertyListSerialization and string encoding

2010-07-23 Thread Joe Turner
know how to do), has to be done with NSStrings. Joe On Jul 23, 2010, at 11:50 AM, Kyle Sluder wrote: On Fri, Jul 23, 2010 at 9:34 AM, Joe Turner joetur...@me.com wrote: Hey, No one is requiring me to send a string–I do indeed send it as data, but I must convert values from string to data

Re: NSPropertyListSerialization and string encoding

2010-07-23 Thread Joe Turner
Hey, Thanks! It seems that all I had to do sanitize was encode 's 's 's 's and ''s, and then just do my normal percent encoding, and everything is now working great! Thanks! Joe On Jul 23, 2010, at 2:11 PM, Kyle Sluder wrote: On Fri, Jul 23, 2010 at 11:54 AM, Joe Turner joetur...@me.com

NSPropertyListSerialization and string encoding

2010-07-22 Thread Joe Turner
can use a different encoding or something else to keep the accents for the time being, and then filter them out when I create the post data with dataUsingEncoding:allowLossyConversion:? Thanks, Joe Turner Iced Cocoa ___ Cocoa-dev mailing list (Cocoa

kTISPropertyUnicodeKeyLayoutData Returns NULL

2009-08-25 Thread Joe Turner
Hey, So, to translate from a string to a keycode, I've been using the UCKeyboardLayout. But, on some keyboard layouts (only Japanese so far), I get a NULL pointer for the layout, and then the app crashes. Here's the code: TISInputSourceRef currentKeyboard =

Create VNC Client iPhone

2009-08-24 Thread Joe Turner
sample code for VNC, but cannot find any. So, how do I connect to a Mac with Screen-Sharing on (password set or not), and then how do I tell it to type something? I'm fairly new to VNC, so any help would be much appreciated :) Cheers, Joe Turner

Re: Best Way to Simulate Keyboard

2009-08-22 Thread Joe Turner
Hey, That works well, until I add modifiers. To do my modifiers i put the modifier keys down before the character part, but this doesn't seem to work when the command key is down or something :/ Is there any way to supply modifiers into a single CGEvent? Cheers, Joe Turner On Aug 21

Re: Best Way to Simulate Keyboard

2009-08-22 Thread Joe Turner
AM, Joe Turner wrote: That works well, until I add modifiers. To do my modifiers i put the modifier keys down before the character part, but this doesn't seem to work when the command key is down or something :/ Is there any way to supply modifiers into a single CGEvent? There's an example

Best Way to Simulate Keyboard

2009-08-21 Thread Joe Turner
access them have been deprecated. So, I'm wondering, is there a better way to simulate a keyboard? Maybe with input methods or something? And if not, how can I access 'kchr' keyboard data? Cheers, Joe Turner ___ Cocoa-dev mailing list (Cocoa-dev

Re: Detect Keyboard Layout for CGKeyCodes

2009-08-20 Thread Joe Turner
; } } } } } } return (CGKeyCode)virtualKeyCode; } Cheers, Joe Turner On Aug 20, 2009, at 4:47 AM, Harry Jordan wrote: Hi Joe

Detect Keyboard Layout for CGKeyCodes

2009-08-19 Thread Joe Turner
Hey, I've got an application that basically simulates a keyboard using CGEvents with CGKeyCodes. However, because CGKeyCodes only map the position of the key on a keyboard, and not the actual key, I've run into some issues. Is there an easy way to detect the type of keyboard they have,

Re: Detect Keyboard Layout for CGKeyCodes

2009-08-19 Thread Joe Turner
it to be universal–This app is a background app, so the keystroke needs to be able to be inserted anywhere. Cheers, Joe Turner On Wednesday, August 19, 2009, at 07:30PM, Harry Jordan cocoaha...@googlemail.com wrote: I've not used CGEvents much.. (Once upon a time, hopefully never again

Re: Private copy not working correctly

2009-07-03 Thread Joe Turner
Thanks, this seems to work perfectly! I recently read about shallow and deep copies, but didn't see the initWithDictionary:copyItems: method. Thanks, Joe On Jul 2, 2009, at 6:51 PM, Adam R. Maxwell wrote: On Jul 2, 2009, at 12:05 PM, Joe Turner wrote: I'm trying to create a private copy

Private copy not working correctly

2009-07-02 Thread Joe Turner
Hello, I'm trying to create a private copy of an object, but yet when the original changes, my copy changes too. I have an array of dictionaries called spacesData. Then, when I do: NSDictionary *backup = [[spacesData objectAtIndex:index] copy]; everything is fine, and this one looks as it

NSKeyedUnarchiver incomprehensible archive error

2009-03-26 Thread Joe Turner
when sent. Is there a way to check if the data can be unarchived, and if not, to try again? Or, is there another way to get around this? Thanks! Any help would be much appreciated! Cheers, Joe Turner ___ Cocoa-dev mailing list (Cocoa-dev

UINavigationBar hidden in one view but not another

2009-03-24 Thread Joe Turner
Hi, So, what I would like to do is have the uinavigationbar of a uinavigationcontroller be visible in the rootviewcontroller, but when the user goes to the next viewcontroller (it pushes it), have it not visible. Apple gave us the ability to hide it altogether, but then, while the

Re: UINavigationBar hidden in one view but not another

2009-03-24 Thread Joe Turner
pushing the new view controller onto the navigation stack. You could potentially do a flip animation to a new view controller or show a modal view controller. Luke On Mar 24, 2009, at 11:28 AM, Joe Turner wrote: Hi, So, what I would like to do is have the uinavigationbar

Custom UIBarButtonItems

2009-03-24 Thread Joe Turner
Hi, I would like to create UIBarButton items with custom backgrounds. My main issue is with the back item. I have an image that is just like apple's back button images (about 20x30 pixels). So, the point is that there would be a left cap, so it could be stretched to fit any title that

Re: TXT Records with NSImages

2009-03-13 Thread Joe Turner
else than NSData it will return nil. So you just have to convert your image to NSData and store that. atze Am 13.03.2009 um 03:45 schrieb Joe Turner: Hello, Recently, I've been working on an app that will sync with an iphone app. So, I am using NSNetServices. I would like

Re: TXT Records with NSImages

2009-03-13 Thread Joe Turner
is not nil!); [netService setTXTRecordData:data]; Joe On Mar 13, 2009, at 7:30 AM, Michael Ash wrote: On Fri, Mar 13, 2009 at 8:12 AM, Joe Turner joetur...@me.com wrote: Actually, I am converting it to NSData, and then adding it, and it still returns nil Post code. Mike

Re: TXT Records with NSImages

2009-03-13 Thread Joe Turner
That's what I thought too. But how do you use the NULL record? Joe On Mar 13, 2009, at 7:36 AM, Keith Duncan wrote: Joe, That's a lot of data to be storing in the TXT record. I'd advise that you store it in the NULL record as iChat does for 'Bonjour' chat. Keith

TXT Records with NSImages

2009-03-12 Thread Joe Turner
Hello, Recently, I've been working on an app that will sync with an iphone app. So, I am using NSNetServices. I would like the iPhone to display the mac's icon, so I was thinking of using the TXT Record to store the icon. However, whenever I add it to the dictionary, convert the

Partially Transparent windows

2009-01-29 Thread Joe Turner
this, or if you must subclass NSWindow or something of the sort. Cheers, Joe Turner ___ 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

Re: Partially Transparent windows

2009-01-29 Thread Joe Turner
Thanks! Works perfectly! I didn't expect it to be that easy :) Cheers, Joe Turner On Jan 29, 2009, at 4:34 PM, Steve Christensen wrote: On Jan 29, 2009, at 2:04 PM, Joe Turner wrote: I've noticed that some applications I see have partially transparent windows. What I mean

Re: Using the security framework

2009-01-24 Thread Joe Turner
Cool, thanks! Then I now have another question: Why not just run chmod on my utility when it's 'unlocked', and change the userID to 0. Then when it's locked, change it back to 501? Or, is this exactly what AEWP() will do? Thanks! Cheers, Joe Turner On Jan 24, 2009, at 6:47 AM, Michael

Re: Using the security framework

2009-01-24 Thread Joe Turner
this! This is just my guess. But it sounds fairly right :) Cheers, Joe Turner On Jan 24, 2009, at 6:47 AM, Michael Ash wrote: On Fri, Jan 23, 2009 at 10:59 PM, Joe Turner joetur...@me.com wrote: Okay, so, it seems everyone was right :) I went to cocoabuilder to find some of the responses

Re: Using the security framework

2009-01-24 Thread Joe Turner
So, you are saying that I must create an install tool, that installs my utility that will run as root? On Jan 24, 2009, at 2:23 PM, Chris Hanson wrote: The proper way to construct everything you've described is discussed in the Authorization Services Programming Guide.

Re: Using the security framework

2009-01-24 Thread Joe Turner
But you can also code sign nowadays On Jan 24, 2009, at 11:54 PM, Chris Hanson wrote: On Jan 24, 2009, at 6:29 PM, Michael Ash wrote: On Sat, Jan 24, 2009 at 6:08 PM, Chris Hanson c...@me.com wrote: Among other things, to be truly secure you must use a secure installation mechanism. Do not

Re: Using the security framework

2009-01-23 Thread Joe Turner
some sort of lock-unlock thing, and then I would be pretty sure, but is there anyway to know for sure? And, is there a way to take SUID away from it? So, if I want to lock it, it would work. Thanks everyone! Cheers, Joe Turner On Jan 22, 2009, at 4:57 PM, Nick Zitzmann wrote: On Jan 22

Re: Using the security framework

2009-01-22 Thread Joe Turner
Thanks again for the speedy responses! On Jan 20, 2009, at 1:47 AM, Nick Zitzmann wrote: On Jan 19, 2009, at 7:56 PM, Joe Turner wrote: That makes sense, but then how does an app like SuperDuper! do it. You click the lock, enter your password, and then you don't need to enter your

Re: Using the security framework

2009-01-22 Thread Joe Turner
On Jan 22, 2009, at 4:57 PM, Nick Zitzmann wrote: On Jan 22, 2009, at 4:09 PM, Joe Turner wrote: I see. Then, how would you suggest to create a cloner/deleter, if it needs root privileges, but cannot use the security framework? I didn't say you couldn't use the security framework. I said

Re: Using the security framework

2009-01-19 Thread Joe Turner
On Jan 6, 2009, at 10:45 AM, Nick Zitzmann wrote: On Jan 3, 2009, at 6:50 PM, Joe Turner wrote: I am making a hard drive cloner/backuper, and to do some deleting and copying, I need to use the security framework. What I need to be able to do is have the user type in their password one

Using the security framework

2009-01-06 Thread Joe Turner
Hello! I am making a hard drive cloner/backuper, and to do some deleting and copying, I need to use the security framework. What I need to be able to do is have the user type in their password one time, and then it would give me system.privilege.admin rights until a time that they want

Re: Text track in QTMovie

2008-12-20 Thread Joe Turner
, douglas On Dec 16, 2008, at 1:40 PM, Joe Turner wrote: Sorry for taking so long. Okay, what I am looking for is the contents of the text track. Like, for a movie, it would be the chapter names and times. The issue is that I am making this for someone who is using AppleScript

Re: Text track in QTMovie

2008-12-16 Thread Joe Turner
. Can you clarify? BTW, what values are you seeing in the debugger? On Dec 14, 2008, at 8:33 PM, Joe Turner wrote: Okay, so I did what you said, but yet, it still won't show me the track names. Here is my code: Media media = [movieView movie] tracksOfMediaType:QTMediaTypeText

Text track in QTMovie

2008-12-14 Thread Joe Turner
I have a QTMovie (that is valid), and it has a text track. I am wondering if there is any easy way to get the contents of the text track into an NSString. Thanks, Joe ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post

Re: Text track in QTMovie

2008-12-14 Thread Joe Turner
with the text sample. Create an NSString with the bytes/length returned in the previous call regards, douglas On Dec 14, 2008, at 7:26 PM, Joe Turner wrote: I have a QTMovie (that is valid), and it has a text track. I am wondering if there is any easy way to get the contents of the text track

Re: Text track in QTMovie

2008-12-14 Thread Joe Turner
, at 7:26 PM, Joe Turner wrote: I have a QTMovie (that is valid), and it has a text track. I am wondering if there is any easy way to get the contents of the text track into an NSString. Thanks, Joe ___ Cocoa-dev mailing list (Cocoa-dev

Authorized Copy/Erase (NSFileManager)

2008-11-29 Thread Joe Turner
Joe Turner NiceMac LLC programmer ___ 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

Number of Files on Volume

2008-11-26 Thread Joe Turner
I have ben trying to find a good way to get an accurate count of files on a Volume. Using a NSDirectoryEnumerator takes way too long (a couples minutes), so, I figured out how to do it on the old Carbon FileManager using: FSVolumeInfo info; FSRef pathRef; FSCatalogInfo catInfo; const char

Re: Number of Files on Volume

2008-11-26 Thread Joe Turner
08:28, Andrew Farmer [EMAIL PROTECTED] wrote: On 25 Nov 08, at 16:44, Joe Turner wrote: I have ben trying to find a good way to get an accurate count of files on a Volume. Using a NSDirectoryEnumerator takes way too long (a couples minutes), so, I figured out how to do it on the old Carbon

Re: Number of Files on Volume

2008-11-26 Thread Joe Turner
even supposed to work? Thanks! On Nov 26, 2008, at 5:53 AM, Graham Lee wrote: On 26/11/2008 08:28, Andrew Farmer [EMAIL PROTECTED] wrote: On 25 Nov 08, at 16:44, Joe Turner wrote: I have ben trying to find a good way to get an accurate count of files on a Volume. Using a NSDirectoryEnumerator

Re: Number of Files on Volume

2008-11-26 Thread Joe Turner
with the CoreServices way ? (ie using FSGetVolumeInfo). Le 26 nov. 08 à 15:19, Joe Turner a écrit : Okay, maybe I spoke too soon... It worked twice. To get the number of files, I am doing this now: - (NSNumber *)fileCount { NSDictionary *attributes = [[NSFileManager defaultManager