Re: Mac Mini or iMac for Cocoa Development?

2009-09-14 Thread Jonathan Hendry


On Sep 13, 2009, at 19:28 PM, Paul Bruneau wrote:

The iMac is so much prettier plus can drive a second display. Refurb  
store = $999 or even sometimes $849 ones show up.


The Mini can drive additional displays if you connect them through USB  
video adapters. They work quite well, although they can't do OpenGL. 
___


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


IKImageView imageCorrection property

2009-09-30 Thread Jonathan Hendry

Hi all,

Last night I was trying to use the imageCorrection property on an  
IKImageView, but it wasn't working for me.


Setting the property to a CIFilter didn't have any effect. The  
property remained nil.


Is there something I'm missing?

Thanks,

jon
___

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: NSColor for darker hightlight color

2009-10-21 Thread Jonathan Hendry
There's a 'Developer' color list in the color list pane of the  
standard color picker.


- Jon

On Oct 21, 2009, at 19:51 PM, Eric Gorr wrote:



On Oct 21, 2009, at 7:34 PM, Graham Cox wrote:



On 22/10/2009, at 9:25 AM, Eric Gorr wrote:

If so, then it may not be appropriate for me to use  
alternateSelectedControlTextColor (for example) - however, neither  
selectedControlColor nor selectedTextBackgroundColor will return  
this darker shade of  
blue.___



One easy way to help you find and choose colours is to use the  
'Developer' colour picker, which shows up in the colour panel. It  
lists all these colours by name and shows you the colour, so it's  
easy to see at a glance which one is which. I'm not sure if this  
picker gets installed automatically by one of the dev tools (maybe  
IB?) but it's been in my colour panel forever.


Interesting. I've looked a little, but cannot seem to find this  
color picker. Anyone know where it can be found?


___

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/jonhendry%40mac.com

This email sent to jonhen...@mac.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: Is there any Cocoa API (or other way) to determine if an application is running in a VNC or ARD session?

2010-02-26 Thread Jonathan Hendry
You might try checking for any telltale running processes, or checking the 
output of lsof -i for any open sockets that are indicative of a VNC or ARD 
connection. That might have to run sudo'd as root.

http://www.akadia.com/services/lsof_quickstart.txt


On Feb 26, 2010, at 18:53 PM, Joe Jones wrote:

> That's what I thought. 
> 
> Why? So we can limit certain functionality over a remote connection. We do 
> this for Terminal Services connections on Windows and I was asked about doing 
> it for Mac.
> 
> Thanx,
> joe
> 
> 
> From: Matthew Lindfield Seager [matt...@sagacity.com.au]
> Sent: Friday, February 26, 2010 1:41 PM
> To: Joe Jones
> Cc: cocoa-dev@lists.apple.com
> Subject: Re: Is there any Cocoa API (or other way) to determine if an   
> application is running in a VNC or ARD session?
> 
> On Saturday, February 27, 2010, Joe Jones  wrote:
>> 
>> Thanx,
>> Joe
> 
> Why? What are you trying to achieve?
> 
> I doubt it though! AFAIK you can only have a remote console (i.e.
> screen sharing) so the app isn't running in the VNC session, it's
> running normally on the host computer.
> 
> Your question only makes sense in the context of "Terminal Services"
> style connections which aren't available on Snow Leopard [Server]
> without third party software.
> 
> Even if you could know if a user is currently connected via VNC/RDP
> and even if you could tell whether the remote or local session (or
> both at the same time) are currently controlling the computer that
> still wouldn't take into consideration other sharing solutions (e.g.
> LogMeIn).
> 
> Matt
> 
> ___
> 
> 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/jonhendry%40mac.com
> 
> This email sent to jonhen...@mac.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: Is there any Cocoa API (or other way) to determine if an application is running in a VNC or ARD session?

2010-03-01 Thread Jonathan Hendry

Checking on my lsof -i suggestion now that I'm at work...

I just set up a screen sharing session from my laptop to another  
machine.


lsof -i on my laptop produced the following output:

AppleVNCS 19770  jon5u  IPv6  0x69d9b2c  0t0  TCP *:vnc-server  
(LISTEN)
AppleVNCS 19770  jon6u  IPv6  0x69d85a8  0t0  TCP  
dhc016942.med.harvard.edu:vnc-server->blur.med.harvard.edu:49152  
(ESTABLISHED)
Screen19773  jon4u  IPv4  0x77a6270  0t0  TCP  
dhc016942.med.harvard.edu:64931->blur.med.harvard.edu:vnc-server  
(ESTABLISHED)


