Re: 4D UI code questions and observations

2017-01-10 Thread Chuck Miller
I would not go back and change existing code that works to do this. I might and have made use of objects rather than variable on forms when appropriate. I do not think all items on form should be objects, variables, or fields. I think it depends Regards Chuck -

Re: 4D UI code questions and observations

2017-01-10 Thread Douglas von Roeder
On Tue, Jan 10, 2017 at 9:32 AM, Benedict, Tom wrote: > The effort is likely too great to refactor an existing app. It is probably > limited to new apps. Tom: Adopting an entirely new architecture is a daunting task, no question, so caution is understandable. I've added the "form controller" a

Re: 4D UI code questions and observations

2017-01-10 Thread Benedict, Tom
Mitchell Shiller writes: >I suspect that there are others like myself who do not have the in depth >background /experience or education in the theory of MVC, UI Models, etc to go >there entirely on my own. But 4D is critical to my business, so I always look >at ways of improving my coding s

Re: 4D UI code questions and observations

2017-01-09 Thread John DeSoi
> On Jan 9, 2017, at 5:14 PM, David Adams wrote: > > For those (like me) that didn't see it, Cannon made some very interesting > posts to the Forums in France about the Cassowary "constraint solving" > algorithm. This tool is well-known and widely used. There are > implementations in Java, C++,

Re: 4D UI code questions and observations

2017-01-09 Thread Mitchell Shiller
Doug, Cannon, Kirk, David, Arnaud, JPR and all those who have contributed to this interested discussion. Thanks! I am a permanent lurker, routine poster and occasional contributor to the NUG. I suspect that there are others like myself who do not have the in depth background /experience or educ

Re: 4D UI code questions and observations

2017-01-09 Thread David Adams
Our hero is at it again, thanks for the demo. For those (like me) that didn't see it, Cannon made some very interesting posts to the Forums in France about the Cassowary "constraint solving" algorithm. This tool is well-known and widely used. There are implementations in Java, C++, Python, JavaScr

Re: 4D UI code questions and observations

2017-01-09 Thread Cannon Smith
In case anyone is interested, I uploaded the code for a UITimer module: It can be used to set up and manage a few different timer types in 4D forms including one for handling animations. The animations are set up declaratively by t

Re: 4D UI code questions and observations

2017-01-09 Thread Cannon Smith
It is where I’d like to go, but most of what I’ve done so far focuses on the lower level bits of the MVC pattern like binding UI objects to the model. So for relatively simple UI objects like numbers, dates, popups, etc., the modules do basically what you are talking about: set the object up and

Re: 4D UI code questions and observations

2017-01-09 Thread Douglas von Roeder
Chip: Ah, yes. I created *Self_Name* but rarely use it. C_TEXT($0) $0:=OBJECT Get name(Object current) -- Douglas von Roeder 949-336-2902 On Mon, Jan 9, 2017 at 9:29 AM, Chip Scheide <4d_o...@pghrepository.org> wrote: > I have that code as well... > but the question was in context of DA's

Re: 4D UI code questions and observations

2017-01-09 Thread Chip Scheide
I have that code as well... but the question was in context of DA's issue with Get Object Pointer vs Get Object Name On Mon, 9 Jan 2017 09:19:13 -0800, Douglas von Roeder wrote: > Chip: > 4D has said that command will be deprecated at some time in the future but > I'd bet we'll see it in V16 - re

Re: 4D UI code questions and observations

2017-01-09 Thread Douglas von Roeder
Chip: 4D has said that command will be deprecated at some time in the future but I'd bet we'll see it in V16 - remember how long it took for subtables to be deprecated? I've started using *Self_* which consists of: C_POINTER($0) $0:=OBJECT Get pointer(Object current) Don't know if using that r

Re: 4D UI code questions and observations

2017-01-09 Thread Arnaud de Montard
> Le 9 janv. 2017 à 16:08, Chip Scheide <4d_o...@pghrepository.org> a écrit : > > > What about : > Self > ?? The doc says it's deprecated and to use OBJECT Get pointer instead. For my own, I use Self a lot and prefer say the same thing in 4 letters instead of 18. -- Arnaud de Montard *

Re: 4D UI code questions and observations

2017-01-09 Thread Nigel Greenlee
David i was going to reply to just one section of this yesterday but did not get time to find my code. You mentioned problems with getting best object size to work with listbox columns..i cant remember if i had a problem or just never really tried using it on the list box column. When i was t

Re: 4D UI code questions and observations (Cannon Smith)

2017-01-09 Thread info
> Yes, subform’s can be typed as C_Objects now. Very nice! > > -- > Cannon Smith > > > On Jan 8, 2017, at 10:58 AM, Kirk Brooks wrote: > > > > For subforms I will make the subform object a text > > type var (c-obj type is in v16?) and stringify the c-obj to it. some reading

Re: 4D UI code questions and observations

2017-01-09 Thread Chip Scheide
What about : Self ?? Chip ** 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

