Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Hi,
I using an AbtTextView with an AbtMonetaryAmountConverter to enter money data. I would like the contents of the field auto selected when the field gets the focus. I set the option but I think there is something about the monetary converter that undoes the selection when it paints its value with the $. Connecting #gettingFocus to #selectAll doesn't circumvent the problem. I have circumvented the problem by connecting #gettingFocus to this code: selectAll: field "Select all of the field." [ (Delay forMilliseconds: 50) wait. field selectAll. ] forkReadyAt: Processor userBackgroundPriority. I also connect the #self attribute of the field to the parameter of the #gettingFocus connection. Note: the #forkReadyAt: method. It creates the fork but doesn't doesn't let it execute immediately. That lets the monetary converter do its think (which I think results in un-selection) and then after the slight delay does the #selectAll. This works but it is an obvious hack. Clearly, this shouldn't be on the top of anybody's list of things to fix but maybe some day. I don't think it will be too hard to get AbtMonetaryAmountConverter to pay attention to the #autoSelect flag. Lou
-- You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/092bd7c3-ce3b-4051-ae6c-ea0fe16bb938n%40googlegroups.com. |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
After making this post I realized a regular #fork would do and it does.
Lou On Thursday, January 14, 2021 at 10:12:20 AM UTC-5 Louis LaBrunda wrote: Hi, ... [show rest of quote] You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/c722b8f5-23fa-4134-a5db-3bec91aebcedn%40googlegroups.com. |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
In reply to this post by Louis LaBrunda
Hi Lou, i cannot reproduce this. I set my local to US (to get the monetary sign $ and monetary symbols .) and created a visual part containing AbtTextView with AbtMonetaryAmountConverter and a connection gettingFocus to selectAll. That works as expected. The symptoms and your by-pass indicate a potential event ordering problem - not a problem in the converter. Are there any other connections hooked on that AbtTextView? If there are such, may be that the ordering of these connections contributes to the problem. Your by-pass to cause a select with a delayed execution in another process is somehow heavy for that purpose. Did you consider the built in protocol CwAppContext default asyncExecInUI:
[field selectAll] ? It will run code in the block decoupled and subsequent without a delay. And theoretically, the
field selectAll after the delay may fail, the widget can be destroyed after the wait. Consider to add a guard here (isDestroyed not ifTrue: [...]) if you have to stick to this by-pass, even with such a short delay of 50ms. This may occur particular in messy situations, under heavy load, unresponsive GUIs and then causing a walkback on top in your app is problematic. Marcus [hidden email] schrieb am Donnerstag, 14. Januar 2021 um 16:12:20 UTC+1: Hi, ... [show rest of quote] You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/9738f870-79e6-44c3-9202-58e5853c1228n%40googlegroups.com. |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Hi
Marcus,
Thanks for looking at this. If one tabs into the field the #selectAll works but if you click on the field with the mouse #selectAll fails. I like your suggestion and modified it slightly: CwAppContext default asyncExecInUI: [field abtIsDestroyed ifFalse: [field selectAll]]. Much better than the delay. Lou On Sunday, February 14, 2021 at 8:33:09 AM UTC-5 [hidden email] wrote:
... [show rest of quote] You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/238e79ac-0c4e-4d8e-bab8-60ae9e1d2adbn%40googlegroups.com. |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Hi Lou, I double checked, I placed another widget before and after the AbtTextView widget and no matter which navigation I use, tab or mouse, it selects as expected without any side effect. I cannot reproduce your symptom. I fear again that there must be something special causing that to fail in your code. Besides. the (ancient) asyncExecInUi protocol and newer variant asyncExecFirstInUI: was very helpful to keep a dialog responsive, in particular when running some code calling APIs of the system. Fine that it helps you, too. Marcus [hidden email] schrieb am Sonntag, 14. Februar 2021 um 21:04:50 UTC+1: Hi Marcus, ... [show rest of quote] You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/6748ef21-4307-43e9-89cb-ebcc0c03bc41n%40googlegroups.com. |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Hi Marcus,
Have you selected the monetary converter? Also, I posted too soon, #asyncExecInUI: was inconsistent. I'm still experimenting, I will post more later. Lou On Monday, February 15, 2021 at 9:23:15 AM UTC-5 [hidden email] wrote:
... [show rest of quote] You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/832e7059-d44f-4686-9a43-8d06e1354043n%40googlegroups.com. |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Hi Marcus, Everybody,
I am back to this: selectAll: field "Select all of the field." [ (Delay forMilliseconds: 50) wait. field abtIsDestroyed ifFalse: [field selectAll]. ] fork. I think it is a timing bug. When the focus changes, the displayed string is changed. I think somewhere along the line it gets selected and then somehow unselected and sometimes part of it gets selected. My hack, tries to wait until all of that finishes and then selects everything. I don't like it but it is the only thing that seems to work consistently. Lou On Monday, February 15, 2021 at 1:22:36 PM UTC-5 Louis LaBrunda wrote: Hi Marcus, ... [show rest of quote] You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/8f5e0b3b-527f-4af6-8b62-eda989c03e17n%40googlegroups.com. |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Hi Lou, t
my example uses AbtMonetaryAmountConverter and EwMonetaryFormat,
before the widget, and a simple bitton after the widget in tab order, without success yet. However, I you mentioned the AbtTextConvertedManager... so it does not reflect your situation. Please let me know type and converter of the widget before and after the widget (in tab order) with the problem
AbtTextView and
AbtMonetaryAmountConverter. It seems to be important to reconstruct the same constellation... Marcus [hidden email] schrieb am Montag, 15. Februar 2021 um 19:45:49 UTC+1: Hi Marcus, Everybody, ... [show rest of quote] You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/94294af0-134d-4354-adab-3cf12d26cca0n%40googlegroups.com. |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Hi Marcus,
I tried including a file out of the main window with a bunch of the fields but that failed to post. Not all are in the tabs list but the problem is mainly with mouse clicking in the field not tabbing, so what is around the field probably doesn't matter. Some are connected to an object. That may have something to do with it. Lou !KscCheckBookWindow privateMethods ! abtBuildInternals "** Do not modify or delete ** See: AbtAppBldrPart class>>#about_abtBuildInternals" | gui window_1 aBANumberLabel createANewEntryPushButton aBANumberText accountNumberLabel accountNumberText accountNameLabel accountNameText bankBalanceLabel bankBalanceText abtMonetaryAmountConverter clearedBalanceLabel clearedBalanceText abtMonetaryAmountConverter_1 kscCheckBookContainerDetails dateContainerDetailsColumn abtDateConverter entryCodeContainerDetailsColumn amountContainerDetailsColumn abtMonetaryAmountConverter_2 descriptionContainerDetailsColumn typeContainerDetailsColumn abtStringConverter clearedContainerDetailsColumn abtBooleanConverter unclearedBalanceLabel unclearedBalanceText abtMonetaryAmountConverter_3 deleteEntryPushButton bankBalanceHelpLabel toSelectionLabel1 clearedBalanceToSelectedEntryText abtMonetaryAmountConverter_4 toSelectionLabel2 unclearedBalanceToSelectedEntryText abtMonetaryAmountConverter_5 abtCwMenuView menuBarItem1 menuBarItem2 menuBarItem3 helpMenuChoice popupMenu1 newMenuChoice openMenuChoice separator1 saveMenuChoice saveAsMenuChoice separator4 createReportMenuChoice separator2 createShortcutToCheckbookFileMenuChoice separator3 exitMenuChoice kscCheckBookDataObject popupMenu2 editBankInfoMenuChoice separator5 findDateMenuChoice findEntryCodeMenuChoice findAmountMenuChoice findDescriptionMenuChoice findUnclearedMenuChoice findNextMenuChoice popupMenu3 aboutMenuChoice checkForUpdateMenuChoice downloadAndInstallCurrentVersionMenuChoice autoCheckForUpdateMenuToggle conn1 conn2 conn3 conn5 conn6 conn7 conn8 conn18 conn9 conn10 conn11 conn12 conn13 conn14 conn15 conn16 conn17 conn19 conn20 conn21 conn23 conn24 conn34 conn25 conn26 conn27 conn38 conn29 conn30 conn31 conn32 conn51 conn52 conn43 conn54 conn45 conn46 | gui := self class abtSeparatedConstants. window_1 := AbtShellView abtCreatePart: 'Window' parent: nil owner: self . aBANumberLabel := AbtLabelView abtCreatePart: 'ABA Number Label' parent: window_1. createANewEntryPushButton := AbtPushButtonView abtCreatePart: 'Create a New Entry Push Button' parent: window_1. aBANumberText := AbtTextView abtCreatePart: 'ABA Number Text' parent: window_1. accountNumberLabel := AbtLabelView abtCreatePart: 'Account Number Label' parent: window_1. accountNumberText := AbtTextView abtCreatePart: 'Account Number Text' parent: window_1. accountNameLabel := AbtLabelView abtCreatePart: 'Account Name Label' parent: window_1. accountNameText := AbtTextView abtCreatePart: 'Account Name Text' parent: window_1. bankBalanceLabel := AbtLabelView abtCreatePart: 'Bank Balance Label' parent: window_1. bankBalanceText := AbtTextView abtCreatePart: 'Bank Balance Text' parent: window_1. clearedBalanceLabel := AbtLabelView abtCreatePart: 'Cleared Balance Label' parent: window_1. clearedBalanceText := AbtTextView abtCreatePart: 'Cleared Balance Text' parent: window_1. kscCheckBookContainerDetails := AbtContainerDetailsView abtCreatePart: 'KscCheckBook Container Details' parent: window_1. dateContainerDetailsColumn := AbtContainerDetailsColumn abtCreatePart: 'Date Container Details Column' parent: kscCheckBookContainerDetails. entryCodeContainerDetailsColumn := AbtContainerDetailsColumn abtCreatePart: 'EntryCode Container Details Column' parent: kscCheckBookContainerDetails. amountContainerDetailsColumn := AbtContainerDetailsColumn abtCreatePart: 'Amount Container Details Column' parent: kscCheckBookContainerDetails. descriptionContainerDetailsColumn := AbtContainerDetailsColumn abtCreatePart: 'Description Container Details Column' parent: kscCheckBookContainerDetails. typeContainerDetailsColumn := AbtContainerDetailsColumn abtCreatePart: 'Type Container Details Column' parent: kscCheckBookContainerDetails. clearedContainerDetailsColumn := AbtContainerDetailsColumn abtCreatePart: 'Cleared Container Details Column' parent: kscCheckBookContainerDetails. unclearedBalanceLabel := AbtLabelView abtCreatePart: 'Uncleared Balance Label' parent: window_1. unclearedBalanceText := AbtTextView abtCreatePart: 'Uncleared Balance Text' parent: window_1. deleteEntryPushButton := AbtPushButtonView abtCreatePart: 'Delete Entry Push Button' parent: window_1. bankBalanceHelpLabel := AbtLabelView abtCreatePart: 'Bank Balance Help Label' parent: window_1. toSelectionLabel1 := AbtLabelView abtCreatePart: 'To Selection Label 1' parent: window_1. clearedBalanceToSelectedEntryText := AbtTextView abtCreatePart: 'Cleared Balance To Selected Entry Text' parent: window_1. toSelectionLabel2 := AbtLabelView abtCreatePart: 'To Selection Label 2' parent: window_1. unclearedBalanceToSelectedEntryText := AbtTextView abtCreatePart: 'Uncleared Balance To Selected Entry Text' parent: window_1. popupMenu1 := AbtCwMenuView abtCreatePart: 'Popup Menu1' parent: self parentVisual owner: self . newMenuChoice := AbtPushButtonView abtCreatePart: 'New Menu Choice' parent: popupMenu1. openMenuChoice := AbtPushButtonView abtCreatePart: 'Open Menu Choice' parent: popupMenu1. separator1 := AbtSeparatorView abtCreatePart: 'Separator1' parent: popupMenu1. saveMenuChoice := AbtPushButtonView abtCreatePart: 'Save Menu Choice' parent: popupMenu1. saveAsMenuChoice := AbtPushButtonView abtCreatePart: 'Save as Menu Choice' parent: popupMenu1. separator4 := AbtSeparatorView abtCreatePart: 'Separator4' parent: popupMenu1. createReportMenuChoice := AbtPushButtonView abtCreatePart: 'Create Report Menu Choice' parent: popupMenu1. separator2 := AbtSeparatorView abtCreatePart: 'Separator2' parent: popupMenu1. createShortcutToCheckbookFileMenuChoice := AbtPushButtonView abtCreatePart: 'Create Shortcut to Checkbook File Menu Choice' parent: popupMenu1. separator3 := AbtSeparatorView abtCreatePart: 'Separator3' parent: popupMenu1. exitMenuChoice := AbtPushButtonView abtCreatePart: 'Exit Menu Choice' parent: popupMenu1. (kscCheckBookDataObject := AbtVariable abtCreatePart: 'KscCheckBookData Object' parent: self parentVisual owner: self ) partClass: KscCheckBookData. popupMenu2 := AbtCwMenuView abtCreatePart: 'Popup Menu2' parent: self parentVisual owner: self . editBankInfoMenuChoice := AbtPushButtonView abtCreatePart: 'Edit Bank Info Menu Choice' parent: popupMenu2. separator5 := AbtSeparatorView abtCreatePart: 'Separator5' parent: popupMenu2. findDateMenuChoice := AbtPushButtonView abtCreatePart: 'Find Date Menu Choice' parent: popupMenu2. findEntryCodeMenuChoice := AbtPushButtonView abtCreatePart: 'Find Entry Code Menu Choice' parent: popupMenu2. findAmountMenuChoice := AbtPushButtonView abtCreatePart: 'Find Amount Menu Choice' parent: popupMenu2. findDescriptionMenuChoice := AbtPushButtonView abtCreatePart: 'Find Description Menu Choice' parent: popupMenu2. findUnclearedMenuChoice := AbtPushButtonView abtCreatePart: 'Find Uncleared Menu Choice' parent: popupMenu2. findNextMenuChoice := AbtPushButtonView abtCreatePart: 'Find Next Menu Choice' parent: popupMenu2. popupMenu3 := AbtCwMenuView abtCreatePart: 'Popup Menu3' parent: self parentVisual owner: self . aboutMenuChoice := AbtPushButtonView abtCreatePart: 'About Menu Choice' parent: popupMenu3. checkForUpdateMenuChoice := AbtPushButtonView abtCreatePart: 'Check For Update Menu Choice' parent: popupMenu3. downloadAndInstallCurrentVersionMenuChoice := AbtPushButtonView abtCreatePart: 'Download And Install Current Version Menu Choice' parent: popupMenu3. autoCheckForUpdateMenuToggle := AbtToggleButtonView abtCreatePart: 'Auto Check For Update Menu Toggle' parent: popupMenu3. self primaryPart: window_1. window_1 menu: ((abtCwMenuView := AbtCwMenuView abtCreatePart: #AbtCwMenuView parent: nil ) abtReturnReceiver: (menuBarItem1 := AbtCascadeButtonView abtCreatePart: 'MenuBar Item1' parent: abtCwMenuView); abtReturnReceiver: (menuBarItem2 := AbtCascadeButtonView abtCreatePart: 'MenuBar Item2' parent: abtCwMenuView); abtReturnReceiver: (menuBarItem3 := AbtCascadeButtonView abtCreatePart: 'MenuBar Item3' parent: abtCwMenuView); abtReturnReceiver: (helpMenuChoice := AbtPushButtonView abtCreatePart: 'Help Menu Choice' parent: abtCwMenuView); rowColumnType: 1); graphicsDescriptor: nil; framingSpec: (AbtViewAttachmentConstraint new leftEdge: (AbtEdgeConstant new offset: 150); rightEdge: (AbtEdgeConstant new offset: 850); topEdge: (AbtEdgeConstant new offset: 75); bottomEdge: (AbtEdgeConstant new offset: 500)); title: (gui at: 1) " 'KscCheckBook' " . aBANumberLabel object: (gui at: 2) " 'ABA Number' " ; framingSpec: (AbtViewAttachmentConstraint new leftEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHFORM; offset: 10); rightEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHNONE); topEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHFORM; offset: 15); bottomEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHNONE)). createANewEntryPushButton object: (gui at: 3) " 'Create a New Entry' " ; tabGroup: true; framingSpec: (AbtViewAttachmentConstraint new leftEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHWIDGET; offset: 20; attachedTargetView: unclearedBalanceText); rightEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHNONE); topEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHOPPOSITEWIDGET; offset: -2; attachedTargetView: bankBalanceLabel); bottomEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHNONE)); enabled: false. aBANumberText tabGroup: false; traversalOn: false; columns: 12; alignment: 1; autoSelect: true; framingSpec: (AbtViewAttachmentConstraint new leftEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHWIDGET; offset: 3; attachedTargetView: aBANumberLabel); rightEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHNONE); topEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHOPPOSITEWIDGET; offset: 0; attachedTargetView: aBANumberLabel); bottomEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHNONE)); editable: false; enabled: true. accountNumberLabel object: (gui at: 4) " 'Account Number' " ; framingSpec: (AbtViewAttachmentConstraint new leftEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHWIDGET; offset: 10; attachedTargetView: aBANumberText); rightEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHNONE); topEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHOPPOSITEWIDGET; offset: 0; attachedTargetView: aBANumberLabel); bottomEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHNONE)). accountNumberText tabGroup: false; traversalOn: false; columns: 17; alignment: 1; autoSelect: true; framingSpec: (AbtViewAttachmentConstraint new leftEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHWIDGET; offset: 3; attachedTargetView: accountNumberLabel); rightEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHNONE); topEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHOPPOSITEWIDGET; offset: 0; attachedTargetView: accountNumberLabel); bottomEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHNONE)); editable: false. accountNameLabel object: (gui at: 5) " 'Account Name' " ; framingSpec: (AbtViewAttachmentConstraint new leftEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHWIDGET; offset: 10; attachedTargetView: accountNumberText); rightEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHNONE); topEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHOPPOSITEWIDGET; offset: 0; attachedTargetView: aBANumberLabel); bottomEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHNONE)). accountNameText tabGroup: false; autoSelect: true; framingSpec: (AbtViewAttachmentConstraint new leftEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHWIDGET; offset: 3; attachedTargetView: accountNameLabel); rightEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHFORM; offset: 10); topEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHOPPOSITEWIDGET; offset: 0; attachedTargetView: accountNameLabel); bottomEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHNONE)); editable: false; traversalOn: false. bankBalanceLabel object: (gui at: 6) " 'Bank Balance' " ; framingSpec: (AbtViewAttachmentConstraint new leftEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHOPPOSITEWIDGET; offset: 0; attachedTargetView: aBANumberLabel); rightEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHNONE); topEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHWIDGET; offset: 10; attachedTargetView: aBANumberLabel); bottomEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHNONE)). bankBalanceText converter: ((abtMonetaryAmountConverter := AbtMonetaryAmountConverter abtCreatePart: #AbtMonetaryAmountConverter parent: nil )); tabGroup: false; traversalOn: false; columns: 10; alignment: 2; autoSelect: false; framingSpec: (AbtViewAttachmentConstraint new leftEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHWIDGET; offset: 3; attachedTargetView: bankBalanceLabel); rightEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHNONE); topEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHOPPOSITEWIDGET; offset: 0; attachedTargetView: bankBalanceLabel); bottomEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHNONE)); editable: false. clearedBalanceLabel object: (gui at: 7) " 'Cleared Balance' " ; framingSpec: (AbtViewAttachmentConstraint new leftEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHWIDGET; offset: 10; attachedTargetView: bankBalanceHelpLabel); rightEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHNONE); topEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHOPPOSITEWIDGET; offset: 0; attachedTargetView: bankBalanceLabel); bottomEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHNONE)). clearedBalanceText converter: ((abtMonetaryAmountConverter_1 := AbtMonetaryAmountConverter abtCreatePart: #AbtMonetaryAmountConverter parent: nil )); tabGroup: false; traversalOn: false; columns: 10; alignment: 2; framingSpec: (AbtViewAttachmentConstraint new leftEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHWIDGET; offset: 3; attachedTargetView: clearedBalanceLabel); rightEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHNONE); topEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHOPPOSITEWIDGET; offset: 0; attachedTargetView: clearedBalanceLabel); bottomEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHNONE)); editable: false. kscCheckBookContainerDetails framingSpec: (AbtViewAttachmentConstraint new leftEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHFORM; offset: 0); rightEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHFORM; offset: 0); topEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHWIDGET; offset: 10; attachedTargetView: toSelectionLabel1); bottomEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHFORM; offset: 0)); refreshEntireListOnChange: true; editable: false. dateContainerDetailsColumn converter: ((abtDateConverter := AbtDateConverter abtCreatePart: #AbtDateConverter parent: nil ) dateFormat: 1; showSeparator: true); attributeName: (gui at: 8) " 'date' " ; abtEditPolicyItems: (OrderedCollection new yourself); width: 75; heading: (gui at: 9) " 'Date' " ; horizontalAlignment: 1; horizontalHeadingAlignment: 1. entryCodeContainerDetailsColumn attributeName: (gui at: 10) " 'entryCode' " ; abtEditPolicyItems: (OrderedCollection new yourself); width: 80; heading: (gui at: 11) " 'Entry Code' " ; horizontalAlignment: 1; horizontalHeadingAlignment: 1. amountContainerDetailsColumn converter: ((abtMonetaryAmountConverter_2 := AbtMonetaryAmountConverter abtCreatePart: #AbtMonetaryAmountConverter parent: nil ) decimalPlace: 2; decimalSeparator: (gui at: 12) " '.' " ); attributeName: (gui at: 13) " 'amount' " ; abtEditPolicyItems: (OrderedCollection new yourself); width: 75; heading: (gui at: 14) " 'Amount' " ; horizontalAlignment: 2; horizontalHeadingAlignment: 1. descriptionContainerDetailsColumn width: 300; attributeName: (gui at: 15) " 'description' " ; heading: (gui at: 16) " 'Description' " ; abtEditPolicyItems: (OrderedCollection new yourself); horizontalHeadingAlignment: 1. typeContainerDetailsColumn converter: ((abtStringConverter := AbtStringConverter abtCreatePart: #AbtStringConverter parent: nil ) defaultObjectFromEmptyString: (gui at: 17) " 'Symbol' " ); attributeName: (gui at: 18) " 'typeAsString' " ; abtEditPolicyItems: (OrderedCollection new yourself); width: 100; heading: (gui at: 19) " 'Type' " ; horizontalAlignment: 1; horizontalHeadingAlignment: 1. clearedContainerDetailsColumn converter: ((abtBooleanConverter := AbtBooleanConverter abtCreatePart: #AbtBooleanConverter parent: nil ) yesStr: (gui at: 20) " 'Yes' " ; noStr: (gui at: 21) " 'No' " ); attributeName: (gui at: 22) " 'cleared' " ; abtEditPolicyItems: (OrderedCollection new yourself); width: 50; heading: (gui at: 23) " 'Cleared' " ; horizontalAlignment: 1; horizontalHeadingAlignment: 1. unclearedBalanceLabel object: (gui at: 24) " 'Uncleared Balance' " ; framingSpec: (AbtViewAttachmentConstraint new leftEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHWIDGET; offset: 10; attachedTargetView: clearedBalanceText); rightEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHNONE); topEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHOPPOSITEWIDGET; offset: 0; attachedTargetView: bankBalanceLabel); bottomEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHNONE)). unclearedBalanceText converter: ((abtMonetaryAmountConverter_3 := AbtMonetaryAmountConverter abtCreatePart: #AbtMonetaryAmountConverter parent: nil )); tabGroup: false; traversalOn: false; columns: 10; alignment: 2; framingSpec: (AbtViewAttachmentConstraint new leftEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHWIDGET; offset: 3; attachedTargetView: unclearedBalanceLabel); rightEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHNONE); topEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHOPPOSITEWIDGET; offset: 0; attachedTargetView: unclearedBalanceLabel); bottomEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHNONE)); editable: false. deleteEntryPushButton object: (gui at: 25) " 'Delete Entry' " ; tabGroup: true; framingSpec: (AbtViewAttachmentConstraint new leftEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHWIDGET; offset: 10; attachedTargetView: createANewEntryPushButton); rightEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHNONE); topEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHOPPOSITEWIDGET; offset: 0; attachedTargetView: createANewEntryPushButton); bottomEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHNONE)). bankBalanceHelpLabel object: (gui at: 26) " 'Help' " ; marginHeight: 0; marginWidth: 0; marginTop: 4; framingSpec: (AbtViewAttachmentConstraint new leftEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHWIDGET; offset: 3; attachedTargetView: bankBalanceText); rightEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHNONE); topEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHOPPOSITEWIDGET; offset: 0; attachedTargetView: bankBalanceLabel); bottomEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHNONE)). toSelectionLabel1 object: (gui at: 27) " 'To Selection' " ; framingSpec: (AbtViewAttachmentConstraint new leftEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHNONE); rightEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHOPPOSITEWIDGET; offset: 0; attachedTargetView: clearedBalanceLabel); topEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHWIDGET; offset: 10; attachedTargetView: clearedBalanceLabel); bottomEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHNONE)). clearedBalanceToSelectedEntryText converter: ((abtMonetaryAmountConverter_4 := AbtMonetaryAmountConverter abtCreatePart: #AbtMonetaryAmountConverter parent: nil )); tabGroup: false; traversalOn: false; columns: 10; alignment: 2; framingSpec: (AbtViewAttachmentConstraint new leftEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHOPPOSITEWIDGET; offset: 0; attachedTargetView: clearedBalanceText); rightEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHNONE); topEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHOPPOSITEWIDGET; offset: 0; attachedTargetView: toSelectionLabel1); bottomEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHNONE)); editable: false. toSelectionLabel2 object: (gui at: 28) " 'To Selection' " ; framingSpec: (AbtViewAttachmentConstraint new leftEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHNONE); rightEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHOPPOSITEWIDGET; offset: 0; attachedTargetView: unclearedBalanceLabel); topEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHOPPOSITEWIDGET; offset: 0; attachedTargetView: toSelectionLabel1); bottomEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHNONE)). unclearedBalanceToSelectedEntryText converter: ((abtMonetaryAmountConverter_5 := AbtMonetaryAmountConverter abtCreatePart: #AbtMonetaryAmountConverter parent: nil )); tabGroup: false; traversalOn: false; columns: 10; alignment: 2; autoSelect: false; framingSpec: (AbtViewAttachmentConstraint new leftEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHOPPOSITEWIDGET; offset: 0; attachedTargetView: unclearedBalanceText); rightEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHNONE); topEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHOPPOSITEWIDGET; offset: 0; attachedTargetView: toSelectionLabel2); bottomEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHNONE)); editable: false. menuBarItem1 object: (gui at: 29) " 'File' " . menuBarItem2 object: (gui at: 30) " 'Edit' " . menuBarItem3 object: (gui at: 31) " 'About' " . helpMenuChoice labelType: 2; object: (gui at: 32) " 'Help' " ; graphicsDescriptor: nil; labelString: (gui at: 33) " 'Help Menu Choice' " . newMenuChoice object: (gui at: 34) " 'New' " . openMenuChoice object: (gui at: 35) " 'Open' " . saveMenuChoice object: (gui at: 36) " 'Save' " ; enabled: false. saveAsMenuChoice object: (gui at: 37) " 'Save as...' " . createReportMenuChoice object: (gui at: 38) " 'Create Report...' " . createShortcutToCheckbookFileMenuChoice object: (gui at: 39) " 'Create Shortcut to Checkbook File' " ; enabled: false. exitMenuChoice object: (gui at: 40) " 'Exit' " . editBankInfoMenuChoice object: (gui at: 41) " 'Edit Bank Info' " . findDateMenuChoice labelType: 2; object: (gui at: 42) " 'Find Date' " ; graphicsDescriptor: nil; helpTitle: (gui at: 43) " 'Find Date' " . findEntryCodeMenuChoice object: (gui at: 44) " 'Find Entry Code (Check #)' " . findAmountMenuChoice object: (gui at: 45) " 'Find Amount' " . findDescriptionMenuChoice object: (gui at: 46) " 'Find Description' " . findUnclearedMenuChoice object: (gui at: 47) " 'Find Uncleared' " . findNextMenuChoice object: (gui at: 48) " 'Find Next' " ; accelerator: (CwAccelerator mask: 0 keysym: 65472). aboutMenuChoice object: (gui at: 49) " 'About' " . checkForUpdateMenuChoice object: (gui at: 50) " 'Check For Update' " . downloadAndInstallCurrentVersionMenuChoice object: (gui at: 51) " 'Download And Install Current Version' " . autoCheckForUpdateMenuToggle object: (gui at: 52) " 'Auto Check For Update' " . openMenuChoice abtWhenPrimitive: #clicked perform: (DirectedMessage new receiver: self; selector: #open; arguments: #()). saveMenuChoice abtWhenPrimitive: #clicked perform: (DirectedMessage new receiver: self; selector: #save; arguments: #()). saveAsMenuChoice abtWhenPrimitive: #clicked perform: (DirectedMessage new receiver: self; selector: #saveAs; arguments: #()). newMenuChoice abtWhenPrimitive: #clicked perform: (DirectedMessage new receiver: self; selector: #new; arguments: #()). window_1 abtWhenPrimitive: #openedWidget perform: (DirectedMessage new receiver: self; selector: #afterOpenSetup; arguments: #()). window_1 abtWhenPrimitive: #closeWidgetRequest perform: (DirectedMessage new receiver: self; selector: #okayToClose:; arguments: (Array new: 1)). self attributeConnections add: (conn8 := AbtAttributeToAttributeConnection new connectSource: popupMenu1 featureName: #self feature: AbtCwMenuView IS_self toTarget: menuBarItem1 featureName: #menu feature: AbtCascadeButtonView IS_menu). createANewEntryPushButton abtWhenPrimitive: #clicked perform: (DirectedMessage new receiver: self; selector: #createNewEntry; arguments: #()). self attributeConnections add: (conn9 := AbtAttributeToAttributeConnection new connectSource: kscCheckBookDataObject variableFeatureName: #routingNumber featureSelector: #IS_routingNumber toTarget: aBANumberText featureName: #object feature: AbtTextView IS_object). self attributeConnections add: (conn10 := AbtAttributeToAttributeConnection new connectSource: kscCheckBookDataObject variableFeatureName: #accountNumber featureSelector: #IS_accountNumber toTarget: accountNumberText featureName: #object feature: AbtTextView IS_object). self attributeConnections add: (conn11 := AbtAttributeToAttributeConnection new connectSource: kscCheckBookDataObject variableFeatureName: #bankBalance featureSelector: #IS_bankBalance toTarget: bankBalanceText featureName: #object feature: AbtTextView IS_object). self attributeConnections add: (conn12 := AbtAttributeToAttributeConnection new connectSource: kscCheckBookDataObject variableFeatureName: #clearedBalance featureSelector: #IS_clearedBalance toTarget: clearedBalanceText featureName: #object feature: AbtTextView IS_object). self attributeConnections add: (conn13 := AbtAttributeToAttributeConnection new connectSource: kscCheckBookDataObject variableFeatureName: #accountName featureSelector: #IS_accountName toTarget: accountNameText featureName: #object feature: AbtTextView IS_object). kscCheckBookContainerDetails abtWhenPrimitive: #defaultActionRequested perform: (DirectedMessage new receiver: self; selector: #editEntry:; arguments: (Array new: 1)). self attributeConnections add: (conn15 := AbtAttributeToAttributeConnection new connectSource: kscCheckBookDataObject variableFeatureName: #unclearedBalance featureSelector: #IS_unclearedBalance toTarget: unclearedBalanceText featureName: #object feature: AbtTextView IS_object). self attributeConnections add: (conn16 := AbtAttributeToAttributeConnection new connectSource: popupMenu2 featureName: #self feature: AbtCwMenuView IS_self toTarget: menuBarItem2 featureName: #menu feature: AbtCascadeButtonView IS_menu). editBankInfoMenuChoice abtWhenPrimitive: #clicked perform: (DirectedMessage new receiver: self; selector: #editBankInfo; arguments: #()). kscCheckBookDataObject abtWhen: #changed selector: #IS_changed perform: (DirectedMessage new receiver: self; selector: #setCheckBookChanged; arguments: #()). self attributeConnections add: (conn20 := AbtAttributeToAttributeConnection new connectSource: kscCheckBookContainerDetails featureName: #selectionIsValid feature: AbtContainerDetailsView IS_selectionIsValid toTarget: deleteEntryPushButton featureName: #enabled feature: AbtPushButtonView IS_enabled). deleteEntryPushButton abtWhenPrimitive: #clicked perform: (DirectedMessage new receiver: self; selector: #deleteEntry; arguments: #()). createShortcutToCheckbookFileMenuChoice abtWhenPrimitive: #clicked perform: (DirectedMessage new receiver: self; selector: #createShortcutToCheckbookFile; arguments: #()). helpMenuChoice abtWhenPrimitive: #clicked perform: (DirectedMessage new receiver: self; selector: #mainHelp; arguments: #()). createReportMenuChoice abtWhenPrimitive: #clicked perform: (DirectedMessage new receiver: self; selector: #createReport; arguments: #()). kscCheckBookContainerDetails abtWhenPrimitive: #selectionIndexChanged perform: (DirectedMessage new receiver: self; selector: #setBalancesUptoSelectedEntry; arguments: #()). kscCheckBookDataObject abtWhen: #changed selector: #IS_changed perform: (DirectedMessage new receiver: self; selector: #setBalancesUptoSelectedEntry; arguments: #()). findUnclearedMenuChoice abtWhenPrimitive: #clicked perform: (DirectedMessage new receiver: self; selector: #findUncleared; arguments: #()). findDateMenuChoice abtWhenPrimitive: #clicked perform: (DirectedMessage new receiver: self; selector: #findDate; arguments: #()). findNextMenuChoice abtWhenPrimitive: #clicked perform: (DirectedMessage new receiver: self; selector: #findNext; arguments: #()). findEntryCodeMenuChoice abtWhenPrimitive: #clicked perform: (DirectedMessage new receiver: self; selector: #findEntryCode; arguments: #()). findAmountMenuChoice abtWhenPrimitive: #clicked perform: (DirectedMessage new receiver: self; selector: #findAmount; arguments: #()). findDescriptionMenuChoice abtWhenPrimitive: #clicked perform: (DirectedMessage new receiver: self; selector: #findDescription; arguments: #()). exitMenuChoice abtWhenPrimitive: #clicked perform: (DirectedMessage new receiver: self; selector: #closeWindow; arguments: #()). self attributeConnections add: (conn52 := AbtAttributeToAttributeConnection new connectSource: popupMenu3 featureName: #self feature: AbtCwMenuView IS_self toTarget: menuBarItem3 featureName: #menu feature: AbtCascadeButtonView IS_menu). checkForUpdateMenuChoice abtWhenPrimitive: #clicked perform: (DirectedMessage new receiver: self; selector: #checkForUpdate; arguments: #()). autoCheckForUpdateMenuToggle abtWhenPrimitive: #selectionChanged perform: (DirectedMessage new receiver: self; selector: #autoCheckForUpdatesChanged:; arguments: (Array new: 1)). aboutMenuChoice abtWhenPrimitive: #clicked perform: (DirectedMessage new receiver: self; selector: #about; arguments: #()). downloadAndInstallCurrentVersionMenuChoice abtWhenPrimitive: #clicked perform: (DirectedMessage new receiver: self; selector: #downloadAndInstallCurrentVersion; arguments: #()). self initializeAttributeConnections. self finalInitialize. ! ! You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/11df518c-8e81-41b1-a403-55c4d8da7552n%40googlegroups.com. |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Hi Lou, given the complexity of your user interface chances to reconstruct it offline are very low. It is extremely unlikely that the converter or the tab manager contains a bug. It is very likely that you are victim of a circular dependency of firing events spread over some widgets. Such a circular dependency is dangerous. It can cause a total frustrating behaviour to a user (equivalent to an endless loop) under rare edge conditions. The attempt to select contents of the widget using the fork code will not cure the problem but hide it and contribute to make the situation worse. You should invest to detect the cause of this dependency to gain the necessary stability. I recommend to debug the connections. You have to find out the malign event causing to loose the text selection and then to decouple that code from presentation. There are several approaches to do so: by trial and error - you can systematically remove connections until the effect vanishes to find the culprit (and then to diagnose the reason) by device and conquer - try to temporarily remove parts of the GUI to narrow down by debugging - you can set break points on connections to track the flow (e.g. tab in the widget causes a) the selectAll as desired b) some other unintended change causing to some calculation which finally changes the selection. Attempt to mark the connection gettingFocus->selectAll, right click and select "Debug connections". [I assume that you know about this debugging feature]. Doing so will open your visual part. If you tab then into the widget of concern, debugger and a connection trace log will open and you can start to step through all follow-up actions, hopefully you will detect the unintended side effect. Consider also to set a break point on method setSelection: of the widget. It will halt when the malign second selection will take place. I do not want to recapitulate theory (MVC) but it is worth to separate representation from logic to avoid such circular references by architectural design. This prevents from introducing such dependency chains and grants to deliver a responsive user interface which requires short event chains. Good luck Marcus [hidden email] schrieb am Montag, 15. Februar 2021 um 22:04:31 UTC+1: Hi Marcus, ... [show rest of quote] You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/d34d3960-e097-4f0a-83f4-c8b93b95e891n%40googlegroups.com. |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Hi Marcus,
I made a test window with just two text fields. The setting of the first are as it is dropped in the window. The second has the alignment set to end, autoSelect set to true and converter set to Monetary Amount. There are no connections at all. The tab order is the default, first field to the second and back to the first. Entering 0, or 0.00 or whatever gets things started. Tabbing around will select everything when the second field gets the focus. Clicking the second field when it doesn't have the focus, gives it the focus but does not select everything. Depending where one clicks, nothing may be selected. Since there are no connections at all, I don't see how this can be a connection problem. Below is a file out of the window part. Attaching even this simple file still doesn't work on this stupid google group. Lou AbtAppBldrView subclass: #KscTestMonetaryAmountConverter classInstanceVariableNames: '' instanceVariableNames: '' classVariableNames: '' poolDictionaries: ''! !KscTestMonetaryAmountConverter class privateMethods ! _PRAGMA_IS_ "%%PRAGMA DECLARE (name: IS_KscTestMonetaryAmountConverter isPool: true isConstant: false) (pool: IS_KscTestMonetaryAmountConverter declarations: ( (name: IS_instanceInterfaceSpec isConstant: false) ))"! abtPrimFlushInterfaceSpecCache IS_KscTestMonetaryAmountConverter associationsDo: [: poolDictionaryAssoc | poolDictionaryAssoc value: nil]. super abtPrimFlushInterfaceSpecCache! abtUntranslatedConstants "** Do not modify or delete ** See: AbtAppBldrPart class>>#about_abtUntranslatedConstants" ^#( )! IS_instanceInterfaceSpec "Private - ** Warning ** This method is generated by VisualAge and should not be modified or deleted. This method is responsible for returning a featureSpec that describes the implementation of a particular feature of the receiver" ^IS_KscTestMonetaryAmountConverter::IS_instanceInterfaceSpec notNil ifTrue: [IS_KscTestMonetaryAmountConverter::IS_instanceInterfaceSpec] ifFalse: [ IS_KscTestMonetaryAmountConverter::IS_instanceInterfaceSpec := AbtInterfaceSpec new]! ! !KscTestMonetaryAmountConverter privateMethods ! abtBuildInternals "** Do not modify or delete ** See: AbtAppBldrPart class>>#about_abtBuildInternals" | gui window text2 text1 abtMonetaryAmountConverter | gui := self class abtSeparatedConstants. window := AbtShellView abtCreatePart: 'Window' parent: nil owner: self . text2 := AbtTextView abtCreatePart: 'Text2' parent: window. text1 := AbtTextView abtCreatePart: 'Text1' parent: window. self primaryPart: window. window framingSpec: (AbtViewAttachmentConstraint new leftEdge: (AbtEdgeConstant new offset: 30); rightEdge: (AbtEdgeConstant new offset: 800); topEdge: (AbtEdgeConstant new offset: 30); bottomEdge: (AbtEdgeConstant new offset: 450)). text2 framingSpec: (AbtViewAttachmentConstraint new leftEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHFORM; offset: 75); rightEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHNONE); topEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHFORM; offset: 38); bottomEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHNONE)). text1 converter: ((abtMonetaryAmountConverter := AbtMonetaryAmountConverter abtCreatePart: #AbtMonetaryAmountConverter parent: nil )); alignment: 2; autoSelect: true; framingSpec: (AbtViewAttachmentConstraint new leftEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHFORM; offset: 96); rightEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHNONE); topEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHFORM; offset: 116); bottomEdge: (AbtRunEdgeAttachmentConstraint new attachment: XmATTACHNONE)). self finalInitialize. ! ! KscTestMonetaryAmountConverter initializeAfterLoad! You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/a6dc125f-5400-43ba-83d2-a73381dade0fn%40googlegroups.com. |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Hi Lou, thank you for bringing it to a minimum, I have now a local replica. I can reproduce "Clicking the second field when it doesn't have the focus, gives it the
focus but does not select everything. Depending where one clicks,
nothing may be selected." -> I assume, you want to have autoselect all also when clicking, not only when tabbing into the field. I will analyse the scope of "autoselect". I will also check if the connection getFocus -> selectAll will help - and if not, why not and then if any event ordering is imporant. I will report to you tomorrow. Marcus [hidden email] schrieb am Dienstag, 16. Februar 2021 um 18:13:14 UTC+1: Hi Marcus, ... [show rest of quote] You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/bd64ff71-6aae-46ac-8d36-cf6c3f080b08n%40googlegroups.com. |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Hi Marcus,
Thanks for continuing to look at this. I left the connection getFocus -> selectAll off to keep things simple. It was the first thing I tried when I first encountered the problem. Adding it to this simple test case doesn't help. I'm going to look more at #AbtTextConverterManager as I think it talks to the Monetary Amount Converter to get/replace the currently displayed text with unformatted text and then select it. I think somewhere along the line the selection is not made or more likely is undone. If we find the bug and fix it, I then have to decide to use the fix or stick with my circumvention. This is a question of maintenance. If the base code is changed with the fix, the fix can be lost with an update, if the update doesn't contain a fix. The circumvention can be rendered unnecessary with an update but that is easily solved by removing it. Lou On Tuesday, February 16, 2021 at 1:06:42 PM UTC-5 [hidden email] wrote:
... [show rest of quote] You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/d81ca063-4fcd-40db-8b5f-9b013f5531c1n%40googlegroups.com. |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Hi Lou, I promised you to respond. My analysis is not finished yet... The autofocus behaviour is part of the AbtTextConverterManager, as you detected yesterday. And a comment gave me a hint AbtTextConverterManager>>gettingFocus ... " Note: Selection position takes precedence over Cursor position because setting the selection also sets the cursor position in Motif. As a consequence of this the cursor will always be placed at the end of the selection... even if it was at the beginning when the widget lost focus. " So there is first a difference of what is selected depending of how you are getting focus: tabbing by keyboard -> everything is selected, by mouse: everything is select up to the mouse position! So it its important where you click with the mouse. If you click left to the money value, nothing is selected as you reported - if you click to the right of the amount, then the amount is selected up to the point to where you clicked at. The whole thing is now complicated by the fact that there are two representations of the amount - before having focus the content is something like 12.23 $, if the field has focus, its content reduces to 12.23 (the money sign is removed). So if you click into the field, the position of the mouse relative to the beginning depends on whether the long or the short representation is at work at that very momenent (I did not find that out yet). However if you click carefully far at the right of the widget, its content is selected as expected even when the field gets focus over the mouse. So if the purpose was to select everything in the field, no matter where you click with the mouse, then autoselect does not cover that. Given the ambition of being platform independent the Motif behaviour implied here under Windows may be felt as unnatural. And then the shift of the two different representations (long with money sign - without focus and short with focus) makes things even more delicate. The point is now: if you want a different behaviour here, a way out of the dilema is to subclass
AbtTextConverterManager to implement that and to install your variant of the AbtTextConverterManager in your application instead of the original. This way you will by-pass the implied Motif behaviour (however if you plan to move to Motif, I can predict many more problems of you GUIs, unfortunately, as Motif is very strict and the common widget emulation is relaxed and tolerant in many aspects, where the original Motif isn't. To change the converter manager is not supported by a protocol (it is lazy initialized when you set a converter). I leave that up to you how to hook the converterManager variable of AbtTextView, potentially global for all instances in your application. Let me know if I should dig deeper here. Marcus [hidden email] schrieb am Mittwoch, 17. Februar 2021 um 15:46:08 UTC+1: Hi Marcus, ... [show rest of quote] You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/54b5e8f7-579e-4d82-91f1-3a6cdfee64d1n%40googlegroups.com. |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
In reply to this post by Louis LaBrunda
Hi Marcus,
I'm going to take a break from this and just use my hack of a circumvention, as it seems the solution is very complicated. The problem in #AbtTextConverterManager may have to do with its instance variable #savedSel (a point). It keeps track of the selected characters. I think it is not always in sync with the characters actually selected in the widget. I think the characters in the widget are selected correctly when the field gets the focus but sometime after that the converter manager get confused and messes thing up. Lou P.S. Instantiations, is there enough here to open a bug report or do I need to formalize it? On Wednesday, February 17, 2021 at 9:46:08 AM UTC-5 Louis LaBrunda wrote: Hi Marcus, ... [show rest of quote] You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/4fe09807-611c-40d7-9799-f13246d0ccbcn%40googlegroups.com. |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Hi Marcus,
I made my last post before your last post came in or while it was coming in. The comment you reference is in an area of code for the tabbing and not clicking into the field. The ifTrue: part of the code just above the comments is what gets executed. Break-pointing that code show the call to #setSelection: in the widget has the full size. So, at that point I think the selection in the widget is correct. I think it gets messed up later. I tried changing "w setSelection:" to "self setSelection:" but that didn't help. When break-pointing at: "w setSelection: ..." or "self setSelection: ..." and resuming the whole thing is selected as desired. Somehow the delay caused by the breakpoint prevents the selection from changing. I don't think this is a "feature" of how Motif should work but it is hard to say for sure. I will say that if one is required to swipe the contents of the field when clicking into it to select all of it, then autoSelect would be designed for tabbing only and therefor less valuable. I don't point this out to argue with you about it and I am generally loath to claim some behavior is a bug, so I may have been premature here but following the code does show the desired behavior being done and then changed. Thanks again. Lou On Wednesday, February 17, 2021 at 11:01:11 AM UTC-5 Louis LaBrunda wrote: Hi Marcus, ... [show rest of quote] You received this message because you are subscribed to the Google Groups "VA Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/829a7cd7-cb8a-4efe-889f-45eb2d714b1dn%40googlegroups.com. |
Free forum by Nabble | Edit this page |