glimmer-dsl-swt 4.24.4.2 → 4.24.4.3

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: 3a089b978fce806c9396adb1f971c4ba8f5344f0b927e8781c6a6985d9c234d2
4
- data.tar.gz: 82e0a576ebf56dd83bafda03378aec4cee32cfa0de1d2bf61bc247c2c33562a1
3
+ metadata.gz: 1b47f7d900d7e9e17d688b2a87f6996e2a4e23f2aec2139b7d5efc03fc1837d7
4
+ data.tar.gz: 0dd67034463fa4193ebbb4c064f6d2dccfd26dde29d326fef69b8a12b80a04a6
5
5
  SHA512:
6
- metadata.gz: 620cc756c24723f0e7443055b9f156e71a7312e07093142dc606f16692af7cd7f37eb97294586bbf79239ccd9fc3c34c9fb107efd28eb5713a287dd882ad1b48
7
- data.tar.gz: 6c954efcf5550479ab13ef3f21b1f68f3f1ab32823fe638ef13618c5e3c12292f1d1fbb8ed42d2158a480a344ac64c12f2f87d8b96deeadda7373302e01167fb
6
+ metadata.gz: 5737d7b9ad280998dfe94b4e4df7879ee48ff805c2abb0bb1626a3d688684371c2aca03c0da8eb27e2011a4ab26e58f3e4c3a44154056d7197a66acfb89ef4c1
7
+ data.tar.gz: 05e8484a449adcbd19a4f1b4ba8644614032a272ec957770bbbc1c11cdbea8299fdeaed0ebcbf42df493280782d6b425ec4d967dca8f967a6fc1a1a95dbaeff2
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Change Log
2
2
 
3
+ ## 4.24.4.3
4
+
5
+ - Fix issue with failed `table` extra property data-binding (e.g. foreground color, background color) due to asynchronous multi-threading optimization (now it works).
6
+
3
7
  ## 4.24.4.2
4
8
 
