create the search buttonHi, everyone
Does it have possibility to create the search button by using JSL?
Now my user interface is using the drop down list, user need scroll down to check whether which item they want.
So, i want to make improvement by using search button in order for user to easy search their item.
May I know the JSL has possibility to do it?
Thanks.
Re: create the search buttonRe: create the search buttonThanks for the information
I will apply it into the script.Re: create the search buttonTo use the jargon, 'Dialog()' has been deprecated.
The phrase 'will not run in the future' is a little vague, but you are strongly advised to make the switch to 'New Window("Title", << modal)' now, particularly if you are developing a code base that you and others need to depend on.
How much work is involved in making the switch will dpend a little on how much code there is, and how you have structured and modularised it. Generally, when writing code, maintainability (or lack of it) is an important consideration, and JSL supports all the design patterns for you to do it right first time (though it's often the second time when you are learning!). There's a lot of useful information here.
Re: create the search buttonSo your meant is I totally cannot use the dialog box?
Therefore, if need to overcome my problem, i have to use the modal box instead of dialog box?
Because now i consider is if i change dialog box to use the modal box, all the code i need to change to modal box also.Because all the file that i have is all using dialog box, and all the file are link together.
You all answer is much appreciate.
Thanks.
Re: create the search buttonIt is not recommended to use DIALOG() anymore. Instead use NEW WINDOW(). Unfortunately most objects have different names in the two platforms. For example HLIST and VLIST are part of DIALOG, whereas NEW WINDOW uses HLISTBOX and VLISTBOX.
The good news is that the scripting index covers all dialog box objects with lots of examples.
One final note - to have a modal box with NEW WINDOW you need to include << modal().
Re: create the search buttonThanks @David_Burnham
It's really more ergonomical than having to click a search button.
Actually my initial UI is by using the combo box, but now i want try to add the text edit box at below which can search the item in order for user to easy find the item rather than the user scroll down to check item one by one.
I had face one problem now which is when i run my whole script, it show me out this error:
Name Unresolved: HList in access or evaluation of 'HList' , HList( Button( "OK" ), Button( "Cancel" ) ) /*###*/
Re: create the search buttonHere is some framework code:
dt = Open("$SAMPLE_DATA/Big Class.jmp");
lst = Column(Dt,"Name") << Get Values;
Close(dt,NoSave);
New Window("Test",
Lineup Box(NCol(1),
lb = List Box(lst),
tbSearch = Text Edit Box("",<<SET hint=""></SET>
The script associated with the Text Edit Box gets executed when you type a search string and press enter which I find more ergonomical than having to click a button but the same script could be attach to a button box.
Some complexity you need to think about:
- What happens if a second search is performed - does it search the search results or the original list? I find it helpful to provide a reset button to restore the original list.
- Scoping of variables - in particular you need to make sure that the variable lst is still defined when the button is clicked. I usually put my variables in explicit namespaces but if you follow the convention of "Names Default To Here(1) " then you can use the notation here:lst.
Re: create the search buttonno, this isn't what I am using......but I may be changing the code to using it........one learns new JMP things every day
Re: create the search buttonAlso see 'Help > Scripting Index' and look for 'Filter Col Selector()' (which might be what Jim's code uses).
Re: create the search buttonI added a JMP Adding that generates a Runs Test that has a dialog box that has a search available to search through the input columns, much like the search capability for the regular JMP platforms. The addin is:
Runs Test (Wald-Wolfowitz Test) and JSL Implementation of JMP Platform Dialog Box