I didn't have to run lsof as root.

After ending the screen sharing session on the remote computer, lsof - 
i on my mac produces this output:


AppleVNCS 19770  jon5u  IPv6  0x69d9b2c  0t0  TCP *:vnc-server  
(LISTEN)


The AppleVNCS 'ESTABLISHED' socket is gone, as is the 'Screen' process  
and its socket, leaving just the screen sharing listening socket.


Apparently the screen-sharing processes run as whoever is logged in at  
the console.


If you want to find out if there's an active VNC session in progress,  
this appears to be a reasonable lead on how to do it, although it  
won't tell you who's controlling the computer at a given time or let  
you distinguish remote input from local input.

___

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: documenting bindings (was: Re: Dynamically loading a part of a Window in Cocoa)

2009-07-02 Thread Jonathan Hendry


On Jul 3, 2009, at 00:25 AM, Jeff Johnson wrote:


This is why I tell people nibs are no good.

Also bindings. ;-)


Bindings are definitely the worst-case scenario for nibs. They tend to  
proliferate, and they are burrowed deep in the IB UI making them hard  
to miss if you don't check every widget on every tab view, etc.


Where I work, we implement experiments as loadable bundles. Since the  
experiments tend to be very similar but specific to a student's  
particular line of research, we have a tool that clones an existing  
experiment project into a new project folder. It modifies class, ivar,  
and constant identifier prefixes, removing a lot of drudge work, but  
can't get into the nibs to change the bindings to refer to the new  
keys. So we have to go through the nibs, track down all the bindings,  
and make sure they're updated with keys that use the new project's  
prefix string rather than the old one.


Some kind of bindings editing tool would be very much appreciated.  
Maybe a table listing a nib's keys that are bound in the first column,  
with additional info in additional columns, such as the associated UI  
objects.


That at least would let you sort alphabetically, which would catch  
stragglers, and would let you more easily check for missing keys.

___

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: [iPhone] Why can't a UITextField be its own delegate?

2009-07-27 Thread Jonathan Hendry


On Jul 25, 2009, at 16:14 PM, WT wrote:


Convoluted? I don't see it that way.

This particular text field needs to limit its number of characters  
to a given interval.


Seems like a good job for an NSFormatter attached to the field.
___

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: Cocoa et al as HCI usability problem

2008-05-18 Thread Jonathan Hendry
For what it's worth, something about the OS X Cocoa docs' arrangement  
has never quite clicked with me. In part it might be an excess of  
hyper text, too many pages to click through, breaking up the stream  
of thought. (I wish XCode's doc viewer had some kind of keyboard  
shortcut for clicking the 'next' or 'previous' links, rather than  
having to scroll, find the link, and click on it. Surely it's  
consistent enough to be automated?) I also get annoyed with  
programming docs on Windows for the same reason - too much linky- 
jumpy, too much documentation appearing to be little more than links  
to yet other pages.


I found the arrangement of the NeXTStep docs to be a bit more  
conducive to study. For one thing, the class reference docs were more  
independently useful. Today the NSWindow class reference contains  
method descriptions, but little context to help you make sense of  
them. That context is in the Window Programming Guide For Cocoa,  
which is itself 22 separate HTML pages, some of which are long  
('Window Layering and Types of Window'), some short ('Handling Events  
in Windows'). Some of the pages in the guide hardly seem long enough  
to merit their own page. (That kinda bugs me. When a section gets its  
own TOC entry, and its own page, but its only a short paragraph, I  
think it leads the reader to feel a bit shortchanged, as if useful  
information was left out. Worse, there might be relevant information  
that is hiding elsewhere in the docs.)


In the NeXTSTEP days, a lot of that context information would be up  
the top of the class reference file, so it was a self-contained unit  
of information. There was also a set of Concepts documents that tied  
things together, but there was a pretty high likelihood that a  
question about a class could be answered simply by bringing up the  
class reference rtf file. Need to know about NSWindow? Bring up  
NSWindow.rtf.


Nowadays, the answer could be on any of a hundred pages, but probably  
not in the class' own reference page.


(The NeXT docs were mostly set in Times, too, which I found easier to  
read than the current near-universal use of sans serif.)


Your mileage may vary, of course. And I may be looking back through  
rose-colored memories. I can't say the current arrangement is an  
error or a case of bad design, it's just that I think the old  
fashioned way worked better for my brain.


At the very least, before I got my hands on a NeXT box of my own I  
was able to learn a fair amount from the NeXTStep Reference books,  
two fat volumes consisting of the class reference files and little  
else. The concepts material was in another volume. Nowadays, the  
class reference files have largely been stripped down to  
documentation of the methods, with little additional info, so there  
would be little benefit from printing and binding them all together.


___

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: Cocoa et al as HCI usability problem

2008-05-19 Thread Jonathan Hendry


On May 19, 2008, at 1:33 PM, Peter Duniho wrote:]

