[Adium-devl] adiumPurpleRequestFields
Andreas Monitzer
soc at monitzer.com
Thu Jun 7 12:29:15 UTC 2007
On Jun 07, 2007, at 08:55, Colin Barrett wrote:
>> I'm not so sure—an NSForm, with some subclasses of NSFormCell, could
>> certainly do the job with not much pain.
>
> That might be way better. Getting HTML to 90% of the way to looking
> like a native app is pretty easy. Getting it that last 10% is tough.
> If we can do it with Cocoa, that would be way better. I actually
> didn't know about NSForm.
Well, since WebKit uses native controls, all that's left to be Mac-
like is the placing, which shouldn't be impossible to get right using
a table and some css.
I considered writing it in Cocoa last year, but then I looked at all
the controls that are necessary:
boolean The field enables an entity to gather or provide an either-
or choice between two options. The default value is "false". [10]
fixed The field is intended for data description (e.g., human-
readable text such as "section" headers) rather than data gathering
or provision.
hidden The field is not shown to the form-submitting entity, but
instead is returned with the form.
jid-multi The field enables an entity to gather or provide
multiple Jabber IDs.
jid-single The field enables an entity to gather or provide a
single Jabber ID.
list-multi The field enables an entity to gather or provide one or
more options from among many.
list-single The field enables an entity to gather or provide one
option from among many.
text-multi The field enables an entity to gather or provide
multiple lines of text.
text-private The field enables an entity to gather or provide a
single line or word of text, which shall be obscured in an interface
(e.g., *****).
text-single The field enables an entity to gather or provide a
single line or word of text, which may be shown in an interface. This
field type is the default and MUST be assumed if a form-submitting
entity receives a field type it does not understand.
boolean would be an NSButton-based check box, fixed would be a non-
editable NSTextField, jid-multi would be an NSTableView combined with
an NSComboBox, jid-single would be an NSComboBox, text-multi would be
an NSTextView, text-single would be an NSTextField, list-single would
be an NSPopupButton, list-multi would be an NSTableView, text-private
would be an NSSecureTextField.
That covers *all* basic AppKit controls, and would be an enormous
effort, esp. the table view.
Plus, in the end, it'd look exactly like the webview. Automatically
generated forms aren't pretty, no matter the API.
andy
More information about the devel
mailing list