Re: Components: How do you reuse utility code?

2017-04-21 Thread David Adams via 4D_Tech
On Sat, Apr 22, 2017 at 12:44 PM, Peter Jakobsson via 4D_Tech < 4d_tech@lists.4d.com> wrote: > A single developer needs to reproduce the same code over again for many > applications. A component-based approach requires them to distill out and > de-couple business logic so that it is explicitly

Re: components - questions about variable scope

2017-04-21 Thread Wayne Stewart via 4D_Tech
Chip, Totally separate variable name space. You can access variables via pointer and that's it. Otherwise I use access methods quite a lot. Consider this method (from a component) to set a variable associated with a boolean: // Project Method: Wnd_CloseBox ({Include a close box?}) -->

Re: Components: How do you reuse utility code?

2017-04-21 Thread Peter Jakobsson via 4D_Tech
Jim - I read all of your post with interest. But with respect, IMHO it really does not do the least bit of justice to the real world applications that 4D’s component architecture is designed to address. Nor does it reflect the practice of a component based development paradigm. For example

Re: Object visualize / browse

2017-04-21 Thread Douglas von Roeder via 4D_Tech
David: "component" - yup. if I price it right, I'll corner the entire market. Agree about the hList idea. No question that once you get past a few dozen rows, the quick and dirty scrolling variable approach *would* get old. -- Douglas von Roeder 949-336-2902 On Fri, Apr 21, 2017 at 6:12 PM,

Re: Object visualize / browse

2017-04-21 Thread David Adams via 4D_Tech
> Sounds like a great idea for a… > component. :-) While you are clearly a bad, bad man...I look forward to your component ;-) I do really like the idea an object bound to an hlist. That would make a very nice feature. Hlists already have all of the gooey goodness we would want. It's just the

Re: Object visualize / browse

2017-04-21 Thread Douglas von Roeder via 4D_Tech
David: No magic. Just the content of the string/Obect in a variable on the form that you can scroll. It's quite "straightforward" in that it displays the same data from the Object but doesn't have the UI controls of the debugger. That would be *quite* nice. The work I've done to date with

Re: Object visualize / browse

2017-04-21 Thread David Adams via 4D_Tech
> If you're in V16.something, you can create a dynamic variable of type > Object. If text var. It sounds like there's some magic to be had here that I haven't heard of. I just tried in V16 and found that setting an 'object'

Re: Object visualize / browse

2017-04-21 Thread David Adams via 4D_Tech
> Can anyone suggest a straightforward approach to displaying a 4D object as a > browsable item - something like what you see in the debugger window, only in > a dialog form? It's awkward to do with native 4D commands alone because: * There's no way to parse or navigate JSON as a tree. *

Re: Object visualize / browse

2017-04-21 Thread Douglas von Roeder via 4D_Tech
Justin: If you're in V16.something, you can create a dynamic variable of type Object. If

Object visualize / browse

2017-04-21 Thread Justin Leavens via 4D_Tech
Can anyone suggest a straightforward approach to displaying a 4D object as a browsable item - something like what you see in the debugger window, only in a dialog form? -- View this message in context: http://4d.1045681.n5.nabble.com/Object-visualize-browse-tp5751523.html Sent from the 4D Tech

Re: Components: How do you reuse utility code?

2017-04-21 Thread David Adams via 4D_Tech
Jim Crate wrote: > Depends on what you consider 3GL vs 4GL Yeah, I find the terms unhelpful. They aren't crisp enough to mean anything useful without a lot of discussion about what you mean by each term first ;-) > These are both tight coupling. This is compile-time vs runtime binding. I'm

Re: Components: How do you reuse utility code?

2017-04-21 Thread James Crate via 4D_Tech
On Apr 21, 2017, at 12:41 PM, Peter Jakobsson via 4D_Tech <4d_tech@lists.4d.com> wrote: > > On 21 Apr 2017, at 02:44, Tim Nevels via 4D_Tech <4d_tech@lists.4d.com> wrote: > >> I think we sometimes forget that 4D is not a 3GL programming language like C >> or C++. 4D is a 4GL language. You

Tom Benedict's rule engine - something that you need to know about.

2017-04-21 Thread David Adams via 4D_Tech
Tom Benedict mentioned in passing that a "rule engine" he presented at the Summit in 2014 might be the right tool to help John Foster solve a problem. My ears perked up because I've long wanted to have a rule engine in 4D but haven't taken the time to write one. Tom hooked me up with the notes (I

components - questions about variable scope

2017-04-21 Thread Chip Scheide via 4D_Tech
I am working on my first component - all the chat about them :) process and inter process variables what can be seen by the component of/from the host, and vis-verse At the moment - I am looking at an inter process var in my nascent component, can the host database see this? if I change an IP

Re: Components: How do you reuse utility code?

2017-04-21 Thread David Adams via 4D_Tech
On Sat, Apr 22, 2017 at 2:41 AM, Peter Jakobsson via 4D_Tech < 4d_tech@lists.4d.com> wrote: What a fantastic post! Peter, thanks so much for taking the time to share your point of view and knowledge. This is a help to me now, and an excellent contribution to the archives. I've already said my

Re: Components: How do you reuse utility code?

