Author |
Topic: Events (Read 596 times) |
|
Alincon
Full Member
member is offline


Posts: 147
|
 |
Re: Events
« Reply #6 on: Nov 7th, 2015, 12:27am » |
|
"There's an undocumented feature of LB whereby you can enable both single- and double-click events from a listbox. I do not support that in LBB, although I could."
I have a program that DOES use both single and double click events because I need to do two different things, and I didn't want to use a menu with only two choices. I hope you will support this feature in the future.
By happenstance, in that same program I get an error on this statement (which works in LB) Code:
today = val(date$("days"))
I had to use these two lines, instead
Code:
today$ = date$("days")
today = val(today$)
r.m.
|
|
Logged
|
|
|
|
joker
Global Moderator
member is offline


Gender: 
Posts: 157
|
 |
Re: Events
« Reply #7 on: Nov 7th, 2015, 01:29am » |
|
Alincon, you should have started another thread, because your problem with the date will get lost if someone searches.
Anything we can do to keep Richard engaged in updating LBB is a good thing!
|
|
Logged
|
|
|
|
Richard Russell
Administrator
member is offline


Posts: 1348
|
 |
Re: Events
« Reply #8 on: Nov 7th, 2015, 09:50am » |
|
on Nov 7th, 2015, 12:27am, Alincon wrote:| By happenstance, in that same program I get an error on this statement (which works in LB). |
|
It only works in LB because of a bug. The docs clearly state that the function date$("days") returns a numeric value, not a string:
"print date$("days") ' 36127 returns number - days since Jan 1, 1901".
So of course if you do val(date$("days")) it is a Type Mismatch - the VAL() function expects a string parameter, not a numeric parameter.
The correct code (which will work in JB, LB 4.04, LB 4.5.0 and LBB) is:
Code: I won't be changing LBB to emulate the bug; the fault is in your program.
Richard.
|
|
|
|
Alincon
Full Member
member is offline


Posts: 147
|
 |
Re: Events
« Reply #9 on: Nov 8th, 2015, 9:53pm » |
|
I agree that my code was wrong, your is right, and I should have known better.
Just one more question: why do you let both of these work?
Code:
today = date$("days")
today$ = date$("days")
r.m.
|
|
Logged
|
|
|
|
|