Re: Methods, Components, Comments, and Tooltips

2017-04-18 Thread Wayne Stewart via 4D_Tech
Oops! I forgot this bit: // Threadsafe? METHOD GET ATTRIBUTES($MethodNames_at{$CurrentMethod_i};$Attributes_o) $ThreadSafe_t:=OB Get($Attributes_o;"preemptive") Case of : ($ThreadSafe_t="capable") $ThreadSafeSection_t:="\rPREEMPTIVE\r" : ($ThreadSafe_t="incapable") $ThreadSafeSec

Re: Components and custom constants files

2017-04-18 Thread David Adams via 4D_Tech
On Wed, Apr 19, 2017 at 4:33 PM, Wayne Stewart via 4D_Tech < 4d_tech@lists.4d.com> wrote: > David, > > I've never seen this. > I have a gift for this sort of thing ;-) ** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.co

Re: Components and custom constants files

2017-04-18 Thread David Adams via 4D_Tech
Jim, I was hoping that you would chime in as I know you do a lot with both constants and components. I've just been looking through for any constants problems and, so far, nothing seems even close to relevant - so I suspect that the problem lies elsewhere. I've also hand-checked every call to the

Re: Components and custom constants files

2017-04-18 Thread Wayne Stewart via 4D_Tech
David, I've never seen this. Regards, Wayne [image: --] Wayne Stewart [image: http://]about.me/waynestewart On 19 April 2017 at 16:28, Jim Dorrance via 4D_Tech <4d_tech@lists.4d.com> wrote: > I use constants in components all the time and I have never experie

Methods, Components, Comments, and Tooltips

2017-04-18 Thread Wayne Stewart via 4D_Tech
Hi, With all this talk about comments, I thought I would throw another 2¢ into the conversation. This is also useful for non components. I love the fact that 4D now displays tooltips over your methods. However, sometimes the first few lines of the method are not too helpful. If you have anythi

Re: Components and custom constants files

