Skip to content

Commit

Permalink
Fixing FXML references to behave like java
Browse files Browse the repository at this point in the history
  • Loading branch information
byteit101 committed May 8, 2013
1 parent 6ac05e1 commit 5203817
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/fxmlloader/elts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,8 @@ def resolvePrefixedValue(aValue)
return nil;
end
dputs callz + "Getting expression '#{aValue}'"
q = KeyPath.parse(aValue).map{|i|parentLoader.namespace[i]}
# remove all nils, them add one in at the end so [0] returns nil if empty
q = (KeyPath.parse(aValue).map{|i|parentLoader.namespace[i]} - [nil] + [nil])[0]
dputs callz + "Parsed Expression! #{q};;;;#{q.inspect}"
return q
end
Expand Down
2 changes: 1 addition & 1 deletion lib/fxmlloader/j8_keypath.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def to_s
@elements.length.times do |i|
element = @elements[i]

if (java.lang.Character.isDigit(element[0].ord))
if (java.lang.Character.java_send(:isDigit, [Java::char], element[0].ord))
stringBuilder.append("[");
stringBuilder.append(element);
stringBuilder.append("]");
Expand Down

0 comments on commit 5203817

Please sign in to comment.