Your point being?  If you think your example is useful in  
presenting your claim, you'll need to be a lot more specific.


undoManager.prepareWithInvocationTarget(this).setColor(mColor);

I could be wrong, but in C#, wouldn't this UndoManager need to be  
defined beforehand as responding to setColor, and any other method  
that could require undo?


NSUndoManager doesn't. It doesn't have to be coded to handle  
setColor, or any other method that you might want to have undone.



___

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: Cocoa et al as HCI usability problem

2008-05-21 Thread Jonathan Hendry


On May 21, 2008, at 12:52 AM, Peter Duniho wrote:


Cocoa restrains class extension _much_ less than any of these other  
languages, and in turn has a _much_ higher degree of hazard.


I think you're overestimating the hazard. Or, at least, the risk that  
it can be encountered accidentally.


It's not like Categories haven't been used in 'serious' software,  
after all.


In the 90s, NeXTSTEP and Objective-C (with Categories) were safe  
enough to be used for investment bank trading systems (derivatives,  
fixed income trading, that kind of thing) that safely handled vast  
numbers of high-value transactions (hundreds of millions of dollars  
each and up).


It's possible to conceive of theoretical situations in which things  
could go badly pear-shaped due to a Category. In practice, because of  
the ways people typically use Categories, it just hasn't been that  
big of an issue.



___

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: A documetation suggestion (was Re: Cocoa et al as HCI usability problem)

2008-05-22 Thread Jonathan Hendry
http://lists.apple.com/mailman/options/cocoa-dev/jonhendry%40mac.com

This email sent to [EMAIL PROTECTED]


Jonathan Hendry

Howard Hughes Medical Institute
Maunsell Lab
Harvard Medical School


___

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: File's Owner

2008-05-23 Thread Jonathan Hendry
An example of multiple nibs where a nib's File's Owner wouldn't  
necessarily be NSApp would be System Preferences and the  
preferencepane bundles that it loads.


NSApp would be SystemPreferences.app, and owns the main nib of the  
application.


Each preference pane is an instance of NSPreferencePane (or a  
subclass), which is the owner of a nib that provides the user  
interface that loads in when you select the pane.


So in that case, NSApp owns a nib, but also has a collection of  
NSPreferencePane objects, each of which owns a nib.


Conceivably, an NSPreferencePane object might be paired with one or  
more other classes (for example, a class to load and display screen  
saver previews) which might want access to the pane's user interface  
widgets or their data. It would access those indirectly through the  
preference pane, which is connected to the widgets using the File's  
Owner proxy.



On May 23, 2008, at 10:31 PM, Johnny Lundy wrote:

OK that's the first step towards saying what it is - the controller  
object that manages the corresponding user interface objects in the  
nib file. Now to find out what "managing" them means. This implies  
that NSApp is a "controller object" that manages the user interface  
objects in my nib file. I need to find out what NSApp is doing to my  
nib file objects to "manage" them.


I'm getting closer. Thanks for the reference.




On May 23, 2008, at 7:36 PM, Julien Jalon wrote:

File's Owner can be any object in your application but is most  
often set to the controller object that manages the corresponding  
user interface objects in the nib file.


___

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/jonhendry%40mac.com

This email sent to [EMAIL PROTECTED]


___

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: drawer attached to modal window is unresponsive

2008-05-30 Thread Jonathan Hendry
I believe a drawer is actually treated as a separate window, which  
probably confuses things when attached to a window that is modal. I'm  
not sure why the tableview scrolls, but this would explain why the  
other controls aren't accessible.


Perhaps you could move the drawer contents into an area in the modal  
window, which is only shown when a disclosure triangle thingy is  
clicked.


- Jon

On May 30, 2008, at 3:55 PM, Steve Christensen wrote:

