Bound with inverse problem

In the code below, model variable is initialized to "abc". It is bound to tbox with inverse. So when prgram runs, the string "abc" is expected in text box but it does not appear unless a key is pressed on the text box.
Normally in the program, data is already available on client. When I show a UI which is bound to data in memory, the data is expected to be displayed in the UI. How can this be achieved?
thanks for help
~ Tushar
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.ext.swing.SwingButton;
import javafx.scene.control.TextBox;
var model : String = "abc";
public class Test {
public var button : SwingButton = SwingButton {
text: "Button"
translateX: 50 translateY: 80
action:
function() {
println("model = {model}");
model="cde";
public var tbox : TextBox = TextBox { text: bind model with inverse
translateX: 50 translateY: 120
function run() {
var test : Test = Test {};
Stage {
title : "MyApp"
scene: Scene {
width: 400
height: 400
content: [ test.button, test.tbox ]
}

Can you use SwingTextField instead? It seems to work without the TextBox bug.
var myText: String = "Hello world";
var myText2: String = "Hello again";
Stage {
    title: "Application title"
    width: 250
    height: 80
    scene: Scene {
        content: HBox{
            content:[SwingTextField {
                    columns: 10
                    text: bind myText with inverse
                    editable: true
                },TextBox {
                    text: bind myText2 with inverse
                    columns: 12
                    selectOnFocus: true
}

Similar Messages

  • Check Mandatory Fields when state is bound with context attribute

    Hello All,
    Currently i am facing  problem in my SAP SRM 7.0 standard component.
    Actually, i have to remove  mandatory(State = Required) for one of my inputfileds for this I have written below code, but it has been  remove only Red mark * infront of Inputfield, after that, i am trying to save other data, still it is asking me enter the required value.
         here my input field  bound with Context attribute, it is standard attribute.
    data:lo_input1 type ref to cl_wd_input_field.
       lo_input1 ?= VIEW->get_element( 'NAME_FIRST' ).
       lo_input1->set_state( '00' ).
    I am trying to delete state = required property from below component and view
    Component Name : /SAPSRM/WDC_MOFC_PERSON
           View  :  V_PERSON
    Can you help me on this?
    Thanks
    Sandeep.

    Hi Baskaran ,
    Thanks for ur reply ..
    Eveen in that component they have not used cl_wd_dynamic_tool class for mandatory attributes
    I want to share another thing with u that is
    I am trying it in another way
    with the following code which i have done in post exit  is
    let me explain u what i did
    __first of all i got the child node of rootuielementcontaine
    later
    i get the childnode of container_left and assigned it to another class of ref cl_wd_uielemnent
    now where i have struked is
    *CALL METHOD LR_CHILD2->GET_CHILD
    EXPORTING
       ID        = 'FORM_OF_ADDRESS_DROPDOWN'
       INDEX     =
    RECEIVING
       THE_CHILD = LR_C1.
    what the error i am getting is
    OBJECTS_OBJREF_NOT_ASSIGNED
    Please correct me if there is any wrong inn the code ...
    FORM_OF_ADDRESS_DROPDOWN--->ui element dropdown
    r__ DATA lr_container TYPE REF TO cl_wd_uielement_container.
    DATA lt_children  TYPE        cl_wd_uielement=>tt_uielement.
    DATA lr_view      TYPE REF TO if_wd_view.
    DATA lr_child     TYPE REF TO cl_wd_uielement.
       DATA lr_child1     TYPE REF TO cl_wd_uielement.
       DATA lr_child2     TYPE REF TO cl_wd_uielement.
    data : LR_CON1 TYPE REF TO CL_WD_TRANSPARENT_CONTAINER.
    data : LR_CON2 TYPE REF TO CL_WD_TRANSPARENT_CONTAINER.
    SANDEEP
    lr_container ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).
    lt_children = lr_container->get_children( ).
    CALL METHOD lr_container->get_child
       EXPORTING
         id        = 'DATACONTAINER'
         index     = 1
       RECEIVING
         the_child = lr_CHILD.
    LR_CON1 ?= LR_CHILD.
    CALL METHOD LR_CON1->GET_CHILD
      EXPORTING
        ID        = 'CONTAINER_LEFT'
        INDEX     = 1
      RECEIVING
        THE_CHILD = LR_CHILD1 .
    DATA : LR_CHILD2 TYPE REF TO CL_WD_TRANSPARENT_CONTAINER.
    LR_CHILD2 ?= LR_CHILD1 .
    *DATA : LR_C1 TYPE REF TO CL_WD_UIELEMENT.
    *CALL METHOD LR_CHILD2->GET_CHILD
    EXPORTING
       ID        = 'FORM_OF_ADDRESS_DROPDOWN'
       INDEX     =
    RECEIVING
       THE_CHILD = LR_C1.
    *DATA : LR_DD TYPE REF TO CL_WD_DROPDOWN_BY_KEY .
    *LR_DD ?= LR_C1 .
    *CALL METHOD LR_DD->SET_STATE
    EXPORTING
       VALUE  = '00'
    sandeep

  • Bind with inverse warning

    hi,
    To learn how the bidirectional binding works I made a couple of small snippets based on a textfield and a button. The objective is that with both editing and clicking on the button the string str changes. The button can be seen as the model that changes the value of the var in the other direction.
    (println is just for debug)
    This works:
    var str = "" on replace{
      println (str)
    mainStage.scene.content = [
    TextBox {
         text: bind str with inverse
         columns: 12
         selectOnFocus: true
    SwingButton {
            translateX:50
         text: "ok"
         action: function() { str = "hello" }
    ]I made an object containing a string which also works:
    class test{
        var str = "" on replace {
            println (str)
    def mytest = test{ };
    mainStage.scene.content = [
    TextBox {
         text: bind mytest.str with inverse
         columns: 12
         selectOnFocus: true
    SwingButton {
            translateX:50
         text: "ok"
         action: function() { mytest.str = "hello" }
    ]Finally I tried to go one level further and made the string come from another object this works but I get a warning:
    class test{
        var t : test1 = test1{} ;
    class test1{
        var str = "" on replace {
            println (str)
    def mytest = test{};
    mainStage.scene.content = [
    TextBox {
         text: bind mytest.t.str with inverse
         columns: 12
         selectOnFocus: true
    SwingButton {
            translateX:50
         text: "ok"
         action: function() { mytest.t.str = "hello" }
    warning: Target of variable select expression is not re-evaluated for bind with inverse. You may want to rewrite like the following:
    def obj = <expression-without-bind>;
    def x = bind obj.variableName with inverse;
            text: bind mytest.t.str with inverseWhen I change the var t into def this doesn't solve the warning. And it's needed to have the str variable as a var because in real apps this will be coming from the model logic that changes this value. So why showing this warning anyway , I used def for mytest object so that the actual object can't be changed ?
    Edited by: guyvo on Jan 9, 2010 9:39 PM

    hi stuart,
    Thanks for reading and give your comments. I red a few of your blogs , interesting stuff and yes maybe you must write one dedicated on the bind with inverse !
    In my app the model is mapped from XML fields into a few class objects. I instantiate these classes at startup and then read and parse my XML data into my objects. The objects will remain living until the script exits. As I bind my view with the model classes and visa versa with a double bind inverse, I think I can be pretty sure these wont garbage collected because of the double links.
    Make sense that the "def temp" is only a local variable of the HorizontalBar and becomes no part of the class declaration itself. I just use this def to avoid the warning.
    I even tried to add a function with a variable when creating the object without a problem although kind a useless :
    HorizontalBar {
                        var y;
                        function foo (){ y = 10;};
                        disable:bind dis;
                        def temp = c.light[j];
    width: 200
    height: 20
    posx: 10
    posy: 10 + y
    valmodel: bind temp.ivalue with inverse
    -G                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • My iPhone 6 ear speaker is not working properly I couldn't able to hear any thing from ear speaker to lissen I had to put on loud speaker or to use handsfree please help me out with this problem if some body have answer?

    My iPhone 6 ear speaker is not working properly I couldn't able to hear any thing from ear speaker to listen I had to put on loud speaker or to use hands free please help me out with this problem if some body have answer?

    Hi Venkata from NZ,
    If you are having an issue with the speaker on your iPhone, I would suggest that you troubleshoot using the steps in this article - 
    If you hear no sound or distorted sound from your iPhone, iPad, or iPod touch speaker - Apple Support
    Thanks for using Apple Support Communities.
    Best,
    Brett L 

  • HT1386 I just reinstalled my windows operating system and decided to put on windows 8.  After loading all of my music back into a freshly installed itunes, my 4th gen ipod is not recognized by itunes.  My 1st gen ipod nano works with no problem.  Help!

    reinstalled my windows operating system and decided to put on windows 8.  After loading all of my music back into a freshly installed itunes, my 4th gen ipod is not recognized by itunes.  My 1st gen ipod nano works with no problem.  I can eliminate any problems with the cable and connection.
    I've stopped and started the service, and also have performed cold reboots.
    Nothing seems to have helped the situation.
    Help!

    See:
    iOS: Device not recognized in iTunes for Windows
    I would start with
    Removing and reinstalling iTunes, QuickTime, and other software components for Windows Vista or Windows 7
    iTunes for Windows: Device Sync Tests
    Have you tried on another computer to help determine if you have a computer or iPod problem?
    The iPod Classic uses different drivers than the Nano

  • Can anyone help me with a problem i am having with my music on my iPhone 4S. I have put alot of Compilation CDs in my library on iTunes. I download these tracks onto my phone, everything is ok so far. Now, this is what is niggling me and I don.t know how

    Can anyone help me with a problem i am having with my music on my iPhone 4S. I have put alot of Compilation CDs in my library on iTunes. I download these tracks onto my phone, everything is ok so far. Now, this is what is niggling me and I don.t know how to resolve it. This is my problem: 
    Have downloaded for example: Queen – Bohemium Rhapsody from a compilation album as well as a few complete Queen Album CDs into the iTunes library and then put them into playlists,
    When I go onto my phone and select Queen on the MUSIC app using Songs tab at the bottom of the screen it will display all Queen songs and their resective Alum pics, that is all those not in a complilation album, .
    If I know the song title I can select the songs tab and find the song that way,
    I’ve tried fiddling with the settings in the iTunes app by going to ‘get info’ tab and trying to sort the problem out that way but am not having much luck.What I want the phone to do is show, for example all Queens songs including those in compilation albums. Can this be done, would be grateful for any ideas on how it can be done, that is if ic can be done, any ideas
    Thanks for your help

    Try assigning Queen as the Album Artist on the compilations in iTunes on your computer.

  • Monitors with Gradient Problems?

    Hi All,
    Further to my recent post "monitor screen display terrible!"
    Finding a monitor without spending a lot with excellent picture quality is proving differcult! I have tried a Philips 22" monitor Model 220CW9FB and now a BENQ T900HD 18.5 WS monitor all not as sharp with good contrast as my 4 year old G5 iMac. Also has a gradient problem e.g. as you get up off your chair and continue to look down at the screen the white background of the screen turns light blue then darker and colored parts turn white!? Also looking at an angle to the side anything light blue turns a light brown!? Then as I'm viewing something as in Apple Discussions each box of replies alternate white then light blue and so on but looking at normal distant as you type each box are white. You have to lean back in your chair, twice the distance back to actual see the blue box then white box!?
    What's that all about? I have noticed this on the new 20" iMacs too but the three new 24" iMacs are great just like my Rev A G5 iMac of 4 years. Are these inferior screen problems anything to do with them being TN panels as I've just read about?
    I really don't know where to go from here as the screen quality is important. I'm use to the great screen quality of my old G5 iMac and don't want to go down in quality for the sake of moving from a Mac PowerPC to an Intel Core 2 Duo even though I need this for EyeTV hybrid and all the features of iLife '09 etc.
    I don't want to spend a huge amount for an Apple display as I might as well get the entry level 24" iMac. The main reason for not getting the new iMac is I don't like the glossy screen, although today I heard there is an option for a 24" matt screen... any truth in that? Then again will I be able to return the new Mac mini I've only had for 6 days for a 24" iMac?
    Other suggestions seen here is turning my G5 iMac into a stand-a-loan monitor or maybe a 20-year-old CRT 19" TV I have can be used as a monitor and if so what connections are needed? Any ideas on these options?
    So buying the new Mac mini has created a lot of unexpected problems. I thought as asked about before getting it was told any monitor would have the same picture quality as my old G5 iMac, but after the fact found out this is not the case.
    Thanks for the read & any ideas/thoughts much appreciated...

    AFAIK Hmmm Googled "As Far As I Know"... So far I've tried three monitors (all with gradient problem) so it looks like you are correct. I'll try a couple more today as if I need to return my Mac mini with Philips monitor need to do soon for a 24" new iMac even though the Mac mini is not at fault. I'll have to get use to the glossy screen. While writing this an item "iMac or MacBook display too glossy? Apply inexpensive non-glare LCD protective film" has appeared in MacDailyNews.
    http://macdailynews.com/index.php/weblog/comments/20561/
    Thanks for the idea using my G5 as a monitor but maybe quite an involved process?
    It's a shame in all my research before buying a monitor no salesperson mentioned TN display panels. Mind you since the problem no salesperson has said they know about TN display panels or better monitors, just saying any monitor will work with the new Mac mini. Very frustrating!

  • I have a wireless network at home. I run my iphone and ipad on it with no problems. Just purchased a MacBook Pro, and now my wi-fi keeps disconnecting and i get an error message saying another device is using the same IP address. What does all this mean?

    I have a wireless network at home. I run my iphone and ipad on it with no problems. Just purchased a MacBook Pro, and now my wi-fi keeps disconnecting and i get an error message saying another device is using the same IP address. What does all this mean?

    Hello AKCamus
    To give you some ideas of what to do next, I have provided a few articles that will give some troubleshooting Wi-Fi connections and recommended Wi-Fi settings.
    iOS and OS X: Recommended settings for Wi-Fi routers and access points
    http://support.apple.com/kb/HT4199
    iOS: Troubleshooting Wi-Fi networks and connections
    http://support.apple.com/kb/ts1398
    Troubleshooting Wi-Fi issues in OS X Lion and Mac OS X v10.6
    http://support.apple.com/kb/HT4628
    Thanks for using Apple Support Communities.
    Regards,
    -Norm G.

  • I bougt a new  Macbook pro in 02/26/2013, in  11/25/ 2013, my trackpad become bulging, they exchange the trackpad, but not the bulging battery.  I went there yesterday, with different problem, and they said one screw  came off from the  truckpad again!

    I bought a new  Macbook pro in 02/26/2013 from Apple Canadian Ices -003.  Than I could not use it, because  my cursor uncontrollably  was jumping around the screen, I was  resumed my trackpad become bulging, Than on11/25/ 2013 they changed my trackpad for free, because was manufactoring defect,  but not the bulging battery.  They said that is do not needed.  Since that my cursor is quiet often quivering, I think my Macbook has serious  manufacturing defect. But they said no, during a year period I went to  the genius bar at least 15 times, with this and similar problems.   I went there yesterday, with different problems, and they said one of the screws  came off from my   truck pad, therefore they need to fix it and change it.  I said: -  What,  how, what  is the real problem?  A screw does not comes off just like that?  They will change my trackpad again, but not the battery. They said  has to rebuild the operation system, I'm  saving all of my data right now! I would like to exchange the battery too, or maybe get a new Macbook. My Macbook is 2010 China model. How long I would have this trackpad  problem? What are you suggesting?

    If it's a 2010 as you say towards the end of your post, it's out of warranty. The battery isn't covered in that case. Why don't you just buy a new battery if that's your concern? If it's a 2013 as you say up at the top, it shouldn't have a bulging battery. How do you know it does? If it really does, ask for the store manager and explain the problem.

  • I need advise and help with this problem . First , I have been with Mac for many years ( 14 to be exact ) I do have some knowledge and understanding of Apple product . At the present time I'm having lots of problems with the router so I was looking in to

    I need advise and help with this problem .
    First , I have been with Mac for many years ( 14 to be exact ) I do have some knowledge and understanding of Apple product .
    At the present time I'm having lots of problems with the router so I was looking in to some info , and come across one web site regarding : port forwarding , IP addresses .
    In my frustration , amongst lots of open web pages tutorials and other useless information , I come across innocent looking link and software to installed called Genieo , which suppose to help with any router .
    Software ask for permission to install , and about 30 % in , my instinct was telling me , there is something not right . I stop installation . Delete everything , look for any
    trace in Spotlight , Library . Nothing could be find .
    Now , every time I open Safari , Firefox or Chrome , it will open in my home page , but when I start looking for something in steed of Google page , there is
    ''search.genieo.com'' page acting like a Google . I try again to get raid of this but I can not find solution .
    With more research , again using genieo.com search eng. there is lots of articles and warnings . From that I learn do not use uninstall software , because doing this will install more things where it come from.
    I do have AppleCare support but its to late to phone them , so maybe there some people with knowledge , how to get this of my computer
    Any help is welcome , English is my learned language , you may notice this , so I'm not that quick with the respond

    Genieo definitely doesn't help with your router. It's just adware, and has no benefit to you at all. They scammed you so that they could display their ads on your computer.
    To remove it, see:
    http://www.thesafemac.com/arg-genieo/
    Do not use the Genieo uninstaller!

  • I have a new iPhone 6 plus and all is OK. But the mail shows more than 400 'unread' messages whereas there are none in the mailbox or trash or anywhere else I have looked. I can send and receive with no problem. I'm sure I have no unread messages.

    I have a new iPhone 6 plus and all is OK. But the mail shows more than 400 'unread' messages whereas there are none in the mailbox or trash or anywhere else I have looked. I can send and receive with no problem. I'm sure I have no unread messages.

        jsavage9621,
    It pains me to hear about your experience with the Home Phone Connect.  This device usually works seamlessly and is a great alternative to a landline phone.  It sounds like we've done our fair share of work on your account here.  I'm going to go ahead and send you a Private Message so that we can access your account and review any open tickets for you.  I look forward to speaking with you.
    TrevorC_VZW
    Follow us on Twitter @VZWSupport

  • I was using same id on 2 iphones with no problems suddenly everything got mess, how can i set a new id w.out losing my contacts?

    i was using same id on 2 iphones with no problems suddenly everything got mess, how can i set a new id w.out losing my contacts?

    I believe because you migrated from a Nokia to an iPhone you need to register the Bn phone number with your Apple ID so it can be used for iMessage. The Pn number seems to be the only one registered
    Go here > https://appleid.apple.com/cgi-bin/WebObjects/MyAppleId.woa/
    Manage your Apple ID and see if that does the trick
    Hope that helps

  • It says that "there was a problem connecting to the server". What's wrong with this, and how can I deal with this problem?

    I just got my new iPad Mini2, and when I choose "sign in with your apple ID", it says that "there was a problem connecting to the server". What's wrong with this, and how can I deal with this problem?

    1. Turn router off for 30 seconds and on again
    2. Settings>General>Reset>Reset Network Settings

  • I set up my iCloud account on iPad with an exchange account and aol account.  I can see exchange and aol emails but not those from .me account or apple email.  I got it to show all 3 accounts on my iPhone with no problem.  Hat am I missing?

    I set up my iCloud account on iPad with an exchange account and aol account.  I can see exchange and aol emails but not those from .me account or apple email.  I got it to show all 3 accounts on my iPhone with no problem.  Hat am I missing?

    I'm having a similar problem, but I do have the key and is not working anyway.
    My old pc was running on windows 7 and my new one is an apple running on Lion.
    My phone is an Iphone IV and I can see all the bookmarks there.
    In order to sync, what I did was click on the "I don't have the device with me", I entered the key that was provided and the process finish ok. It says congratulations, etc, etc.
    But the bookmarks are not there, I tried merging data and replacing data on this computer options but is the same.
    Any suggestions?

  • Mail on iMac not accessing MS Exchange server but both iPhone and iPad access the same account with no problems.

    I have been using an iPhone and iPad to access my work emails via our MS Exchange server for a number of years now with no problems at all.  I recently replaced my home PC with an iMac (first Mac I have owned) but cannot get it to communicate with the exchange server.  I've checked and re-checked the information on the iMac and my iPad - I even deleted the mail account on the iPad and input the details concurrently with setting up on the iMac - but the Mac will not access the exchange server.
    I receive the message "The Exchange server "---------------" rejected the password for user "------"  Enter you password again or cancel."  I am using the correct password.  iPad and iPhone are logging on using that password fine.  iMac just ends up repeating this message.
    Our IT support at work assure me that there is no reason from their end for it not to work, and reasonably point to it working using the iPhone etc.
    I'd be extremely grateful if anyone can provide a solution to this basic, but extremely frustrating, little problem.

    iPhone and iPad use a different way of accessing the server.
    I don't know the exact details, but we are using Zarafa instead of Exchange and have the same problem:
    iPhone and the likes can connect to Zarafas z-push interface, which is some identical interface to the native Exchange interface, while the desktop e-mail application tries to interface with the web front end (via http) of the server.
    These are completely different setups and it depends on the actual installation of the server to get this going.
    So, you will most likely need different access parameters for the desktop - and the web mail feature has to be enabled on the Exchange server.
    In my opinion using the web mail interface is just silly. On the other hand, the native protocol has less features comparedto the web front end, so you are somehow stuck with sins of the past.
    Good luck!

Maybe you are looking for

  • Calendar Invites from Exchange Users

    Hello All, Not sure if anyone has any updates or ideas on this. I did a bit of a search but did not come up with anything. Hoping my search skills were adequate enough though. Currently If I get an invite sent to me to my MobileMe account from anothe

  • All Of A Sudden - Invalid RAM?

    Last night I was using my 2006 Mac Pro and all was well... put it to sleep around 10PM and then woke it up around 6AM today... discovered that the power light was blinking in what appeared to be 3 short blips; as I understand it, this means 'invalid

  • Spry Tabbed panels problem in IE 6

    I'm having an issue in IE 6 on PC apparently with a layout for which I used spry widgets to create a navigation menu and some content within the main content div of my layout, but apparently these are getting pushed down below my sidebars. I'm on Mac

  • CSV  FILE READING

    Hi all, I got the Csv parser from the net.It is giving runtime error "IO FILE Exception" actually there are 3 file included in it. CSVFile import java.util.ArrayList; import java.io.BufferedReader; import java.io.FileReader; * holds the file object o

  • Storage type indicator in material master

    For a combination of a particaular plant+WH no, a material can have ONLY ONE storage type indicator defined..is it correct? What if I need multiple storage type indicator for a specific plant+WH combination. Regards.