mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-17 04:00:42 +00:00
Tests/Manual: Record more AppKit gaps in the TextEditor work list
Add the AppKit gaps found since the work list was created, and describe the visible effect of the window resize defect. * WORKLIST.md: Add entries for CPBundleDisplayName, which AppKit ignores, and for the Show Toolbar menu item, which never reflects the toolbar state; state that a window shrunk to its minimum size can no longer be moved or resized, because hit testing uses the unclamped frame.
This commit is contained in:
1 parent
98c3611ade
commit
41a7004a53
1 file changed
+3
-1
@@ -7,7 +7,9 @@ TextEditor is a document-based test application and a tutorial. When the app use
|
||||
### Windows and documents
|
||||
|
||||
- **The Window menu does not list document windows.** It has no items to show or change the active window. AppKit has no equivalent of the Cocoa windows menu support in `NSApplication`: `windowsMenu`, `addWindowsItem:title:filename:`, `changeWindowsItem:title:filename:`, `removeWindowsItem:` and `arrangeInFront:`. nib2cib marks the menu as `_CPWindowsMenu` (`Tools/nib2cib/NSMenu.j:31`), but nothing in AppKit reads that name.
|
||||
- **The window ignores the delegate's size for its own frame.** In `_setFrame:display:animate:constrainWidth:constrainHeight:`, `size` refers to `_frame.size`, which already holds the proposed size. The result of `windowWillResize:toSize:` replaces the local variable only, and goes to the window view (`CPWindow.j:799` to `811`). So when the delegate returns a different size, the window view takes that size, but `_frame` keeps the proposed size.
|
||||
- **AppKit ignores `CPBundleDisplayName`.** Cocoa uses `CFBundleDisplayName` for the name that the user sees, and `CFBundleName` as the short name. AppKit reads only `CPBundleName`: for the About panel title (`CPApplication.j:389`) and for the browser tab title (`_CPMenuBarWindow.j:106`). Both should use `CPBundleDisplayName`, with `CPBundleName` as the fallback.
|
||||
- **The Show Toolbar menu item does not show the toolbar state.** `-[CPWindow toggleToolbarShown:]` works (`CPWindow.j:2758`), but `CPWindow` has no `validateMenuItem:`. In Cocoa, `NSWindow` validates this item: it changes the title between "Show Toolbar" and "Hide Toolbar", and disables the item when the window has no toolbar. `CPMenu` already asks the target through `validateMenuItem:` (`CPMenu.j:699`), so the fix is a `validateMenuItem:` in `CPWindow` that handles `toggleToolbarShown:` and returns `YES` for every other action.
|
||||
- **The window ignores the delegate's size for its own frame.** In `_setFrame:display:animate:constrainWidth:constrainHeight:`, `size` refers to `_frame.size`, which already holds the proposed size. The result of `windowWillResize:toSize:` replaces the local variable only, and goes to the window view (`CPWindow.j:799` to `811`). So when the delegate returns a different size, the window view takes that size, but `_frame` keeps the proposed size. The platform window chooses the window for a mouse event by testing `_frame` (`containsPoint:` and `_isValidMousePoint:`, `CPWindow.j:3832` to `3845`). So after the user shrinks a document window to its minimum, clicks on most of the visible window miss it, and the window can no longer be moved or resized. Resizing the browser window does not repair the frame. The fix: the size returned by the delegate must become `_frame.size`.
|
||||
- **The "save changes" alert is modal for the whole app.** `CPDocument` shows it with `runModal` (`CPDocument.j:903`). Cocoa attaches it as a sheet to the document window, so that only that document is blocked.
|
||||
- **Save cannot work without a server.** With no file URL, Save uses `CPSavePanel`, which falls back to `window.prompt` (`CPSavePanel.j:79`). `CPDocument` then sends an HTTP POST. A storage facade is needed, with local (IndexedDB) and remote (HTTP) implementations.
|
||||
|
||||
|
||||
Reference in new issue
Block a user