blackberry-webworks / BB10-Webworks-API

An api repository for webworks
6 stars 1 forks source link

All APIs need to be revisited to make sure constants and read-only fields are implemented correctly #13

Closed rwmtse closed 12 years ago

rwmtse commented 12 years ago

Fields defined using defineGetter are not read-only under the BB10 WebWorks architecture.

Read-only field must be defined using the following way:

Object.defineProperty(obj, "prop", {
    value: webworks.execSync(feature, "prop", args),
    writable: false
});  

Refer to blackberry.app API.

rwmtse commented 12 years ago

The define read-only property code should be refactored into a common util method so that all API uses the same way to define read-only properties.

nukulb commented 12 years ago

@kwallis - this does not feel like a high priority bug, am I missing anything? properties still seem available, if someone changes it well too bad, I think this can be downgraded.

kwallis commented 12 years ago

I'll admit I was unsure of the full scope of this, though the description indicated that we weren't sure everything was working "correctly".

I do worry about the potential, accidental or intentional by the dev, to screw up the behaviour of their app because they modified a read-only field. It could be a P2 though for post Beta 1

Ken Wallis

Product Manager – BlackBerry WebWorks

Research In Motion

(905) 629-4746 x14369


From: Nukul Bhasin [reply@reply.github.com] Sent: Monday, April 16, 2012 1:53 PM To: Ken Wallis Subject: Re: [BB10-Webworks-API] All APIs need to be revisited to make sure constants and read-only fields are implemented correctly (#13)

@kwallis - this does not feel like a high priority bug, am I missing anything? properties still seem available, if someone changes it well too bad, I think this can be downgraded.


Reply to this email directly or view it on GitHub: https://github.com/blackberry-webworks/BB10-Webworks-API/issues/13#issuecomment-5158239


This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.

erhorim commented 12 years ago

Defect fixed by blackberry-webworks/BB10-WebWorks-Framework#12