API to determine a list of installed scriptable applications

2011-04-02 Thread jonat...@mugginsoft.com
Is there an API to determine a list of installed scriptable applications?

Such a list is displayed by the AppleScript Editor menu item Open Dictionary...

Application bundles can be queried for using MDQuery and the scriptability of a 
given application can be be determined.
I don't think that ASE uses this approach as its existence long predates 
Spotlight etc.

Also the ASE list includes items that have not been previously launched.

Regards

Jonathan Mitchell

Developer
Mugginsoft LLP
http://www.mugginsoft.com







___

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: Simulate touch event with cordinate?

2011-04-02 Thread Jesse Armand
Then, you are explaining your problems incorrectly.

You're looking to handle the motion of the face, recognized by the
face recognition algorithm and captured by the camera. You can't find
that answer in the iOS SDK.

You need to implement your own algorithm to detect those movements and
convert it somehow to a group of points or rects in the screen, with
their paths of movement.

Once you obtained this path, then you can do something with it.

But, my word of advice:
People don't read PDFs with the gestures of their face or head. It's just silly.

Jesse Armand

(http://jessearmand.com)



On Sat, Apr 2, 2011 at 7:25 AM, Rikza Azriyan  wrote:
> Thanks chase for your reply,
> Yes, i want to make an application like ibooks that the user can navigate the 
> page by swipe the screen, than
>> - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;
> Will respond for that swipe...
> But in my case, i don't want to make that swipe with my finger...
> I want to make that swipe by my face
> So that i want to implement my facetracking algorithm on my iphone 
> 4...detecting the face by frontcamera, and give the output result as the face 
> position cordinate.
> I'm going to use this cordinate as realtime dragging event on my PDF reader 
> as if the finger swiping in my screen. As ibooks did use finger for swipe...
> that what i want to do chase...
>
> I hope u understand my bad english :)
> Thx in advance
>
> Rikza Azriyan
> Student of Sriwijaya University
> Palembang, Indonesia
>
> Sent from my iPhone
> Provided by Telkomsel.
>
> On Apr 2, 2011, at 9:36 AM, Chase Latta  wrote:
>
>> Are you trying to achieve something like, in the iBooks example, the
>> user can swipe their finger to change the page or press a 'next page'
>> button and have the same animation occur?  If so then you need to
>> write one function to handle the animation and call that in response
>> to either a button push or a series of touch events.
>>
>> - (void)moveMyThingFrom:(CGPoint)a toPoint:(CGPoint)b;
>> {
>>    // Put code here for the animation
>> }
>>
>> // For button press
>> - (IBAction)moveThingAcrossScreen:(id)sender;
>> {
>>    CGPoint fromPoint = ...;
>>    CGPoint toPoint = ...;
>>    [self moveMyThingFrom:fromPoint toPoint:toPoint];
>> }
>>
>> // For drag events you could do something like
>> - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;
>> {
>>    lastPoint = ... // Value stored somewhere
>>    CGPoint newPoint = ... // Calculated from event
>>    [self moveMyThingFrom:lastPoint toPoint:toPoint];
>> }
>>
>> The main point is that you should not be performing your animations in
>> your event handling code; this should be in separate methods that get
>> called from your event handling code or wherever you need to call it.
>>
>> Is this what you were looking for?
>>
>> Chase
>>
>> On Fri, Apr 1, 2011 at 7:02 PM, Conrad Shultz
>>  wrote:
>>> -BEGIN PGP SIGNED MESSAGE-
>>> Hash: SHA1
>>>
>>> On 4/1/11 6:44 PM, Rikza Azriyan wrote:
 Sorry maybe you guys don't understand with my bad english..
 I said UIGestureRecognizer does'n do what i want because it's for 
 detecting/responding touch,gesture,tap etc that user did to the screen. 
 It's for respond the user interaction to the screen...
 In my case, i want to make that interaction. I want to make a touch event 
 without touching the screen, i want to make slide event without touching 
 it
>>>
>>> Could you explain WHY you want to do this?  Surely if your app takes a
>>> certain action in response to a gesture it would be easier to just
>>> trigger that action on demand.
>>>
>>> Don't know what your goal is, but at first read this sounds like the
>>> product of a very flawed application architecture.
>>>
>>>
>>> - --
>>> Conrad Shultz
>>>
>>> Synthetiq Solutions
>>> www.synthetiqsolutions.com
>>> -BEGIN PGP SIGNATURE-
>>> Version: GnuPG v1.4.7 (Darwin)
>>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>>>
>>> iD8DBQFNloOfaOlrz5+0JdURAmhwAJ9tvB7kMYsTq9oSeCNo0+Fm91/vHgCdGP4b
>>> 5+O28EP12Ej/qBFMsO5omys=
>>> =evPd
>>> -END PGP SIGNATURE-
>>> ___
>>>
>>> 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/chaselatta%40gmail.com
>>>
>>> This email sent to chasela...@gmail.com
>>>
> ___
>
> 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/mnemonic.fx%40gmail.com
>
> This email sent to mne

Re: Simulate touch event with cordinate?

2011-04-02 Thread Sherm Pendley
On Sat, Apr 2, 2011 at 7:29 AM, Jesse Armand  wrote:
>
> But, my word of advice:
> People don't read PDFs with the gestures of their face or head. It's just 
> silly.

Tell that to Stephen Hawking. There are cases where what seems "silly"
to most of us are the only options one has left.

sherm--

-- 
Cocoa programming in Perl:
http://camelbones.sourceforge.net
___

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: Simulate touch event with cordinate?

2011-04-02 Thread Rikza Azriyan
Nothing that silly Jesse, as long as you thing if there're somebody who don't 
have a hand, but they want to read.
Have you ever heard the research about human computer interaction using their 
head movement as the cursor movement, and right click by their right eye, left 
click by their left eye...
We Call it Computer Vision.

Thanks

Rikza Azriyan
Student of Sriwijaya University
Palembang, Indonesia

Sent from my iPhone
Provided by Telkomsel.

On Apr 2, 2011, at 6:52 PM, Sherm Pendley  wrote:

> On Sat, Apr 2, 2011 at 7:29 AM, Jesse Armand  wrote:
>> 
>> But, my word of advice:
>> People don't read PDFs with the gestures of their face or head. It's just 
>> silly.
> 
> Tell that to Stephen Hawking. There are cases where what seems "silly"
> to most of us are the only options one has left.
> 
> sherm--
> 
> -- 
> Cocoa programming in Perl:
> http://camelbones.sourceforge.net
> ___
> 
> 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/rikzaxtrmsprt%40yahoo.com
> 
> This email sent to rikzaxtrms...@yahoo.com
___

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


An "Open With..." submenu...

2011-04-02 Thread Jason Harris
Hi All,

Two related questions.

(1) Managing the default application for documents from a "file manager" type 
of appication.
(2) An "Open With..." menu.

---

(1) (Background: MacHg is a "browser" or "file manager" type of application 
(its a GUI for the DVCS mercurial) so its role is to manage files and sometimes 
if the user wants then open these files in the appropriate application.) Its 
quite likely that developers will want to open these documents in an 
application which is not the default. Eg if they are working with .html files 
from within MacHg they will likely be "developing" with / on them and so will 
want these files to open in bbedit, or coda, or DreamWeaver etc, rather than 
Safari, Firefox, or Chrome.

So what is the best way to manage this mapping in MacHg? Have some sort of 
table in the preferences which does this mapping from extensions to 
applications? I don't want to reinvent wheels so if there is already some code 
with is publicly viewable that does this sort of thing I would interested in 
references so I could look it over...

2.
Some users have asked for an "open with" menu to be added to MacHg. I have a 
menu delegate that captures when the contextual menu is firing and I can insert 
a "Open With..." menu at the right place and time in my 'menuNeedsUpdate' call. 
My question is does anyone have any prototype code already written that nicely 
constructs and manages the creation of this "Open With..." menu.