2017-04-21 Thread Tim Nevels via 4D_Tech
On Apr 21, 2017, at 2:00 PM, Peter Jakobsson wrote: > On 21 Apr 2017, at 02:44, Tim Nevels via 4D_Tech <4d_tech@lists.4d.com> wrote: > >> I think we sometimes forget that 4D is not a 3GL programming language like C >> or C++. 4D is a 4GL language. You don’t get all the feature, benefits and >>

Re: Components: How do you reuse utility code?

2017-04-21 Thread Robert McKeever via 4D_Tech
Remember subtables inside of subtables? (4D v1.xxx). Lots of fun - if used right. > On Apr 21, 2017, at 8:31 AM, Keith White via 4D_Tech <4d_tech@lists.4d.com> > wrote: > >> If they did care, some of these things could have been added instead of >> querying on object fields that most people

Re: Components: How do you reuse utility code?

2017-04-21 Thread Peter Jakobsson via 4D_Tech
On 21 Apr 2017, at 02:44, Tim Nevels via 4D_Tech <4d_tech@lists.4d.com> wrote: > I think we sometimes forget that 4D is not a 3GL programming language like C > or C++. 4D is a 4GL language. You don’t get all the feature, benefits and > capabilities of a 3GL language in a 4GL language. Remember

Re: Converting Little Endian Byte Representation To a String

2017-04-21 Thread Cannon Smith via 4D_Tech
Hi Arnaud, Interesting idea. In all actuality, even though we call the tag a “number", it is always treated as a string. This algorithm I needed help with was the first time in 10 years I needed to think of it as a number, and that was only a temporary step for the way the algorithm worked.

Re: Methods, Components, Comments, and Tooltips

2017-04-21 Thread John DeSoi via 4D_Tech
> On Apr 21, 2017, at 9:59 AM, Chip Scheide <4d_o...@pghrepository.org> wrote: > > What does this project method look like? > > Case of > :(form event=) > case of > :(Last object = ) > do stuff Example below. All calls to Form event in the database are replaced with a wrapper

Re: Components: How do you reuse utility code?

2017-04-21 Thread Keith White via 4D_Tech
>If they did care, some of these things could have been added instead of >querying on object fields that most people will eventually wish they didn’t >use in the first place. This made me smile a lot.I had exactly the same thought. It brings back memories of subtables which I'm sure every

Re: Dynamic Method Creation & Content Changing

2017-04-21 Thread truegold via 4D_Tech
Hi Nigel, First I know the issue of using 4D List as a short cut for using a real lookup of records in a table, aka choice list, for example. I have a client who has an app (I have inherited this one as well) where there are hundreds of these and they are having the kinds of problems you

Re: Components: How do you reuse utility code?

2017-04-21 Thread John DeSoi via 4D_Tech
I'm fairly new to components also, and what you describe below is pretty much how I'm doing it. Anything reusable goes in one component library. But I want to use different subsets of this for different projects. I have "build methods" which specify which methods (modules) should be shared for

Re: Methods, Components, Comments, and Tooltips

2017-04-21 Thread Chip Scheide via 4D_Tech
What does this project method look like? Case of :(form event=) case of :(Last object = ) do stuff On Fri, 21 Apr 2017 07:49:11 -0500, John DeSoi via 4D_Tech wrote: > I recently embarked on an automated testing project and implemented > the advantages you mention by

Re: Methods, Components, Comments, and Tooltips

2017-04-21 Thread Chip Scheide via 4D_Tech
I have asked for - repeatedly - 4D to give us an automated means to "fix" this. http://forums.4d.fr/Post/EN/8282868/1/8282870#8282870 (15 votes from 2012) Basically - a means to change unchanged object names (variable1, Field3 etc) to AT LEAST the variable name, but with an option to pre/post

Re: Methods, Components, Comments, and Tooltips

2017-04-21 Thread John DeSoi via 4D_Tech
I recently embarked on an automated testing project and implemented the advantages you mention by automatically generating *one* project method per form that contains all of the object method and form method code. The only other task was to create wrappers for Form event and OBJECT Get pointer

Re: Converting Little Endian Byte Representation To a String

2017-04-21 Thread Arnaud de Montard via 4D_Tech
> Le 17 avr. 2017 à 23:36, Cannon Smith via 4D_Tech <4d_tech@lists.4d.com> a > écrit : > > I have a little problem I’m hoping someone can help me solve. First, a bit of > background. Our application deals with RFID tags for animals. These are > always 15 digit numbers like 124000123456789.

Re: Dynamic Method Creation & Content Changing

2017-04-21 Thread Nigel Greenlee via 4D_Tech
John 4D lists can suck if they are being edited..I remember having trouble with a system a while back where users complained that some drop downs did not have something in that should have been there..testing showed that we had code nicely adding to the 4D list that was being used in the

Re: Components: How do you reuse utility code?

2017-04-21 Thread David Adams via 4D_Tech
On Fri, Apr 21, 2017 at 2:45 PM, Tim Nevels via 4D_Tech < 4d_tech@lists.4d.com> wrote: > Just before I clicked “Send” on my post I thought “this is probably gonna > crawl under David’s skin, I can’t wait to read his reply”. You certainly > did not disappoint. :) And that is a smiley face because

Re: Components: How do you reuse utility code?

2017-04-21 Thread David Adams via 4D_Tech
On Fri, Apr 21, 2017 at 2:39 PM, James Crate via 4D_Tech < 4d_tech@lists.4d.com> wrote: > A few more less important things that are in almost every modern language > that would make coding nicer for everyone, and could be added without > affecting legacy code: > +1 on your list. And while The