Re: Receiving system notifications in 10.8

2013-10-10 Thread Carl Hoefs

On Oct 10, 2013, at 9:28 PM, Jens Alfke  wrote:

> 
> On Oct 10, 2013, at 7:38 PM, Carl Hoefs  
> wrote:
> 
>> How does one receive notifications from 10.8's new system-wide Notification 
>> Center? Is there a framework that allows a Cocoa program to receive system 
>> notifications, i.e., the ones that show automatically in the upper right 
>> hand of the screen?
> 
> No, it’s the other way around — Notification Center is for apps to _send_ 
> notifications to, not receive them. The notifications are purely for the user 
> to see.

Tantalizing, to be able to see them and not act on them programmatically.
> 
> There are several existing mechanisms like NSDistributedNotification, 
> NSWorkspace and kqueues for getting programmatic notifications of things 
> outside your process. Is there something specific you want to be notified of?

Lots of applications come to mind, if such a mechanism were available. To be 
able to know when a certain song is playing in iTunes Radio and crank up the 
volume, or to send out a text/email/tweet when certain notifications are 
posted, etc. I would think this would be Generally Useful. Wish there were a 
way...

- Carl


___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Re: collection of applications

2013-10-10 Thread Jens Alfke

On Oct 10, 2013, at 8:44 PM, Rufat A. Abdullayev  wrote:

> I also saw another approach they give a link to app store from application 
> and downloaded other app from App Store separately but managed them from 
> another app like a service ... It’s a pity that I could not get more details 
> on implementation!

Do you mean just launching another app programmatically? You can definitely do 
that; the typical way involves having the app register a custom URL scheme. But 
the other apps are just regular apps, not services or anything hidden.

—Jens
___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Re: Receiving system notifications in 10.8

2013-10-10 Thread Jens Alfke

On Oct 10, 2013, at 7:38 PM, Carl Hoefs  wrote:

> How does one receive notifications from 10.8's new system-wide Notification 
> Center? Is there a framework that allows a Cocoa program to receive system 
> notifications, i.e., the ones that show automatically in the upper right hand 
> of the screen?

No, it’s the other way around — Notification Center is for apps to _send_ 
notifications to, not receive them. The notifications are purely for the user 
to see.

There are several existing mechanisms like NSDistributedNotification, 
NSWorkspace and kqueues for getting programmatic notifications of things 
outside your process. Is there something specific you want to be notified of?

—Jens
___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

RE: collection of applications

2013-10-10 Thread Rufat A. Abdullayev
I also saw another approach they give a link to app store from application and 
downloaded other app from App Store separately but managed them from another 
app like a service ... It’s a pity that I could not get more details on 
implementation!

And I would like to learn out how it could be possible



-Original Message-
From: cocoa-dev-bounces+rufataa=agbank...@lists.apple.com 
[mailto:cocoa-dev-bounces+rufataa=agbank...@lists.apple.com] On Behalf Of Fritz 
Anderson
Sent: Thursday, October 10, 2013 8:39 PM
To: Jens Alfke
Cc: Cocoa-dev
Subject: Re: collection of applications

On 10 Oct 2013, at 11:12 AM, Jens Alfke  wrote:

> Does anyone know the reason for this limitation? It seems arbitrary. I can 
> understand why you can’t spawn processes (it prevents fork-bombs and similar 
> attacks) but what damage can be caused by a bundled dylib? Sure, you can 
> change your build process to make the dylib static, but I’ve had trouble with 
> complex 3rd party code [i.e. the Erlang interpreter/runtime] that has a heavy 
> dependency on dynamic library loading.

I can only speculate, but: If you can call out to a dynamic library, wouldn't 
that make it possible to download a library and execute unapproved code? 
Apple's not happy with downloadable executables other than JavaScript in the 
WebKit sandbox.

I don't know enough about HFS+ and dyld on iOS to know if it's possible to stop 
that.

— F


___

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:
https://lists.apple.com/mailman/options/cocoa-dev/rufataa%40agbank.az

This email sent to rufa...@agbank.az

___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Receiving system notifications in 10.8

2013-10-10 Thread Carl Hoefs
How does one receive notifications from 10.8's new system-wide Notification 
Center? Is there a framework that allows a Cocoa program to receive system 
notifications, i.e., the ones that show automatically in the upper right hand 
of the screen?

- Carl


___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

NSToolbar alternatives

2013-10-10 Thread jonat...@mugginsoft.com
Is anyone aware of any open source alternatives to NSToolbar?
I have looked in the usual places and turned up nothing.

I need to use InAppStoreWindow to customise the window title bar.
That and the requirement for a ribbon-esque style toolbar exclude using 
NSToolbar.

Jonathan











___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Re: collection of applications

2013-10-10 Thread Jens Alfke

On Oct 10, 2013, at 9:38 AM, Fritz Anderson  wrote:

