|Re: private attributes in Build.platformTable [message #1140 is a reply to message #1114]
||Wed, 11 February 2009 19:32
| Dave Russo
Registered: July 2009
Ramsey Harris wrote:|
>> Not really. You can add anything you want to the platformTable but
>> the only instance fields that you can access after the platform
>> instance is created are those instance fields defined by the
>> ti.platforms.evmDM6446.Platform module.
>> However, this module _could_ provide the arguments passed in the
>> platformTable as an instance parameter. But this would be
> All right, I understand that the platform instance will only see the
> properties defined by the platform module. What I would like to do is
> add private properties in the platformTable which a package build script
> would use at build time. I just want to confirm that doing this would
> not cause a problem when creating the platform instance. I don't need
> access to the private properties in the platform instance, just in the
> package build script. Is this allowed?
The current implementation explicitly removes properties not declared by
the Platform module _before_ creating the Platform instance. So .. it
However, others might argue that we should be generating an error for
these properties rather than silently "fixing" the object. Suppose, for
example, that you simply misspell a platform's instance creation
parameter. Without an error message, you will be pulling your hair out
trying to understand why the platform is not doing what you want.
If it weren't for backward compatibility, I'd fix the current
implementation to generate an error. In a future release when we have
some flexibility w.r.t. compatibility, we might implement this fix.
Powered by FUDForum
. Page generated in 0.02054 seconds