[OGo-Discuss] Bug 1852: support creation of xmpp: field types in OGo
Helge Hess
discuss@opengroupware.org
Sun, 25 Mar 2007 18:43:34 +0200
On Mar 25, 2007, at 18:18, Adam Williams wrote:
>> Now the questions was on "new types". Adding new types of course
>> doesn't hurt, only people using more of them does ;-)
>> What I always wondered is whether we are going to drop the
>> 'company_value' and use 'obj_property' like other objects. But I
>> suppose thats not going to happen in the OGo 5.x line given thats it
>> is a larger change.
> It would be nice to have just one mechanism for storing custom
> data. :)
Actually the best way to store custom attributes would be to extend
the company table dynamically (ADD COLUMN). Dynamic schema changes
works very well with modern databases, especially with PostgreSQL.
>> Of course the component/element which shows the value must parse this
>> for display. And the editor might need to support the user.
> Something like: <select box:IM service>[entry: screenname] ? Put
> together and subsequently crack the value at the ":".
Some component, don't know how it would look like exactly. But
propbably a textfield plus a popup which selects the service, yes.
>> Its a bit more difficult to implement, but sounds like the better
>> option to me.
> Right, only the IM URLs can be a bit more complicated. For
> instance, as
> mentioned earlier, the URL for sending to an AIM account is: <a
> href="aim:goim?screenname=notarealuser">...</a>
Well, in theory NSURL should be able to parse this. Possibly it has
bugs though.
Something like
@implementation NSString(URLAddOns)
- (NSURL *)asNSURL {
return [NSURL URLWithString:self];
}
@end
and then:
<var:string value="textfield.asNSURL.scheme"/>
<var:string value="textfield.asNSURL.path"/>
etc.
We might need to extend NSURL a bit to parse the query parameters
string.
Greets,
Helge
--
Helge Hess
http://www.helgehess.eu/