2017-04-18 Thread Jim Dorrance via 4D_Tech
I use constants in components all the time and I have never experienced this problem. If you regenerate constants often, perhaps just to make a minor spelling change, perhaps the modified constants are not tokenised.All my constants start with 'k', so I do a search and replace of 'k' (case sensitiv

Re: Components and custom constants files

2017-04-18 Thread Keisuke Miyako via 4D_Tech
maybe one or more constants are redefining default 4D constants with a different type. > 2017/04/19 13:01、David Adams via 4D_Tech <4d_tech@lists.4d.com> のメール: > The argument list for the method named "MessageHub_Unsubscribe" in the > component "MesageHub" is incompatible with the database or comp

Re: Remedial question about components

2017-04-18 Thread David Adams via 4D_Tech
On Tue, Apr 18, 2017 at 4:59 PM, Keisuke Miyako via 4D_Tech < 4d_tech@lists.4d.com> wrote: + when the host and component share the same methods names > > this is also documented (see Naming conflicts: masking methods) > the host takes precedence over component > http://doc.4d.com/4Dv16/4D/16/Compo

Re: Components and custom constants files

2017-04-18 Thread David Adams via 4D_Tech
One more detail: No component code is being invoked. I removed all startup code in the host. No matter, you still get the error. Compiled only. ** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: ht

Components and custom constants files

2017-04-18 Thread David Adams via 4D_Tech
Another background question on components. This time, it's about custom constants files. *Background* I break up my code into 'modules', some of which have associated constants. So, I end up with a few to many (many) constants files, depending on structure. The point is that I've got a bunch of l

Re: Automated tasks on 4D Server

2017-04-18 Thread Keisuke Miyako via 4D_Tech
some time ago our Tech Support (not me) posted this: https://github.com/4D-JP/sample-outside-call-for-windows please don't freak out because of the language, the sample code is what's important. basically, you configure the Windows Task Scheduler to run a script (JS) periodically. the script co

Re: Automated tasks on 4D Server

2017-04-18 Thread James Crate via 4D_Tech
> On Apr 17, 2017, at 8:16 PM, David Adams via 4D_Tech <4d_tech@lists.4d.com> > wrote: > > On Tue, Apr 18, 2017 at 4:44 AM, James Crate via 4D_Tech < > 4d_tech@lists.4d.com> wrote: > >> Every time I add some automatic process on the server, I wonder whether >> there is either >> >> a. some bui

Re: Remedial question about components

2017-04-18 Thread Wayne Stewart via 4D_Tech
Forgot to say. Client Server 1000 tests in under a second with 1600 methods in host or 800 methods in component. Regards, Wayne [image: --] Wayne Stewart [image: http://]about.me/waynestewart On 19 April 2017 at 12:07, Wayne Stewart wrote: > David, > > Using

Re: Remedial question about components

2017-04-18 Thread Wayne Stewart via 4D_Tech
David, Using a bit of discipline you can easily set this up Create a method in each component like this, just change the suffix on the method name. // // Project Method: MethodExists_Comp (Method Name) --> Boolean // Checks if a meth

Re: Converting Little Endian Byte Representation To a String

2017-04-18 Thread Cannon Smith via 4D_Tech
Thanks again, Miyako! This is even more useful! -- Cannon.Smith Synergy Farm Solutions Inc. Hill Spring, AB Canada 403-626-3236 > On Apr 18, 2017, at 3:39 PM, Keisuke Miyako via 4D_Tech > <4d_tech@lists.4d.com> wrote: > > I think there was a bug in the carry-over logic, > I've uploaded a cle

Re: Top Menu Vs Sidebar (Web Applications)

2017-04-18 Thread Keisuke Miyako via 4D_Tech
perhaps the screen aspect ratio has some part to play, you'd rather not block the whole top (or bottom) strip unless you really have a lot of menus. but then, responsive UI's (like Google) tend to collapse their side menu in button on a square or portrait screen. finally, the human eye is better

Re: Top Menu Vs Sidebar (Web Applications)

2017-04-18 Thread Lee Hinde via 4D_Tech
IMHO, it’s chef’s choice. There are no standard, as far as I can tell. In my case, I do global links up top (but links, not menus) and then site-location specific things on the side. I.e, I use both. > On Apr 18, 2017, at 3:42 PM, Sujit Shah via 4D_Tech <4d_tech@lists.4d.com> > wrote: > > I

Re: Remedial question about components

2017-04-18 Thread David Adams via 4D_Tech
Hey Wayne, Thanks for the idea. I like the way you flip things around from how I think, it's great. In this case, your suggestion doesn't apply, but I'm adding your suggestion to your other idea about manufactured methods to my "things to think about" list. Anyway, I haven't explained my constrai

Re: Remedial question about components

2017-04-18 Thread Wayne Stewart via 4D_Tech
David, What I occasionally do is use Execute Method and have two "identical" project methods (other than the name). $Method_t:="My_Method" If (RunningInComponent) $Method_t:=$Method_t+"Comp" else $Method_t:=$Method_t+"Host" end if That way I can test when running the component only, I can ca

Top Menu Vs Sidebar (Web Applications)

2017-04-18 Thread Sujit Shah via 4D_Tech
I have read a bit about the pros and cons of a Top Menu layout vs Sidebar Layout. A lot of popular web applications like Xero, Salesforce use Top Menus. Gmail is of course using a sidebar. For me a sidebar offers a lot more flexibility (accordion) without using several levels of menus and submenu

Re: Converting Little Endian Byte Representation To a String

2017-04-18 Thread Keisuke Miyako via 4D_Tech
Hello, I think there was a bug in the carry-over logic, I've uploaded a cleaner version here: https://github.com/miyako/4d-tips-text-integer-maths > 2017/04/19 2:03、Cannon Smith via 4D_Tech <4d_tech@lists.4d.com> のメール: > Thanks, Miyako! That does indeed work and is plenty fast as well. I really

v15 - appending menu functions

2017-04-18 Thread Chip Scheide via 4D_Tech
I have converted a v13 database to v15. I am playing around with v15 to see what is broken. the first thing I found that is broken is: appending a menu item with a pre-defined (4D defined) function. If the user is allowed (admin or designer) a method is called to append a menu item to the first

RE: PDF's

2017-04-18 Thread Timothy Penner via 4D_Tech
> And where can I find the plug-in? Miyako's Github page is here: https://github.com/miyako/ You can search his repositories for the term PDF: https://github.com/miyako?utf8=%E2%9C%93&tab=repositories&q=pdf&type=&language= I think you are looking for this one: https://github.com/miyako/4d-plugin

Re: PDF's

2017-04-18 Thread Robert McKeever via 4D_Tech
And where can I find the plug-in? > On Apr 16, 2017, at 12:33 PM, Mitchell Shiller via 4D_Tech > <4d_tech@lists.4d.com> wrote: > > You can use Miyako’s pdf plugin to do basic pdf manipulation. > > For instance we receive our faxes as pdf’s from an e-fax service. > In our application, we create

Re: Converting Little Endian Byte Representation To a String

2017-04-18 Thread Cannon Smith via 4D_Tech
Thanks, Miyako! That does indeed work and is plenty fast as well. I really appreciate the code! -- Cannon.Smith Synergy Farm Solutions Inc. Hill Spring, AB Canada 403-626-3236 > On Apr 18, 2017, at 12:43 AM, Keisuke Miyako via 4D_Tech > <4d_tech@lists.4d.com> wrote: > > I think this will do

Re: v15.2 clients logging into v15.4 server

2017-04-18 Thread Walt Nelson via 4D_Tech
> On Apr 18, 2017, at 7:39 AM, Jeffrey Kain via 4D_Tech <4d_tech@lists.4d.com > > wrote: > > There's an issue with composite indexes and certain queries that use them. If > you have access to the hotfixes, get 15.4 HF2. Otherwise 15.4 is very stable > in my opinion

RE: IMAP_Download and "Error with IMAP PARTIAL"

2017-04-18 Thread Epperlein, Lutz (agendo) via 4D_Tech
Hi Armin, many thanks for your code. I implemented it in our app and it works like a charm. But we do an upgrade of 4D the same time. And now, believe it or not, it works with the IMAP_Download command from the Internet Commands plugin too. But that is not all of the story. There wasn't a 4D b

Re: v15.2 clients logging into v15.4 server

2017-04-18 Thread Jeffrey Kain via 4D_Tech
Not aware of any open or fixed bugs there in 15.4... -- Jeffrey Kain jeffrey.k...@gmail.com > On Apr 18, 2017, at 11:14 AM, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> > wrote: > > My error log was blowing up with issues around queries on c-obj fields, > which are also indexed. Do you know i

Re: v15.2 clients logging into v15.4 server

2017-04-18 Thread Kirk Brooks via 4D_Tech
Hi Jeffrey, Yes I do have a few composite indexes. My error log was blowing up with issues around queries on c-obj fields, which are also indexed. Do you know if that was resolved as well? On Tue, Apr 18, 2017 at 7:39 AM, Jeffrey Kain via 4D_Tech < 4d_tech@lists.4d.com> wrote: > There's an issu

Re: v15.2 clients logging into v15.4 server

2017-04-18 Thread Spencer Hinsdale via 4D_Tech
+1 and certified for Sierra, Touchbar > On Apr 18, 2017, at 7:39 AM, Jeffrey Kain via 4D_Tech <4d_tech@lists.4d.com> > wrote: > Otherwise 15.4 is very stable in my opinion. > ** 4D Internet Users Group (4D iNUG) FAQ: http://

Re: v15.2 clients logging into v15.4 server

2017-04-18 Thread Jeffrey Kain via 4D_Tech
There's an issue with composite indexes and certain queries that use them. If you have access to the hotfixes, get 15.4 HF2. Otherwise 15.4 is very stable in my opinion. Does your application use composite indexes? -- Jeffrey Kain jeffrey.k...@gmail.com > On Apr 18, 2017, at 10:24 AM, Kirk Bro

Re: v15.2 clients logging into v15.4 server

2017-04-18 Thread Kirk Brooks via 4D_Tech
To close this out I'm going to finger server 15.4 as the problem here. Looking back at my notes I see I didn't put in the upgrade previously but did it this weekend. I updated my development machine to 15.4 a while ago but not this server. When I rolled back to v15.3 everything went back to runnin

Re: Remedial question about components

2017-04-18 Thread David Adams via 4D_Tech
On Tue, Apr 18, 2017 at 10:16 PM, Wayne Stewart via 4D_Tech < 4d_tech@lists.4d.com> wrote: > David, > > Why don't you get the component to just create the method in the host > before calling it? (Assuming it doesn't exist yet). Huh, I would never have thought of that. That won't help out in this

Re: Remedial question about components

2017-04-18 Thread Wayne Stewart via 4D_Tech
David, Why don't you get the component to just create the method in the host before calling it? (Assuming it doesn't exist yet). This only works interpreted but we do that all the time in the Foundation world. Regards, Wayne Sent from my iPhone > On 18 Apr 2017, at 21:56, David Adams via 4D

Re: Remedial question about components

2017-04-18 Thread David Adams via 4D_Tech
On Tue, Apr 18, 2017 at 9:48 PM, Keisuke Miyako via 4D_Tech < 4d_tech@lists.4d.com> wrote: > to recap, > > why do you need to know from a compiled component if the host is > interpreted? > I'd like to validate that the host method name I'm being passed is valid in two ways: 1) The name actually

Re: Remedial question about components

2017-04-18 Thread Keisuke Miyako via 4D_Tech
to recap, why do you need to know from a compiled component if the host is interpreted? > 2017/04/18 19:16、David Adams via 4D_Tech <4d_tech@lists.4d.com> のメール: > > is there a way to find out if the host is compiled without having the > host pass that information into the component? **

Re: Remedial question about components

2017-04-18 Thread Keisuke Miyako via 4D_Tech
I think you can do something like $name:="test" (""#METHOD Get path(Path project method;$name)) is a "local" method (""#METHOD Get path(Path project method;$name;*)) //with asterisk is a "host" method > 2017/04/18 19:16、David Adams via 4D_Tech <4d_tech@lists.4d.com> のメール: > As far as I know,

Re: Remedial question about components

2017-04-18 Thread David Adams via 4D_Tech
On Tue, Apr 18, 2017 at 4:59 PM, Keisuke Miyako via 4D_Tech < 4d_tech@lists.4d.com> wrote: > Hello, > > Structure file=Structure file(*) > this is documented (see example 2) > http://doc.4d.com/4Dv15/4D/15.4/Structure-file.301-3274414.en.html Great trick! That answers one of the two questions

Re: Converting Little Endian Byte Representation To a String

2017-04-18 Thread Bruno LEGAY via 4D_Tech
Hi Cannon, Here is a method using LPE on Mac OS X : C_TEXT($vt_64bitLittleEndianHex;$vt_64bitBigEndianHex) $vt_64bitLittleEndianHex:="02ABC877FAFB0200" // => "840003123456770" //convert the little endian hex to big endian hex C_LONGINT($i) For ($i;1;Length($vt_64bitLittleEndianHex);2) $vt_64bi