With regards to the first problem, we have received another report of a similar problem on Gentoo. We tracked the problem down to the StsTextPrompter in VA Assist. The problem occurs because the attachments for the ComboBox and Settings label are overspecified. In most linux versions, the warnings appear but do not cause the IDE to crash.
Included below is a filein patch that may work. For linux, it refrains from specifying a top attachment for these two widgets. the warning messages should go away.
The BadMatch error will still occur. It comes from StsTextPrompter>>prompt ****and StsTextPromper>>preInitWindow*** when the comboBox widget (the text instance variable) is given focus. you can get rid of it by commenting out the line:
text setInputFocus.
The effect of the filein does not seem to have any bad effects on the size of the widgets except that the empty combo dropdown is tiny. When the dropdown has items, they show properly.
You can also disable using the enhanced prompters by executing StsPowerTools useEnhancedPrompters: false.
With regards to the second problem you report with the composition editor, I don't know offhand if the StsPrompters are involved, but they could be. Please let us know if this patch works for both problems. I don't know if NX client is the culprit; I would suspect it is the version of the Ubuntu kernel and X windows version being used.
Thanks!
- Code: Select all
!StsTextPrompter privateMethods !
createWorkRegion
"Private: WARNING!!!! This method was automatically generated by
WindowBuilder Pro. Code you add here which does not conform
to the WindowBuilder Pro API will probably be lost the next time
you save your layout definition."
| numAnswers okWidth cancelWidth offset isUnix |
okWidth := (self stringWidth: okLabel) + 16 max: 68.
cancelWidth := (self stringWidth: cancelLabel) + 16 max: 68.
isUnix := self stsIsUnix.
label := CwLabel
createManagedWidget: 'label'
parent: self workRegion
argBlock: [:w | w
x: 8;
y: 4;
width: 380;
height: 15;
labelString: 'label';
yourself].
text := CwComboBox
createManagedWidget: 'text'
parent: self workRegion
argBlock: [:w | w
x: 8;
y: 23;
width: 380;
height: 24;
editable: true;
items: #();
yourself.
self setFontListFor: w.
numAnswers := self class answersFor: self keyString.
isUnix
ifTrue: [w visibleItemCount: (numAnswers size min: 16)]
ifFalse: [numAnswers isEmpty ifTrue: [w comboBoxType: XmSIMPLE]]].
settings := CwLabel
createManagedWidget: 'settings'
parent: self workRegion
argBlock: [:w | w
x: 4;
y: 55;
width: 68;
labelString: 'Settings...';
yourself].
okButton := CwPushButton
createManagedWidget: 'okButton'
parent: self workRegion
argBlock: [:w | w
width: okWidth;
height: 32;
labelString: okLabel;
mnemonic: okLabel first;
showAsDefault: 1;
recomputeSize: false;
yourself].
cancelButton := CwPushButton
createManagedWidget: 'cancelButton'
parent: self workRegion
argBlock: [:w | w
width: cancelWidth;
height: 32;
labelString: cancelLabel;
mnemonic: cancelLabel first;
recomputeSize: false;
yourself].
label
leftOffset: 8; leftAttachment: XmATTACHFORM;
rightOffset: 8; rightAttachment: XmATTACHFORM;
topOffset: 4; topAttachment: XmATTACHFORM;
bottomOffset: 72; bottomAttachment: XmATTACHFORM.
offset := self stsIsUnix
ifTrue: [40]
ifFalse: [68 - text osWidget textHeight].
text
leftOffset: 8; leftAttachment: XmATTACHFORM;
rightOffset: 8; rightAttachment: XmATTACHFORM;
" topOffset: -68; topAttachment: XmATTACHOPPOSITEFORM;"
bottomOffset: offset; bottomAttachment: XmATTACHFORM;
addCallback: XmNactivateCallback
receiver: self
selector: #ok:clientData:callData:
clientData: nil.
self stsIsUnix
ifFalse: [text topOffset: -68; topAttachment: XmATTACHOPPOSITEFORM].
self canAutoFill
ifTrue: [
text
addCallback: XmNmodifyVerifyCallback
receiver: self
selector: #modifyVerify:clientData:callData:
clientData: nil;
addCallback: XmNvalueChangedCallback
receiver: self
selector: #valueChanged:clientData:callData:
clientData: nil;
addCallback: XmNsingleSelectionCallback
receiver: self
selector: #singleSelection:clientData:callData:
clientData: nil].
settings
leftOffset: 4; leftAttachment: XmATTACHFORM;
" topOffset: -24; topAttachment: XmATTACHOPPOSITEFORM;"
bottomOffset: 4; bottomAttachment: XmATTACHFORM.
self stsIsUnix
ifFalse: [settings topOffset: -24; topAttachment: XmATTACHOPPOSITEFORM].
offset := EsSystemInfo osType = 'AIX'
ifTrue: [35]
ifFalse: [EsSystemInfo osType = 'SunOS'
ifTrue: [90]
ifFalse: [0]].
okButton
leftOffset: ((isUnix ifTrue: [24] ifFalse: [16]) + okWidth + cancelWidth) negated; leftAttachment: XmATTACHOPPOSITEFORM;
bottomOffset: 4; bottomAttachment: XmATTACHFORM;
topOffset: (isUnix ifTrue: [32 + offset] ifFalse: [-36]);
topAttachment: (isUnix ifTrue: [XmATTACHSELF] ifFalse: [XmATTACHOPPOSITEFORM]);
addCallback: XmNactivateCallback
receiver: self
selector: #ok:clientData:callData:
clientData: nil.
cancelButton
leftOffset: (8 + cancelWidth) negated; leftAttachment: XmATTACHOPPOSITEFORM;
bottomOffset: 4; bottomAttachment: XmATTACHFORM;
topOffset: (isUnix ifTrue: [32 + offset] ifFalse: [-36]);
topAttachment: (isUnix ifTrue: [XmATTACHSELF] ifFalse: [XmATTACHOPPOSITEFORM]);
addCallback: XmNactivateCallback
receiver: self
selector: #cancel:clientData:callData:
clientData: nil.! !