> I can only speculate, but: If you can call out to a dynamic library, wouldn't 
> that make it possible to download a library and execute unapproved code? 
> Apple's not happy with downloadable executables other than JavaScript in the 
> WebKit sandbox.

Good point, but that’s avoidable by restricting dyld to only paths within the 
app’s bundle, which is immutable.
(I don’t know for certain, but this seems like something the sandbox can 
enforce.)

—Jens
___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Re: collection of applications

2013-10-10 Thread Fritz Anderson
On 10 Oct 2013, at 11:12 AM, Jens Alfke  wrote:

> Does anyone know the reason for this limitation? It seems arbitrary. I can 
> understand why you can’t spawn processes (it prevents fork-bombs and similar 
> attacks) but what damage can be caused by a bundled dylib? Sure, you can 
> change your build process to make the dylib static, but I’ve had trouble with 
> complex 3rd party code [i.e. the Erlang interpreter/runtime] that has a heavy 
> dependency on dynamic library loading.

I can only speculate, but: If you can call out to a dynamic library, wouldn't 
that make it possible to download a library and execute unapproved code? 
Apple's not happy with downloadable executables other than JavaScript in the 
WebKit sandbox.

I don't know enough about HFS+ and dyld on iOS to know if it's possible to stop 
that.

— F


___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

MODERATOR: End of Thread (was Re: [OT] Buttons in iOS 7)

2013-10-10 Thread Chris Hanson
Please keep posts on-topic for this list and do not continue this off-topic 
thread. Thanks.

  -- Chris Hanson, cocoa-dev co-moderator


___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Re: collection of applications

2013-10-10 Thread Jens Alfke

On Oct 10, 2013, at 3:42 AM, Rufat A. Abdullayev  wrote:

> One approach is to include apps in another app as a static library.
> Pls kindly share ideas about any other approaches?

I don’t think there are any other approaches:

* You can’t hide applications from the Springboard. All apps are visible.
* You can’t bundle the apps’ binaries inside your main app and start them up, 
because 3rd party apps can’t launch processes.
* You can’t bundle the apps as dynamic libraries and load them in your process, 
because 3rd party apps can’t contain their own dynamic libraries.*

—Jens

* Does anyone know the reason for this limitation? It seems arbitrary. I can 
understand why you can’t spawn processes (it prevents fork-bombs and similar 
attacks) but what damage can be caused by a bundled dylib? Sure, you can change 
your build process to make the dylib static, but I’ve had trouble with complex 
3rd party code [i.e. the Erlang interpreter/runtime] that has a heavy 
dependency on dynamic library loading.
___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Re: Crash in datasource method when closing document

2013-10-10 Thread Sean McBride
On Wed, 9 Oct 2013 23:10:18 -0700, Jerry Krinock said:

>> I'm using ARC.
>
>ARC doesn't help for KVO observers, notification observers, delegates,
>manual bindings, or data sources.  These must still be managed manually.
>
>* * *
>
>Here is some typical code "tear down" code.  This is for a tabbed
>window.  Note the outline view's delegate and data source being set to nil.

Is all that really necessary in ARC?  Even with weak references?  I still 
haven't switched from GC to ARC, looks like that's going to be a lot of crusty 
tear down code I'm going to need to add I guess. :(

Cheers,

-- 

Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-research.com 
Mac Software Developer  Montréal, Québec, Canada



___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Re: [OT] Buttons in iOS 7

2013-10-10 Thread Kyle Sluder
Protip: if you feel the need to prefix your subject line with “[OT]”, you 
should not send the message.

Especially if your previous thread on the subject was already terminated by a 
moderator,

Stop wasting everyone’s time. We’re not interested.

--Kyle Sluder

> On Oct 10, 2013, at 7:39 AM, Dave  wrote:
> 
> Hi All,
> 
> Interestingly (for me anyway in a bizarre way), Buttons in iOS 7 now no 
> longer meet the definition in the dictionary supplied with MacOS X ! 
> 
> Go figure! lol
> 
> All the Best
> Dave

___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

[OT] Buttons in iOS 7

2013-10-10 Thread Dave
Hi All,

Interestingly (for me anyway in a bizarre way), Buttons in iOS 7 now no longer 
meet the definition in the dictionary supplied with MacOS X ! 

Go figure! lol

All the Best
Dave


___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Re: Crash in datasource method when closing document

2013-10-10 Thread Shane Stanley
On 10 Oct 2013, at 10:56 PM, Michael Babin  wrote:

> outlet connected?

 Problem solved...

-- 
Shane Stanley 
'AppleScriptObjC Explored' 

___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Re: Crash in datasource method when closing document

2013-10-10 Thread Shane Stanley

On 10 Oct 2013, at 9:51 PM, Michael Babin  wrote:

> From your description, it appears that you're presenting a window/sheet when 
> the window is asked to close (Save/revert changes?). When the revert option 
> is selected, what changes occur to the underlying data supporting the outline 
> view?

