Re Subject: question about PROCESS 4D TAGS 4d v13
Hi All, I want to thank all who took their time to look into this and answer my question. gr8 !! Koen Van Hooreweghe remarked maybe there was a typo, and in the email which I shortened there was a typo, (that number "1" should not have been there) but in the 4D method it was correct. What I did after getting different suggestions was simply take a backup of the project and apply / copy-paste the code again. From project1 to project2. Also copied the "monthly.html" again from Project1 to the correct folder in Project2. And Lo & behold, the code worked this time. I tried to figure out where the problem might have slipped in but could find no code differences between the new Project2 and the 'old' Project2. It was strange, the loop count was correct and in debug mode I could see the values. But when Process 4D Tags would produce the name of the array and not the value in the array. Since I have spend quite some time on finding the problem, actually the whole production day, lockdown or not, getting it to work was the moment to look no further and continue with the project. Once more, all who reacted, many thanks. ernie hilgers (aruba) > Working with PROCESS 4D TAGS and testing it baffles me because, > I created a 'template' html document, that gets opened by 4D > which contains this html code: > > > > > > > > In a 4D method that runs this aTxtHeaders array is filled with 7 text strings. > > The template get's opened: > > $path_t:=Get 4D folder(Current Resources folder)+"monthly.html" > DOCUMENT TO BLOB($path_t;$template_x) > > PROCESS 4D TAGS($template_x;$processed_x) > > $path_t:=Get 4D folder(Database Folder)+"attachmentz"+Folder > separator+"Rob_321.html" > BLOB TO DOCUMENT($path_t;$processed_x) > > standard code to be found in the manual. > > When I open the Rob_321.html file with BBEditI see this result, which is > correct > > bordercolor="#f0f0f0" width="100%"> > > Description > > Hours > Income > Misc > Year Totals > > > > > So I copy that exact -same- code over to another 4D project, using the -same- > array and same open the file code. > Then when I open this Rob_321.html using BBEdit I see this: > > bordercolor="#f0f0f0" width="100%"> > > > > > > > > > > > What am I missing ? or doing wrong ? Why no values but 7x the array name ? ** 4D Internet Users Group (4D iNUG) New Forum: https://discuss.4D.com Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
question about PROCESS 4D TAGS 4d v13
Hi All, Mac 10.13, 4D v13 Working with PROCESS 4D TAGS and testing it baffles me because, I created a 'template' html document, that gets opened by 4D which contains this code: In a 4D method that runs this aTxtHeaders array is filled with 7 text strings. The template get's opened: $path_t:=Get 4D folder(Current Resources folder)+"monthly.html" DOCUMENT TO BLOB($path_t;$template_x) PROCESS 4D TAGS($template_x;$processed_x) $path_t:=Get 4D folder(Database Folder)+"attachmentz"+Folder separator+"Rob_321.html" BLOB TO DOCUMENT($path_t;$processed_x) standard code to be found in the manual. When I open the Rob_321.html file with BBEditI see this result, which is correct Description Hours Income Misc Year Totals So I copy that exact -same- code over to another 4D project, using the -same- array and same open file code. Then when I open this Rob_321.html using BBEdit I see this: What am I missing ? or doing wrong ? Both programs written by me are opened with the same version of 4D v13 Also opened the test-code and the final-code simultaneous with 2 4D v13 programs and compared Preference settings. ernie hilgers (aruba) ** 4D Internet Users Group (4D iNUG) New Forum: https://discuss.4D.com Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
create an email from a form with 2 4D View areas on it
Hi All, 4D v13 mac and windows I have to create an email (1 page) from a form that has some database fields and 2, 4D View areas. The form looks like this below. The question is, how to best approach a solution for this. Where to start ? greetings ernie hilgers(aruba) Employee name: date: function: employee#: ss#: (here start of 4D view area# 1) - - - - - - - - - - (end 4D view area# 1) database field comments#1 ,,comments#2 ,,comments#3 ,,comments#4 (here start of 4D view area# 2) - - - - - - - - - - (end 4D view area# 2) ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
create an email from a form with 2 4D View areas on it
Hi All, I have to create an email (1 page) from a form that has some database fields and 2, 4D View areas. The form looks like this below. The question is, how to best approach a solution for this. Where to start ? greetings ernie hilgers(aruba) Employee name: date: function: employee#: ss#: (here start of 4D view area# 1) - - - - - - - - - - (end 4D view area# 1) database field comments#1 ,,comments#2 ,,comments#3 ,,comments#4 (here start of 4D view area# 2) - - - - - - - - - - (end 4D view area# 2) ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
Re: Open a document in compiled: ok, but when with standalone get message: invalid path name
Solved… Thank to all that gave me pointers & suggestions !! > $tDocRef:=Open document($DocPath_t;”*";Read mode) > > this is the point when I get the “file not found” error message. > > what am I missing….. ? the error was right after the “open document” command where I do a "Document to blob” I did NOT supply the document-path but only the document-name. :-( In my “impatience” to quickly finish this program of a couple of lines, I was not reading the error message thorough enough. the cmd “open document” was on line 30 the cmd "Document to blob" was on line 32. all the time I assumed the error was referring to line 30. after doing what Timothy Penner suggested: split the program up into smaller parts (more or less) the detail of the error messages caught my eye, that’s when I found my editorial error. thanks for all who gave me feedback !! Greetings ernie hilgers(aruba) ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
Open a document in compiled: ok, but when with standalone get message: invalid path name
Using 4D v15.6 on pc W7 Made a small program, no fields are used, no tables are used or present all memory based and there is a “datafile” because 4D requires that. When running during interpreted and compiled, and open 1 particular file, using cmd “open document” there is no error message and 4D “opens” the file, and every things works as designed. But when I run that same program, as stand-alone, the file is NOT opened because of the following message: -The path name is invalid- File not found with error message#: -43 File not found. The file path is obtained by doing a drag and drop on an area, the cmd: $DocPath_t:=Get file from pasteboard(1) some validation…. then I use: $tDocRef:=Open document($DocPath_t;”*";Read mode) this is the point when I get the “file not found” error message. wrote this little program in 2 hours but I’ve spend 8 hours reading up on this single issue, changed to read-write etc. etc. But now I don’t know how to proceed. Can anyone have any pointers to why this is happening. path is the same in every situation, I put the path in a text variable to be displayed on screen and there is no difference in the path, even after the error, the same path (info) is shown in the variable. what am I missing….. ? greetings ernie hilgers(aruba) ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
soap messages somehow not read by 4d
Hi All, I've been struggling to understand why 4D (v13 or v15 mac or pc) is not reading a (supposed to be) Soap message, which is send by a ElectricCar Charge station (acting as a soap client) to a processing unit acting as a soap-server (4D). problem: I am not able to 'receive' the Soap message, 4D is not reacting. With a program called "ComCap" running on a laptop in W7, I can 'capture' the first soap message coming from the client (charge station) during boot-time, but 4D is not reacting on that msg at all, not with a trace in the -On Web Authentication- method. I cannot determine IF 4D is getting this and secondly HOW to determine it's sending me a "BootNotification" -request (understand/decypher what request) is coming in. There can be many. I have gone thru all the pages of the book : The 4Th Dimension-Web Services Companion by David Adams (excellent book) however I would have likened to see more complete examples. I understand, mundane for the writer but indispensable to the student. but have not been able to make this incoming msg to 'receive', mostly because the topic is new and unfamiliar. although I have done some limited work using Soap before but that was all 4D, server and client. http://www.w3.org/2003/05/soap-envelope; xmlns:ns="urn://Ocpp/Cs/2012/06/"> http://www.w3.org/2005/08/addressing;> /BootNotification CBI-0e1c0001 SETEC POWER Co.,Ltd CPM CHADEMO AND CCS CPSN SETECCHADEMO CCS CONTROL 01 CBSN SETEC CHADEMO CCS CONTROL 01 1.0 this is how the manual says the message is formed: Defines the BootNotification.req PDU I created a Soap call for testing using 4D as a client and another copy of 4D as the server that works ok and the header I see is completely different than what I caught with ComCap, so I have no clue how to otherwise 'capture' the incoming messages if 4D is not reacting to the first. ip's are correct, DNS are correct, I can ping the ip-address of the charging station. Soap by 4D Connection: Close Content-Length: 924 Content-Type: text/xml; charset=UTF-8 Date: Tue, 25 Dec 2018 23:38:00 GMT Host: 192.168.1.88:8080 SoapAction: "A_WebService#WS_AwakeLookAnser" User-Agent: 4D_HTTP_Client/15.6 http://schemas.xmlsoap.org/soap/encoding/; xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/; xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/; xmlns:xsd="http://www.w3.org/2001/XMLSchema; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;> 1605 195 68.00 Is it possible to "capture" this bootNotification request using another of 4D's web commands ? The port it's sending the message to can be any one. I have set the defaults to 8080. ernie hilgers (aruba) ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
Re: what to do when I don't want back button funtionality in a browser of pages from 4d
I want to thank Paul Dennis and Epperlein, Lutz for their time and effort to answer on this subject. As it seems, I have to insert JavaScript that do 'filter-work' in the background no matter what (for now). >> But there are some hacks around using javascript to mimic the behavior, e.g. >> look at https://stackoverflow.com/q/12381563/1865659. I will get busy (again then) with the links supplied in the answer from Epperlein, Lutz. No way around this for now. Oh well it is what it is. Have a nice day. ernie hilgers(aruba) > -Original Message- > From: 4D_Tech [mailto:4d_tech-boun...@lists.4d.com] On Behalf Of setar accnt > via > 4D_Tech > Subject: what to do when I don't want back button funtionality in a browser > of pages > from 4d > > Hi All, > I am a fledgling developer trying to become more proficient in using 4D and > the web > for in-house applications. > > Sinds many years 4D is capable to send, to the Web browser, the HTML page of > the > Web file stored in the document whose pathname is supplied. > > Every page I send to the browser is cached (back), so if I send first : > page 1, where user enters an account# or other unique identifier > this info is send back to 4d, a query is made (if found) > page 2, is shown with info to, possibly, change > say the data is updated, the page info is send back to 4D, acknowledged > page 3, is send stating successful acceptance of the data. All 3 pages > designed with > simple HTML and inline css. > > If I have 15 such case one morning, I might have 15x 3 pages possibly in the > cache at > that one station / smart device. > Pressing the back-button I can go back and update the data once more and > again send > the page to the 4d database, > which is an absolute no-no. > > Is there a technique or standard that is used with 4D environment that use a > different > approach, besides elaborate javascripts that bent > and force website behavior to behave, e.g. no back button which does work for > one > browser and not another. > > Any tips on this would be very welcome. > > In my ignorance I am thinking like, put up 1 screen for input identifier > same screen (with other html) put up the requested data > at acknowledgement, redraw again screen 1 for input of identifier. > > thus no back-button action possible (?), what’s wrong with this picture ? ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
Re: Adding dates (sync) from 4D to Google Calendar
Hi All, (sorry, made a mistake with the subject). Thanks for pointing the way and the warnings (lol). Was unsuspected humor, me like.. > From: Keisuke Miyako > > you need to > > 1. create a Google account > 2. study the Google Calendar API > 3. use HTTP request to send and receive JSON > 4. and pay Google for using their API. > > the hardest part is 2. > > coding may be a couple hours, > reading can take days. greetings ernie hilgers(aruba) ** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
Re: High Sierra - Export Text in 4D v13.6
I want to thank Chip Scheide, Bernd Frölich and Jeremy French for their feedback and suggestions. > From: Bernd Fröhlich > Subject: Re: High Sierra - Export Textin 4D v13.6 > > Might have to do with how High Sierra is putting Apps in a sandbox if they > are not in the Applications directory. > I had something similar happen a while ago. I don´t remember the details but > if you download 4D in a directory that belongs to a "normal" user you can > start it like before, but the OS is putting it in a sandbox directory with a > random name like 07B29AA87F90481387491D4EEF206BB6. > So if you use commands like Get 4D folder it does not return the folder where > you THINK that 4D is located but the name of the random sandbox folder. > > If you move 4D into the application folder you are asked to authorize with > your admin password and the OS removes that quarantine-bit (or whatever it > uses to mark the app). So from then on everything works as expected even when > you the copy 4D from the applications folder to any other place. > > As I said, my memory is a bit vague but I think your problem might be > connected to this behavior of macOS. Definitely, because it does NOT create this file with os's before High Sierra. Why is v15 not displaying this behavior ? It's definitely something with v13.6. & High Sierra. I will apply a cleanup-method after I export the file, in the way Chip Scheide suggested and will work on this the coming days. > Greetings from Germany, > Bernd Fröhlich In this case I run the 4D database v13.6 either compiled or interpreted with the mac 4D app in High Sierra, in the regular Applications folder that you find on the root. It's not a standalone .app. Have not tried that one yet. >> > From: Jeremy French > Subject: Re: High Sierra - Export Textin 4D v13.6 > > Have you looked at "Design -> Database Settings -> Database -> Temporary > Folder Location”? > > Is the "Temporary File Location" set to the “Resources” folder? > > >> there is a .temp file with a long filename >> (“07B29AA87F90481387491D4EEF206BB6.temp”) ALSO created in that Resource >> folder. The settings --> Database --> Temporary Folder Location is not set and the radiobutton of the 3 choices, the middle one, is set: Data File Folder. Current (location) is empty, as is Choose a folder line. However the folder "Temporary" I encounter in my Data File Folder ( is where I have the structure & datafile and the Resource Folder ) is empty. I do find the .temp file in the Resource Folder. Thank all for their input. Greetings ernie hilgers (aruba) ** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
Re: [SAD NEWS] legendary developer and 4D base-rock Ortwin Zillgen
This is very sad news indeed !! His ever willingness to help out and show new ways to code will absolutely be missed. Just 2 weeks ago he pointed me the way how to tackle a problem I encountered on cartography. > Really sad news :-( Please pass on my condolences to his family. > Unexpected for sure as he posted on just 2 weeks ago about going to the > Summit in Paris. > > His posts here and on will surely be missed. Rest in peace Ortwin. ernie hilgers(aruba) ** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
Screen capture code snippet found on the NUG that I am not able to make work. plse help
Hi Tim Nevels, I was trying to make the code work on my mac 10.6 / 10.8 but somehow I am not getting the snapshot on the desktop. (where I want them, for now) I changed some of your code (see below) but I am not sure if I understand if that makes it work. I am not interested in a windows solution for now. I have no need for a "GetCurrentScreenNumber" so I removed that. the Screen Coordinates is fine and the POSIX path name I modified (I think). Then for quick results I put this code in a button object, so when clicked it would make a screen snapshot of the active 4D window and put it on the desktop. Unfortunately I don't get a snapshot. If you have some minutes to spare, can you give me some pointers where to look for the missing info to make this work. Thank you in advance for your time. ernie hilgers (aruba) > On macOS there is a built in command for doing this called “screencapture” > that you can run with LEP. I have a method called “GetCurrentScreenNumber” > that will return the screen number of the screen the frontmost window is > located on. I can use that with SCREEN COORDINATES to grab just that screen. > > On Windows I was not able to find a built in command to do this. Much > searching lead me to a freeware program called “NirCmd”. > http://www.nirsoft.net/utils/nircmd.html > > This utility does a lot of things, but all I’m interested in is the > “savescreenshotfull” command. I’m getting an image of all screens in case the > user has moves the 4D MDI to a screen other than the main screen. > > Here is my ScreenshotToFile method. You might find it useful. > > // === > // PROJECT METHOD: ScreenshotToFile > > // PARAMETERS: $0 = path to file containing screenshot > > // DESCRIPTION: Take a screenshot in PNG format of the screen where the > frontmost > // window is located and returns the path to the file containing it. > > // macOS support for multiple screens. On Windows you get all screens. > > // CREATED BY: Tim Nevels, Innovative Solutions ©2018 > // DATE: 1/5/18 > // LAST MODIFIED: > // > > C_TEXT($0;$filePath_t) > > C_TEXT($fileName_t;$screenRectOption_t;$command_t;$inputStream_t;$outputStream_t;$errorStream_t) > C_LONGINT($left;$top;$right;$bottom) > > // create temporary file path > $fileName_t:="Screenshot "+String(Current date;ISO date;Current time)+".png" > $fileName_t:=Replace string($fileName_t;"/";"-") // replace slashes with > dashes in file name > $fileName_t:=Replace string($fileName_t;":";".") // replace colons with > periods in file name $filePath_t:=system folder("Desktop")+$fileName_t > // get screen coordinates > SCREEN COORDINATES($left;$top;$right;$bottom ) > > $screenRectOption_t:="-R"+String($left)+","+String($top)+","+String($right)+","+String($bottom) > > // get screenshot $command_t:="screencapture "+$screenRectOption_t+" "+Convert path system to POSIX($filePath_t) > SET ENVIRONMENT VARIABLE("_4D_OPTION_HIDE_CONSOLE";"true") > LAUNCH EXTERNAL > PROCESS($command_t;$inputStream_t;$outputStream_t;$errorStream_t) > > // return file path > $0:=$filePath_t > > Tim ** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: http://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
Re: right click in text variable gets menu with cut copy
Thanks for all that have come to help me with this request, not in any particular order: Chip Scheide, Keisuke Miyako, Tim Nevels Great to have this NUG. greetings and have a great week. ernie hilgers (aruba) ** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: http://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
right click in text variable gets menu with cut copy paste
Hi all, problem / request: A user of one of my database solutions on PC W7 4D v13.6 is complaining that, in many of the alphanumeric fields, there is NO right click with subsequent cut copy paste menu. they absolutely refuse to use any keyboard short-cut, all must be done with the mouse (they are absolutely adamant) . I can create the menu and I am able to show this menu, however they must click a button on the side of the alphanumeric field, clumsy patch they say. It should be that right clicking a text field or variable, this menu pops up. I can't get a text field / variable (or string variable for that matter in 4D v13) to register a click in that field. It becomes active but then a second click is not registered. Is it possible to create such a functionality in v13 or v15 for that matter ? Hope to hear from anyone. greetings ernie hilgers (aruba) ** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: http://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **