tag:blogger.com,1999:blog-7970679050025899967.post2109407550959819135..comments2023-11-24T03:56:57.923-08:00Comments on Adobe LiveCycle Designer Cookbooks by BR001: Using app.execDialog() in an Adobe Designer FormBR001http://www.blogger.com/profile/02005650446661555680noreply@blogger.comBlogger69125tag:blogger.com,1999:blog-7970679050025899967.post-67724605078464121322020-12-30T22:46:51.710-08:002020-12-30T22:46:51.710-08:00Hi Tarek, I've fixed the links in the post, s...Hi Tarek, I've fixed the links in the post, seems Google Sites no longer allows attachments. A shame as that is were most of the samples I've posted over the years in the Adobe forums were stored. I don't seem to be able to update the links in the comments part of the blog either, so if there's a particular one you are after from the comments please let me know.<br /><br />Regards, BruceBR001https://www.blogger.com/profile/02005650446661555680noreply@blogger.comtag:blogger.com,1999:blog-7970679050025899967.post-62010179953021974192020-12-30T15:05:09.044-08:002020-12-30T15:05:09.044-08:00Hi Bruce! I am trying to download the samples, but...Hi Bruce! I am trying to download the samples, but the links are dead. Can you please with that issue?<br />TarekTarekAHFhttps://www.blogger.com/profile/15914538165615810959noreply@blogger.comtag:blogger.com,1999:blog-7970679050025899967.post-44917452391332685412017-05-09T05:51:54.591-07:002017-05-09T05:51:54.591-07:00Hi Urs,
Maybe this sample from Niall would be of ...Hi Urs,<br /><br />Maybe this sample from Niall would be of interest, his sample has a color picker using a slider for the R, G, B values, http://assuredynamics.com/index.php/2010/11/moving-objects-around-a-form/<br /><br />I think this will be as close as you can get to using a slider in an XFA form.<br /><br />Regards<br /><br />BruceBrucehttps://www.blogger.com/profile/13436665111609409629noreply@blogger.comtag:blogger.com,1999:blog-7970679050025899967.post-92149507749864471452017-05-03T13:14:02.218-07:002017-05-03T13:14:02.218-07:00Hi Bruce
interesting work! Could you help me out?...Hi Bruce<br /><br />interesting work! Could you help me out? In a longer form (about 20 pages) we'd like to integrate a slider Control as you presented it in your pdf (as an undocumented Control element). Is it possible to use such a slider element as an object within the Default form, I mean outside a Dialog box? THANK YOU FOR ANY HELP. <br /><br />Kind regards from switzerland<br />UrsHolzhttps://www.blogger.com/profile/05412319296239704155noreply@blogger.comtag:blogger.com,1999:blog-7970679050025899967.post-87272046058445852592016-08-04T07:38:24.736-07:002016-08-04T07:38:24.736-07:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/09498837033976861754noreply@blogger.comtag:blogger.com,1999:blog-7970679050025899967.post-46727174692037237822016-07-27T09:17:49.592-07:002016-07-27T09:17:49.592-07:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/09498837033976861754noreply@blogger.comtag:blogger.com,1999:blog-7970679050025899967.post-19530569297405220302016-06-26T16:31:22.471-07:002016-06-26T16:31:22.471-07:00Hi Marek,
I'm sorry I can't help you with...Hi Marek,<br /><br />I'm sorry I can't help you with that, I've spent a bit of time trying and I've seen "max-characters" used but it didn't seem to have any affect.<br /><br />The max length has been implemented in other Adobe software, like Adobe Illustrator plugins so it might be possible. But with a generic JavaScript object it could be called anything.<br /><br />Please let me know if you work it out.<br /><br />Bruce<br /><br />BR001https://www.blogger.com/profile/02005650446661555680noreply@blogger.comtag:blogger.com,1999:blog-7970679050025899967.post-69677318324738813052016-06-25T10:58:58.526-07:002016-06-25T10:58:58.526-07:00Hi Bruce,
please, would you know, how to set the ...Hi Bruce, <br />please, would you know, how to set the 'max length' of an "edit_text" control on a dialog, so that the user can't enter more then 20 characters? <br />I know, that I can validate the text later, but that is less appropriate. Anonymoushttps://www.blogger.com/profile/12031456152465344615noreply@blogger.comtag:blogger.com,1999:blog-7970679050025899967.post-47973905753288475772016-06-24T07:30:34.731-07:002016-06-24T07:30:34.731-07:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/12031456152465344615noreply@blogger.comtag:blogger.com,1999:blog-7970679050025899967.post-29274510434377359852016-05-01T18:18:42.994-07:002016-05-01T18:18:42.994-07:00Hey Bruce:
Been a while, amigo. Sent you message...Hey Bruce:<br /><br />Been a while, amigo. Sent you message via Acrobat Forums. Thought I was done - and I guess I am - but looks like there's one last issue. https://forums.adobe.com/message/8722810#8722810<br /><br />Other than that, looks like it's ready. Hope you're well. Look forward to hearing from you. <br />Thanks,<br /><br />BrianB. Reedhttps://www.blogger.com/profile/04603153976228419564noreply@blogger.comtag:blogger.com,1999:blog-7970679050025899967.post-53203232621415865212015-11-24T13:39:24.571-08:002015-11-24T13:39:24.571-08:00Hi Brian,
I've updated the "Bold static ...Hi Brian,<br /><br />I've updated the "Bold static text line ..." sample to bold the line selected from the drop down, https://sites.google.com/site/livecycledesignercookbooks/home/Bold%20a%20static%20text%20line%20based%20on%20variable%20value%20-%20Brian%20to%20Brucev2%20(1).pdf?attredirects=0&d=1. <br /><br />Hope that helps<br /><br />BruceBR001https://www.blogger.com/profile/02005650446661555680noreply@blogger.comtag:blogger.com,1999:blog-7970679050025899967.post-63781752078701063852015-11-21T18:58:59.081-08:002015-11-21T18:58:59.081-08:00Had to run out without full chance to check. Some ...Had to run out without full chance to check. Some success initially with my simple example. Might have issues though as its in the dialogs that we discussed earlier. (the 4 dialogs with PREVIOUS and NEXT buttons.)Will let you know tomorrow...<br /><br />Thanks, B. <br />B<br />B. Reedhttps://www.blogger.com/profile/04603153976228419564noreply@blogger.comtag:blogger.com,1999:blog-7970679050025899967.post-31809169031850396802015-11-21T17:49:51.640-08:002015-11-21T17:49:51.640-08:00Hi,
If some condition before the dialog is opened...Hi,<br /><br />If some condition before the dialog is opened determines if the text is bold you can use that condition to set the value of the bold property in the dialog description. So in the sample https://sites.google.com/site/livecycledesignercookbooks/home/DynamicBold.pdf?attredirects=0&d=1 a checkbox determines if the text is bold so the dialog description looks like;<br /><br />{<br /> type: "static_text",<br /> item_id: "t001",<br /> name: "BOLD",<br /> font: "dialog",<br /> bold: CheckBox1.rawValue == 1,<br /> }<br /><br />If the condition is something within the dialog then you might be out of luck. The closest I can think of is have two static text objects one bold and one not and make them hidden/visible as needed, but this will leave the space for the hidden text (like invisible for an XFA object).<br /><br />I don't know of any books of dialogs, apart from the "JavaScript for Acrobat API Reference", but that's got some bits missing, every now and then I come across an example that's using some property I've not seen before, but not for some time now. The ADM dialogs have a lot more functionality than what Acrobat JavaScript has implemented so you never know.<br /><br />Good to hear you are feeling better, and would be interested in seeing your form. Send me a link here if it is not public, https://forums.adobe.com/people/BR001.<br /><br />Bruce<br /><br /><br />BR001https://www.blogger.com/profile/02005650446661555680noreply@blogger.comtag:blogger.com,1999:blog-7970679050025899967.post-57226065962979189422015-11-21T16:59:57.766-08:002015-11-21T16:59:57.766-08:00Bruce:
4 hours later. Couldn't crack it. Ug...Bruce:<br /><br />4 hours later. Couldn't crack it. Ugh. Demo page here if you get a sec. Thanks.<br /><br />https://www.dropbox.com/s/9dlgogfbv0cl08o/Bold%20a%20static%20text%20line%20based%20on%20variable%20value%20-%20Brian%20to%20Brucev2.pdf?dl=0<br /><br />BB. Reedhttps://www.blogger.com/profile/04603153976228419564noreply@blogger.comtag:blogger.com,1999:blog-7970679050025899967.post-303137322870687902015-11-21T13:44:35.715-08:002015-11-21T13:44:35.715-08:00Hey B -
Feeling better and back on track. But d...Hey B - <br /><br />Feeling better and back on track. But damn you and these dialogs. =)<br /><br />You did the following to make a button with the item_id of "prev" disappear when the dialog is first created: <br /> initialize : function(dialog)<br /> {<br /> dialog.visible({"prev": false,});<br /> },<br /><br />I've been able to take it a step further and, by declaring a variable in the click event of the button (var toBold = "123";) make the button appear or disappear based on the value of the toBold variable:<br /> initialize : function(dialog)<br /> {<br /> if (toBold == "123"){<br /> dialog.visible({"prev": false,});<br /> }<br /> },<br /><br />Assuming you're using the "dialog" font, could something similar be used to set a static text line ("t001")'s "bold" value to true or false on the initialize event? Something like:<br /><br /> initialize : function(dialog)<br /> {<br /> if (toBold == "123"){<br /> dialog.bold ({"t001": false,});<br /> }<br /> },<br /><br /><br />Know that's not right ("dialog.bold") but I think it gets the point across. Trying to use a variable to change the true/false property of a static text line's bold property.<br /><br />And do you want to see what I've been working on? Home stretch here - this is actually the last dialog box question. Then just a general clean up of commented-out code -- there's a lot, not surprisingly -- and it's done. Couldn't have done it without you and Cookbooks.<br /><br />Let me know and deep thanks as always! So close!<br />B<br />B. Reedhttps://www.blogger.com/profile/04603153976228419564noreply@blogger.comtag:blogger.com,1999:blog-7970679050025899967.post-76084381705306385852015-11-19T06:37:54.926-08:002015-11-19T06:37:54.926-08:00Hey B -
Sick as a dog here - sorry delay. Fill ...Hey B - <br /><br />Sick as a dog here - sorry delay. Fill you in more later but the standard button w/ an ok button worked great. Had some formatting issues (my dialogs are wider and taller obviously) but got around it using a gap. And it seems to default to giving the OK button a buffer zone around it - one that it doesn't give to regular buttons - but that actually works great with the layout. Gives a nice subtle separation of the cancel button from the rest of the buttons. Plus no X in the upper right hand corner issue!<br /><br />Can you recommend any books on dialog creation? <br /><br />Well done , as always, sir. Much thanks; more laters.<br /><br />B B. Reedhttps://www.blogger.com/profile/04603153976228419564noreply@blogger.comtag:blogger.com,1999:blog-7970679050025899967.post-59107019696327044672015-11-15T03:46:58.281-08:002015-11-15T03:46:58.281-08:00Hi,
Maybe you are better off just using standard ...Hi,<br /><br />Maybe you are better off just using standard buttons and the ok control for cancel?<br /><br />Here's a sample https://sites.google.com/site/livecycledesignercookbooks/home/ok_cancel_other%20-%20Bruce%20to%20Brian%20-%20Brian%20Messing%20With7b.pdf?attredirects=0&d=1<br /><br />It is a bit neater. And without the cancel button there is no "X" button in the top right at all ... is that good?<br /><br />BruceBR001https://www.blogger.com/profile/02005650446661555680noreply@blogger.comtag:blogger.com,1999:blog-7970679050025899967.post-9044158864627011512015-11-12T19:45:06.916-08:002015-11-12T19:45:06.916-08:00Agh..should have realized it. (D*mn it.)
And sorr...Agh..should have realized it. (D*mn it.)<br /><br />And sorry for the confusion about the "X." We're talking about the same thing - the box in the upper right of the dialog with the "X" to close the dialog.<br /><br />Using this method, that X no longer closes the dialog, ie it no longer works as a "cancel". Is that because of the while statement?<br /><br />B<br /><br /><br /><br />B. Reedhttps://www.blogger.com/profile/04603153976228419564noreply@blogger.comtag:blogger.com,1999:blog-7970679050025899967.post-75343489798683072902015-11-12T17:40:11.993-08:002015-11-12T17:40:11.993-08:00Hi, you just need to add a dialog.end() to exit th...Hi, you just need to add a dialog.end() to exit the dialog, see the updated sample https://sites.google.com/site/livecycledesignercookbooks/home/ok_cancel_other%20-%20Bruce%20to%20Brian%20-%20Brian%20Messing%20With7a.pdf?attredirects=0&d=1<br /><br />But I'm not sure what you mean by the red X, I still get the standard close dialog X in the top right.<br /><br />BruceBR001https://www.blogger.com/profile/02005650446661555680noreply@blogger.comtag:blogger.com,1999:blog-7970679050025899967.post-11501549123442965582015-11-12T07:57:01.074-08:002015-11-12T07:57:01.074-08:00You're amazing, B. Totally helps. Thanks SO m...You're amazing, B. Totally helps. Thanks SO much.<br /><br />Couldn't help but try further manipulations out of curiosity- specifically the order of the buttons. <br /><br />Given "back" is usually to the left and "next" is to the right, I tried moving the code around to match a left to right button order of: OK (now labeled "Previous" )(if visible, to far left), OTHER (now labeled "Next") (in the middle) then "Cancel" (far right) for Hints 2 and 3. Moved functions from Other into OK and OK into Other. ( So "dialogObject.index--;" is now in the far left OK (now labeled Previous) button --- similar to what you did in Hint 4.)<br /><br />Initial Hint 1 - always appears when main button is clicked; (no surprise; not touching that code).<br /><br />Hints 2 and 3 - "Cancel" always works. (Again, I'm not touching it.)<br />"Next" (now the middle "Other" button for Hints 2 and 3) doesn't trigger the closure and reopening BUT it IS doing something as clicking NEXT (despite no visual response) will affect which Hint appears when you then click PREVIOUS (far left; technically the OK button). <br /><br />Previous (the OK button) always works.<br /><br />Example here: https://www.dropbox.com/s/9zibfra52svk5qw/ok_cancel_other%20-%20Bruce%20to%20Brian%20-%20Brian%20Messing%20With7.pdf?dl=0<br /><br />And how'd you disable the little red X in the corner? Or is that because the code at the end is a while statement and the X doesn't return a value for the variable dialogIndex? <br /><br />Thanks again, as always, Sensei. Truly the best.<br /><br />B<br /><br />B. Reedhttps://www.blogger.com/profile/04603153976228419564noreply@blogger.comtag:blogger.com,1999:blog-7970679050025899967.post-68449931204693452732015-11-12T03:00:00.476-08:002015-11-12T03:00:00.476-08:00Not sure why that's not working for you. I ha...Not sure why that's not working for you. I have updated your sample, in the Hint 2 button you can see the code I suggested.<br /><br />But now knowing a little more about what you are trying to do, it might be better to have each dialog return which dialog to display next. So there is now a "Bruce's new button" in your sample that does this. Hope it makes sense, I'm passing in the current index to the dialogs and the ok button on all but the last returns the index + 1, cancel returns -1 (that is exit) and other (or previous) returns the index - 1, the ok on the last dialog returns index - 1 ... would have been good if there was a other_cancel control.<br /><br />https://sites.google.com/site/livecycledesignercookbooks/home/ok_cancel_other%20-%20Bruce%20to%20Brian.pdf?attredirects=0&d=1<br /><br />Hope that helps.<br /><br />BruceBR001https://www.blogger.com/profile/02005650446661555680noreply@blogger.comtag:blogger.com,1999:blog-7970679050025899967.post-54449287093012486912015-11-11T18:09:49.301-08:002015-11-11T18:09:49.301-08:00Hey B -
Thanks so much for the post. Been trying...Hey B -<br /><br />Thanks so much for the post. Been trying; still no luck.<br /><br />Built you an example of what I'm attempting at: https://www.dropbox.com/s/lfvimyaniraigds/ok_cancel_other%20-%20Brian%20to%20Bruce.pdf?dl=0<br /><br />What I'm trying to accomplish is as follows;<br /><br />One button with four simple dialogs in them, each giving a hint.<br />Click the button and Hint 1 opens with "next" and "cancel" button options.<br />Clicking next would close Hint 1 and open Hint 2; clicking cancel closes Hint 1 and ends the button activity.<br /><br />Dialogs for hints 2 and 3 would have "previous", "next" and "cancel" buttons.<br />"Previous" closes current hint and opens previous hint.<br />"Next" closes current hint and opens next hint.<br /><br />Think you see where I'm going with this.<br /><br />I've been trying to use the return value of the dialog to determine what should happen next but it's not really working. Only limited success and only moving forward (using the "ok" button renamed as "next").<br /><br />Any thoughts would be great. Or should I not be using the return value and using something else?<br /><br />Thanks a ton, as always.<br /><br />B<br />B. Reedhttps://www.blogger.com/profile/04603153976228419564noreply@blogger.comtag:blogger.com,1999:blog-7970679050025899967.post-41005052372794759992015-11-11T15:28:15.619-08:002015-11-11T15:28:15.619-08:00Hi Brian,
The other button click is something you...Hi Brian,<br /><br />The other button click is something you have to handle yourself. So you will need to add something like;<br /><br /><br /> other : function(dialog)<br /> {<br /> dialog.end("other")<br /> }<br /><br /><br />And in case the code gets mucked up in the comments, here's a sample https://sites.google.com/site/livecycledesignercookbooks/home/ok_cancel_other.pdf?attredirects=0&d=1<br /><br />BruceBR001https://www.blogger.com/profile/02005650446661555680noreply@blogger.comtag:blogger.com,1999:blog-7970679050025899967.post-62536911648454128892015-11-11T08:41:28.821-08:002015-11-11T08:41:28.821-08:00Hey Bruce:
Hope you're well, amigo. Stuck on...Hey Bruce:<br /><br />Hope you're well, amigo. Stuck on something I thought would be relatively simple.<br /><br />I've got a dialog box using the OK/OTHER/CANCEL button package.<br /><br />var returnFromBox = d.execDialog; (triggers the dialog just fine)<br /><br />The following code is able to recognize the return value for OK and CANCEL but not for OTHER<br /><br />if (returnFromBox == "ok"){<br /> xfa.host.messageBox("apple");<br /> }<br />else if (returnFromBox == "cancel"){<br /> xfa.host.messageBox("pear");<br /> }<br />else if (returnFromBox == "other"){<br /> xfa.host.messageBox("grape");<br /> }<br /><br />What am I missing? Totally stumped....<br /><br />Thanks,<br /><br />B<br />B. Reedhttps://www.blogger.com/profile/04603153976228419564noreply@blogger.comtag:blogger.com,1999:blog-7970679050025899967.post-9863720209340529282015-10-09T14:02:52.763-07:002015-10-09T14:02:52.763-07:00Hi Bruce,
Worked like a charm! Thank you very muc...Hi Bruce,<br /><br />Worked like a charm! Thank you very much! You have no idea what a help you've been in completing my form!Moccahttps://www.blogger.com/profile/16943937910651217718noreply@blogger.com