Re: 4D UI code questions and observations

2017-01-09 Thread Cannon Smith
Hi Kirk, Yes, subform’s can be typed as C_Objects now. Very nice! -- Cannon Smith Synergy Farm Solutions Inc. Hill Spring, AB Canada 403-626-3236 > On Jan 8, 2017, at 10:58 AM, Kirk Brooks wrote: > > For subforms I will make the subform object a text > type var (c-obj type is in v16?) and s

Re: 4D UI code questions and observations

2017-01-09 Thread Spencer Hinsdale
thank you! > On Jan 9, 2017, at 4:54 AM, Arnaud de Montard wrote: > > >> Le 9 janv. 2017 à 13:26, Spencer Hinsdale a écrit : >> >> Hi Arnaud, >> >> What is 4dbb? > > Hi Spencer, > 4dbb stands for "4d bulletin board", the "official" 4d forum. > > > -- > Arnaud de

Re: 4D UI code questions and observations

2017-01-09 Thread Arnaud de Montard
> Le 9 janv. 2017 à 13:26, Spencer Hinsdale a écrit : > > Hi Arnaud, > > What is 4dbb? Hi Spencer, 4dbb stands for "4d bulletin board", the "official" 4d forum. -- Arnaud de Montard ** 4D Internet

Re: 4D UI code questions and observations

2017-01-09 Thread Spencer Hinsdale
Hi Arnaud, What is 4dbb? thanks, Spencer > On Jan 9, 2017, at 1:07 AM, Arnaud de Montard wrote: > > >> Le 9 janv. 2017 à 00:38, David Adams a écrit : >> >> [...] >> * Reading 4D code on the NUG is pretty hard to do. > > I do like inug, but really, from that point of view, 4dbb is another

Re: 4D UI code questions and observations

2017-01-09 Thread Arnaud de Montard
> Le 9 janv. 2017 à 00:38, David Adams a écrit : > > [...] > * Reading 4D code on the NUG is pretty hard to do. I do like inug, but really, from that point of view, 4dbb is another world… In France we had 4d-forum, similar to inug. In a few years, quite all contributors went on 4dbb. -- Ar

Re: 4D UI code questions and observations

2017-01-08 Thread Jim Dorrance
I've use an OM and FM like Arnaud since sometime in the last century: C_LONGINT($1;$nFormEvent) //FORM EVENT C_TEXT($2;$tObjectName) //OBJECT NAME FROM CURRENT METHOD NAME C_POINTER($3;$pObjectPtr) //SELF C_LONGINT($nParamCount) $nParamCount:=Count parameters Case of : ($nParamCount=3) $nFor

Re: 4D UI code questions and observations

2017-01-08 Thread David Adams
Hey! Thanks to everyone for the detailed and intriguing responses so far. I've got some stuff on my plate so will have to put off more detailed responses, but wanted to send my thanks immediately and add a couple of thoughts that might bring out a few more details. Also, I want to acknowledge that

Re: 4D UI code questions and observations

2017-01-08 Thread Kirk Brooks
Arnaud, On Sun, Jan 8, 2017 at 10:41 AM, Arnaud de Montard wrote: > Looks quite similar to Cannon's logic in his OB module… > ​True. I like the way the code reads in this syntax. Also keep in mind those methods I mentioned are for dealing with form objects, not c-objs. The names get confusing. ​

Re: 4D UI code questions and observations

2017-01-08 Thread Arnaud de Montard
> Le 8 janv. 2017 à 18:58, Kirk Brooks a écrit : > > [...] I went in a slightly different direction: > > OBJECT_SET_TEXT("objectName";"text value to set") > > $text:=Object_get_text("objectName")​ > > OBJECT_SET_toPointer("objectName";$pointer) // handles any data type Looks quite similar to

Re: 4D UI code questions and observations

2017-01-08 Thread Arnaud de Montard
> Le 8 janv. 2017 à 18:58, Kirk Brooks a écrit : > > [...] > > ​The hardest thing for me when I started working with dynamic variables and > the new form options was getting past my old, old habits about making forms > in 4D. [...] I remember began to feel "like a hen with a knife" (typical fr

Re: 4D UI code questions and observations

2017-01-08 Thread Kirk Brooks
Arnaud, ​It looks like we are doing very similar things. ​ On Sun, Jan 8, 2017 at 8:26 AM, Arnaud de Montard wrote: > > • $1, $2…? > before v12, a friend of mine and I used form event as 1st entry point in > our Form managers, and optional pointer on the source object as $2. > ​There's no​ need

Re: 4D UI code questions and observations

2017-01-08 Thread Arnaud de Montard
> Le 7 janv. 2017 à 23:03, David Adams a écrit : > > [...] > > > OBJECT GET BEST SIZE > > OBJECT GET BEST SIZE & listbox columns. WTF? The docs say that you should > get a calculation of the ideal

Re: 4D UI code questions and observations

2017-01-08 Thread Arnaud de Montard
> Le 8 janv. 2017 à 04:08, Kirk Brooks a écrit : > > [...] My basic template is this: > > C_TEXT($1;$2;$action;$errMsg) > C_POINTER($ptrCurrent;$ptrObj) > > $ptrCurrent:=OBJECT Get pointer(Object current) > If (Count parameters=0) > $action:=OBJECT Get name(Object current) > Else > $action:=

Re: 4D UI code questions and observations

2017-01-07 Thread Kirk Brooks
Doug, On Sat, Jan 7, 2017 at 6:37 PM, Douglas von Roeder wrote: > Kirk hasn't had to, AFAIK, get to the level of putting a project method in > every object ​Well, yeah - that's actually what I do. but it's the 'form controller' method in each one. This moves the actual code out of the object, w

Re: 4D UI code questions and observations

2017-01-07 Thread David Adams
> I’ve actually toyed with the idea for the next Summit. Right now I’m figuring out which parts of this > “wonderful" theory work in real life—trial by fire! Hopefully by then I’ll have been able to sift the wheat > from the chaff. Do it! Do it! Do it! What you describe is pretty ambitious and I'

Re: 4D UI code questions and observations

2017-01-07 Thread Cannon Smith
I’ve actually toyed with the idea for the next Summit. Right now I’m figuring out which parts of this “wonderful" theory work in real life—trial by fire! Hopefully by then I’ll have been able to sift the wheat from the chaff. Here is a list of the modules I created: - UIModel. For the model lay

Re: 4D UI code questions and observations

2017-01-07 Thread Cannon Smith
> On Jan 7, 2017, at 7:43 PM, Douglas von Roeder wrote: > > Thank you for passing that along. Per my reply to David, I hit an issue > with a child/sibling/asterisked form last year that had just those symptoms > and I"m wondering if what you've described was the underlying issue. > Something to c

Re: 4D UI code questions and observations

2017-01-07 Thread David Adams
On Sun, Jan 8, 2017 at 11:31 AM, Cannon Smith < can...@synergyfarmsolutions.com> wrote: > > Anyone deliberately implementing an MVC pattern in V16? Comments on > trade-offs in > > a 4D-specific implementation? > > I have. Unfortunately I haven’t had the time recently to contribute much > on the to

Re: 4D UI code questions and observations

2017-01-07 Thread Kirk Brooks
David, You touch on a great number of things here. I'm going to speak to what I've been doing with the idea of a 'form controller' as Doug mentioned. BTW - the issue with the difference between what's returned by OBJECT Get pointer and OBJECT Get name is actually even documented somewhere, though

Re: 4D UI code questions and observations

2017-01-07 Thread Douglas von Roeder
On Sat, Jan 7, 2017 at 4:31 PM, Cannon Smith < can...@synergyfarmsolutions.com> wrote: > (But make sure you make these variables fairly big, like 200 px x 200 px. > Even though they are invisible, there is a bug in 4D which makes things > _really_ slow if the actual C_Object variables on the form

Re: 4D UI code questions and observations

2017-01-07 Thread Douglas von Roeder
David: Whether or not my approach is valid, it appears that I can at least explain it to someone. :-) Kirk hasn't had to, AFAIK, get to the level of putting a project method in every object but, as we know from experience, there's huge variation in how applications are structured so the approach

Re: 4D UI code questions and observations

2017-01-07 Thread Cannon Smith
> Anyone deliberately implementing an MVC pattern in V16? Comments on > trade-offs in > a 4D-specific implementation? I have. Unfortunately I haven’t had the time recently to contribute much on the topic, but I am finding the pattern nice in a lot of ways. Without much detail, here is how I’ve

Re: 4D UI code questions and observations

2017-01-07 Thread David Adams
If I'm following your example, it's something like this: - Object script - -- Package up details about -- what got the event -- what the event is -- Pass this package of data up to a project method for this form named Proposals_FM In native V

Re: 4D UI code questions and observations

2017-01-07 Thread Peter Jakobsson
On 7 Jan 2017, at 23:03, David Adams wrote: > After spending time with a group of 4D developers who are sold on > no-process-variables on forms If you carry on down this road you might dicover you’ve re-written v1 of 4D (in 4D ! ;) ) Peter

Re: 4D UI code questions and observations

2017-01-07 Thread Douglas von Roeder
David: Great topic to bring up and good to hear that you're getting back into using 4D's UI again. "OBJECT Get name and OBJECT Get pointer *only make sense when called from an object script.*" Agreed. Per below, I've run into that behavior and have adjusted my code design. "Any comments or tips

4D UI code questions and observations

2017-01-07 Thread David Adams
I wrote this up the other week and never got around to posting it. I've still got the same questions as I haven't had time to go back to UI stuff recently. Any tips, design concepts, etc. appreciated. After spending time with a group of 4D developers who are sold on no-process-variables on forms,