I would of course imagine that the results would be generated from 
LSCopyApplicationURLsForURL, but for me LSCopyApplicationURLsForURL with 
kLSRolesEditor for a file /Users/jason/Documents/myfile.txt file returns the 
following list:

(
file://localhost/Developer/Applications/Xcode.app/,
file://localhost/Applications/Microsoft%20Office%202008/Microsoft%20Excel.app/,
file://localhost/Volumes/QuickSilver/Applications%20local/Write/BBEdit.app/,
file://localhost/Volumes/QuickSilver/Applications/TextEdit.app/,
file://localhost/Applications/TextWrangler.app/,
file://localhost/Volumes/QuickSilver/Developer/Applications/Dashcode.app/,
file://localhost/Volumes/TSL/Applications/TextEdit.app/,
file://localhost/Volumes/QuickSilver/Applications%20local/Write/Word%20Processing/Nisus%20Writer%20Express.app/,
file://localhost/Applications%20local/Utilities/File/HexEdit/HexEdit.app/,
file://localhost/Applications/Microsoft%20Office%202008/Microsoft%20Word.app/,
file://localhost/Developer/Applications/AD%20Viewer.app/,
file://localhost/Volumes/TSL/Applications/TextEdit.app/,
file://localhost/Developer/Applications/Dashcode.app/,
file://localhost/Volumes/QuickSilver/Applications%20local/Graphics/Adobe%20Dreamweaver%20CS4/Adobe%20Dreamweaver%20CS4.app/,
file://localhost/Volumes/QuickSilver/Applications%20local/Graphics/Adobe%20Illustrator%20CS4/Adobe%20Illustrator.app/,
file://localhost/Applications%20local/Write/BBEdit.app/,
file://localhost/Applications/TextEdit.app/,
file://localhost/Applications%20local/Graphics/Coda.app/,
file://localhost/Applications%20local/Utilities/iPhone/Stanza.app/
)

Which of course needs a bit of cleanup. Ie remove duplicate applications and 
choose those on the main drive first. If this list is empty or "too" small then 
the application should fall back on kLSRolesViewer.  Ordering preference should 
likely be given to the applications that are currently open. If its easy and 
possible then maybe ordering in the menu should be given by the last time an 
application was run? Then I can imagine if the user actually choose a 
particular application for opening the given file /document then maybe MacHg 
should order that application preferentially in the future higher in the list?  
It should definitely be the first choice in the list for the same file in the 
future. I can imagine other complications / subtleties around this topic. Thus, 
is there some source code somewhere that someone could point out with the 
recommended best practices in this sort of case?

Thanks in advance!
  Jason___

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


Retrieve camera's parameters

2011-04-02 Thread eveningnick eveningnick
Hi
I am developing a QTKit application for capturing the camera's output,
and i need to tell the user about what color modes and resolutions the
camera supports natively. QTKit itself does not provide such a
functionality - it sets up resolution automatically.

I am wondering, if there is any way to retrieve such an information,
bypassing QTKit iteslf?

Maybe some QuickTime low level APIs exist? Even obsolete ones (i.e.,
only 32 bit) will also work for me.

Maybe i could ask some driver for that info?

I really need this.
Is it really impossible, on any level of the system  APIs in OS X system?

Thank you
___

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: Simulate touch event with cordinate?

2011-04-02 Thread Dave Camp
Since you are doing this in your own application, just get the data from your 
face tracking code and call your animation code directly. I don't think it's 
possible to create a UITouch with the public APIs.

Dave

On Apr 1, 2011, at 10:25 PM, Rikza Azriyan wrote:
> Thanks chase for your reply,
> Yes, i want to make an application like ibooks that the user can navigate the 
> page by swipe the screen, than 
>> - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;
> Will respond for that swipe...
> But in my case, i don't want to make that swipe with my finger...
> I want to make that swipe by my face
> So that i want to implement my facetracking algorithm on my iphone 
> 4...detecting the face by frontcamera, and give the output result as the face 
> position cordinate.
> I'm going to use this cordinate as realtime dragging event on my PDF reader 
> as if the finger swiping in my screen. As ibooks did use finger for swipe...
> that what i want to do chase...

