shadow_7283 wrote:
LOL it was so easy....
keyPressed
"Answer the currently pressed key."
self keyNames do: [:ch |
(self keyPressed: ch) ifTrue: [^ ch]].
^ ''.Block spec:
('key pressed' #r #keyPressed)
Or for those who use the source (Go you!):
('key pressed' #r keyPressed)
The code that works is:
"Answer the currently pressed key."
self keyNames do: [:ch |
(self keyPressed: ch) ifTrue: [^ ch] ifFalse: [^ none]].
I am not entirely sure.
Last edited by rdococ (2010-09-13 11:45:50)
Offline
rdococ wrote:
shadow_7283 wrote:
LOL it was so easy....
keyPressed
"Answer the currently pressed key."
self keyNames do: [:ch |
(self keyPressed: ch) ifTrue: [^ ch]].
^ ''.Block spec:
('key pressed' #r #keyPressed)
Or for those who use the source (Go you!):
('key pressed' #r keyPressed)
The code that works is:
"Answer the currently pressed key."
self keyNames do: [:ch |
(self keyPressed: ch) ifTrue: [^ ch] ifFalse: [^ none]].
I am not entirely sure.![]()
that looks good to me. i havent inspected it really though.
Offline
"Answer the currently pressed key."
self keyNames do: [:ch |
(self keyPressed: ch) ifTrue: [^ ch]].
^ 'none'
Offline
rdococ wrote:
shadow_7283 wrote:
LOL it was so easy....
keyPressed
"Answer the currently pressed key."
self keyNames do: [:ch |
(self keyPressed: ch) ifTrue: [^ ch]].
^ ''.Block spec:
('key pressed' #r #keyPressed)
Or for those who use the source (Go you!):
('key pressed' #r keyPressed)
The code that works is:
"Answer the currently pressed key."
self keyNames do: [:ch |
(self keyPressed: ch) ifTrue: [^ ch] ifFalse: [^ none]].
I am not entirely sure.![]()
You do know that you just falsely quoted Shadow writing what I wrote? This is not Shadow's post.
And that won't work. This thread is already solved, so stop posting solutions that look exactly like mine.
Last edited by nXIII (2010-09-13 16:02:52)
Offline
You made nXIII angry.
Offline
nXIII wrote:
LOL it was so easy....
keyPressed
"Answer the currently pressed key."
self keyNames do: [:ch |
(self keyPressed: ch) ifTrue: [^ ch]].
^ ''.Block spec:
('key pressed' #r #keyPressed)
Or for those who use the source (Go you!):
('key pressed' r keyPressed)
Won't work
Offline
zorket wrote:
nXIII wrote:
LOL it was so easy....
keyPressed
"Answer the currently pressed key."
self keyNames do: [:ch |
(self keyPressed: ch) ifTrue: [^ ch]].
^ ''.Block spec:
('key pressed' #r #keyPressed)
Or for those who use the source (Go you!):
('key pressed' r keyPressed)
Won't work
It does work.
Offline
shadow_7283 wrote:
zorket wrote:
nXIII wrote:
LOL it was so easy....
keyPressed
"Answer the currently pressed key."
self keyNames do: [:ch |
(self keyPressed: ch) ifTrue: [^ ch]].
^ ''.Block spec:
('key pressed' #r #keyPressed)
Or for those who use the source (Go you!):
Won't work
It does work.
He probably just didn't use copy-paste and typed it wrong
Offline
Or used "Control- v"
Offline
bbbeb wrote:
zorket wrote:
bbbeb wrote:
OMGBBQNECROPOST
![]()
Dont revive old posts just to say:
cool.I just like the topic slightly
![]()
DON'T DO THAT!![]()
![]()
REPEAT:
OMGWTHBBQNECROPOSTER![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
BE QUIET!
_______________
This is my 100th post :p
Last edited by zorket (2010-09-14 16:33:29)
Offline
It's actually (key pressed), and if you used shift-click-r you can't do the same thing nXIII did.
Offline
zorket wrote:
bbbeb wrote:
zorket wrote:
I just like the topic slightly
![]()
DON'T DO THAT!![]()
![]()
REPEAT:
OMGWTHBBQNECROPOSTER![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
BE QUIET!
![]()
_______________
This is my 100th post :p
This is my 277th post!
_______________
This topic needs to be closed, it is already solved...
Last edited by bbbeb (2010-09-14 21:35:12)
Offline
No it doesn't. It needs to be left open in case other people have questions about it.
It's not my fault you guys brought it up again.
Offline
shadow_7283 wrote:
No it doesn't. It needs to be left open in case other people have questions about it.
It's not my fault you guys brought it up again.
Yes. It. Does.
NXIII posted the code... solving the issue... what else is there to explain?
Offline
Oh, really? It's already solved? Well, I wasn't aware of that. Bye It looks like i wont give any helpful advice then
Last edited by 1stCorinthians (2010-09-16 16:33:59)
Offline