Hi all,
I’m trying to get the accessory view of an NSAlert to layout similarity to the
the text fields of the messageText and informativeText. That is:
*Fill the the available horizontal space of the alert, respecting margins
* Including accounting for the different margins
> On 12 May 2021, at 11:17 am, Carl Hoefs via Cocoa-dev
> wrote:
>
> I'd like to present an informational alert for n seconds then dismiss it
> without user interaction. But I don't see any way to dismiss, terminate,
> cancel, invalidate, etc. an NSAlert object.
I recen
On 5/12/21 11:17 AM, Carl Hoefs via Cocoa-dev wrote:
I had thought it was possible on MacOS to run an NSAlert panel nonmodally...
I'd like to present an informational alert for n seconds then dismiss it
without user interaction. But I don't see any way to dismiss, terminate,
cancel
; wrote:
>
> I had thought it was possible on MacOS to run an NSAlert panel nonmodally...
>
> I'd like to present an informational alert for n seconds then dismiss it
> without user interaction. But I don't see any way to dismiss, terminate,
> cancel, invalidate, e
> On May 12, 2021, at 11:17 AM, Carl Hoefs via Cocoa-dev
> wrote:
>
> I had thought it was possible on MacOS to run an NSAlert panel nonmodally…
Alerts are modal by definition, per the HIG (IIRC). If you want a non-modal
panel, it wouldn't be an alert; you'd have to implement
I had thought it was possible on MacOS to run an NSAlert panel nonmodally...
I'd like to present an informational alert for n seconds then dismiss it
without user interaction. But I don't see any way to dismiss, terminate,
cancel, invalidate, etc. an NSAlert object.
I know this is possible
I have an OutlineView. Whenever I drag and drop a child item within the
> Outline-View my application crashes when I open do an "NSAlert runModal" like
> in the code below:
>
> - (BOOL)outlineView:(NSOutlineView *)outlineView acceptDrop:(id <
> NSDraggingInf
Hello,
I have an OutlineView. Whenever I drag and drop a child item within the
Outline-View my application crashes when I open do an "NSAlert runModal"
like in the code below:
- (BOOL)outlineView:(NSOutlineView *)outlineView acceptDrop:(id <
NSDraggingInfo >)info item:(id
> On Sep 10, 2018, at 12:17 PM, Ben Kennedy wrote:
>
> Son of a gun. Thanks for elucidating this Richard.
Actually Andy Lee was right on when he suggested "it may depend on the setting
in System Preferences that governs whether all controls can get keyboard
focus". However I could not see
> On 10 Sep 2018, at 11:06 am, Richard Charles wrote:
>
> On my development machine running 10.12.6 pressing the spacebar will dismiss
> a simple NSAlert. This is because in System Preferences > Keyboard >
> Shortcuts > Full Keyboard Access > All Controls was se
g
> in System Preferences that governs whether all controls can get
> keyboard focus.
> On Sep 8, 2018, at 6:52 PM, Alex Zavatone wrote:
>
> Which version of macOS are you running?
Thanks for the comments.
On my development machine running 10.12.6 pressing the spacebar will dismiss a
s
Which version of macOS are you running?
Sent from my iPhone
> On Sep 8, 2018, at 5:53 PM, Richard Charles wrote:
>
> I have a simple NSAlert presented as an attached sheet with a single default
> OK button.
>
> When the spacebar is pressed the alert is dismissed.
>
us.
--Andy
On Sat, Sep 8, 2018, at 6:53 PM, Richard Charles wrote:
> I have a simple NSAlert presented as an attached sheet with a single
> default OK button.
>
> When the spacebar is pressed the alert is dismissed.
>
> It this a new thing?
>
> Is this document
I have a simple NSAlert presented as an attached sheet with a single default OK
button.
When the spacebar is pressed the alert is dismissed.
It this a new thing?
Is this documented anywhere?
--Richard Charles
___
Cocoa-dev mailing list (Cocoa-dev
> On Aug 23, 2016, at 4:31 PM, dangerwillrobinsondan...@gmail.com wrote:
>
>
>
>> On Aug 24, 2016, at 2:56 AM, Andreas Falkenhahn
>> wrote:
>>
>> Is that your personal opinion or is this documented anywhere?
> There's not anything to the contrary I've seen.
Andreas
> On Aug 24, 2016, at 2:56 AM, Andreas Falkenhahn
> wrote:
>
> Is that your personal opinion or is this documented anywhere?
There's not anything to the contrary I've seen.
Look no further than LSUIElement.
There is an info plist key that says you have no UI, and
> On 24 Aug 2016, at 12:52 AM, Andreas Falkenhahn
> wrote:
>
> I really can't use NSApplicationMain() because AFAICS it also expects
> to load a NIB file from the app bundle which simply doesn't exist for
> my app because I'm not using Xcode at all and everything is set
On 23.08.2016 at 19:30 dangerwillrobinsondan...@gmail.com wrote:
> You don't have to have a nib unless your plist says you will.
Is that your personal opinion or is this documented anywhere?
Apple's documentation of NSApplicationMain() clearly states that
this function "loads the main nib file
It may load it any way.
You don't have to have a nib unless your plist says you will.
Sent from my iPhone
> On Aug 24, 2016, at 12:45 AM, Scott Ribe wrote:
>
>> On Aug 23, 2016, at 8:52 AM, Andreas Falkenhahn
>> wrote:
>>
>> I really
On 23.08.2016 at 17:45 Scott Ribe wrote:
> On Aug 23, 2016, at 8:52 AM, Andreas Falkenhahn
> wrote:
>> I really can't use NSApplicationMain() because AFAICS it also expects
>> to load a NIB file from the app bundle
> The nib to load at startup is specified in the
On Aug 23, 2016, at 8:52 AM, Andreas Falkenhahn wrote:
>
> I really can't use NSApplicationMain() because AFAICS it also expects
> to load a NIB file from the app bundle
The nib to load at startup is specified in the plist, I bet if you leave that
entry out, it won't
On 23.08.2016 at 01:17 Graham Cox wrote:
>> On 23 Aug 2016, at 1:46 AM, Andreas Falkenhahn
>> wrote:
>> It is unusual in the way that it's not calling NSApplicationMain() but tries
>> to imitate what NSApplicationMain() does. Here goes the code that is executed
>> to
> On 23 Aug 2016, at 1:46 AM, Andreas Falkenhahn wrote:
>
> It is unusual in the way that it's not calling NSApplicationMain() but tries
> to imitate what NSApplicationMain() does. Here goes the code that is executed
> to set up the NSApp:
There’s your problem.
You’re
can rule out the possibility that such a fundamental
functionality like "runModal" is broken completely in 10.6 for NSAlert,
NSOpenPanel, NSSavePanel... I'm pretty certain that it will work
correctly when doing things the proper way using NSApplicationMain().
Still, it must be possible to get t
On Aug 22, 2016, at 10:46 AM, Andreas Falkenhahn <andr...@falkenhahn.com> wrote:
>
> On 22.08.2016 at 17:30 Ken Thomases wrote:
>
>> On Aug 22, 2016, at 8:26 AM, Andreas Falkenhahn <andr...@falkenhahn.com>
>> wrote:
>
>>> I've created an
On 22.08.2016 at 17:30 Ken Thomases wrote:
> On Aug 22, 2016, at 8:26 AM, Andreas Falkenhahn <andr...@falkenhahn.com>
> wrote:
>> I've created an NSAlert dialog as described here:
>> https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Dialog/Tasks/Usin
On Aug 22, 2016, at 8:26 AM, Andreas Falkenhahn <andr...@falkenhahn.com> wrote:
>
> I've created an NSAlert dialog as described here:
> https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Dialog/Tasks/UsingAlerts.html#//apple_ref/doc/uid/2871-129009-BCIFAAEJ
anything that could help me here. If you have
> anything more than just a Google search for "NSAlert 10.6", please
> elaborate... (or send a link)
>
> --
> Best regards,
> Andreas Falkenhahnmailto:andr...@falkenhahn.com
>
H
On Aug 22, 2016, at 09:04 AM, Andreas Falkenhahn <andr...@falkenhahn.com> wrote:
You really think I didn't Google before asking? I certainly did, but
so far I haven't found anything that could help me here. If you have
anything more than just a Google search for "NSAlert 10.6",
//bfy.tw/7Kcc
> there is a great resource here.
You really think I didn't Google before asking? I certainly did, but
so far I haven't found anything that could help me here. If you have
anything more than just a Google search for "NSAlert 10.6", please
elaborate... (or send
> On Aug 22, 2016, at 10:26 PM, Andreas Falkenhahn
> wrote:
>
> Does anybody have an idea
> what could cause this behaviour on 10.6 and how I can fix this?
http://bfy.tw/7Kcc
there is a great resource here.
___
Cocoa-dev
I've created an NSAlert dialog as described here:
https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Dialog/Tasks/UsingAlerts.html#//apple_ref/doc/uid/2871-129009-BCIFAAEJ
When I run it using
[alert runModal];
it shows up correctly but pressing a button doesn't do
> On May 23, 2016, at 2:41 PM, Fritz Anderson wrote:
>
> Hence the rule that you don’t do _anything_ lengthy on the main (GUI-runloop)
> thread. You can see how using a separate thread would solve your problem.
> Welcome to 2003.
Less dogmatically, you can use
On 23 May 2016, at 4:14 PM, Tom Doan <t...@estima.com> wrote:
>
> I have an menu operation which, before it fully executes, pops up
> an NSAlert asking a Yes/No question ("Selection Only(Y/N)?") then,
> depending upon the answer will either apply to the whole l
I have an menu operation which, before it fully executes, pops up
an NSAlert asking a Yes/No question ("Selection Only(Y/N)?") then,
depending upon the answer will either apply to the whole list or just
the selection. However, no matter what I do (other than putting the
operation in
@lists.apple.com
[cocoa-dev-bounces+lrucker=vmware@lists.apple.com] on behalf of Gerriet M.
Denkmann [gerr...@mdenkmann.de]
Sent: Tuesday, October 21, 2014 8:59 PM
To: cocoa-dev@lists.apple.com
Subject: Return values of NSAlert
NSAlert has: - (void)beginSheetModalForWindow:(NSWindow *)sheetWindow
NSAlert has: - (void)beginSheetModalForWindow:(NSWindow *)sheetWindow
completionHandler:(void (^)(NSModalResponse returnCode))handler
NSModalResponse has three values: Stop, Abort, Continue - none of which bear
any resemblance with the buttons: Default, Alternate, Other in my
to work.
var alert = NSAlert()
alert.addButtonWithTitle(NSLocalizedString(SAVE, comment: Save))
alert.addButtonWithTitle(NSLocalizedString(CANCEL, comment: Cancel))
alert.addButtonWithTitle(NSLocalizedString(DONT_SAVE, comment: Don't
Save))
alert.messageText = NSLocalizedString
On Oct 21, 2014, at 10:59 PM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote:
NSAlert has: - (void)beginSheetModalForWindow:(NSWindow *)sheetWindow
completionHandler:(void (^)(NSModalResponse returnCode))handler
NSModalResponse has three values: Stop, Abort, Continue - none
code which determines the format and, if it’s the old format, creates and
displays an NSAlert to ask the user if they want to update the document
in-place or create a copy.
This seems to work in initial testing — the alert displays — but I get a
message in the console telling me that “NSAlert
On Aug 27, 2014, at 11:30 AM, Matthew LeRoy mle...@minitab.com wrote:
This seems to work in initial testing — the alert displays — but I get a
message in the console telling me that “NSAlert is being used from a
background thread, which is not safe. This is probably going to crash
On Aug 27, 2014, at 8:43 AM, edward taffel etaf...@me.com wrote:
On Aug 27, 2014, at 11:30 AM, Matthew LeRoy mle...@minitab.com wrote:
This seems to work in initial testing — the alert displays — but I get a
message in the console telling me that “NSAlert is being used from a
background
;
}
- showWindows {
[super showWindows];
if (_autoConverted) {
NSAlert *autoConversionAlert = …;
NSWindow *docWindow = self.windowControllers[0].window;
[alert beginSheetModalForWindow:window completionHandler:…];
}
--Kyle Sluder
___
Cocoa
telling me that ³NSAlert is being used from a
background thread, which is not safe. This is probably going to crash
sometimes. Š² Presumably this is because I have overridden
+canConcurrentlyReadDocumentsOfType: to return YES for my documents,
resulting in document reading happening on a background
button, but *not* default button. Responds to
Command-Delete
Cancel - Default button, responds to both the Return and Escape keys.
Solution:
NSAlert * alert = [[NSAlert alloc] init];
[alert addButtonWithTitle:@Delete];
[alert addButtonWithTitle:@Cancel
opening an NSAlert while scanning an autosaved document now engenders the
following log item:
NSAlert is being used from a background thread, which is not safe. This is
probably going to crash sometimes. Break on void
_NSAlertWarnUnsafeBackgroundThreadUsage() to debug. This will be logged
On May 22, 2014, at 8:29 AM, edward taffel etaf...@me.com wrote:
this i have remedied. however, given the scenario where a url has vanished, i
first show an NSAlert then an NSOpenPanel to offer relink. NSOpenPanel
causes no such background thread issue: do the two have variant thread
On May 22, 2014, at 11:41 AM, Jens Alfke j...@mooseyard.com wrote:
On May 22, 2014, at 8:29 AM, edward taffel etaf...@me.com wrote:
this i have remedied. however, given the scenario where a url has vanished,
i first show an NSAlert then an NSOpenPanel to offer relink. NSOpenPanel
On 22 May 2014, at 10:54 AM, edward taffel etaf...@me.com wrote:
i find no mention of thread safety in the NSOpenPanel doc, but the doc
mentions ‘Open panels are drawn in a separate process by the powerbox’:
perhaps this is the reason.
This is one of those rules so universal in Apple APIs
On May 22, 2014, at 8:54 AM, edward taffel etaf...@me.com wrote:
i find no mention of thread safety in the NSOpenPanel doc, but the doc
mentions ‘Open panels are drawn in a separate process by the powerbox’:
perhaps this is the reason.
That’s done because the Open panel itself can’t be
On May 22, 2014, at 12:24 PM, Jens Alfke j...@mooseyard.com wrote:
On May 22, 2014, at 8:54 AM, edward taffel etaf...@me.com wrote:
i find no mention of thread safety in the NSOpenPanel doc, but the doc
mentions ‘Open panels are drawn in a separate process by the powerbox’:
perhaps
On May 19, 2014, at 4:30 PM, Seth Willits sli...@araelium.com wrote:
Any ideas on how to get a Cancel button which is both the default button and
responds to escape? Both require setting the button's key equivalent and
there can only be one.
This seems to work:
NSAlert *alert
Any ideas on how to get a Cancel button which is both the default button and
responds to escape? Both require setting the button's key equivalent and there
can only be one.
--
Seth Willits
--
Seth Willits
___
Cocoa-dev mailing list
On 2014 May 19, at 13:30, Seth Willits sli...@araelium.com wrote:
Any ideas on how to get a Cancel button which is both the default button and
responds to escape? Both require setting the button's key equivalent and
there can only be one.
Maybe override -keyDown: somewhere.
On 6 Apr 2014, at 2:52 PM, Daniel Luis dos Santos daniel.d...@gmail.com wrote:
I want to display some text indicating a list of errors the user should
correct before submitting data.
I am using a modal NSAlert in which i set a message with a localised string
from a table.
I want
On Apr 5, 2014, at 7:19 PM, Daniel Luis dos Santos daniel.d...@gmail.com
wrote:
I want to include the error details and for that I was setting the
informativeText field but it doesn’t show up unless its a string literal.
That's simply not true, so you're not setting up your string variable
Hello all,
I want to display some text indicating a list of errors the user should correct
before submitting data.
I am using a modal NSAlert in which i set a message with a localised string
from a table.
I want to include the error details and for that I was setting the
informativeText field
Sorry, my mistake
String was empty. Conditional that populated it failed.
On 06 Apr 2014, at 16:18, Scott Ribe scott_r...@elevated-dev.com wrote:
On Apr 5, 2014, at 7:19 PM, Daniel Luis dos Santos daniel.d...@gmail.com
wrote:
I want to include the error details and for that I was setting
Hello all,
I want to display some text indicating a list of errors the user should correct
before submitting data.
I am using a modal NSAlert in which i set a message with a localised string
from a table.
I want to include the error details and for that I was setting the
informativeText field
. The question of whether it’s a string literal
is irrelevant, since the string is passed as a parameter to a NSAlert method,
regardless of origin. Can you show code?
I also tried setting an accessory view but nothing is showed.
The code that uses the accessory view is below.
NSTextView
In general -- any alert that requires user attention (especially ones with
multiple button alternatives) can be left on the screen indefinitely by a user.
If you are monitoring environmental conditions (such as network, server, or
Internet reachability) that arise, it is always possible that
On Dec 4, 2012, at 7:49 AM, Brad O'Hearne br...@bighillsoftware.com wrote:
In general -- any alert that requires user attention (especially ones with
multiple button alternatives) can be left on the screen indefinitely by a
user. If you are monitoring environmental conditions (such as
Hello all,
Is there a way to get a reference to the currently displayed modal NSAlert, or
to be able to globally determine if a modal alert is presently showing in a
Cocoa app, though you have no knowledge of where in the app it originated from?
Thanks,
Brad
Brad O'Hearne
Founder/Lead
On Mon, Dec 3, 2012, at 05:13 PM, Brad O'Hearne wrote:
Hello all,
Is there a way to get a reference to the currently displayed modal
NSAlert, or to be able to globally determine if a modal alert is
presently showing in a Cocoa app, though you have no knowledge of where
in the app
was behind the
question. If an app could easily request a reference to any NSAlert that was
currently being displayed, it might suggest an alternative to handling it.
Presently, each plugin has to handle dismissing its own potentially displayed
alerts when the workflow manager decides it needs
of these exceptional conditions.
Whether the workflow manager then runs the NSAlert itself, or waits for
the plugin to do so, that paused state is now captured by the workflow
manager, and there is no need to consult AppKit about the currently
running NSAlert.
In general, I think it's a bad idea
Do you mean something like
[[self window] attachedSheet]
Am 04.12.2012 um 02:13 schrieb Brad O'Hearne:
Hello all,
Is there a way to get a reference to the currently displayed modal NSAlert,
or to be able to globally determine if a modal alert is presently showing in
a Cocoa app
On 4 Dec 2012, at 06:26, Kyle Sluder k...@ksluder.com wrote:
I think you're thinking about the problem too generally.
The workflow manager is probably going to need to understand that the
plugins it's running can have encounter exceptional conditions.
Therefore, there should be a mechanism
()
#6 0x7fff935e97dc in _dispatch_worker_thread2 ()
#7 0x7fff8a9b93da in _pthread_wqthread ()
#8 0x7fff8a9bab85 in start_wqthread ()
I'm creating the alert with class method in NSAlert and running it with
runModal.
NSAlert *alert =[NSAlert
On 2011 Jul 13, at 05:58, Graham Westlake wrote:
I'm showing an NSAlert with runModal, but despite the buttons being
responsive, the alert box will not dismiss and runModal never returns. I
can't understand what state the run loop is in for this to be happening.
This doesn't quite make
I'm showing an NSAlert with runModal, but despite the buttons being responsive,
the alert box will not dismiss and runModal never returns. I can't understand
what state the run loop is in for this to be happening.
It's actually a Qt application, and I am showing the alert at startup
On 23 Feb 2010, at 18:17, Kyle Sluder wrote:
On Tue, Feb 23, 2010 at 7:05 AM, Keith Duncan ke...@33software.com wrote:
However, if I click my 'Done' button, which first attempts to -commitEditing
for the hosting view controller, and will then close the hosting child
window if
I have a text field whose value is bound to a property which is validated.
When editing the field and hitting enter, if the value fails to validate the
error is presented as a sheet - this is the desired behaviour.
However, if I click my 'Done' button, which first attempts to -commitEditing
On Tue, Feb 23, 2010 at 7:05 AM, Keith Duncan ke...@33software.com wrote:
However, if I click my 'Done' button, which first attempts to -commitEditing
for the hosting view controller, and will then close the hosting child window
if -commitEditing returns YES; the error is presented as a
On 25 Jan 2010, at 04:27, Poonam Virupaxi Shigihalli wrote:
hi all,
When alert messages are displayed using runModal, it blocks the thread until
the user clicks on the button. Is there anyway to avoid blocking of the
thread when alert is displayed?
Try displaying your alerts as
hi all,
When alert messages are displayed using runModal, it blocks the thread until
the user clicks on the button. Is there anyway to avoid blocking of the thread
when alert is displayed?
Regards,
Poonam.
___
Cocoa-dev mailing list
On 25/01/2010, at 3:27 PM, Poonam Virupaxi Shigihalli wrote:
When alert messages are displayed using runModal, it blocks the thread until
the user clicks on the button. Is there anyway to avoid blocking of the
thread when alert is displayed?
NSAlert does not block the thread, it runs
So the problem I was having with my googling was that I was trying alert,
popup and dialog - not sheet ;o)
Yep. Just a heads up for future reference (not related to your current
question), as you continue on your newbie path, you may find that certain
methods dealing with modal windows that
Dialogs
Types of Dialogs and When to Use Them
Sheets (Document-Modal Dialogs)
...reveals the key word sheet, which in NSAlert.h will lead you straight to
-[NSAlert
Hi,
Sorry for the really noob posting, but I am currently using the NSAlert class
to display alerts in my application, but what I would rather do is display one
of the alert boxes that slide out of the title bar, as with the installer,
firefox and a slew of other applications. Does anyone know
On Dec 19, 2009, at 12:37 AM, Michael Davey wrote:
Sorry for the really noob posting, but I am currently using the
NSAlert class to display alerts in my application, but what I would
rather do is display one of the alert boxes that slide out of the
title bar, as with the installer, firefox
will lead you straight to
-[NSAlert
beginSheetModalForWindow:modalDelegate:didEndSelector:contextInfo:]
In the old days, the HI Guidelines always left us to discover the appropriate
implementation ourselves. I like the new Implementation sections a lot,
though currently they seem
So the problem I was having with my googling was that I was trying alert, popup
and dialog - not sheet ;o)
On 19 Dec 2009, at 18:41, Ken Thomases wrote:
On Dec 19, 2009, at 12:37 AM, Michael Davey wrote:
Sorry for the really noob posting, but I am currently using the NSAlert
class
What is the easiest way to get my customized NSAlert to allow multiple
key equivalents for its buttons?
For instance, I'd like to assign not just the default Command-D to
Don't Save, but also another key with which my users are very
familiar.
I think it might be possibly to replace
On Wed, Oct 7, 2009 at 10:58 AM, David Reitter david.reit...@gmail.com wrote:
What is the easiest way to get my customized NSAlert to allow multiple key
equivalents for its buttons?
You're probably going to need to stop using NSAlert and start using
your own window as a sheet. Then you should
On Oct 7, 2009, at 10:58 AM, David Reitter wrote:
What is the easiest way to get my customized NSAlert to allow
multiple key equivalents for its buttons?
I think the best way is to create your own alert panel in a nib and
run it modally. That way you have total control — you can set your
on it because the
layout was painful to control, and the sheet animation wasn't quite
right. Future compatibility is an important consideration.
Of course I'm already subclassing NSAlert.
On Oct 7, 2009, at 2:04 PM, Kyle Sluder wrote:
You're probably going to need to stop using NSAlert and start
On Wed, Oct 7, 2009 at 11:19 AM, David Reitter david.reit...@gmail.com wrote:
window = (MyNSAlert*) [window clone];
What is this -clone method?
That way I could get NSAlert to do all the layout and prepare the window,
but then take over and roll my own?
No, because even granting
On Oct 7, 2009, at 2:48 PM, Kyle Sluder wrote:
On Wed, Oct 7, 2009 at 11:19 AM, David Reitter david.reit...@gmail.com
wrote:
window = (MyNSAlert*) [window clone];
What is this -clone method?
I meant NSObject's -copy. Confused it with Java's clone method.
That way I could get NSAlert
, the alerts are run with beginModalSessionForWindow and
runModalSession.
So I don't understand why you're so intent on using NSAlert if you're
not using its -beginSheetModalForWindow:… convenience method?
Would it be possible to add a control to the alert that is invisible, but
has the desired
On Oct 7, 2009, at 3:12 PM, Kyle Sluder wrote:
FWIW, the alerts are run with beginModalSessionForWindow and
runModalSession.
So I don't understand why you're so intent on using NSAlert if you're
not using its -beginSheetModalForWindow:… convenience method?
Oh, I use it. But because
How would I do this?
The Outline View is being used with Core Data.
Cheers,
Josh.
___
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
NSArrayController's
-remove: method, and assuming you're using NSArrayController for this in the
first place, simply subclass your NSArrayController and provide the NSAlert
behavior by overriding -remove: and then call super's -remove: once the
NSAlert has come back positive (for chlamydia
: Steven Degutis steven.degu...@gmail.com
To: Joshua Garnham joshua.garn...@yahoo.co.uk
Cc: cocoa-dev@lists.apple.com
Sent: Monday, 7 September, 2009 17:20:50
Subject: Re: Making an NSAlert be displayed when the User attempts to delete a
row from an NSOutlineView when it has children.
Josh
On Sep 7, 2009, at 8:14 AM, Joshua Garnham
joshua.garn...@yahoo.co.uk wrote:
How would I do this?
http://www.whathaveyoutried.com
--Kyle Sluder
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or
);
}
}
From: Kyle Sluder kyle.slu...@gmail.com
To: Joshua Garnham joshua.garn...@yahoo.co.uk
Cc: cocoa-dev@lists.apple.com cocoa-dev@lists.apple.com
Sent: Monday, 7 September, 2009 17:52:26
Subject: Re: Making an NSAlert be displayed when the User attempts to delete a
row from
Hi,
NSArray *selectedRow = [treeController selectedObjects];
you get an NSArray - so you should enumerate through the objects of
the array
NSInteger childrenCount = [selectedRow.children count];
Does not get the children count of anything but the NSArray, which it
doesn't have.
On Sep 7, 2009, at 10:20 AM, Joshua Garnham
joshua.garn...@yahoo.co.uk wrote:
This.
Excellent response. In the future, it is always better if you include
code or a description of your attempts (even if it's just looking at
the documentation).
- (IBAction)remove:(id)sender {
On Thu, May 14, 2009 at 12:27 AM, Sean McBride cwat...@cam.org wrote:
Michael Ash (michael@gmail.com) on 2009-05-13 11:07 PM said:
2) Display the second window as a modal panel instead of a sheet.
Apple does this with NSSavePanel if you try to save over an existing
file. It's easy and works
On May 13, 2009, at 9:07 PM, Michael Ash wrote:
3) Use performSelector:withObject:afterDelay: with a 0 delay to run
the code to show the new sheet after the old sheet has truly gone
away. This will result in one sheet being followed by another sheet as
you desire.
I have had success with
1 - 100 of 127 matches
Mail list logo