5
9
  - `refined_table` filtering support
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.24.4.2
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.24.4.3
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)
@@ -21,7 +21,7 @@ Featured in JRuby Cookbook](http://shop.oreilly.com/product/9780596519650.do) an
21
21
 
22
22
  ![Eclipse SWT RCP NASA Mars Rover](/images/glimmer-eclipse-swt-rcp-nasa-mars-rover.png)
23
23
 
24
- [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) 4.24.4.2 includes [SWT 4.24](https://download.eclipse.org/eclipse/downloads/drops4/R-4.24-202206070700/), which was released on June 7, 2022. 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.
24
+ [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) 4.24.4.3 includes [SWT 4.24](https://download.eclipse.org/eclipse/downloads/drops4/R-4.24-202206070700/), which was released on June 7, 2022. 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.
25
25
 
26
26
  **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. That was [originally conceived back in 2007](https://andymaleh.blogspot.com/2007/12/data-shining-in-glimmer.html).
27
27
 
@@ -338,7 +338,7 @@ jgem install glimmer-dsl-swt
338
338
 
339
339
  Or this command if you want a specific version:
340
340
  ```
341
- jgem install glimmer-dsl-swt -v 4.24.4.2
341
+ jgem install glimmer-dsl-swt -v 4.24.4.3
342
342
  ```
343
343
 
344
344
  `jgem` is JRuby's version of `gem` command.
@@ -366,7 +366,7 @@ Note: if you're using activerecord or activesupport, keep in mind that Glimmer u
366
366
 
367
367
  Add the following to `Gemfile`:
368
368
  ```
369
- gem 'glimmer-dsl-swt', '~> 4.24.4.2'
369
+ gem 'glimmer-dsl-swt', '~> 4.24.4.3'
370
370
  ```
371
371
 
372
372
  And, then run:
@@ -389,7 +389,7 @@ glimmer
389
389
  ```
390
390
 
391
391
  ```
392
- Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.24.4.2
392
+ Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.24.4.3
393
393
 
394
394
  Usage: glimmer [--bundler] [--pd] [--quiet] [--debug] [--log-level=VALUE] [[ENV_VAR=VALUE]...] [[-jruby-option]...] (application.rb or task[task_args]) [[application2.rb]...]
395
395
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.24.4.2
1
+ 4.24.4.3
@@ -4320,7 +4320,7 @@ Options:
4320
4320
  - `page` (default: `1` if table is filled and `0` otherwise): specifies initial page
4321
4321
  - `query` (default: `''`): specifies filter query term (empty shows all results)
4322
4322
 
4323
- Note that currently `refined_table` only supports displaying a **read-only** table (meaning it can read updates from the model, but it cannot write back to the model through `TableEditor` cells).
4323
+ Note that currently `refined_table` only supports displaying a **read-only** table (meaning it can read updates from the model, but it cannot write back to the model through `TableEditor` cells). Also, it does not support selection or sorting by clicking columns yet.
4324
4324
 
4325
4325
  Example taken from [Hello, Refined Table!](/docs/reference/GLIMMER_SAMPLES.md#hello-refined-table):
4326
4326
 
Binary file
@@ -86,6 +86,8 @@ module Glimmer
86
86
  @model_observer_registrations ||= {}
87
87
  @table_item_property_observation_mutex ||= Mutex.new
88
88
 
89
+ brand_new_model_collection = !same_model_collection_with_different_sort?(new_model_collection)
90
+
89
91
  Thread.new do
90
92
  @data_binding_done = false
91
93
  @table_item_property_observation_mutex.synchronize do
@@ -100,7 +102,7 @@ module Glimmer
100
102
  end
101
103
  end
102
104
 
103
- if !same_model_collection_with_different_sort?(new_model_collection)
105
+ if brand_new_model_collection
104
106
  new_model_collection.each_with_index do |model, model_index|
105
107
  TABLE_ITEM_PROPERTIES.each do |table_item_property|
106
108
  @column_properties.each do |column_property|
@@ -220,13 +222,7 @@ module Glimmer
220
222
  end
221
223
 
222
224
  def table_item_model_collection
223
- Glimmer::SWT::DisplayProxy.instance.auto_exec do
224
- if @table.disposed?
225
- []
226
- else
227
- @table.swt_widget.items.map(&:get_data)
228
- end
229
- end
225
+ @table.swt_widget.items.map(&:get_data)
230
226
  end
231
227
 
232
228
  def deregister_model_observer_registrations
@@ -23,7 +23,7 @@ class KlondikeSolitaire
23
23
  else
24
24
  @game.dealt_pile.push!(playing_card)
25
25
  end
26
- end
26
+ end
27
27
 
28
28
  def playing_cards
29
29
  @playing_cards ||= []
@@ -27,7 +27,6 @@ class KlondikeSolitaire
27
27
  card_source_model = card_parent_pile.model
28
28
  cards = card_source_model.remove!(card)
29
29
  cards[1..-1].each { |card| model.add!(card) } if cards.is_a?(Array) # if it is a column pile
30
- drop_event.dragged_shape.dispose
31
30
  rescue => e
32
31
  Glimmer::Config.logger.debug { "Error encountered on drop of a card to a column pile: #{e.full_message}" }
33
32
  drop_event.doit = false
@@ -28,6 +28,10 @@ class KlondikeSolitaire
28
28
  body {
29
29
  shape(pile_x, pile_y) {
30
30
  hidden_playing_card
31
+
32
+ on_mouse_up do |event|
33
+ model.deal!
34
+ end
31
35
  }
32
36
  }
33
37
 
@@ -18,11 +18,9 @@ class KlondikeSolitaire
18
18
  empty_playing_card
19
19
  }
20
20
  else
21
- body_root.shapes.each { |shape| shape.drag_source = false }
22
21
  before_last_shape = body_root.shapes[-2] && body_root.shapes[-2].get_data('custom_shape').respond_to?(:model) && body_root.shapes[-2].get_data('custom_shape').model
23
22
  if model.playing_cards.last == before_last_shape # happens when dragging card out
24
23
  body_root.shapes.last.dispose
25
- body_root.shapes.last.drag_source = true
26
24
  else
27
25
  body_root.content {
28
26
  playing_card(model: model.playing_cards.last, parent_pile: self) {
@@ -42,7 +42,6 @@ class KlondikeSolitaire
42
42
  raise 'Cannot accept multiple cards' if card_source_model.playing_cards.index(card) != (card_source_model.playing_cards.size - 1)
43
43
  model.add!(card)
44
44
  card_source_model.remove!(card)
45
- drop_event.dragged_shape.dispose
46
45
  rescue => e
47
46
  Glimmer::Config.logger.debug { "Error encountered on drop of a card to a foundation pile: #{e.full_message}" }
48
47
  drop_event.doit = false
@@ -27,12 +27,6 @@ class KlondikeSolitaire
27
27
  @column_piles = 7.times.map do |n|
28
28
  column_pile(pile_x: MARGIN + n*(PLAYING_CARD_WIDTH + PLAYING_CARD_SPACING), pile_y: PLAYING_CARD_HEIGHT + PLAYING_CARD_SPACING, model: game.column_piles[n])
29
29
  end
30
-
31
- on_mouse_up do |event|
32
- if @dealing_pile.body_root.include?(event.x, event.y)
33
- game.dealing_pile.deal!
34
- end
35
- end
36
30
  }
37
31
  }
38
32
 
@@ -1,3 +1,24 @@
1
+ # Copyright (c) 2007-2022 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
+
1
22
  require 'glimmer-dsl-swt'
2
23
 
3
24
  require_relative 'klondike_solitaire/model/game'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glimmer-dsl-swt
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.24.4.2
4
+ version: 4.24.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Maleh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-11 00:00:00.000000000 Z
11
+ date: 2022-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement