Re: Macro to check that local variables are declared in a method? [Solved]

2018-04-27 Thread jim.dorrance--- via 4D_Tech
Wow! Useful, thanks. Sent from my iPhone > ** 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: mailt

Re: 4DMethod meeting Xojo/4D files updated (John Baughman)

2018-04-27 Thread truegold via 4D_Tech
Hey John, > 11. 4DMethod meeting Xojo/4D files updated (John Baughman) Thank you! That was a cool demonstration of another front end WEB UI with 4D as a backend. I didn’t know but now I do. I didn’t now that XoJo handles Mac, windows, linux, iOS, etc. If anyone missed may I suggest spending

Re: Macro to check that local variables are declared in a method? [Solved]

2018-04-27 Thread Bob Miller via 4D_Tech
Thanks to everyone for all the responses! I put the macro at the end of this posting. Cannon Smith inquired: RE> I don?t have a macro for you, but I?m curious to know why asking the compiler to check the syntax isn?t enough? 1. It may not be a syntactical problem; I may have simply forgotten t

Re: Collection.orderBy()

2018-04-27 Thread Chip Scheide via 4D_Tech
I **KNOW** I am going to hate this when I start using collections etc. B vs b ARGH! :) On Fri, 27 Apr 2018 21:39:46 +, Julio Carneiro via 4D_Tech wrote: > > The collection member function is ‘orderBy’, capital B. That’s why you get > a runtime error, because ‘orderby’ does not exist.

Re: Collection.orderBy()

2018-04-27 Thread Cannon Smith via 4D_Tech
Thanks Jeff and Julio. Funny, I thought I’d double-checked case, but apparently not well enough! As soon as I changed it from “orderby” to “orderBy” it started working. BTW, I finally turned on object notation in my database and have started using object notation as well as collections directly

Re: Collection.orderBy()

2018-04-27 Thread Julio Carneiro via 4D_Tech
Cannon, If the statement in your code reads exactly as you posted then the error is in v16r6 syntax checker :-) The collection member function is ‘orderBy’, capital B. That’s why you get a runtime error, because ‘orderby’ does not exist. At this point 4D does not manage class typing properly, so

Re: Collection.orderBy()

2018-04-27 Thread Jeffrey Kain via 4D_Tech
Yep - you're right. I was thinking of the other syntax that uses a constant. Does the debugger give you any clues if you trace it? -- Jeffrey Kain jeffrey.k...@gmail.com > On Apr 27, 2018, at 5:26 PM, Cannon Smith via 4D_Tech <4d_tech@lists.4d.com> > wrote: > > Yeah, the ending quote must

Re: Collection.orderBy()

2018-04-27 Thread Cannon Smith via 4D_Tech
Hi Jeff, Yeah, the ending quote must have been converted by my mail app. It’s a proper quote in code. I _think_ the asc should be inside the double quotes. But I’m just going by the examples found at: http://doc.4d.com/4Dv16R6/4D/16-R6/collectionorderBy.301-3690504.en.html. I don’t r

Re: Collection.orderBy()

2018-04-27 Thread Jeffrey Kain via 4D_Tech
Well, you have a curly quote in that line of code - maybe that's just a mail artifact? Should the asc be inside the double quotes? -- Jeffrey Kain jeffrey.k...@gmail.com > On Apr 27, 2018, at 5:10 PM, Cannon Smith via 4D_Tech <4d_tech@lists.4d.com> > wrote: > > Has anyone else gotten orde

Collection.orderBy()

2018-04-27 Thread Cannon Smith via 4D_Tech
I’m having trouble with the collection.orderBy() command working. Not sure if it is me or a bug. I’m using 4D v16r6, 64-bit, on macOS with this line of code: $cSortedFrames:=$oPage.frames.orderby("position.zIndex asc”) In the method editor everything colors correctly, including “orderBy”

Re: Picture resources Related Question

2018-04-27 Thread Keith Culotta via 4D_Tech
The Picture Library is still in 17b, but you can only add a new pic to by loading it from a volume. Pics in the library can still be assigned to form objects. Keith - CDI > On Apr 27, 2018, at 2:42 PM, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> > wrote: > > Is the Picture library deprec

Re: Picture resources Related Question

2018-04-27 Thread Chip Scheide via 4D_Tech
Is the Picture library depreciated? On Fri, 27 Apr 2018 15:09:43 -0400, Dave Tenen via 4D_Tech wrote: > I know this has probably been covered here but I searched and found > no clear answer to this and any direction would be appreciated!. > I am trying to upgrade some older dbs to ver

Re: Picture resources

2018-04-27 Thread Patrick Emanuel via 4D_Tech
Hi, you have to open the *32bits* 4D v16 version and to export your picture library. This is the only one way to get you pictures back. Then, one by one replace the call from a file coming from your ressources folder. Easy, but take times. Or get help with QS_Toolbox ;-) Patrick - Patric

Re: Picture resources

2018-04-27 Thread Keith Culotta via 4D_Tech
Take a look at this Tech Tip and its link to Tech Tip 76775: http://kb.4d.com/assetid=77713 The code must be run the the older version of 4D, the one compatible with the depreciated picture format. Keith - CDI > On Apr 27, 2018, at 2:09 PM, Dave Tenen via 4D_Tech <4d_tech@lists.4d.com> > wrote

Picture resources

2018-04-27 Thread Dave Tenen via 4D_Tech
I know this has probably been covered here but I searched and found no clear answer to this and any direction would be appreciated!. I am trying to upgrade some older dbs to version 16, that have picture library entries that are all coming up with the default images. How can I retrieve the or

RE: SMTP_Attachment (16r4, 5 & 6) and MacOS 10.13 and APFS (encrypted)

2018-04-27 Thread Timothy Penner via 4D_Tech
Hi Stephen, I think there is a limitation based on the length of the path. I checked the bug you filed: ACI0097873 (it’s a duplicate of ACI0097739) On ACI0097739 I see the following comment: { MacOS x32 4DIC Plugin uses obsolete FSSpecs file-objects. The MacOS API rejects the filename if it exce

Re: Macro to check that local variables are declared in a method?

2018-04-27 Thread Tim Nevels via 4D_Tech
On Apr 27, 2018, at 1:03 PM, Jody Bevan wrote: > I would suggest if you are going to write something this far, why not make it > so that it will declare all local variables for you, and remove declarations > that are no longer needed. A great time saver. Of course to go that far, > there needs

SMTP_Attachment (16r4, 5 & 6) and MacOS 10.13 and APFS (encrypted)

2018-04-27 Thread Stephen Shaw via 4D_Tech
HI Is anyone successfully using this command with the APFS? I am getting file not found (error -43) Test path name = 1 (document) And the document is present and there are no permission issues that I can see Many thanks for any help Steve Shaw UK

Re: Macro to check that local variables are declared in a method?

2018-04-27 Thread John DeSoi via 4D_Tech
$localRegex:="\\$[0-9_\\p{Letter}]+" //Includes parameters. Assumes locals do not have spaces. A simple way to ensure you are not matching within strings is to split the method into lines and then on each line collapse the strings so they are empty. You only need to do this on lines that have

Re: [Tip?] Test path name and Posix

2018-04-27 Thread Stephen Shaw via 4D_Tech
I have found this too! Error -43 and also giving 'Get localized document path' an absolute path results in an empty string which is rather disappointing! Steve > On 27 Apr 2018, at 18:29, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> > wrote: > > Test Path Name FAILS (file/folder does not e

4DMethod meeting Xojo/4D files updated

2018-04-27 Thread John Baughman via 4D_Tech
HI all, If anyone downloaded the Xojo/4D demo files from my presentation during the 4DMethod meeting on Wednesday, please note that a couple of bugs in the Xojo project file have been reported to me. The download files have been updated. Specifically JASON data exchange had a bug so only XML wo

[Tip?] Test path name and Posix

2018-04-27 Thread Chip Scheide via 4D_Tech
Test Path Name FAILS (file/folder does not exist) if given a POSIX formatted path. --- Gas is for washing parts Alcohol is for drinkin' Nitromethane is for racing ** 4D Internet Users Group (4D iNUG) FAQ: http://lis

Re: Macro to check that local variables are declared in a method?

2018-04-27 Thread Patrick Emanuel via 4D_Tech
Hi, I haven't a macro but a tool that try to answer to this point (not only). It works on local ($), variable (without $ or <>) and global (<>) variable. Manage $ and <> variables is pretty easy, standard variable, more difficult. So, this code works with method of all objects and cross declaratio

Re: Macro to check that local variables are declared in a method?

2018-04-27 Thread Jody Bevan via 4D_Tech
Bob: Another thought to watch out for. As you know in some cases 4D names some of it’s own things starting with a ‘$’. For example a Process name can be named starting with a ‘$’. If you have strictly named local variables those should be easy to filter out. Jody > On Apr 27, 2018, at 9:54 A

Re: Macro to check that local variables are declared in a method?

2018-04-27 Thread Jody Bevan via 4D_Tech
Bob: I would suggest if you are going to write something this far, why not make it so that it will declare all local variables for you, and remove declarations that are no longer needed. A great time saver. Of course to go that far, there needs to be a strictly enforced naming convention. Jody

Re: Macro to check that local variables are declared in a method?

2018-04-27 Thread Lee Hinde via 4D_Tech
On Apr 27, 2018, at 8:54 AM, Bob Miller via 4D_Tech <4d_tech@lists.4d.com> wrote: > > Hello, > > Has anyone created a macro to check a method to make sure all its local > variables are declared? > > I've thought about undertaking such a thing, but as it probably involves > getting into regula

Re: Macro to check that local variables are declared in a method?

2018-04-27 Thread Cannon Smith via 4D_Tech
Hi Bob, I don’t have a macro for you, but I’m curious to know why asking the compiler to check the syntax isn’t enough? -- Cannon.Smith Synergy Farm Solutions Inc. Hill Spring, AB Canada 403-626-3236 > On Apr 27, 2018, at 9:54 AM, Bob Miller via 4D_Tech <4d_tech@lists.4d.com> > wrote: > >

Re: Macro to check that local variables are declared in a method?

2018-04-27 Thread Koen Van Hooreweghe via 4D_Tech
Hi Bob, Take a look at 4D Pop. There is such a thing in dhe 4D Pop macros part. HTH Koen > Op 27 apr. 2018, om 17:54 heeft Bob Miller via 4D_Tech <4d_tech@lists.4d.com> > het volgende geschreven: > > Has anyone created a macro to check a method to make sure all its local > variables are decla

Macro to check that local variables are declared in a method?

2018-04-27 Thread Bob Miller via 4D_Tech
Hello, Has anyone created a macro to check a method to make sure all its local variables are declared? I've thought about undertaking such a thing, but as it probably involves getting into regular expressions, I've been looking forward to doing this with some dread. If anyone has done this al