Path: csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Jeff Higgins Newsgroups: comp.lang.c,comp.lang.java.programmer Subject: Re: Self-updating relationship Date: Thu, 03 Sep 2015 01:22:26 -0400 Organization: A noiseless patient Spider Lines: 34 Message-ID: References: <55E766BD.3060303@verizon.net> <55E77D04.6080200@verizon.net> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Thu, 3 Sep 2015 05:22:03 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="a78aad8b483612fbf45d18e918df0cca"; logging-data="5784"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18W/x3qLPh0J/d6cewPVRqPtiDdTBlbLLk=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.8.0 In-Reply-To: Cancel-Lock: sha1:+vxARPFeytAKAKe7/9a9Bi3FVwQ= Xref: csiph.com comp.lang.c:69054 comp.lang.java.programmer:32486 On 09/02/2015 11:38 PM, Jeff Higgins wrote: > import javafx.beans.property.IntegerProperty; > import javafx.beans.property.SimpleIntegerProperty; > > public class Main > { public static void main(String[] args) > { > > final IntegerProperty height > = new SimpleIntegerProperty(); > > final IntegerProperty number > = new SimpleIntegerProperty(); > > final IntegerProperty spaces > = new SimpleIntegerProperty(); > > spaces.bind(height.subtract(number)); > > height.set(10); > number.set(2); > System.out.print(spaces.get()); // 8 > > spaces.unbind(); > height.set(20); > System.out.print(spaces.get()); // 8 > > } } So, if I take spaces to be a spreadsheet cell with an Observable value it's a pretty simple matter to bind it to any of my CellFormula(s) which are also Observable values of a type compatible with the spaces cell.