glimmer-dsl-swt 4.20.2.0 → 4.20.2.1

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: 833c707b308578391e1ce4676ed517d6297250cb9272f6f3c7539c2b538403c6
4
- data.tar.gz: 9f9bc412c837ba8389333587638638b95534634464f5084e9471de028747dc9e
3
+ metadata.gz: ba041a49dabbc3bbe0b3ac98cb5ba113b386087149563a331290fba998a45887
4
+ data.tar.gz: 042ea65040e8b874f8477fa87266ae48c88affd922b824f64e1ab891b28f85ff
5
5
  SHA512:
6
- metadata.gz: f46c2d58b167cd75c807fce955eae9a1abc6895414311b93fdf6950d54c8fc14f15384dd8a19bfef0f2503e2f732c73e79e342e9d03d7f9a69990844dacc9c81
7
- data.tar.gz: 9e41adb252a09d397cb1b81cf91c9a37e89c95fdbf00b74134d38baaaac920ed74396df92b926e593b5ba4ae9005a7b43b3d64f4aec5576ef0ae237c0de35db2
6
+ metadata.gz: 755a71479d44c7bcb3efd6a4f4ae1e0c6d378f25374584bca4f1fe7ede096d683b6770016eb4566bbacb2c40bf2b64300846e57408cf0ca5745910bba68801ac
7
+ data.tar.gz: 75617372b2e04e5064cfa0a408504e43a4defd25194f1b16f27a91ca8275865dd3337ac76397087ac74e9878f51d194d7626c227509b9ac93a823a14faba0a4f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Change Log
2
2
 
3
+ ### 4.20.2.1
4
+
5
+ - Shine data-binding support for `animation` (also supporting `#content {}` method in `Animation`)
6
+ - Update Hello, Custom Shell! to use Shine data-binding syntax
7
+ - Fix `table` automatic sorting support when using one-way Shine data-binding syntax (which was disabling reads)
8
+
3
9
  ### 4.20.2.0
4
10
 
5
11
  - Shine data-binding syntax support for `tree` widget
data/README.md CHANGED
@@ -290,6 +290,12 @@ SWT supports Canvas graphics drawing, and Glimmer takes that further by provding
290
290
 
291
291
  Audio is supported via the Java Sound library in a cross-platform approach and video is supported via a Glimmer custom widget, so any Glimmer app can be enhanced with audio and video where needed.
292
292
 
293
+ ### Remaining Challenges
294
+
295
+ Startup time is long. Thankfully, [there are work-arounds](https://andymaleh.blogspot.com/2021/03/glimmer-dsl-for-swt-41900-halved.html) that could make apps start as fast as instantly.
296
+
297
+ Contributors who appreciate Glimmer's ultra-high productivity, maintainability, and extensibility might want to help report and resolve remaining challenges in its software architecture.
298
+
293
299
  ## Platform Support
294
300
 
295
301
  Glimmer runs on the following platforms:
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.20.2.0
1
+ 4.20.2.1
Binary file
@@ -51,6 +51,8 @@ module Glimmer
51
51
  else # || other.is_a?(Hash) # TODO support hash e.g. {model: model_obj, attribute: :some_attribute, more-options...}
52
52
  args_clone << {read_only: true}
53
53
  end
54
+ # remove read_only from table to allow automatic sorting (but it remains non-editable)
55
+ args_clone.last[:read_only] = false if @parent.is_a?(Glimmer::SWT::TableProxy) # TODO consider a polymorphic way to perform this
54
56
  @parent.content {
55
57
  send(@parent_attribute, bind(*args_clone))
56
58
  }
@@ -35,7 +35,7 @@ module Glimmer
35
35
  args.size == 0 and
36
36
  block.nil? and
37
37
  (
38
- (parent.respond_to?(:set_attribute) and parent.respond_to?(:has_attribute?) and parent.has_attribute?(keyword)) or
38
+ (parent.respond_to?(:has_attribute?) and parent.has_attribute?(keyword)) or
39
39
  (parent.respond_to?(:swt_widget) and (parent.swt_widget.is_a?(Table) or parent.swt_widget.is_a?(Tree)))
40
40
  ) and
41
41
  !parent.is_a?(Glimmer::UI::CustomWidget) and
@@ -99,6 +99,12 @@ module Glimmer
99
99
  end
100
100
  end
101
101
 
102
+ def content(&block)
103
+ Glimmer::SWT::DisplayProxy.instance.auto_exec do
104
+ Glimmer::DSL::Engine.add_content(self, Glimmer::DSL::SWT::AnimationExpression.new, 'animation', &block)
105
+ end
106
+ end
107
+
102
108
  # Starts an animation that is indefinite or has never been started before (i.e. having `started: false` option).
103
109
  # Otherwise, resumes a stopped animation that has not been completed.
104
110
  def start
@@ -132,7 +132,7 @@ class ContactManager
132
132
  width 200
133
133
  }
134
134
 
135
- items bind(@contact_manager_presenter, :results), column_properties(:first_name, :last_name, :email)
135
+ items <=> [@contact_manager_presenter, :results, column_properties: [:first_name, :last_name, :email]]
136
136
 
137
137
  on_mouse_up { |event|
138
138
  table_proxy.edit_table_item(event.table_item, event.column_index)
@@ -49,7 +49,7 @@ class HelloAnimationDataBinding
49
49
  selection <=> [self, :delay_time, on_read: ->(v) {(BigDecimal(v.to_s)*1000).to_f}, on_write: ->(v) {(BigDecimal(v.to_s)/1000).to_f}]
50
50
  }
51
51
  animation {
52
- every bind(self, :delay_time)
52
+ every <= [self, :delay_time]
53
53
 
54
54
  frame { |index|
55
55
  background rgb(index%100, index%100 + 100, index%55 + 200)
@@ -138,7 +138,7 @@ class HelloCustomShell
138
138
  width 360
139
139
  }
140
140
 
141
- items bind(@email_system, :emails), column_properties(:date, :subject, :from)
141
+ items <= [@email_system, :emails, column_properties: [:date, :subject, :from]]
142
142
 
143
143
  on_mouse_up { |event|
144
144
  email = event.table_item.get_data
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glimmer-dsl-swt
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.20.2.0
4
+ version: 4.20.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Maleh