[futurebasic] Re: [FB] dialog function

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : November 2002 : Group Archive : Group : All Groups

From: Alain Pastor <apastor@...>
Date: Tue, 05 Nov 2002 09:07:08 +0100

Larry T wrote:
> Page 208 of the R7 reference manual lists an _evCmdKey event. This constant
> is not defined, at least in appearance runtime. Its value is listed as 24 in
> PPC runtime, but so is _cntxtMenuClick. Running the program below in
> carbon/appearance and pressing a command-key combination shows that an event
> of number 22 is reported. 22 is defined as a _preview event on page 211.
> 
> Will this event not work if there is an active edit field in the current
> window? It still should work, shouldn't it?
> 
> Larry
> 
> 
> '~'A
> '                       Runtime : Rntm Appearance.Incl
> '                           CPU : Carbon
> '~'B
> local fn xxx
> appearance window 1
> end fn
> 
> local fn dodialog
> select dialog(0)
> case _evKey : print "_evKey"
> case else : print dialog(0)
> end select
> end fn
> 
> on dialog fn dodialog
> 
> fn xxx
> 
> '-----------------
> DO
> HANDLEEVENTS
> UNTIL 0
> '-----------------
> 

Larry,

I think there is a boo boo in the manual or in the Appearance runtime.
According to the Ref manual _evCmdKey has a value of 24 in the 
Standard runtime and 32 in the Appearance runtime. Such an event is 
sent whether you have an active edit field or not in the active 
window. However, a simple test shows that this feature is missing from 
the Appearance runtime and we get an undefined constant. For the 
moment let's say that the manual is wrong.
-- 
Cheers,

A. Pastor