___

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: Are the progress spinner images publically available?

2011-04-02 Thread Bill Bumgarner

> Am 01.04.2011 um 18:38 schrieb James Bucanek:
> 
>> So I'm going with plan B, which is create a custom CALayer that draws a 
>> single spinner "wheel" image and then rotate it using a key-frame animation.

As long as you don't actually show rotation of the lines of the progress 
indicator, that'll work...

I've now seen several progress indicators that were, quite literally, just 
smoothly rotating bitmaps.  Looked really bad.
___

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: Simulate touch event with cordinate?

2011-04-02 Thread Steve Christensen
On Apr 1, 2011, at 10:25 PM, Rikza Azriyan wrote:

> Yes, i want to make an application like ibooks that the user can navigate the 
> page by swipe the screen, than 
>> - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;
> Will respond for that swipe...
> But in my case, i don't want to make that swipe with my finger...
> I want to make that swipe by my face
> So that i want to implement my facetracking algorithm on my iphone 
> 4...detecting the face by frontcamera, and give the output result as the face 
> position cordinate.
> I'm going to use this cordinate as realtime dragging event on my PDF reader 
> as if the finger swiping in my screen. As ibooks did use finger for swipe...

Chase's solution is still the way you want to go, no matter what how you gather 
the points. He just phrased it as an example that uses a touch event in one 
case and a "scripted" movement in another. In each case, they call a common 
method that handles the actual movement between a pair of points, but doesn't 
care how those points were calculated.

For your case, your face tracking algorithm could calculate points based on 
whatever algorithm it uses and then pass those points to that common movement 
method. Conceivably you could have a book reading experience where someone who 
has use of their hands could swipe the screen and someone who doesn't could 
take advantage of face tracking.

___

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


Track Splitter

2011-04-02 Thread koko
I want to move a button to the x-location of a horizontal split view's 
splitter. I have a split view subclass and in it I implement mouseMoved but 
this does not seem correct. 

So, how can I track the splitter so I can live move the button , i.e. the 
button will look like it is bound to the splitter.

-koko___

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: Book for expert programmer about cocoa and Objective-C

2011-04-02 Thread Steven Woolgar
> But now, I need a book for professional. Book that is BIG, DIFFICULT and is
> HARDCORE about anything for cocoa and objective-c. That show a really lot of
> thing. That will be my book for years.. You understand, right?

Cocoa Design Patterns:




W.
___

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: Track Splitter

2011-04-02 Thread koko
Disregard.

splitViewDidResizeSubviews

-koko

On Apr 2, 2011, at 1:55 PM, koko wrote:

> I want to move a button to the x-location of a horizontal split view's 
> splitter. I have a split view subclass and in it I implement mouseMoved but 
> this does not seem correct. 
> 
> So, how can I track the splitter so I can live move the button , i.e. the 
> button will look like it is bound to the splitter.
> 
> -koko___
> 
> 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/koko%40highrolls.net
> 
> This email sent to k...@highrolls.net
> 

___

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: Book for expert programmer about cocoa and Objective-C

2011-04-02 Thread Max Stottrop
I'd also recommend Cocoa Programming by Scott Anguish. But Steves 
recommendation is a great choice, too.

http://www.amazon.com/gp/aw/d/B000212NUM/ref=redir_mdp_mobile/188-2135721-8610619?ref_=sr_1_7&s=books&qid=1301687411&sr=1-7

Am 02.04.2011 um 21:58 schrieb Steven Woolgar :

>> But now, I need a book for professional. Book that is BIG, DIFFICULT and is
>> HARDCORE about anything for cocoa and objective-c. That show a really lot of
>> thing. That will be my book for years.. You understand, right?
> 
> Cocoa Design Patterns:
> 
> 
> 
> 
> W.
> ___
> 
> 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/max.stottrop%40googlemail.com
> 
> This email sent to max.stott...@googlemail.com
___

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: Book for expert programmer about cocoa and Objective-C

