bugGNUstep - Bugs: bug #13582, NSRunAlertPanel() should wrap the...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #13582: NSRunAlertPanel() should wrap the message string where possible

Submitted by:  Peter Cooper <comrade>
Submitted on:  Thu 30 Jun 2005 01:37:07 PM UTC  
 
Category: Gui/AppKitSeverity: 3 - Normal
Item Group: BugStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Tue 21 Apr 2009 05:30:16 PM UTC, comment #3:

here is a tiny patch to have the dialog not any larger than half the screen (would look more decent i guess), if text is larger than that scrollbars will still be used (same as the old behavior). I think wrapping will need a rewrite of sizePanelToFit. Or maybe \n could be inserted into the user text where appropriate to fake the wrapping?

(file #17986)

Fred Morcos <fredmorcos>
Sun 13 Nov 2005 03:05:27 PM UTC, comment #2:

I've recently found that this problem also makes it difficult to use the same strings on GNUstep and OSX.

I have some longish strings in some alert panels, which I've inserted \n's into to get reasonably wide alert panels. On OSX, these strings are wrapped automatically, so the hard returns look a little odd.

Rob Burns <rburns>
Thu 30 Jun 2005 02:50:10 PM UTC, comment #1:

I wanted to add that I agree, it should be wrapped when possible. And also, that in cases where the string is very long the margins around the text shrink to some value very small. In the following screenshots, you can see gradually longer strings and their effects on the margin.

http://www.eskimo.com/~pburns/misc/panel1.jpg
http://www.eskimo.com/~pburns/misc/panel2.jpg
http://www.eskimo.com/~pburns/misc/panel3.jpg

Thanks
Rob

Rob Burns <rburns>
Thu 30 Jun 2005 01:37:07 PM UTC, original submission:

When NSRunAlertPanel() is called, the dialog box that appears is the full width of the message string, or if the message string is too wide for the screen, then a full-width window is created with a horizontal scrollbar.

Not only does this look unappealing, but makes the message harder to understand for an end-user (we're not so good at reading long horizontal runs of text). I do not believe that the application designer should have to manually line-break the message to the user unless strictly necessary for comprehension.

When I look at the source of NSAlert.m, I see that the current behaviour is what the coder intended. I believe that this is a usability problem.

The panel should contain the wrapped text of the message and adjust its height, not width. The code that looks like it does the work is the sizePanelToFit method.

If this bug report is rejected, then I'd suggest we strongly encourage developers to use a short message and add an "explain" button to their Alert panels which displays the more complete text (a la the OpenStep UI Guidelines).

Peter Cooper <comrade>

 

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by fredmorcos (Updated the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 21 Apr 2009 05:30:16 PM UTCfredmorcosAttached File-=>Added gnustep-gui-gsalertpanel-size-fix.patch, #17986

    Back to the top


    Powered by Savane 3.1-cleanup1