Page 2 of 2

Re: HotKey for every controls

Posted: Mon Apr 19, 2010 6:42 am
by mol
I've read this sample. It looks great. But, I thought about easiest definition of hotkey of control - during creating it in IDE or by defining via code.

Of course, we can do it in few other ways, eg. by ON KEY...

Re: HotKey for every controls

Posted: Mon Apr 19, 2010 11:25 am
by Roberto Lopez
mol wrote:I thought about OnKey event and in my opinion, this won't be the same as Hotkey.
Onkey will be fired after key pressed - but control will be focused yet.

Hotkey should be quick implementation of ON KEY of WindowName.... phrase.

Marek
So, it is possible that I've don't fully understood you...

Re: HotKey for every controls

Posted: Mon Apr 19, 2010 11:30 am
by Roberto Lopez
Roberto Lopez wrote:
mol wrote:I thought about OnKey event and in my opinion, this won't be the same as Hotkey.
Onkey will be fired after key pressed - but control will be focused yet.

Hotkey should be quick implementation of ON KEY of WindowName.... phrase.

Marek
So, it is possible that I've don't fully understood you...
Ok.

I've re-read and I've understood now... :)

Re: HotKey for every controls

Posted: Mon Apr 19, 2010 11:35 am
by Roberto Lopez
mol wrote:
Roberto Lopez wrote: It's a nice idea, but no so much easy to make :)

Going this way, I think it's very easy to make.
One extra field in IDE Object inspector (of course, it should be added to definition of every control), and while processing every control, added phrase
if !empty(HotKey)
_defineHotkey(....)
endif

It could be done without controlling syntactic correctness, with programmers responsibility.


(ps. Maybe for textboxes, datepicters for now?)
mmm... I'm not sure if that is the right way...

On Key is really a window-level event (even if it is available as an independent command)...

so... presenting it as a control property, is a design error...

Maybe, the solution here be to add a builder to visually 'construct' a complex OnKey event for windows...

I'll think on that...

Re: HotKey for every controls

Posted: Mon Apr 19, 2010 12:39 pm
by mol
Roberto Lopez wrote:
Roberto Lopez wrote:
mol wrote:I thought about OnKey event and in my opinion, this won't be the same as Hotkey.
Onkey will be fired after key pressed - but control will be focused yet.

Hotkey should be quick implementation of ON KEY of WindowName.... phrase.

Marek
So, it is possible that I've don't fully understood you...
Ok.

I've re-read and I've understood now... :)
every man can write in English, but not everyone can be understood :lol:
(I'm writing about myself of course :D)
Marek

Re: HotKey for every controls

Posted: Mon Apr 19, 2010 1:59 pm
by Roberto Lopez
mol wrote:
every man can write in English, but not everyone can be understood :lol:
(I'm writing about myself of course :D)
Marek
It's normal for me to not understand things the first time I've read, even on my native tongue (Spanish) :)

Re: HotKey for every controls

Posted: Mon Apr 19, 2010 6:22 pm
by mol
I rather thought about my poor English :)