On Thu, Mar 3, 2011 at 12:43 PM,  <henrik.ha...@nokia.com> wrote:
> Question to the list; are there better techniques for exposing properties to 
> a common element from a specific implementation - and be able to use such 
> properties in the implementation effectively? Can attached properties be used 
> for this without breaking the ability to deploy the App to a different 
> platform that doesn't have this property?

AFAIK if somebody wants to use a specific component from one platform
it will do:

import Platform 1.0

and that is where the developer knows that he locked himself into that
component. If he wants to stay cross platform, it should use "import
native 1.0" and be careful to not use any elements that are platform
specific.

Now, regarding *properties*: I can't think of a nice way of allowing
the developer to use some properties that are present in an "extended"
form of a component. Example: let's say that the common api defines:

MyComponent {
   int myproperty;
}

and then on some platform they do:

MyComponent {
   int myproperty;
   int mysecondproperty;
}

If a developer use "mysecondproperty" it would invalidate the "cross
platform" characteristic of his application. Even if we do some
"ticks" to allow the developer to use that and just ignore if that is
not present it may lead to strange behaviors like: "why this property
doesn't work on this platform?".

I'm not sure if I understood the problem you're trying to solve, but I
would vote to be as more explicit as possible and doing any trick
"behind the scenes" to allow the developer to use a property that does
not exist seems too "magic" ;)

Cheers!

-- 
-------------------------------------------------------
Artur Duque de Souza
openBossa
INdT - Instituto Nokia de Tecnologia
-------------------------------------------------------
Blog: http://blog.morpheuz.cc
PGP: 0xDBEEAAC3 @ wwwkeys.pgp.net
-------------------------------------------------------
_______________________________________________
Qt-components mailing list
Qt-components@qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt-components

Reply via email to