The property holding the data is updated, and reloadData is called.
> 
> Once the window/sheet is dismissed, it looks like the main/document window is 
> asked to redraw its contents and the problem occurs there (redrawing the 
> outline view). That probably occurs before the -windowWillClose: call takes 
> place.

Right, that looks to be where it happens.

So before it happens, outlineView:objectValueForTableColumn:byItem: is being 
called regularly, and is returning my object (a file wrapper). Then when I 
click Revert in the dialog, I see reloadData called, then 
outlineView:objectValueForTableColumn:byItem: is called again, but this time 
the item is entirely unrelated to the outline view. And there shouldn't be an 
item at that stage.

-- 
Shane Stanley 
'AppleScriptObjC Explored' 


___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Re: Crash in datasource method when closing document

2013-10-10 Thread Michael Babin
On Oct 10, 2013, at 6:45 AM, Shane Stanley  wrote:

> 
> On 10 Oct 2013, at 9:39 PM, Michael Babin  wrote:
> 
>> Given the use of the data source protocol to provide the data to the outline 
>> view and the "Revert Changes" option, my first suspect would be the data 
>> provided to the outline view. Perhaps the underlying data has changed and 
>> the outline view has not been told to reload its data?
> 
> I have a reloadData in readFromURL::: when it's a revert.
> 
>> If the outline view has been told to reload its data, perhaps there is some 
>> problem with the other data source methods 
>> (outlineView:numberOfChildrenOfItem: or outlineView:child:ofItem:) and their 
>> return values?
> 
> They seem fine. But after I call reloadData, the next dataSource method 
> called is outlineView:objectValueForTableColumn:byItem:, and the item 
> argument is nonsense. I'd assumed outlineView:numberOfChildrenOfItem: would 
> be called after reloadData, but that doesn't seem to be happening.

I would have also assumed that outlineView:numberOfChildrenOfItem: would be 
called after reloadData. Perhaps check that reloadData is sent to the correct 
outline view (outlet connected? Same value as in the data source callback?).
___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Re: Crash in datasource method when closing document

2013-10-10 Thread Shane Stanley

On 10 Oct 2013, at 9:39 PM, Michael Babin  wrote:

> Given the use of the data source protocol to provide the data to the outline 
> view and the "Revert Changes" option, my first suspect would be the data 
> provided to the outline view. Perhaps the underlying data has changed and the 
> outline view has not been told to reload its data?

I have a reloadData in readFromURL::: when it's a revert.

> If the outline view has been told to reload its data, perhaps there is some 
> problem with the other data source methods 
> (outlineView:numberOfChildrenOfItem: or outlineView:child:ofItem:) and their 
> return values?

They seem fine. But after I call reloadData, the next dataSource method called 
is outlineView:objectValueForTableColumn:byItem:, and the item argument is 
nonsense. I'd assumed outlineView:numberOfChildrenOfItem: would be called after 
reloadData, but that doesn't seem to be happening.

-- 
Shane Stanley 
'AppleScriptObjC Explored' 


___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

collection of applications

2013-10-10 Thread Rufat A. Abdullayev
Hello Dear members!

I need to collect and manage ios applications on a device for our corporation 
to single one.

For example we have 5 apps and we want to create a new app that will be like a 
manager(or shell) for all other apps. So I open that app and see there all my 
existing apps and I could tap on any to launch it. So these 5 apps will not be 
visible on mobile desktop. So there no separate icon for that 5 apps ... only 
the one that collects them

One approach is to include apps in another app as a static library.

Pls kindly share ideas about any other approaches?

Cheers,
Rufat



___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Re: Crash in datasource method when closing document

2013-10-10 Thread Michael Babin
On Oct 10, 2013, at 12:06 AM, Shane Stanley  wrote:

> I have a document-based app, and it saves as a package. The document's window 
> contains an outline view, where the user can drag items from the Finder or 
> create new folders, and these will be saved to the package. I'm creating file 
> wrappers of the items, stored in a property of the document. That's all 
> working OK.
> 
> The problem I'm having is that if I open a file, then add an item, say a 
> folder, then click the close button and choose Revert Changes, I (nearly 
> always) get an exception thrown on the outline view's datasource method 
> -outlineView:objectValueForTableColumn:byItem:. It doesn't happen if the 
> outline view is hidden. I'm using ARC.
> 
> Any thoughts on where to start?

Given the use of the data source protocol to provide the data to the outline 
view and the "Revert Changes" option, my first suspect would be the data 
provided to the outline view. Perhaps the underlying data has changed and the 
outline view has not been told to reload its data? If the outline view has been 
told to reload its data, perhaps there is some problem with the other data 
source methods (outlineView:numberOfChildrenOfItem: or 
outlineView:child:ofItem:) and their return values?


___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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