on_mouse_move (a_x, a_y: INTEGER; a_x_tilt, a_y_tilt, a_pressure: DOUBLE; a_screen_x, a_screen_y: INTEGER)
-- Handle mouse moving actions.
local
l_item: detachable EV_GRID_ITEM
l_list: LIST [EV_GRID_ITEM]
do
if attached choice_list as l_choice_list then
if
not attached initial_position as l_pos or else
(l_pos.x /= l_choice_list.screen_x + a_x and then l_pos.y /= l_choice_list.screen_y + a_y)
then
initial_position := Void
l_item := l_choice_list.item_at_virtual_position (l_choice_list.virtual_x_position + a_x,
l_choice_list.virtual_y_position + a_y)
if l_item /= Void then
l_list := l_choice_list.selected_items
if not l_list.is_empty and then l_list.first /= l_item then
l_choice_list.remove_selection
l_item.enable_select
end
has_user_selected_item := True
end
end
else
check choice_list /= Void end
end
end
on_mouse_move (a_x, a_y: INTEGER; a_x_tilt, a_y_tilt, a_pressure: DOUBLE; a_screen_x, a_screen_y: INTEGER)
-- Handle mouse moving actions.
local
l_item: detachable EV_GRID_ITEM
l_list: LIST [EV_GRID_ITEM]
do
inspect choice_list
when attached then
inspect initial_position
when detached or else (initial_position.x /= choice_list.screen_x + a_x
and then initial_position.y /= choice_list.screen_y + a_y)
then
initial_position := Void
l_item := choice_list.item_at_virtual_position (choice_list.virtual_x_position + a_x,
choice_list.virtual_y_position + a_y)
inspect l_item
when attached then
l_list := choice_list.selected_items
if not l_list.is_empty and then l_list.first /= l_item then
choice_list.remove_selection
l_item.enable_select
end
has_user_selected_item := True
else
end
else
end
else
check choice_list /= Void end
end
end
if
not attached initial_position as l_pos or else
(l_pos.x /= l_choice_list.screen_x + a_x and then l_pos.y /= l_choice_list.screen_y + a_y)
then
on_mouse_move (a_x, a_y: INTEGER; a_x_tilt, a_y_tilt, a_pressure: DOUBLE; a_screen_x, a_screen_y: INTEGER)
-- Handle mouse moving actions.
local
l_item: detachable EV_GRID_ITEM
l_list: LIST [EV_GRID_ITEM]
do
inspect choice_list when attached then
inspect initial_position when detached
or else (initial_position.x /= choice_list.screen_x + a_x
and then initial_position.y /= choice_list.screen_y + a_y)
then
initial_position := Void
l_item := choice_list.item_at_virtual_position (choice_list.virtual_x_position + a_x,
choice_list.virtual_y_position + a_y)
inspect l_item when attached then
l_list := choice_list.selected_items
if not l_list.is_empty and then l_list.first /= l_item then
choice_list.remove_selection
l_item.enable_select
end
has_user_selected_item := True
else
end
else
end
else
check choice_list /= Void end
end
end
--
You received this message because you are subscribed to the Google Groups "Eiffel Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-users...@googlegroups.com.
Visit this group at https://groups.google.com/group/eiffel-users.
For more options, visit https://groups.google.com/d/optout.
on_mouse_move (a_x, a_y: INTEGER; a_x_tilt, a_y_tilt, a_pressure: DOUBLE; a_screen_x, a_screen_y: INTEGER)
-- Handle mouse moving actions.
local
l_item: detachable EV_GRID_ITEM
l_list: LIST [EV_GRID_ITEM]
do
inspect choice_list when attached then
inspect initial_position when detached
or else (initial_position.x /= choice_list.screen_x + a_x
and then initial_position.y /= choice_list.screen_y + a_y)
then
initial_position := Void
l_item := choice_list.item_at_virtual_position (choice_list.virtual_x_position + a_x,
choice_list.virtual_y_position + a_y)
inspect l_item when attached then
l_list := choice_list.selected_items
if not l_list.is_empty and then l_list.first /= l_item then
choice_list.remove_selection
l_item.enable_select
end
has_user_selected_item := True
var firstName: String?
I have followed some discussion of Kotlin language, where they describe the nullable type with an appended question mark:###NullIn Kotlin you have to decide whether a variable can be assigned null or not. This applies to both primitives or class types.A nullable variable is marked by assigning ? after the type, e.g.var firstName: String?
firstName: detachable STRING
var firstName: String
fun main(args : Array<String>) { val firstName : String = "Adam" val name : String? = firstName print("$name") }
Finnian Reilly <frei...@gmail.com>: