| Subject |
Re: SpeedTip followup |
| From |
AndrewS <no@nomore.com> |
| Date |
Fri, 24 Feb 2023 14:05:44 +1100 |
| Newsgroups |
dbase.getting-started |
Lee,
I got the hint :)
It did not work for me using Tom's posted code either, although the mouse and speed tips worked fine.
The color change was only a one-shot from opening color, to the pink nightmare, and back to the opening color. That seemed odd to me so I made it a toggle for the test.
I did not concern myself with the color strings and just changed the color toggle to the way I would do it and it used both the exact string match [==] and assignment [:=] for an existing property. This eliminated any set([exact]) risk.
The rest of the code I eliminated seemed redundant for the test, but may be needed for his application.
However, I did remember _app.executeMessages() causing me an enormous amount of frustration and effort when I migrated/converted/enhanced a large application from W7P dBase v2.62 to W10P dBase11, dbase12 and dbase 2019, so I eliminated the _app.executeMessages() risk as well for the test.
I removed the time delay for similar reasons.
It then worked as I figured Tom intended so I posted it.
regards, AndrewS
On 24/2/23 11:14, Lee Grant wrote:
> AndrewS,
>
> I was hoping you'd chime in, since I know you have a VM setup. :)
>
> Your code manually making the toggle, is what I was referring to, but after I changed the spelling it worked for me, so I didn't figure any other code would be necessary.
>
> I was trying to think why the toggling worked for Ken prior to my changing the spelling, but not for me, until after.
>
> My theory was going to be that the original code made an assignment only ':=' symbol assigning the IIF() function and it's conditions, and maybe it was that assignment that kept the different spellings from working. I don't know if Ken changed anything else on his sample of the code or not.
>
> It's consistent on my install, that it only works if I change the case of the 'g' to match what is normally in the Object Inspector for that property, and that matches the original spelling in the test aspect. I can't explain it, except for that theory, even though Ken says it worked for him without the change.
>
> Lee
>
>
> On 2/23/2023 6:27 PM, AndrewS wrote:
>> Tom,
>>
>> I am running dBase 2019 in a W10 virtual machine:
>>
>> dBASE 2019 13.20 b2618 (11/26/2019-EN191126)
>> Windows 10 Pro 22H2 build 19045.2486
>> VirtualBox 6.1.42
>> Ubuntu 20.04.5 Gnome
>>
>> When I change your code, to the following, I have no problems and it runs fine.
>>
>> It appears your problem MAY be a systems integration problem. Unfortunately, this is no longer considered important, so good luck finding the answer.
>>
>> FWIW ...
>>
>> My mouse and keyboard are Logitech:
>>
>> MX Master 3
>> MX Keys
>>
>> using a unifying receiver attached to an Aten CS1824 KVM switch.
>>
>> regards, AndrewS
>>
>> *
>> ** END HEADER -- do not remove this line
>> //
>> // Generated on 02/21/2023
>> //
>> parameter bModal
>> local f
>> f = new ImageClicked2Form()
>> if (bModal)
>> f.mdi = false // ensure not MDI
>> f.readModal()
>> else
>> f.open()
>> endif
>>
>> class ImageClicked2Form of FORM
>> with (this)
>> doubleBuffered = true
>> metric = 6 // Pixels
>> colorNormal = "LightGrey"
>> height = 352.0
>> left = 1004.0
>> top = 0.0
>> width = 280.0
>> text = ""
>> showSpeedTip = true
>> endwith
>>
>> this.GETENTRY1 = new ENTRYFIELD(this)
>> with (this.GETENTRY1)
>> onOpen = class::ENTRYFIELD_ONOPEN
>> height = 24.0
>> left = 76.0
>> top = 163.0
>> width = 125.0
>> fontSize = 11.0
>> speedTip = "Assist"
>> value = ""
>> endwith
>>
>>
>> Function ENTRYFIELD_ONOPEN
>> * ------------------------------------------ *
>>
>> this.TL1 = new TEXTLABEL( this.parent ) // this.parent == the FORM !!!
>> this.TL1.top := this.top + 1
>> this.TL1.width := 22.0
>> this.TL1.height := 22.0
>> this.TL1.left := (this.left + this.width) - (this.TL1.width + 1)
>> this.TL1.text := "6"
>> this.TL1.colorNormal := "Red/Window"
>> this.TL1.fontName := "Webdings"
>> this.TL1.fontSize := 14.0
>> this.TL1.borderStyle := 3 // None
>> this.TL1.alignVertical := 1 // Middle
>> this.TL1.alignHorizontal := 1 // Center
>> this.TL1.speedTip := "Calendar ..."
>> this.TL1.onLeftMouseDown := class::TL1_ONLEFTMOUSEDOWN
>>
>> return
>>
>> Function TL1_onLeftMouseDown(flags, col, row)
>> * ------------------------------------------------------------- *
>> // 'click' it ...
>> * this.borderStyle = 2
>> * _app.executeMessages( )
>> * sleep .35
>> * this.borderStyle = 3
>> * _app.executeMessages( )
>> *
>>
>> do case
>> case this.parent.colorNormal == "LightGrey"
>> this.parent.colorNormal := "Fuchsia"
>> case this.parent.colorNormal == "Fuchsia"
>> this.parent.colorNormal := "LightGrey"
>> endcase
>>
>> *this.parent.colorNormal := iif( this.parent.colorNormal = "LightGrey","Fuchsia","Lightgrey")
>> *
>> return
>> *
>>
>> endclass
>>
>> *
>>
> <snip>
|
|