2011-04-02 Thread Sherm Pendley
On Fri, Apr 1, 2011 at 3:40 PM, Rodrigo Zanatta Silva
 wrote:
> Hi. I need to have a good book in my side to program with Objective-C using
> the cocoa. I read the beginner books like "... for absolute beginner",
> "starting to program with...".
>
> But now, I need a book for professional. Book that is BIG, DIFFICULT and is
> HARDCORE about anything for cocoa and objective-c.

Book? HARDCORE programmers don't read books, we read header files! :-)

Kidding aside, I just wanted to add another vote for both "Cocoa
Programming" & "Cocoa Design Patterns." Both are written by active and
respected community members, at least one of whom has since been hired
by Apple to write documentation. Two thumbs up, and more than that if
I had 'em.

sherm--

-- 
Cocoa programming in Perl:
http://camelbones.sourceforge.net
___

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: An "Open With..." submenu...

2011-04-02 Thread Ken Thomases
On Apr 2, 2011, at 8:08 AM, Jason Harris wrote:

> Some users have asked for an "open with" menu to be added to MacHg. I have a 
> menu delegate that captures when the contextual menu is firing and I can 
> insert a "Open With..." menu at the right place and time in my 
> 'menuNeedsUpdate' call. My question is does anyone have any prototype code 
> already written that nicely constructs and manages the creation of this "Open 
> With..." menu.
> 
> I would of course imagine that the results would be generated from 
> LSCopyApplicationURLsForURL [...]
> 
> If this list is empty or "too" small then the application should fall back on 
> kLSRolesViewer.  Ordering preference should likely be given to the 
> applications that are currently open. If its easy and possible then maybe 
> ordering in the menu should be given by the last time an application was run? 
> Then I can imagine if the user actually choose a particular application for 
> opening the given file /document then maybe MacHg should order that 
> application preferentially in the future higher in the list?  It should 
> definitely be the first choice in the list for the same file in the future. I 
> can imagine other complications / subtleties around this topic.

In my opinion, you're over-designing this.  To me, a menu that's "adaptive" 
like that ends up being, in practice, ever-shifting and unpredictable.

I would say, take the results from LSCopyApplicationURLsForURL, sort it 
lexically respecting localization.  Pull out the default app indicated by 
LSGetApplicationForURL and put it on top with a separator below it.  The Finder 
tags this item with a "(default)" label. If there are multiple entries with the 
same name, the Finder tags them with the version number.  If the version 
numbers are the same, I recommend tagging them with the display path of the 
containing folder (either in parentheses or as a tooltip).

To let users specify a preference, I recommend following the Finder's lead 
again.  If the user holds down Option/Alt, the Open With menu becomes Always 
Open With.  If they pick something in that mode, the item opens and you should 
also remember the user's preference for that file.  This would override the use 
of LSGetApplicationForURL that I described above in future Open With menus.

For specifying a preference for a type of file, rather than a specific file, 
the Finder relies on the Get Info window, which is kind of obscure and probably 
not applicable to MacHg.  So, possibly extend the Always Open With technique by 
using an additional modifier key to change the menu to Always Open Type With, 
or something like that.

Regards,
Ken

___

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


applicationWillTerminate not received

2011-04-02 Thread Jeffrey Walton
Hi All,

I'm using NSLog and breakpoints to trace application life cycle
messages on an iPhone. I'm receiving applicationDidBecomeActive,
applicationWillResignActive, applicationDidEnterBackground,
applicationWillEnterForeground, etc as expected.

If I perform the following, the application does not appear to receive
the applicationWillTerminate message.
* enter background by pressing Home
* double press Home to list tasks
* delete the [background] task (tap down and hold for 'Red X')

I planned on saving some state when the applicationWillTerminate was
invoked. Are things working as expected? Should I abandon my plans to
save state during termination?

Jeff
___

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: applicationWillTerminate not received

2011-04-02 Thread Quincey Morris
On Apr 2, 2011, at 18:01, Jeffrey Walton wrote:

> I planned on saving some state when the applicationWillTerminate was
> invoked. Are things working as expected? Should I abandon my plans to
> save state during termination?

No, you should save the state, but it's explained here:


http://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/CoreApplication/CoreApplication.html

(search for all occurrences of "applicationWillTerminate", since the 
information you need is spread out) that you don't get the notification in the 
circumstances you describe.

I think you'll need to force a low-memory termination to test the code path 
through 'applicationWillTerminate:'. I couldn't see an easier way to make it 
happen with an iOS 4.0 backgroundable multitasking-aware app.


___

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: Simulate touch event with cordinate?

2011-04-02 Thread Rikza Azriyan
Thanks for Steve,dave,chase,gary,sherm,jesse and All list member who had 
respond for my question,,

Maybe the solution i have to pass my face cordinate Directly to the 
Animation..as dave said..

Just for share:
I recently found the way how to synthesize The UITouch Event in someone blog, 
with the sample Code.
->Try "synyhesize touch event" (cocoawithlove.com)
But it's seem complicated for me to understand.
paasing the cordinate to the animation might be the best solution.

Thanks All :)

Rikza Azriyan
Student of Sriwijaya University
Palembang, Indonesia

Sent from my iPhone
Provided by Telkomsel.

On Apr 3, 2011, at 1:06 AM, Steve Christensen  wrote:

> On Apr 1, 2011, at 10:25 PM, Rikza Azriyan wrote:
> 
>> Yes, i want to make an application like ibooks that the user can navigate 
>> the page by swipe the screen, than 
>>> - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;
>> Will respond for that swipe...
>> But in my case, i don't want to make that swipe with my finger...
>> I want to make that swipe by my face
>> So that i want to implement my facetracking algorithm on my iphone 
>> 4...detecting the face by frontcamera, and give the output result as the 
>> face position cordinate.
>> I'm going to use this cordinate as realtime dragging event on my PDF reader 
>> as if the finger swiping in my screen. As ibooks did use finger for swipe...
> 
> Chase's solution is still the way you want to go, no matter what how you 
> gather the points. He just phrased it as an example that uses a touch event 
> in one case and a "scripted" movement in another. In each case, they call a 
> common method that handles the actual movement between a pair of points, but 
> doesn't care how those points were calculated.
> 
> For your case, your face tracking algorithm could calculate points based on 
> whatever algorithm it uses and then pass those points to that common movement 
> method. Conceivably you could have a book reading experience where someone 
> who has use of their hands could swipe the screen and someone who doesn't 
> could take advantage of face tracking.
> 
___

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: An "Open With..." submenu...

2011-04-02 Thread Eric Wing
On 4/2/11, Jason Harris  wrote:
> Hi All,
>
> Two related questions.
>
> (1) Managing the default application for documents from a "file manager"
> type of appication.
> (2) An "Open With..." menu.
>

With LuaCocoa, I have an example program called
HybridCoreAnimationScriptability which shows how to open a Lua script
file in the user's preferred text editor from the running application
and modify the script while the application is running.

The text editor code is in:
LuaCocoa/Samples/HybridCoreAnimationScriptability/TextEditorSupport.m
which can be found at
http://bitbucket.org/ewing/luacocoa


While this code isn't exactly what you are doing, it contains an
explicit mapping of text editors. The reason I did this is because I
wanted to not only open the text editor, but also open the text editor
to a specific line number. Since this is very custom to every text
editor, I need write special code for every editor. I've also used
this code in multiple projects and in some cases, I've used this basic
code to black list programs that hijack the extension (e.g. .lua) for
things that are completely unhelpful in my context (like Adobe
Lightroom).

But maybe this list will be useful to you, especially since I would
imagine jumping to specific line numbers would be useful in MacHG. I
would welcome additions to the text editor list too. It takes a long
time to research these features and I don't own all the editors out
there to test.



-Eric
-- 
Beginning iPhone Games Development
http://playcontrol.net/iphonegamebook/
___

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