This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
106
Web Server - Ask For Help / Re: Experimenting with Accordion menu to right of a browse
« on: April 30, 2022, 10:22:09 AM »
Jeff,
I often wind up with an annoying useless scrollbar at the bottom of popups.
It seems to arise out of pressure between a width:100%!important property combined with left/right margin settings.
I've found I can avoid it by setting CSS on the inner div to override the margins, or by setting overflow:hidden on the parent div.
Pics.
jf
I often wind up with an annoying useless scrollbar at the bottom of popups.
It seems to arise out of pressure between a width:100%!important property combined with left/right margin settings.
I've found I can avoid it by setting CSS on the inner div to override the margins, or by setting overflow:hidden on the parent div.
Pics.
jf
107
Web Server - Share Knowledge / Making "focus" work in a nested popup
« on: April 28, 2022, 10:32:31 AM »
My problem was an input field on a form nested several popups deep. I wanted the field to have focus when the form opened but it wasn't working.
This is a follow-up to Bruce's help on today's webinar.
1. We were fooling ourselves in the console. The console itself grabs focus, so typing
$("#bruce").focus();
actually DID work, but one needed to click back into the browser part of the screen for it to take effect. (Unlike the .hide() and .show() commands).
2. I guess "timing is everything". I tried moving the focus() command to inside the embed that is inside the $(document).ready function and now it works! (pic). Apparently what I tried previously was firing too early.
Thanks, all.
Jane
This is a follow-up to Bruce's help on today's webinar.
1. We were fooling ourselves in the console. The console itself grabs focus, so typing
$("#bruce").focus();
actually DID work, but one needed to click back into the browser part of the screen for it to take effect. (Unlike the .hide() and .show() commands).
2. I guess "timing is everything". I tried moving the focus() command to inside the embed that is inside the $(document).ready function and now it works! (pic). Apparently what I tried previously was firing too early.
Thanks, all.
Jane
108
Web Server - Ask For Help / Re: Export not correct
« on: April 15, 2022, 07:38:40 AM »
Just taking a WAG here, Mike. I'd try clearing the "Enable File Cache" checkbox on the web server extension Performance tab.
109
Web Server - Ask For Help / CASE statement uses equate, not field name
« on: April 14, 2022, 12:45:00 PM »
I'm a good shot.
Take aim at foot. Do not miss
Yes. I know. "Why would you do that?" "Don't do that."
But I did...
I changed the equate on a form field (just because I don't particularly like the colon-replaced-by-underscores.)
And after a bit of chasing my tail figured out that that's what broke my effort to use a lookup on that field.
The AfterLookup routine grabs the session value for the "lookupfield" - but that's based on the field's equate, not the field name.
Then immediately following is a CASE statement that looks to match the actual field name, not the equate.
Sneaky!
Cheers,
Jane
Take aim at foot. Do not miss
Yes. I know. "Why would you do that?" "Don't do that."
But I did...
I changed the equate on a form field (just because I don't particularly like the colon-replaced-by-underscores.)
And after a bit of chasing my tail figured out that that's what broke my effort to use a lookup on that field.
The AfterLookup routine grabs the session value for the "lookupfield" - but that's based on the field's equate, not the field name.
Then immediately following is a CASE statement that looks to match the actual field name, not the equate.
Sneaky!
Cheers,
Jane
110
Web Server - Ask For Help / Re: Disable insert button?
« on: April 10, 2022, 06:31:05 PM »
Thanks for the 12.39 fix.
111
Web Server - Ask For Help / Re: NT12 - Copy-To-Clipboard Button for Fields
« on: April 10, 2022, 02:26:28 PM »
There's probably a better way.
An hour with Mr. Google turned up the attached as a possibilty for a form. (Copy the custom.js into the web\scripts folder).
Cheers,
Jane
An hour with Mr. Google turned up the attached as a possibilty for a form. (Copy the custom.js into the web\scripts folder).
Cheers,
Jane
112
Web Server - Ask For Help / Re: CSS Condition
« on: April 06, 2022, 11:34:11 AM »What about to change the CSS served by the browser based on a conditon?
if condition then Custon.css else Custon2.css end
Is that possible?
Regards
Do you mean similar to what you can do by using the url http://127.0.0.1:88/?_theme_=morris
I'd guess you could do something in p_web.ChangeTheme in the web handler
IF get some value from cookie = blarg then p_web.SetSessionValue('_theme_','blargTheme') .
??
113
Web Server - Ask For Help / Re: Disable insert button?
« on: April 05, 2022, 08:40:31 PM »that is indeed intentional.Makes sense that it would be since both routines are doing almost the same thing. It just surprised me because I was using that embed for part of the OMIT to substitute my own code and noticed that the end of the omit wound up in both places.
114
Web Server - Ask For Help / Re: Disable insert button?
« on: April 04, 2022, 08:06:28 PM »
LOL... I never use the row insert buttons so that never occurred to me...
Thanks, Bruce.
This is not a high-security item. Rather, I don't want someone creating an audit record for a date that has not yet come. Instead of removing the button I decided to leave it tantalizingly in view but disabled, with a message saying that the future will come in its own time.
Just because I'm a jerk, and I can...
A fix would be nice but I just added my own logic to set the flag in the call to CreateStdBrowseButton.
BTW... this may be intentional but it seems that the [Start of "Set jQuery Update Buttonset Options" Priority 5000] embed in the GenerateUpdateButtonsAbove and GenerateUpdateButtonsBelow routines share code. Put something in one, close and open the procedure, and the code appears in the other one as well.
Cheers,
Jane
Thanks, Bruce.
This is not a high-security item. Rather, I don't want someone creating an audit record for a date that has not yet come. Instead of removing the button I decided to leave it tantalizingly in view but disabled, with a message saying that the future will come in its own time.
Just because I'm a jerk, and I can...
A fix would be nice but I just added my own logic to set the flag in the call to CreateStdBrowseButton.
BTW... this may be intentional but it seems that the [Start of "Set jQuery Update Buttonset Options" Priority 5000] embed in the GenerateUpdateButtonsAbove and GenerateUpdateButtonsBelow routines share code. Put something in one, close and open the procedure, and the code appears in the other one as well.
Cheers,
Jane
115
Web Server - Ask For Help / Disable insert button?
« on: April 02, 2022, 03:57:35 PM »
I think I'm probably missing something obvious.
I want to conditionally disable the Insert button. The template appears to support doing that, but it removes the button altogether rather than disabling it (pic).
Setting the "Disabled IF" condition on a regular button placed as a field on a form tab works as expected.
I can OMIT() template code and write my own routine to make it work on a browse, but am I misinterpreting the template option's intent?
edited to add: nt 12.38
Jane
I want to conditionally disable the Insert button. The template appears to support doing that, but it removes the button altogether rather than disabling it (pic).
Setting the "Disabled IF" condition on a regular button placed as a field on a form tab works as expected.
I can OMIT() template code and write my own routine to make it work on a browse, but am I misinterpreting the template option's intent?
edited to add: nt 12.38
Jane
116
Web Server - Ask For Help / Re: Running NetTalk API server as a service/azure app
« on: March 08, 2022, 09:58:46 AM »
If you don't have Capesoft's MessageBox you may want to pick that up also, Gary.
Otherwise you'll need to do your own code to override the message and stop statements (using MessageHook, etc.).
Services aren't allowed to show a user interface, so an error message popping up and wanting to be acknowledged will hang your app forever. Be sure to read the docs: https://www.capesoft.com/docs/SelfService/selfservice.htm#GroundRules
Otherwise you'll need to do your own code to override the message and stop statements (using MessageHook, etc.).
Services aren't allowed to show a user interface, so an error message popping up and wanting to be acknowledged will hang your app forever. Be sure to read the docs: https://www.capesoft.com/docs/SelfService/selfservice.htm#GroundRules
117
Web Server - Ask For Help / Re: Running NetTalk API server as a service/azure app
« on: March 07, 2022, 09:22:33 AM »
Absolutely the easiest way to run a Clarion app (NetTalk or otherwise) as a Windows service is with Self Service: https://www.capesoft.com/accessories/SelfServicesp.htm
As with any service, you'll want to make sure the account under which it's running has appropriate permissions. (LOCAL SYSTEM will not have a printer defined, for example, and will not have access to network shares).
As with any service, you'll want to make sure the account under which it's running has appropriate permissions. (LOCAL SYSTEM will not have a printer defined, for example, and will not have access to network shares).
118
Web Server - Ask For Help / Re: Saving QR Code to an ImageFile
« on: March 06, 2022, 11:52:15 AM »
?? maybe easier to use a library to generate the image on the server rather than with script on the browser ??
119
Web Server - Ask For Help / Re: HasAutoInc error NTWS 12.37
« on: February 26, 2022, 11:15:30 AM »
It occurs to me, Johan, that a better fix might be to tweak the Clarion files, since I doubt you'll be updating to a different version of CW10.
You could try this.
Edit abfile.inc
Inside the FileManager class, add the line:
Edit abfile.clw
Add the method:
Then you could set the NT template back the way it was and verify that it works. That way you won't need to edit something each time you update NetTalk.
You could try this.
Edit abfile.inc
Inside the FileManager class, add the line:
Code: [Select]
GetHasAutoInc PROCEDURE(),BYTE,VIRTUAL
Edit abfile.clw
Add the method:
Code: [Select]
FileManager.GetHasAutoInc PROCEDURE()
CODE
RETURN SELF.HasAutoInc
Then you could set the NT template back the way it was and verify that it works. That way you won't need to edit something each time you update NetTalk.
120
Web Server - Ask For Help / Re: HasAutoInc error NTWS 12.37
« on: February 25, 2022, 03:34:37 PM »
That's not the error from the docs, Johan.
The docs refers to illegal use of a private property.
And it looks as if Bruce has changed to a workaround to try to avoid the requirement to edit abfile.inc.
The code in the doc references the (protected in old versions) property directly: RM.Me.HasAutoInc = false
The code in your example (and in 12.37 I just downloaded) uses a METHOD rather than looking for the protected property: GetHasAutoInc()
Looking at abfile.inc, my version of clarion 10 (10.0.12349) DOES have a method called GetHasAutoInc.
Looking at abfile.inc in clarion 9.1, the property HasAutoInc byte,protected exists but the method to retrieve it (GEThasAutoInc) does NOT exist.
So I'm guessing that the method was added to C10 some time after your version.
netweb.tpw for 11.37 on line 341 is checking for clarion versions less than 10 and assuming that higher versions DO have the GetHasAutoInc() method. But apparently your version of C10 does not.
Since you've removed the PROTECTED attribute from the property in abfile.inc, you could probably change the code in your screen shot so it again reads like what is in Bruce's doc page and check the property directly:
If p_forceWrite and RM.Me.HasAutoInc = false !8000
I'd make a backup copy of netweb.tpw and alter the code between lines 341 and 349.
Cheers,
Jane
The docs refers to illegal use of a private property.
And it looks as if Bruce has changed to a workaround to try to avoid the requirement to edit abfile.inc.
The code in the doc references the (protected in old versions) property directly: RM.Me.HasAutoInc = false
The code in your example (and in 12.37 I just downloaded) uses a METHOD rather than looking for the protected property: GetHasAutoInc()
Looking at abfile.inc, my version of clarion 10 (10.0.12349) DOES have a method called GetHasAutoInc.
Looking at abfile.inc in clarion 9.1, the property HasAutoInc byte,protected exists but the method to retrieve it (GEThasAutoInc) does NOT exist.
So I'm guessing that the method was added to C10 some time after your version.
netweb.tpw for 11.37 on line 341 is checking for clarion versions less than 10 and assuming that higher versions DO have the GetHasAutoInc() method. But apparently your version of C10 does not.
Since you've removed the PROTECTED attribute from the property in abfile.inc, you could probably change the code in your screen shot so it again reads like what is in Bruce's doc page and check the property directly:
If p_forceWrite and RM.Me.HasAutoInc = false !8000
I'd make a backup copy of netweb.tpw and alter the code between lines 341 and 349.
Cheers,
Jane