glimmer-dsl-swt 4.21.2.5 → 4.22.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d379f6055bc86787c888142b3ae76c8cec195e558b00880bdcc2ca5849f0323d
4
- data.tar.gz: 1c4c5a96157a4ddf59515a9a3399f505071d3e9caf8e32656fb6238157ed8d78
3
+ metadata.gz: d6fe5217a1c912fb15b8e361b77f974e705541e182e20449b2b1e348e22d92b6
4
+ data.tar.gz: c9064bb6e9e7abf29e0a4868bbc328253625649fb37df7110ab5943990478043
5
5
  SHA512:
6
- metadata.gz: 076e3436c4b1258a11b291df10196a9ee18e34703b8769de3b3d5d5120ee66927290e15aa874b98850ca7c73c537469130c1a20d2013f21bcff67b076c771e0c
7
- data.tar.gz: ab43d3b02470e200dc0b84c2649f96cae1058307b06923d15c63f6a89f69407d4c66371cdce479b19ba9e5d27071a72b78ab516fde4350c0fdf6f953beb7d528
6
+ metadata.gz: 68e034634d6eb05df11fdc741f8c5d76de07f1973411d32ea65f7210fec3977ea5be7093e6e504e9cff78656ffbe98a558c91d47be214c408296a3ccc5808797
7
+ data.tar.gz: 37aa870344fe03f4df807a6e6252ac332816486c2a54c2d79c12e160cacf2ecdf7755eaaac05fc458169c46973e1232815417343bd97f22e9c97ad49504c36d1
data/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Change Log
2
2
 
3
+ ### 4.22.0.0
4
+
5
+ - Upgrade to SWT 4.22
6
+ - Upgrade to JDK17
7
+ - Upgrade to glimmer 2.5.4
8
+ - Support new SWT 4.22 `sync_call` keyword, which is like `sync_exec`, but returns value of evaluating expression (though `sync_exec` was already enhanced by Glimmer to return the expression evaluated value just like `sync_call`)
9
+ - More work regarding: Do not clean observers when disposing of a widget while closing the last shell (e.g. when closing an app, it is not needed to clean observers, so it is better to exit faster)
10
+ - Fix issue in Battleship sample caused by data-binding nil model, which is forbidden in glimmer 2.5.x
11
+ - Fix issue with closing Stock Ticker sample taking too long
12
+
3
13
  ### 4.21.2.5
4
14
 
