發表文章

目前顯示的是 11月 16, 2018的文章

AWS | Using DynamoDB results in “ERROR TypeError: Cannot convert undefined or null to object”

圖片
up vote 0 down vote favorite Im trying to utilize AWS JS SDK in my Angular application. Consider the following code: import * as AWS from 'aws-sdk'; import Component, OnInit from '@angular/core'; declare let AWSCognito: any; @Component( selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] ) export class AppComponent implements OnInit private _dynamodb; constructor() AWS.config.region = 'eu-west-2'; // Region AWS.config.credentials = new AWS.CognitoIdentityCredentials( IdentityPoolId: 'eu-west-2:xxyyzz' ); this._dynamodb = new AWS.DynamoDB.DocumentClient(); ngOnInit() this._dynamodb.get(TableName: 'somename', Key: projectId: 123321, (err, data) => ) When the above code is executed the following error appears: ERROR TypeError: Cannot convert undefined or null to object I can see that it's this._dynamodb.get that makes the system crash. Any idea what

How do I read values from the formAttachment in java?

圖片
up vote 1 down vote favorite 1 How do I read values ​​from the formAttachment in Java? here is my code: Text one = new Text(composite, SWT.BORDER); data = new FormData(); data.top = new FormAttachment(0, 0); data.bottom = new FormAttachment(100, 0); data.left = new FormAttachment(0, 0); data.right = new FormAttachment(sash, 0); one.setLayoutData(data); result: java swt share | improve this question edited Nov 10 at 15:03 Cœur 16.9k 9 102 139 asked Aug 5 '12 at 14:48 Yrais 25 2 BTW: which values do you want to read? The numerator and offset values of FormAttachment or the text contained in the Text ? – Baz Aug 5 '12 at 15:11 The numerator and offset – Yrais Aug 5 '12 at 16:54 add a comment  |  up vote 1 down vote favorite 1 How do I read values ​​from the formAttachment in Java? here is my code: Text one = new Text(composite, SWT.BORDER); data = new FormData(); data.top