Re: [Xswt-developer] ID as tag
Brought to you by:
dvorme
|
From: David O. <dj...@co...> - 2006-06-26 17:04:13
|
> I think I've suggested this before, but I don't think we made a decisio= n: I think I must have missed it; sorry! > How about supporting IDs as tags, to make an existing object the "curre= nt > object". This will make it possible to set/change properties and add > children to objects, without modifying the "original" element. I've oft= en > had to copy and comment out an element, to make a slight change without > losing the original. Instead I could've added the "change" by using the= ID > as the tag and adding whatever change I wanted there. Hmmmm.... This is an interesting idea. In the abstract it sounds like it could be a good idea. I'm interested in adding the feature but I don't have a clear sense yet for the tradeoff between advantages and disadvantages with having the feature. Here are my thoughts: the syntax we have right now forces you to put everything related to a particular object in one place. Most of the time= , this is a feature because the resulting code is generally much easier to follow. I think you're suggesting that some of the time this isn't a feature, however. So let's talk about the tradeoffs and see what consensus we get= . Can you provide a sample of the kind of code you want to write that this would enable to put in concrete terms the benefit that this would provide= ? Best Regards, Dave Orme |