Re: Thinking through object/text fields: Findings summarized, advice solicited
Thanks for the people that answered "what has Postgres have to do with 4D" so well. Also, thanks for the advice on tools. My quick findings for desktop tools (I didn't look at Web tools) Valentina Studio Surprisingly good and complete for a free tool. Design, admin, and data browsing. The 'pro' version offers reporting features, etc. but the free version is all I'll likely ever need. Navicat 12 Hey! I like it better than Naviat 11. To each their own. If they don't have a feature, it probably doesn't exist. Postico A simple design and browe tool. Looks nice. From the folks that put the server together that Lee recommended. Postgres.app. I'm running that on OS X (10.12.5) and it took only a couple of minutes to set up, just like it said on the tin. SQLPro for Postgres (no relation to Sequel Pro for MySQL.) A bit cheaper than Postico (neither are expensive) and, it looked to me, a bit more capable. Not for admin, but for design and browsing. There are free trials available for all of the paid products. External databases can really extend the usefulness of 4D, so it's great to have tools available. I would, by preference, only use MySQL/MariaDB or Postgres because Rob's plug-ins let us avoid ODBC. At this point, I'd prefer Postgres because, well, it's just kind of mind-blowingly impressive and well-supported by cloud-based stuff. In the whole MySQL vs. Postgres conversation, I have never met anyone that picked Postgres and regretted not using MySQL. The other way around? Yes. But plenty of MySQL users are totally happy and have no regrets, so it's not worth leaving it if you like it and it's working. But when starting from scratch, I'm going to vote for Postgres. ** 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 **
Choose - I love it :)
OBJECT SET TITLE(*;"obj_Extension_Title";Choose(rb_Replace=1;"New Extension";"Extension")) GOTO OBJECT(*;Choose(rb_Replace=1;"obj_x_Replacment";"obj_x_Extension")) :) --- Gas is for washing parts Alcohol is for drinkin' Nitromethane is for racing ** 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: Collections in v16R4
I saw that in the 4D Blog this morning. http://blog.4d.com/new-type-of-variable-collections/ I've not yet come to grips with objects. This seems like something I can get my hands around. I also saw the new SDI mode for windows. My first reaction was... eehhh, its a windows only thing and I'm a mac guy. But I looked anyway and it turned out to be something I was very happy to see. Getting rid of the 4D background window. In my opinion, 4D generally looks inferior on windows and this will be a big help. http://blog.4d.com/4d-introduces-sdi-mode-for-applications-on-windows/ -- View this message in context: http://4d.1045681.n5.nabble.com/Collections-in-v16R4-tp5753225p5753226.html Sent from the 4D Tech mailing list archive at Nabble.com. ** 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 **
Collections in v16R4
This is fascinating: http://blog.4d.com/new-type-of-variable-collections/ 1. "Arrays" of random data types. 2. Elements are accessed with [] not {}. E.g MyCollection[8] 3. The first element starts at zero. 4. They have an associated method - length. MyCollection.length 5. Appending past the length of the collection results in padding. That is if your collection is currently 5 items long, adding something at position 10 MyCollection[10]:="something" will add intermediate null items. http://doc.4d.com/4Dv16R4/4D/16-R4/C-COLLECTION.301-3342374.en.html http://doc.4d.com/4Dv16R4/4D/16-R4/New-collection.301-3342875.en.html ** 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: Use of Objects vs Global Variables (Was 'Arrays vs Objects...)
Long ago - and I am pretty sure the code has been lost to time - in v2.2.3 (I think) I wrote code to do binary searching on a selection, as at that time Search Selection (the old command name) was sequential, but sorting the selection was indexed. Even with the overhead of managing the pointers, and stepping through records to find all matching records in the selection, as memory serves, it was faster (interpretedly) to use the binary search on a selection size of beginning at 6-8 records. For those who care, an outline of a binary search (on records in selection) The following was written off the stop of my head, in the email editor, BUT it gets to the basics of a binary search on a selection in 4D. - get size of selection ($Selection_Size). - make sure it is sorted on the field you want to search on. repeat $Current_record:= int($Selection_Size/2) repeat goto selected record([table];$Current_record) case of :($Current_record>=$Selection_Size) or ($Current_record<=1) $Not_Found:=true :([table]field = Value) // found it create collection of matching records add to set([table];"Matching") $previous:=$Current_record $Next:=$Current_record repeat $previous:= previous-1 goto selected record([table];$previous) if ([table]field = Value) // found it create collection of matching records add to set([table];"Matching") else $previous:=0 end if until($previous=0) repeat $$Next:= $Next+1 goto selected record([table];$Next) if ([table]field = Value) // found it create collection of matching records add to set([table];"Matching") else $Next:=Selection_Size end if until($Next= Selection_Size) $Mo_More_Matches = true :([table]field > Value) // Not found current record value > search value $Current_record:=int((1+$Current_record)/2) :([table]field < Value) // Not found current record value < search value $Current_record:=int((Selection_Size+1+$Current_record)/2) end case until ($Not_Found)) or ($No_More_Mathes) At this point the set "Matching" contains all records matching the criteria, or nothing. On Tue, 18 Jul 2017 22:16:18 +1000, David Adams via 4D_Tech wrote: > > And, lest anyone forget, you can use binary search logic on sorted > selections with GOTO SELECTED RECORD. Why not? --- Gas is for washing parts Alcohol is for drinkin' Nitromethane is for racing ** 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: Trace buttons disappeared (OS X 11.12, 4D v14.6)
You can also do this with code // //User name (OS): Chuck Miller //Date and time: 08/09/16, 13:36:59 // //Method: ut_ResetWindowDefaults //Description //This method will delete and therefore reset debugger pane. It can be used as a basis for resetting other windows from a designer perspective as well // Parameters // If (False) End if C_TEXT($1;$Path_txt) Case of : ($1="ALL") ut_ResetWindowDefaults ("Debugger") ut_ResetWindowDefaults ("pref_Database") ut_ResetWindowDefaults ("Explorer") : ($1="Debugger") $Path_txt:=Get 4D folder(Active 4D Folder)+"4D Window Bounds v"+Substring(Application version;1;2)+Folder separator+"coreDialog"+Folder separator+"[projectForm]"+Folder separator+"4ddebugger.json" If (Test path name($Path_txt)=Is a document) DELETE DOCUMENT($Path_txt) End if : ($1="Explorer") $Path_txt:=Get 4D folder(Active 4D Folder)+"4D Window Bounds v"+Substring(Application version;1;2)+Folder separator+"development"+Folder separator+"[projectForm]"+Folder separator+"Explorer.json" If (Test path name($Path_txt)=Is a document) DELETE DOCUMENT($Path_txt) End if : ($1="pref_Database") $Path_txt:=Get 4D folder(Active 4D Folder)+"4D Window Bounds v"+Substring(Application version;1;2)+Folder separator+"development"+Folder separator+"[projectForm]"+Folder separator+"pref_Database.json" If (Test path name($Path_txt)=Is a document) DELETE DOCUMENT($Path_txt) End if End case //End ut_ResetWindowDefaults Regards and hope this helps Chuck On Tue, Jul 18, 2017 at 9:24 AM, Julio Carneiro via 4D_Tech < 4d_tech@lists.4d.com> wrote: > I had the same issue this week. > > - open your user Library folder in Finder (option-Go->Library) > - go to Application Support -> 4D > - delete folder "4D Window Bounds v16” > > That’ll reset all window bounds to a default setting. > > hth > julio > > > On Jul 18, 2017, at 2:19 PM, Claudio Braga via 4D_Tech < > 4d_tech@lists.4d.com> wrote: > > > > Hi everyone, > > > > I just encountered this problem, the buttons in the trace window are > invisible (or hidden under the window bar). > > > > > > > > Any trick to reset this ? > > > > Thanks in advance > > > > Ciao > > > > > > > > Claudio Braga > > ** > > claudiobr...@me.com > > claudiobr...@mac.com > > claudiobr...@icloud.com > > ** > > > > -- > Julio Carneiro > jjfo...@gmail.com > > > > ** > 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 > ** > -- - Chuck Miller Voice: (617) 739-0306 Fax: (617) 232-1064 Informed Solutions, Inc. Brookline, MA 02446 USA Registered 4D Developer Providers of 4D, Sybase & SQL Sever connectivity http://www.informed-solutions.com - This message and any attached documents contain information which may be confidential, subject to privilege or exempt from disclosure under applicable law. These materials are intended only for the use of the intended recipient. If you are not the intended recipient of this transmission, you are hereby notified that any distribution, disclosure, printing, copying, storage, modification or the taking of any action in reliance upon this transmission is strictly prohibited. Delivery of this message to any person other than the intended recipient shall not compromise or waive such confidentiality, privilege or exemption from disclosure as to this communication. ** 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 **
errors on built client
Hi all, environment Mac server v15.4hf2 server (64 bit) windows built client (32 bit) I am getting errors 1209 (Can not receive request) and then 1 (read failed) on the client, which I think mean connection lost in some way. Can anyone confirm. It would be great if 4D errors were more descriptive between occurrence on server and occurrence on client. If this error were on the server I would run MSC Is there any enhancement request that anyone knows of to make the descriptions more relevant to reality. I have also gotten errors like null point reached and read past end of file on client. Thanks and regards Chuck -- - Chuck Miller Voice: (617) 739-0306 Fax: (617) 232-1064 Informed Solutions, Inc. Brookline, MA 02446 USA Registered 4D Developer Providers of 4D, Sybase & SQL Sever connectivity http://www.informed-solutions.com - This message and any attached documents contain information which may be confidential, subject to privilege or exempt from disclosure under applicable law. These materials are intended only for the use of the intended recipient. If you are not the intended recipient of this transmission, you are hereby notified that any distribution, disclosure, printing, copying, storage, modification or the taking of any action in reliance upon this transmission is strictly prohibited. Delivery of this message to any person other than the intended recipient shall not compromise or waive such confidentiality, privilege or exemption from disclosure as to this communication. ** 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: Trace buttons disappeared (OS X 11.12, 4D v14.6)
I had the same issue this week. - open your user Library folder in Finder (option-Go->Library) - go to Application Support -> 4D - delete folder "4D Window Bounds v16” That’ll reset all window bounds to a default setting. hth julio > On Jul 18, 2017, at 2:19 PM, Claudio Braga via 4D_Tech <4d_tech@lists.4d.com> > wrote: > > Hi everyone, > > I just encountered this problem, the buttons in the trace window are > invisible (or hidden under the window bar). > > > > Any trick to reset this ? > > Thanks in advance > > Ciao > > > > Claudio Braga > ** > claudiobr...@me.com > claudiobr...@mac.com > claudiobr...@icloud.com > ** > -- Julio Carneiro jjfo...@gmail.com ** 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 **
Trace buttons disappeared (OS X 11.12, 4D v14.6)
Hi everyone, I just encountered this problem, the buttons in the trace window are invisible (or hidden under the window bar). Any trick to reset this ? Thanks in advance Ciao Claudio Braga ** claudiobr...@me.com claudiobr...@mac.com claudiobr...@icloud.com ** ** 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: Use of Objects vs Global Variables (Was 'Arrays vs Objects...)
> The original thread on "Arrays vs Object for Key/Value pair lookups” is a good case in point. Yes there is a huge > performance boost in using objects (I hold my hands up - I’m doing it ! LoL), but I’m retaining the use of ‘parallel arrays’ > for much of the code simply because they’re so nice and trackable everywhere. As David Adam’s say, the performance > gain is huge but has to be weighed against other priorities. Hey Peter, my point was arguably the opposite - the performance gains for using an object instead of a sorted array are *trivial* (best case) and negative (worst case.) Object setup/teardown is more time-consuming and a binary search is fast and remains fast even with billions of items. (In theory.) Unsorted array searches are just slower by nature...they're sequential so the pain only gets worse with larger arrays and when you're searching for elements to the end of the array. I'm very pleased that 4D now has a native binary search on arrays, and I'm happy with how it's implemented. It's perfect for everything I needed it for. Indeed such a thing earlier this year, rewrote an old Dave Terry tech note, posted the code here and...someone quickly said, "U, have you seen the Language Reference lately?" If anyone out there doesn't understand why binary searches are faster (so much faster) than standard sequential scans, and why they depend on sorted values, it's easy to understand. Google it and you should be able to figure it out in a few minutes. And, lest anyone forget, you can use binary search logic on sorted selections with GOTO SELECTED RECORD. Why not? ** 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 **
Use of Objects vs Global Variables (Was 'Arrays vs Objects...)
This is just a brief commentary on my experience with objects after about a year of using them intensively. I now use them extensively for certain things but have ditched them for others where I had initially thought they may have a role. But one of the reasons I don’t use 4D objects too widely is because I find 4D global variables to really represent the skeleton of an application. I don’t mean that in a functional sense, but in an architectural sense because I see 4GL’s as tending to support a “top down” implementation and 3GL’s more suited to “bottom up” implementations. “Top down” being where properties & logic from systems analysis itself themselves explicitly in and detectably in the code, whereas ‘bottom up’ meaning you’re just developing a load of tools to do…whatever. If you use objects to represent major business logic properties that persist across methods, I’ve found you can end up with a whole load of extra work to do at the architecture level AND at the code level. For example: • one is constantly stuffing and unstuffing all kings of “property bags” in order to manipulate the properties to the point that the business logic gets drowned in a morass of utility code • much of the ‘formal verification’ role of the compiler is lost since objects obfuscate the identity of high level business logic properties that are otherwise completely unambiguous when they manifest as globals • refactoring is an order of magnitude more of a pain since the IDE is almost oblivious to property naming collisions and because we now have to levels of hierarchy to deal with instead of 1 (object and property) The original thread on "Arrays vs Object for Key/Value pair lookups” is a good case in point. Yes there is a huge performance boost in using objects (I hold my hands up - I’m doing it ! LoL), but I’m retaining the use of ‘parallel arrays’ for much of the code simply because they’re so nice and trackable everywhere. As David Adam’s say, the performance gain is huge but has to be weighed against other priorities. The are where I find objects of most benefit is in transport. For example you need to populate a field with some complex hierarchical data that gets passed to another table in a trigger or something like that. Here it really does something which 4D had very little support for before objects arrived. Just my 2c on objects so far ! Regards Peter ** 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: Thinking through object/text fields: Findings summarized, advice solicited
Hi Kirk, Navicat is just a GUI tool to view and manipulate PostgreSQL data. It is really that PostgreSQL helps me with 4D. 4D is great, but PostgreSQL is better suited for many tasks. I use it for websites (with Drupal) and sync the necessary data with 4D. I also use it a lot for preprocessing data that needs to be imported into 4D. John > On Jul 17, 2017, at 12:08 PM, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> > wrote: > > I haven't done very much communicating from 4D to a SQL database so this is > a very naive question - but could you talk about how a tool like Navicat > helps you with 4D? ** 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 **