5
15
  - Hello, Scrolled Composite! sample
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=85 />](https://github.com/AndyObtiva/glimmer) Glimmer DSL for SWT 4.21.2.5
1
+ # [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=85 />](https://github.com/AndyObtiva/glimmer) Glimmer DSL for SWT 4.22.0.0
2
2
  ## JRuby Desktop Development GUI Framework
3
3
  [![Gem Version](https://badge.fury.io/rb/glimmer-dsl-swt.svg)](http://badge.fury.io/rb/glimmer-dsl-swt)
4
4
  [![Travis CI](https://travis-ci.com/AndyObtiva/glimmer-dsl-swt.svg?branch=master)](https://travis-ci.com/github/AndyObtiva/glimmer-dsl-swt)
@@ -17,9 +17,9 @@ Featured in JRuby Cookbook](http://shop.oreilly.com/product/9780596519650.do) an
17
17
 
18
18
  ![Eclipse SWT RCP NASA Mars Rover](/images/glimmer-eclipse-swt-rcp-nasa-mars-rover.png)
19
19
 
20
- [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) 4.21.2.5 includes [SWT 4.21](https://download.eclipse.org/eclipse/downloads/drops4/R-4.21-202109060500/), which was released on September 6, 2021. Gem version numbers are in sync with the SWT library versions. The first two digits represent the SWT version number. The last two digits represent the minor and patch versions of Glimmer DSL for SWT. Note that SWT now supports AARCH64 on Mac and Linux, but it is not fully tested in Glimmer DSL for SWT yet, so deem its support experimental for the time being without guarantees for functionality until declared otherwise (please report any issues you may encounter).
20
+ [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) 4.22.0.0 includes [SWT 4.22](https://download.eclipse.org/eclipse/downloads/drops4/R-4.22-202111241800/), which was released on November 24, 2021. Gem version numbers are in sync with the SWT library versions. The first two digits represent the SWT version number. The last two digits represent the minor and patch versions of Glimmer DSL for SWT. Note that SWT now supports AARCH64 on Mac and Linux, but it is not fully tested in Glimmer DSL for SWT yet, so deem its support experimental for the time being without guarantees for functionality until declared otherwise (please report any issues you may encounter).
21
21
 
22
- **Starting in version 4.20.0.0, [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) comes with the new [***Shine***](/docs/reference/GLIMMER_GUI_DSL_SYNTAX.md#shine) syntax** for highly intuitive and visually expressive View/Model Attribute Mapping, relying on `<=>` for bidirectional (two-way) data-binding and `<=` for unidirectional (one-way) data-binding, providing an alternative to the `bind` keyword (keep in mind that it is still a beta, so default back to `bind` whenever needed).
22
+ **Starting in version 4.20.0.0, [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) comes with the new [***Shine***](/docs/reference/GLIMMER_GUI_DSL_SYNTAX.md#shine) syntax** for highly intuitive and visually expressive View/Model Attribute Mapping, relying on `<=>` for bidirectional (two-way) data-binding and `<=` for unidirectional (one-way) data-binding, providing an alternative to the `bind` keyword.
23
23
 
24
24
  Please help make [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) better by providing feedback and [contributing](#contributing) whenever possible. Any feature suggestions that are accepted could be implemented within weeks if not days.
25
25
 
@@ -293,10 +293,10 @@ https://www.eclipse.org/swt/faq.php
293
293
 
294
294
  ## Pre-requisites
295
295
 
296
- - JDK 16 (16.0.2) (find at https://www.oracle.com/java/technologies/javase/jdk16-archive-downloads.html / Ensure PATH includes Java bin directory for `jpackage` command to work when packaging Glimmer applications)
296
+ - JDK 17 (17.0.1) (find at https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html / Ensure PATH includes Java bin directory for `jpackage` command to work when packaging Glimmer applications)
297
297
  - [RVM](http://rvm.io) on Mac & Linux (not available on Windows)
298
298
  - JRuby 9.3.1.0 (supporting Ruby 2.6.x syntax) (get via [RVM](http://rvm.io) on Mac and Linux by running `rvm install jruby-9.3.1.0`; On Windows, find at [https://www.jruby.org/download](https://www.jruby.org/download))
299
- - SWT 4.21 (already included in the [glimmer-dsl-swt](https://rubygems.org/gems/glimmer-dsl-swt) gem). Note that SWT now supports AARCH64 on Mac and Linux, but it is not fully tested with Glimmer DSL for SWT yet, so it is considered experimental until declared otherwise.
299
+ - SWT 4.22 (already included in the [glimmer-dsl-swt](https://rubygems.org/gems/glimmer-dsl-swt) gem). Note that SWT now supports AARCH64 on Mac and Linux, but it is not fully tested with Glimmer DSL for SWT yet, so it is considered experimental until declared otherwise.
300
300
  - Git (comes with Mac and Linux. Install on Windows: https://git-scm.com/download/win )
301
301
 
302
302
  Glimmer might still work on other versions of Java, JRuby and SWT, but there are no guarantees, so it is best to stick to the pre-requisites outlined above.
@@ -325,7 +325,7 @@ jgem install glimmer-dsl-swt
325
325
 
326
326
  Or this command if you want a specific version:
327
327
  ```
328
- jgem install glimmer-dsl-swt -v 4.21.2.5
328
+ jgem install glimmer-dsl-swt -v 4.22.0.0
329
329
  ```
330
330
 
331
331
  `jgem` is JRuby's version of `gem` command.
@@ -353,7 +353,7 @@ Note: if you're using activerecord or activesupport, keep in mind that Glimmer u
353
353
 
354
354
  Add the following to `Gemfile`:
355
355
  ```
356
- gem 'glimmer-dsl-swt', '~> 4.21.2.5'
356
+ gem 'glimmer-dsl-swt', '~> 4.22.0.0'
357
357
  ```
358
358
 
359
359
  And, then run:
@@ -367,6 +367,8 @@ You may learn more about other Glimmer related gems ([`glimmer-dsl-opal`](https:
367
367
 
368
368
  ## Glimmer Command
369
369
 
370
+ [docs/reference/GLIMMER_COMMAND.md](docs/reference/GLIMMER_COMMAND.md)
371
+
370
372
  You can use the glimmer command to scaffold new apps, run apps & samples, package native executables, and list Glimmer community gems.
371
373
 
372
374
  ```
@@ -374,7 +376,7 @@ glimmer
374
376
  ```
375
377
 
376
378
  ```
377
- Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.21.2.5
379
+ Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.22.0.0
378
380
 
379
381
  Usage: glimmer [--bundler] [--pd] [--quiet] [--debug] [--log-level=VALUE] [[ENV_VAR=VALUE]...] [[-jruby-option]...] (application.rb or task[task_args]) [[application2.rb]...]
380
382
 
@@ -441,6 +443,8 @@ Learn more at:
441
443
 
442
444
  ## Glimmer GUI DSL Syntax
443
445
 
446
+ [docs/reference/GLIMMER_GUI_DSL_SYNTAX.md](docs/reference/GLIMMER_GUI_DSL_SYNTAX.md)
447
+
444
448
  Here is a listing of supported widgets taken from the [SWT website](https://www.eclipse.org/swt/widgets/):
445
449
 
446
450
  [![SWT Widgets](/images/glimmer-swt-widgets.png)](https://www.eclipse.org/swt/widgets/)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.21.2.5
1
+ 4.22.0.0
@@ -572,6 +572,10 @@ end
572
572
 
573
573
  `sync_exec {}` is required by SWT when running GUI update from a thread other than the GUI thread. In Glimmer, it is automatically invoked for you so that you wouldn't have to worry about it. It works just like `async_exec` except it executes the block synchronously at the earliest opportunity possible, waiting for the block to be finished.
574
574
 
575
+ ##### sync_call
576
+
577
+ `sync_exec {}` is required by SWT when running GUI update from a thread other than the GUI thread. In Glimmer, it is automatically invoked for you so that you wouldn't have to worry about it. It works just like `async_exec` except it executes the block synchronously at the earliest opportunity possible, waiting for the block to be finished.
578
+
575
579
  ##### auto_exec
576
580
 
577
581
  `auto_exec(override_sync_exec:, override_async_exec) {}` only executes code block with `sync_exec` when necessary (running from a thread other than the GUI thread). It is used automatically all over the Glimmer DSL for SWT codebase, so you wouldn't need it unless you grab a direct handle on `swt_widget` from a widget proxy.
@@ -2408,59 +2412,67 @@ The [Glimmer Tetris](/docs/reference/GLIMMER_SAMPLES.md#tetris) sample provides
2408
2412
 
2409
2413
  ### Data-Binding
2410
2414
 
2411
- Data-binding is done with `bind` command following widget property to bind and taking model and bindable attribute as arguments.
2415
+ Data-binding is done with either the [Shine](#shine) syntax `<=>` (bidirectional data-binding) & `<=` (unidirectional data-binding) or via the `bind` keyword, following widget property to bind and taking model and bindable attribute as arguments.
2412
2416
 
2413
2417
  #### General Examples
2414
2418
 
2419
+ `text <=> [contact, :first_name]`
2420
+
2421
+ This example binds the text property of a widget like `label` to the first name of a contact model using Shine data-binding syntax (recommended).
2422
+
2415
2423
  `text bind(contact, :first_name)`
2416
2424
 
2417
- This example binds the text property of a widget like `label` to the first name of a contact model.
2425
+ This example binds the text property of a widget like `label` to the first name of a contact model (older style of data-binding, not recommended).
2418
2426
 
2419
- `text bind(contact, 'address.street')`
2427
+ `text <=> [contact, 'address.street']`
2420
2428
 
2421
2429
  This example binds the text property of a widget like `label` to the nested street of
2422
2430
  the address of a contact. This is called nested property data binding.
2423
2431
 
2424
- `text bind(contact, 'address.street', on_read: :upcase, on_write: :downcase)`
2432
+ `text <=> [contact, 'address.street', on_read: :upcase, on_write: :downcase]`
2425
2433
 
2426
2434
  This example adds on the one above it by specifying converters on read and write of the model property, like in the case of a `text` widget. The text widget will then displays the street upper case and the model will store it lower case. When specifying converters, read and write operations must be symmetric (to avoid an infinite update loop between the widget and the model since the widget checks first if value changed before updating)
2427
2435
 
2428
- `text bind(contact, 'address.street', sync_exec: true)`
2429
-
2430
- This example forces GUI updates via [sync_exec](#sync_exec) assuming they are coming from another thread (different from the GUI thread)
2431
-
2432
- `text bind(contact, 'address.street', async_exec: true)`
2433
-
2434
- This example forces GUI updates via [async_exec](#async_exec) assuming they are coming from another thread (different from the GUI thread)
2435
-
2436
- `text bind(contact, 'address.street', on_read: lambda { |s| s[0..10] })`
2436
+ `text <=> [contact, 'address.street', on_read: ->(s) { s[0..10] }]`
2437
2437
 
2438
2438
  This example also specifies a converter on read of the model property, but via a lambda, which truncates the street to 10 characters only. Note that the read and write operations are assymetric. This is fine in the case of formatting data for a read-only widget like `label`
2439
2439
 
2440
2440
  `text bind(contact, 'address.street') { |s| s[0..10] }`
2441
2441
 
2442
- This is a block shortcut version of the syntax above it. It facilitates formatting model data for read-only widgets since it's a very common view concern. It also saves the developer from having to create a separate formatter/presenter for the model when the view can be an active view that handles common simple formatting operations directly.
2442
+ This is a block shortcut version of the syntax above it. It facilitates formatting model data for read-only widgets since it's a very common view concern. It also saves the developer from having to create a separate formatter/presenter for the model when the view can be an active view that handles common simple formatting operations directly (older style of data-binding, not recommended).
2443
2443
 
2444
- `text bind(contact, 'address.street', read_only: true)`
2444
+ `text <= [contact, 'address.street']`
2445
2445
 
2446
2446
  This is read-ohly data-binding. It doesn't update contact.address.street when widget text property is changed.
2447
2447
 
2448
- `text bind(contact, 'addresses[1].street')`
2448
+ `text bind(contact, 'address.street', read_only: true)`
2449
+
2450
+ This is read-ohly data-binding. It doesn't update contact.address.street when widget text property is changed (older style of data-binding, not recommended).
2451
+
2452
+ `text <=> [contact, 'addresses[1].street']`
2449
2453
 
2450
2454
  This example binds the text property of a widget like `label` to the nested indexed address street of a contact. This is called nested indexed property data binding.
2451
2455
 
2452
- `text bind(contact, :age, computed_by: :date_of_birth)`
2456
+ `text <=> [contact, :age, computed_by: :date_of_birth]`
2453
2457
 
2454
2458
  This example demonstrates computed value data binding whereby the value of `age` depends on changes to `date_of_birth`.
2455
2459
 
2456
- `text bind(contact, :name, computed_by: [:first_name, :last_name])`
2460
+ `text <=> [contact, :name, computed_by: [:first_name, :last_name]]`
2457
2461
 
2458
2462
  This example demonstrates computed value data binding whereby the value of `name` depends on changes to both `first_name` and `last_name`.
2459
2463
 
2460
- `text bind(contact, 'profiles[0].name', computed_by: ['profiles[0].first_name', 'profiles[0].last_name'])`
2464
+ `text <=> [contact, 'profiles[0].name', computed_by: ['profiles[0].first_name', 'profiles[0].last_name']]`
2461
2465
 
2462
2466
  This example demonstrates nested indexed computed value data binding whereby the value of `profiles[0].name` depends on changes to both nested `profiles[0].first_name` and `profiles[0].last_name`.
2463
2467
 
2468
+ `text <=> [contact, 'address.street', sync_exec: true]`
2469
+
2470
+ This example forces GUI updates via [sync_exec](#sync_exec) assuming they are coming from another thread (different from the GUI thread)
2471
+
2472
+ `text <=> [contact, 'address.street', async_exec: true]`
2473
+
2474
+ This example forces GUI updates via [async_exec](#async_exec) assuming they are coming from another thread (different from the GUI thread)
2475
+
2464
2476
  Example from [samples/hello/hello_combo.rb](samples/hello_combo.rb) sample (you may copy/paste in [`girb`](GLIMMER_GIRB.md)):
2465
2477
 
2466
2478
  #### Shine
Binary file
@@ -49,7 +49,7 @@ module Glimmer
49
49
  def call(value)
50
50
  SWT::DisplayProxy.instance.auto_exec(override_sync_exec: @sync_exec, override_async_exec: @async_exec) do
51
51
  if @widget.respond_to?(:disposed?) && @widget.disposed?
52
- deregister_all_observables
52
+ deregister_all_observables unless @widget.shell_proxy.last_shell_closing?
53
53
  return
54
54
  end
55
55
  # need the rescue false for a scenario with tree items not being equal to model objects raising an exception
@@ -61,7 +61,7 @@ module Glimmer
61
61
 
62
62
  def evaluate_property
63
63
  if @widget.respond_to?(:disposed?) && @widget.disposed?
64
- deregister_all_observables
64
+ deregister_all_observables unless @widget.shell_proxy.last_shell_closing?
65
65
  return
66
66
  end
67
67
  @widget.get_attribute(@property)
@@ -0,0 +1,38 @@
1
+ # Copyright (c) 2007-2021 Andy Maleh
2
+ #
3
+ # Permission is hereby granted, free of charge, to any person obtaining
4
+ # a copy of this software and associated documentation files (the
5
+ # "Software"), to deal in the Software without restriction, including
6
+ # without limitation the rights to use, copy, modify, merge, publish,
7
+ # distribute, sublicense, and/or sell copies of the Software, and to
8
+ # permit persons to whom the Software is furnished to do so, subject to
9
+ # the following conditions:
10
+ #
11
+ # The above copyright notice and this permission notice shall be
12
+ # included in all copies or substantial portions of the Software.
13
+ #
14
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
+
22
+ require 'glimmer/dsl/static_expression'
23
+ require 'glimmer/dsl/swt/exec_expression'
24
+
25
+ module Glimmer
26
+ module DSL
27
+ module SWT
28
+ # Synchronously executes code block against the SWT Event Loop
29
+ # to manipulate SWT UI objects on the UI thread safely with
30
+ # immediate priority when needed.
31
+ #
32
+ # Returns the value produced by evaluating the expression.
33
+ class SyncCallExpression < StaticExpression
34
+ include ExecExpression
35
+ end
36
+ end
37
+ end
38
+ end
@@ -25,6 +25,8 @@ require 'os'
25
25
  module Glimmer
26
26
  module RakeTask
27
27
  module Package
28
+ JDK_VERSION = '17.0.1'
29
+
28
30
  class << self
29
31
  attr_accessor :jpackage_extra_args
30
32
 
@@ -90,10 +92,10 @@ module Glimmer
90
92
  def native(native_type=nil, native_extra_args)
91
93
  puts "Generating native executable with jpackage..."
92
94
  java_version = `jruby -v`
93
- if java_version.include?('16.0.2')
94
- puts "Java Version 16.0.2 Detected!"
95
+ if java_version.include?(JDK_VERSION)
96
+ puts "Java Version #{JDK_VERSION} Detected!"
95
97
  else
96
- puts "WARNING! Glimmer Packaging Pre-Requisite Java Version 16.0.2 Is Not Found!"
98
+ puts "WARNING! Glimmer Packaging Pre-Requisite Java Version #{JDK_VERSION} Is Not Found!"
97
99
  end
98
100
  require 'facets/string/titlecase'
99
101
  require 'facets/string/underscore'
@@ -109,8 +109,10 @@ module Glimmer
109
109
  end
110
110
 
111
111
  def deregister_shape_painting
112
- @paint_listener_proxy&.deregister
113
- @resize_listener_proxy&.deregister
112
+ unless shell_proxy.last_shell_closing?
113
+ @paint_listener_proxy&.deregister
114
+ @resize_listener_proxy&.deregister
115
+ end
114
116
  end
115
117
 
116
118
  def setup_shape_painting
@@ -88,7 +88,7 @@ module Glimmer
88
88
  end
89
89
  on_widget_disposed do
90
90
  @last_shell_closing = true if @display.shells.count == 1 && @display.shells.first == @swt_widget
91
- clear_shapes
91
+ clear_shapes unless @last_shell_closing
92
92
  end
93
93
  @display ||= @swt_widget.getDisplay
94
94
  end
@@ -175,8 +175,10 @@ module Glimmer
175
175
  @keyword = underscored_widget_name.to_s
176
176
  if respond_to?(:on_widget_disposed)
177
177
  on_widget_disposed {
178
- clear_shapes
179
- deregister_shape_painting
178
+ unless shell_proxy.last_shell_closing?
179
+ clear_shapes
180
+ deregister_shape_painting
181
+ end
180
182
  }
181
183
  end
182
184
  end
@@ -199,7 +201,11 @@ module Glimmer
199
201
  end
200
202
 
201
203
  def shell_proxy
202
- @swt_widget.shell.get_data('proxy')
204
+ if @swt_widget.respond_to?(:shell)
205
+ @swt_widget.shell.get_data('proxy')
206
+ else
207
+ @parent_proxy&.shell_proxy
208
+ end
203
209
  end
204
210
 
205
211
  def extract_args(underscored_widget_name, args)
@@ -188,8 +188,10 @@ module Glimmer
188
188
  auto_exec { execute_hook('after_body') }
189
189
  auto_exec do
190
190
  @dispose_listener_registration = @body_root.on_widget_disposed do
191
- observer_registrations.compact.each(&:deregister)
192
- observer_registrations.clear
191
+ unless @body_root.shell_proxy.last_shell_closing?
192
+ observer_registrations.compact.each(&:deregister)
193
+ observer_registrations.clear
194
+ end
193
195
  end
194
196
  end
195
197
  post_add_content if content.nil?
@@ -54,10 +54,18 @@ class Battleship
54
54
 
55
55
  rectangle(0, 0, [:max, -1], [:max, -1])
56
56
  oval(:default, :default, 10, 10) {
57
- foreground <= [model, :hit, on_read: ->(h) {h == nil ? COLOR_EMPTY : (h ? COLOR_HIT : COLOR_NO_HIT)}]
57
+ if model.nil?
58
+ foreground COLOR_EMPTY
59
+ else
60
+ foreground <= [model, :hit, on_read: ->(h) {h == nil ? COLOR_EMPTY : (h ? COLOR_HIT : COLOR_NO_HIT)}]
61
+ end
58
62
  }
59
63
  oval(:default, :default, 5, 5) {
60
- background <= [model, :hit, on_read: ->(h) {h == nil ? COLOR_EMPTY : (h ? COLOR_HIT : COLOR_NO_HIT)}]
64
+ if model.nil?
65
+ background COLOR_EMPTY
66
+ else
67
+ background <= [model, :hit, on_read: ->(h) {h == nil ? COLOR_EMPTY : (h ? COLOR_HIT : COLOR_NO_HIT)}]
68
+ end
61
69
  }
62
70
 
63
71
  on_mouse_move do |event|
Binary file
Binary file
Binary file
Binary file
Binary file
metadata CHANGED
@@ -1,21 +1,21 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glimmer-dsl-swt
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.21.2.5
4
+ version: 4.22.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Maleh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-03 00:00:00.000000000 Z
11
+ date: 2021-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
15
15
  requirements:
16
16
  - - "~>"
17
17
  - !ruby/object:Gem::Version
18
- version: 2.5.1
18
+ version: 2.5.4
19
19
  name: glimmer
20
20
  prerelease: false
21
21
  type: :runtime
@@ -23,7 +23,7 @@ dependencies:
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 2.5.1
26
+ version: 2.5.4
27
27
  - !ruby/object:Gem::Dependency
28
28
  requirement: !ruby/object:Gem::Requirement
29
29
  requirements:
@@ -466,6 +466,7 @@ files:
466
466
  - lib/glimmer/dsl/swt/shell_expression.rb
467
467
  - lib/glimmer/dsl/swt/shine_data_binding_expression.rb
468
468
  - lib/glimmer/dsl/swt/swt_expression.rb
469
+ - lib/glimmer/dsl/swt/sync_call_expression.rb
469
470
  - lib/glimmer/dsl/swt/sync_exec_expression.rb
470
471
  - lib/glimmer/dsl/swt/tab_item_expression.rb
471
472
  - lib/glimmer/dsl/swt/table_items_data_binding_expression.rb