I'm working on a plugin that needs to do some involved setup, and  
I'm handling this in a modal window since the setup has to be done  
in an atomic fashion. The window also has an attached drawer. What  
I'm finding is that I can open and close the drawer, and a table  
view in the drawer will scroll if I move a scroll wheel while the  
mouse is over the table, but if I click on any of the controls in  
the drawer, I just hear a beep instead of having something useful  
happen.


Is this expected behavior? Is there any way to allow the drawer to  
process user events or should I give up on the drawer?


steve

___

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/jonhendry%40mac.com

This email sent to [EMAIL PROTECTED]


Jonathan Hendry

Howard Hughes Medical Institute
Maunsell Lab
Harvard Medical School


___

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: MacBook Wake On Lan

2008-08-20 Thread Jonathan Hendry


On Aug 20, 2008, at 17:47 PM, Ryan Stephens wrote:

I believe that most MacBooks and Powerbooks are designed to run when  
closed

if an external monitor, keyboard and mouse are attached.


A dummy monitor, allowing headless operation, can be easily created  
using a resistor and a VGA connector, or a MacBook->VGA adaptor.


http://www.mythic-beasts.com/support/macminicolo_howto.html

"prepare a simple terminator to convince the machine that a (non-DDC)  
monitor is attached. All that's needed is to connect a 75Ω resistor  
between pins 2 and 7 of the (analogue) VGA connector. The easiest way  
to do this is to buy a male DB15 connector (a "VGA plug") and  
appropriate resistor, and solder it between pins 2 and 7 on the  
connector. Fit a hood over the connector to prevent damage in handling."


A cheap and dirty way to create this would be to just pop a resistor  
into the proper holes in the mini-DVI->VGA adaptor from Apple.


Jonathan Hendry

Howard Hughes Medical Institute
Maunsell Lab
Harvard Medical School


___

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]


NSSound dropouts with Leopard on a G5

2008-05-09 Thread Jonathan Hendry

Howdy,

We have an experiment-running program which uses NSSound to play  
auditory stimuli. After upgrading a G5 to Leopard, we're seeing  
significant audio problems that we didn't see on Tiger. Sometimes,  
it's just a momentary dropout, but other times the audio just goes  
away for minutes at a time.


This behavior happens with both the internal audio hardware, or with  
a USB soundcard, so it probably isn't specific to the hardware.


Most of the audio glitches are accompanied by syslog messages from  
IOAudioStream, describing problems related to clipIfNecessary()


Has anyone run into this? Is there a fix or workaround? Should we be  
using something lower-level than NSSound? Is there a better place to  
ask?


Thanks,

Jon

Jonathan Hendry

Howard Hughes Medical Institute
Maunsell Lab
Harvard Medical School


___

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: NSSound dropouts with Leopard on a G5

2008-05-09 Thread Jonathan Hendry


On May 9, 2008, at 3:27 PM, Jens Alfke wrote:



On 9 May '08, at 12:10 PM, Jonathan Hendry wrote:

We have an experiment-running program which uses NSSound to play  
auditory stimuli. After upgrading a G5 to Leopard, we're seeing  
significant audio problems that we didn't see on Tiger. Sometimes,  
it's just a momentary dropout, but other times the audio just goes  
away for minutes at a time.


Does any other audio played by other apps on that machine have  
similar problems?


Hm. I'll have to check on that. It's pretty much only used for  
experiments.




Most of the audio glitches are accompanied by syslog messages from  
IOAudioStream, describing problems related to clipIfNecessary()
Has anyone run into this? Is there a fix or workaround? Should we  
be using something lower-level than NSSound? Is there a better  
place to ask?


I'm not aware of any bugs specific to NSSound.

If you want to try another API, QTKit is probably the best one to  
try next. Load the audio file into a QTMovie object and then tell  
it to play. (You don't need any controller view.)


The low-level API that really does all the audio work is CoreAudio,  
but you don't want to go there for a simple task like this. Playing  
a sound file would end up as several pages of code. There are  
sample apps that demonstrate how to do it, but it's still probably  
overkill.


Probably. And it might not even fix the problem. On the other hand,  
we play the various sounds *a lot*, and frequently, so it might be  
worthwhile given their importance. If it fixed the problem. (It might  
also be useful to add the ability to send the audio to a specific  
output device, rather than just sending it to the default audio out.)


On the other hand, if you want to find expert advice on this  
problem, the coreaudio-api list is probably the right place to ask.


Thanks, I'll check there.

--

Jonathan Hendry

Howard Hughes Medical Institute
Maunsell Lab
Harvard Medical School


___

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: App Listener?

2009-01-08 Thread Jonathan Hendry


On Jan 8, 2009, at 09:14 AM, Rainer Brockerhoff wrote:


At 05:55 -0800 08/01/09, cocoa-dev-requ...@lists.apple.com wrote:

From: Jerry Krinock 
References: <63539670901072146w570a8dc1wc13c58b8ecb43...@mail.gmail.com 
>


<63539670901072246j1f659c63q33a73b501233f...@mail.gmail.com>
<63539670901072246u6b783883n69fdf7a44fb0a...@mail.gmail.com>
In-Reply-To: <63539670901072246u6b783883n69fdf7a44fb0a...@mail.gmail.com 
>

Date: Thu, 8 Jan 2009 05:39:57 -0800
Message-ID: <406b8377-613f-49d2-a3de-2ba381346...@ieee.org>

On 2009 Jan, 07, at 22:46, Chunk 1978 wrote:


does this work with Dashboard?  it seems that dashboard is a
background application that's always open...


Well, obviously it does not.

You'd need a NSWorkspaceDidActivateApplicationNotification, but it  
looks like there is no such thing.  You could periodically poll - 
[NSWorkspace activeApplication], but I hope someone has a better  
idea, because if you do I would not want your process running on my  
Mac.


Today, the only solution seems to be to install a Carbon Event  
handler for the {kEventClassApplication, kEventAppFrontSwitched}  
event.




A hacky idea might be to create an Objective-C Dashboard widget that  
reports when it is displayed or updated, if that's possible.


--

Jonathan Hendry

Howard Hughes Medical Institute
Maunsell Lab
Harvard Medical School


___

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


NSScreen order?

2009-02-10 Thread Jonathan Hendry

Hi,

How is the order of screens after screen 0 in [NSScreen screens]  
determined?


I have two external monitors hooked up to my laptop. One is a 23" LCD  
which is the primary display. One of the monitors is a Mimo USB  
monitor, which doesn't play well with OpenGL. Our application is  
written so that if there is more than one display, it captures display  
2 (ie, screens[1]) and uses it to display an OpenGL visual stimulus.


The problem I'm having is that the app always grabs the Mimo, which  
makes OpenGL unhappy, and the app crashes. I would like the app to  
grab the internal LCD of the laptop instead. I've tried changing the  
arrangement of the screens, but that doesn't seem to make any  
difference. If I unplug the Mimo, then start the app, it does capture  
the laptop's LCD. I can then plug the Mimo back in, and it works as  
desired - until I restart the app.


Is there any way to predict how the displays will be numbered? Or to  
force the Mimo to be screen 3?


(I'd rather not add code to the app to account for my toy monitor.)

Thanks,

Jon

Jonathan Hendry

Howard Hughes Medical Institute
Maunsell Lab
Harvard Medical School


___

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: Running Cocoa applications from file servers

2009-02-25 Thread Jonathan Hendry


On Feb 25, 2009, at 11:48 AM, I. Savant wrote:

On Wed, Feb 25, 2009 at 10:43 AM, Erik Buck  
 wrote:


Where did the fetish for installing every single application on the  
local hard disk come from ?  Isn't it insane to have 35 installed  
copies of OmniGraffle using up disk space just because you have 35  
licenses ?  Why is MS Word on every disk instead of just the server?


 ... because network interruptions (especially intermittent ones) can
wreak havoc on your running apps. :-) That's my main reason.


This is even more the case for the Citrix/Terminal Server model of  
application use, but that's quite popular.


It was quite convenient at the bank I worked at, to be able to change  
machines at will because home directories and /Network/Applications  
were NFS-mounted. You could even go to another building several  
streets away and get the same setup.


Yes, sometimes NFS hosed up and the NeXTStep machines went into  
spinning-disk land for extended periods, but it wasn't a crippling  
problem, and only happened a handful of times in several years.



___

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: Non-pageable app

2009-04-06 Thread Jonathan Hendry


On Apr 3, 2009, at 19:27 PM, Clark Cox wrote:

On Fri, Apr 3, 2009 at 3: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.


Then turn on "Use Secure Virtual Memory" in the Security Pane in
System Preferences.


Looking at Rich's employer's site, ironkey.com, I suspect the idea is  
to provide the security even if the machine does not have this  
preference set.


For instance, if you plug a secure, encrypted USB key into a public- 
access Mac, to which you may not have admin access in order to change  
the preference setting. You don't want some malware running on such a  
machine to be able to snoop the password that you enter to access the  
contents of the key.



___

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