Re: Trouble with Comment Blocks v18

2020-03-10 Thread Sannyasin Siddhanathaswami via 4D_Tech
Yes. Dot notation works fine.

Sannyasin Siddhanathaswami
On Mar 10, 2020, 12:11 AM -1000, Vincent de Lachaux via 4D_Tech 
<4d_tech@lists.4d.com>, wrote:
Is the database accept dot notation ?
vdl
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: ds.Table.query() field not available

2020-03-10 Thread Sannyasin Siddhanathaswami via 4D_Tech
Ok. I guess I was hallucinating or something. It works today with one 
exception. If I change the name of a field (to remove spaces in field 
names…..), the new field name doesn’t work in an orda query. I get this error:

The "Account_Name" attribute cannot be found in The "Deposits" datastore class

This is where I have to reboot the server as the only way to update the 
datastore, right?

Thanks for the list of possible errors and troubleshooting options Miyako. I 
will use them!

Sannyasin Siddhanathaswami
On Mar 9, 2020, 6:47 PM -1000, Keisuke Miyako via 4D_Tech 
<4d_tech@lists.4d.com>, wrote:
Hello,

When I do a ds.Table.query() using a field/attribute of a non-indexed field, I 
get an error.

that has not been my experience.
v18, Client/Server, non-indexed field, ORDA query has always worked just fine.

---

are sure definitely sure that indexing is causing the problem?

for instance, could it be that the table does not have a primary key?
what is the field type? is it an object?
what does the query string look like?
does it include "linked" queries? (e.g. attr[a].attr = :1 and attr[a].prop = :2)
can you reproduce the problem on a fresh DB?

Of course, I can add an index, but then I seem to have restart the server for 
it to work. This is super inconvenient, obviously and in may cases not possible 
at that moment. Is there a command to run that reloads whatever list the 
ds.Table.query() uses to find field/attributes? Or Should I just index all 
fields? What do you all do?

**
4D Internet Users Group (4D iNUG)
Archive: http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:4d_tech-unsubscr...@lists.4d.com
**
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

ds.Table.query() field not available

2020-03-09 Thread Sannyasin Siddhanathaswami via 4D_Tech
Aloha,

When I do a ds.Table.query() using a field/attribute of a non-indexed field, I 
get an error. Of course, I can add an index, but then I seem to have restart 
the server for it to work. This is super inconvenient, obviously and in may 
cases not possible at that moment. Is there a command to run that reloads 
whatever list the ds.Table.query() uses to find field/attributes? Or Should I 
just index all fields? What do you all do?



Sannyasin Siddhanathaswami
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Trouble with Comment Blocks v18

2020-03-09 Thread Sannyasin Siddhanathaswami via 4D_Tech
Makes sense. I was hoping I wasn’t going nuts!

Sannyasin Siddhanathaswami
On Mar 9, 2020, 10:35 AM -1000, John DeSoi via 4D_Tech <4d_tech@lists.4d.com>, 
wrote:
I think there was a bug related to this late in the beta cycle. I'm not sure if 
the fix made it in to 18.0. Seems to work fine in 18.0 HF1.

John DeSoi, Ph.D.


On Mar 9, 2020, at 3:24 PM, Sannyasin Siddhanathaswami via 4D_Tech 
<4d_tech@lists.4d.com> wrote:

Aloha,

I’m having trouble getting the new comment blocks to work in v18. Seems silly 
simple but doesn’t work:

/*

This is a comment

*/

This gives a syntax error.

I’m using v18 on Mac OS Catalina, in client server.

I looked for compatibility settings, and anything useful in the documentation, 
but all I read says the above should work and be collapsable. What am I missing?

**
4D Internet Users Group (4D iNUG)
Archive: http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:4d_tech-unsubscr...@lists.4d.com
**
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Trouble with Comment Blocks v18

2020-03-09 Thread Sannyasin Siddhanathaswami via 4D_Tech
Aloha,

I’m having trouble getting the new comment blocks to work in v18. Seems silly 
simple but doesn’t work:

/*

This is a comment

*/

This gives a syntax error.

I’m using v18 on Mac OS Catalina, in client server.

I looked for compatibility settings, and anything useful in the documentation, 
but all I read says the above should work and be collapsable. What am I missing?

Thanks,

Sannyasin Siddhanathaswami
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: More on 4D Objects and 'Inheritance'

2019-09-18 Thread Sannyasin Siddhanathaswami via 4D_Tech
Aloha Aparajita,

I’d definitely be interested. Object-oriented programming is something I never 
learned, but is becoming a requirement in 4D. I’ve been using objects, 
collections and entity selections quite a bit recently in 4D and love them. I 
know I’m only scratching the surface. v18 knowing all of this will be a 
requirement.


Sannyasin Siddhanathaswami
On Sep 18, 2019, 8:17 AM -1000, Aparajita Fishman via 4D_Tech 
<4d_tech@lists.4d.com>, wrote:
I worked on a 4D system originally developed by Aparajita more than 22 years 
ago for an investment bank. It used a plug-in that was probably little known at 
the time - ObjectTools.

I wrote ObjectTools specifically for that project, so that we could use an 
object oriented style of programming. It worked pretty well. 


Hint... if Aparajita was to give some trainings at the next 4D Summit on the 
work he's done porting npm pacakges to 4D, well we could all learn a great deal 
from his experience and I would be over there like a shot!

I’ve given some thought to creating two video courses:

- Revolutionize your apps with object-oriented programming in 4D v17 — today!
- express4d: The better way to write web APIs in 4D

I’m wondering how many people would be interested in one or both of these 
courses.

Pricing:
1 course: $500
2 courses: $900

- Aparajita
**
4D Internet Users Group (4D iNUG)
Archive: http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:4d_tech-unsubscr...@lists.4d.com
**
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Deleting a record from a listbox

2019-07-04 Thread Sannyasin Siddhanathaswami via 4D_Tech
Aloha Carl and Keith!

Thanks! That’s just what I needed. I see both options will work. The key is the 
LONGINT ARRAY FROM SELECTION and/or BOOLEAN ARRAY FROM SET. Much appreciated.

Sannyasin Siddhanathaswami
On Jul 3, 2019, 11:16 AM -1000, Carl Aage Wangel via 4D_Tech 
<4d_tech@lists.4d.com>, wrote:
This is from 4D Knowledge Base and might help you:
// Method: listboxDeleteSelectedRecords

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Deleting a record from a listbox

2019-07-03 Thread Sannyasin Siddhanathaswami via 4D_Tech
Aloha,

I’m trying to update my "delete selection of records from a listbox" code. I’m 
trying to keep the sort order so that when someone clicks  to delete, the only 
thing they see is the lines they select, get deleted.

Here’s the basic code. Of course, deleting a record in this scenario, leaves an 
empty record in the listbox.

COPY NAMED SELECTION($tablePtr->;"TempCurrentSet")
USE SET($highlightSet)
DELETE SELECTION($tablePtr->)
USE NAMED SELECTION("TempCurrentSet")
CLEAR NAMED SELECTION("TempCurrentSet")

I haven’t been able to figure out how to keep the sort, and get rid of the 
deleted records (now showing as blank).

Any ideas?



Sannyasin Siddhanathaswami
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: Anyone using zipcodeapi

2019-06-08 Thread Sannyasin Siddhanathaswami via 4D_Tech
I’m playing with the Google Geocode too. It’s useful for certain things. It’s 
free for up to $200 worth or requests per month. That’s a lot for minor uses!



Sannyasin Siddhanathaswami
On Jun 8, 2019, 7:11 AM -1000, David Ringsmuth via 4D_Tech 
<4d_tech@lists.4d.com>, wrote:
John,

I’m using the Google Geocode API. It returns XML with street address info, 
which can be complicated….

It’s not free, but it is very in-expensive.

David Ringsmuth

From: JOHN BAUGHMAN via 4D_Tech
Sent: Saturday, June 1, 2019 8:07 PM
To: Ed Hammond via 4D_Tech
Cc: JOHN BAUGHMAN
Subject: Anyone using zipcodeapi

Is anyone using zipcodeapi.com  to fill in city and 
state fields in a 4D database? Would you be willing to share your code?

Thanks,

John


John Baughman
Kailua, Hawaii
(808) 262-0328
john...@hawaii.rr.com

**
4D Internet Users Group (4D iNUG)
Archive: http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:4d_tech-unsubscr...@lists.4d.com
**

**
4D Internet Users Group (4D iNUG)
Archive: http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:4d_tech-unsubscr...@lists.4d.com
**
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Variable in Dialog Doesn’t Honor Number Formatting

2019-05-17 Thread Sannyasin Siddhanathaswami via 4D_Tech
Thank you Miyako!

I changed the compatibility setting, but that didn’t help for this.

I then traced and found, as you suspected, that the variable was text. Makes 
sense, as it’s a enterable box. Declaring it properly fixed the issue.

Thanks!

Sannyasin Siddhanathaswami
On May 15, 2019, 7:13 PM -1000, Keisuke Miyako via 4D_Tech 
<4d_tech@lists.4d.com>, wrote:
how did you decide that the variable is numeric?

did you use C_REAL or C_LONGINT?

what does the debugger/runtime explorer say?

the value type in property list does not set the variable type except for form 
local variables.

https://doc.4d.com/4Dv17/4D/17.1/Variables.300-4179325.en.html

2019/05/16 13:27、Sannyasin Siddhanathaswami via 4D_Tech 
<4d_tech@lists.4d.com<mailto:4d_tech@lists.4d.com>>のメール:
These are all numeric variables.


**
4D Internet Users Group (4D iNUG)
Archive: http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:4d_tech-unsubscr...@lists.4d.com
**
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Variable in Dialog Doesn’t Honor Number Formatting

2019-05-15 Thread Sannyasin Siddhanathaswami via 4D_Tech
Aloha,

Super weird issue. I’m trying to do a simple $ format in a variable on a 
dialog. Choosing a number format of "$###,##0.00” doesn’t display properly. I 
enter “50”, I get $0.50. Even when using this:
OBJECT SET FORMAT(*;"ShippingCost";"$###,##0.00”)

But in the same dialog, if I do the same code on a column of a list box, it 
works fine:
OBJECT SET FORMAT(*;"Column1";"$###,##0.00”)

Even on the same dialog, I have another variable that has a collection 
expression: “colAdjustData.sum(“ExtCost”)” and that displays properly with the 
same OBJECT SET FORMAT command.

I looked through all of the properties of this variable, but don’t see anything 
weird. Creating a new variable also doesn’t work. These are all numeric 
variables.

Any clues?


Sannyasin Siddhanathaswami
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Collection of JSON Arrays to a Flat Array

2019-04-09 Thread Sannyasin Siddhanathaswami via 4D_Tech
Sortof nevermind. It’s actually crazy easy with nested for each loops. I’m 
really liking these for each loops!

ARRAY REAL($aAllLessons;0)
For each ($thisLessonArray;$oLessons)
For each ($thisLesson;$thisLessonArray)
APPEND TO ARRAY($aAllLessons;$thisLesson)
End for each
End for each


Sannyasin Siddhanathaswami
On Apr 9, 2019, 4:59 PM -1000, Sannyasin Siddhanathaswami via 4D_Tech 
<4d_tech@lists.4d.com>, wrote:
Aloha,

Is there an easy way to make an collection of JSON arrays into a single flat 
array using the new ORDA collection commands?

Here’s a screenshot of the data:
https://www.dropbox.com/s/mmjrxfn4t2umejh/collectiontoarray.png?dl=0

If there’s no easy way, I can loop through and manually do it, just thought 
once of those combine, or other commands could do it rapidly.

Thanks,

Sannyasin Siddhanathaswami
**
4D Internet Users Group (4D iNUG)
Archive: http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:4d_tech-unsubscr...@lists.4d.com
**
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Collection of JSON Arrays to a Flat Array

2019-04-09 Thread Sannyasin Siddhanathaswami via 4D_Tech
Aloha,

Is there an easy way to make an collection of JSON arrays into a single flat 
array using the new ORDA collection commands?

Here’s a screenshot of the data:
https://www.dropbox.com/s/mmjrxfn4t2umejh/collectiontoarray.png?dl=0

If there’s no easy way, I can loop through and manually do it, just thought 
once of those combine, or other commands could do it rapidly.

Thanks,

Sannyasin Siddhanathaswami
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: JSON from Google Sheet to Property Object

2018-11-27 Thread Sannyasin Siddhanathaswami via 4D_Tech
Aloha all,

I created the method to convert a Google Sheet JSON to a property:value 
collection of objects. This has the advantage of being able to use all of the 
collection method (such as query). Here’s the code.

  //get Google Sheet via JSON and convert to property:value Collection of 
objects (can query and use all the collection methods)
C_OBJECT($result)
C_COLLECTION($formattedCol)
$formattedCol:=New collection

  //sample data
$result:=JSON 
Parse("{\"range\":\"Sheet1!A1:Z1003\",\"majorDimension\":\"ROWS\",\"values\":[[\"ID\",\"First
 Name\",\"Last 
Name\"],[\"5912029\",\"John\",\"Smith\"],[\"6015906\",\"Martian\",\"Marsa\"]]}")

//format for grabbing a Google Sheet JSON (needs to be public, and a key 
created)
  //$sheetURL:="https://sheets.googleapis.com/v4/spreadsheets//values/A1:Z5000?key="
  //$err:=HTTP Get($sheetURL;$result)

$headers:=$result.values[0]  //collection of an array of just the headers
For ($dataRowNum;1;$result.values.length-1)  //loop through each data row 
starting with the second row (1 since it starts with 0)
$formattedCol[$dataRowNum-1]:=New object  //create a new object in each element 
of the collection
For ($HeaderEleNum;0;$headers.length-1)  //loop through each header value
$thisHeaderValue:=$headers[$HeaderEleNum]
$formattedCol[$dataRowNum-1][$thisHeaderValue]:=$result.values[$dataRowNum][$HeaderEleNum]
  //set the property and value for each header
End for
End for

Hope someone finds this a bit useful. At least for better understanding 
collections. I’m using this currently to get data from a Thinkific course, to 
Google Sheets via Zapier, then to 4D.




Sannyasin Siddhanathaswami

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: JSON from Google Sheet to Property Object

2018-11-26 Thread Sannyasin Siddhanathaswami via 4D_Tech
Last email didn’t work right.

I think a Collection might be the way to go with this. If I create a collection 
of objects:
{“ID”:”5912029","First Name”:”Sannyasin”},
{“ID”:”6015906","First Name”:”Mayuran”}

I should be able to access the data very easily.

Sannyasin Siddhanathaswami
On Nov 25, 2018, 11:06 PM -1000, 4D iNug Technical <4d_tech@lists.4d.com>, 
wrote:

{“ID”:”5912029","First Name”:”Sannyasin”},
{“ID”:”6015906","First Name”:”Mayuran”}
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: JSON from Google Sheet to Property Object

2018-11-26 Thread Sannyasin Siddhanathaswami via 4D_Tech

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: JSON from Google Sheet to Property Object

2018-11-26 Thread Sannyasin Siddhanathaswami via 4D_Tech
That makes sense. No wonder I’m confused. :)

But if I convert:
[
[ID,First Name,Last Name],
[5912029,Sannyasin,Siddhanathaswami],
[6015906,Mayuran,Sokkan]
]

to an array of objects:
[
{“ID”:”5912029","First Name”:”Sannyasin”},
{“ID”:”6015906","First Name”:”Mayuran”}
]

Does than mean I can access the “First Name” value by the “ID”? Somehow?

This is kind of like doing a "Selection to JSON”, parsing that into an object, 
then trying to find a “record” in the resulting object.





Sannyasin Siddhanathaswami
On Nov 25, 2018, 10:44 PM -1000, 4D iNug Technical <4d_tech@lists.4d.com>, 
wrote:

you are confusing property names and array positions.

$lastName:=$convertedObject[“ID”][“6015906”][“Last Name”]

this would infer

{"ID":{"6015906":{"Last Name":__here_}}}

if the target is

[
[ID,First Name,Last Name],
[5912029,Sannyasin,Siddhanathaswami],
[6015906,Mayuran,Sokkan]
]

then the notation should be

$convertedObject[2][2] //Sokkan
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

JSON from Google Sheet to Property Object

2018-11-26 Thread Sannyasin Siddhanathaswami via 4D_Tech
Aloha,

I’m getting my feet wet with v17’s dot notion/objects.

My first use is converting a Google Sheet JSON into something easily 
accessible. I was thinking to a property:value 4D Object.

Does anyone have a utility method that does this?

It’s a JSON array of arrays from the Google Sheet that has the headers in the 
first “row” of the array "values[0]”:
[
[ID,First Name,Last Name],
[5912029,Sannyasin,Siddhanathaswami],
[6015906,Mayuran,Sokkan]
]

My goal is to be able to reference this new object by doing something like:
$lastName:=$convertedObject[“ID”][“6015906”][“Last Name”]

I don’t really know what I’m doing. Would that even work?

Is there an easy way to approach this? If it was just this one Google Sheet, 
I’d probably loop through each array and see if element [0] matched the ID I 
was looking for. If it did, then I would grab element [2]. But this seems like 
the wrong approach.

Any tips or things to research would be greatly appreciated.



Sannyasin Siddhanathaswami
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Related Fields in a Listbox (Manual Relations)

2018-11-16 Thread Sannyasin Siddhanathaswami via 4D_Tech
Thanks. Just what I needed!

Sannyasin Siddhanathaswami
On Nov 16, 2018, 9:09 AM -1000, Keith Culotta via 4D_Tech 
<4d_tech@lists.4d.com>, wrote:
These have worked:

// ok
GET AUTOMATIC RELATIONS($o;$m) // before the listbox displays
SET AUTOMATIC RELATIONS(True;$m)


// better
: (Form event=On Display Detail) // in the listbox method
RELATE ONE([many]linkField)

Keith - CDI

On Nov 16, 2018, at 12:54 PM, Sannyasin Siddhanathaswami via 4D_Tech 
<4d_tech@lists.4d.com> wrote:

Aloha all,

Is there a simple way to include related field (with Manual relations) in a 
current selection listbox in v17?

Not sure why I haven’t done this before with listboxes.

Sannyasin Siddhanathaswami

**
4D Internet Users Group (4D iNUG)
Archive: http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:4d_tech-unsubscr...@lists.4d.com
**
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Related Fields in a Listbox (Manual Relations)

2018-11-16 Thread Sannyasin Siddhanathaswami via 4D_Tech
Aloha all,

Is there a simple way to include related field (with Manual relations) in a 
current selection listbox in v17?

Not sure why I haven’t done this before with listboxes.

Sannyasin Siddhanathaswami
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Listbox Crashes 4D in v17

2018-11-01 Thread Sannyasin Siddhanathaswami via 4D_Tech
In v16, I added a spacer column with this code:
LISTBOX INSERT COLUMN FORMULA(*;"CCTransactionsLB";3;"SpacerCol";" ";Is text;" 
";$headerVar)
LISTBOX SET COLUMN WIDTH(*;"SpacerCol";10)
OBJECT SET ENTERABLE(*;"SpacerCol";False)  //make column unenterable

Unfortunately, this crashes 4D (quits to the Finder). It only crashes 4D at 
when it displays the form, not when executing these 3 lines.

Any clue what changed, or what I’m doing wrong here?

This is Server/Remote on Mac.


Sannyasin Siddhanathaswami
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Preventing Return and Enter from Closing a Dialog

2018-05-20 Thread Sannyasin Siddhanathaswami via 4D_Tech
Thanks for everyone's help. I couldn't get the Database Settings 
solution to work. Very weird. I set it to this and still "Enter" closed 
the window.

https://www.dropbox.com/s/drzxr3othn8dti8/Screenshot%202018-05-20%2016.11.58.png?dl=0

I even restarted the server. Still didn't work.

But, I was able to get it to work based on Miyako's suggestion. But, 
it's extra sensitive:
1. Use an invisible (type of object) button with the enter key as 
shortcut to intercept the accept/cancel shortcut
2. The invisible button MUST be on page 0. If it's on the current 
page, (such as page 1), it doesn't work.
3. The button must be visible (property of object), enabled and 
available

4. The "on clicked" form event must be activated.''

I don't get why it has to be on page 0, but whatever. I'll remember this 
now for sure!

Sannyasin Siddhanathaswami

Keisuke Miyako via 4D_Tech wrote:

using an invisible (type of object) button with the enter/escape key as 
shortcut does intercept the accept/cancel shortcut,
but the button must be visible (property of object), enabled and available (page 0 or 
current page) and the "on clicked" form event must be activated.
I would rather not change the database preferences as it affects the entire 
application.




**
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:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Preventing Return and Enter from Closing a Dialog

2018-05-20 Thread Sannyasin Siddhanathaswami via 4D_Tech
Thanks! I've never noticed that setting. While changing that setting 
didn't work, I'm going to try rebooting the server later to see if 
that's needed to get the setting to work.


I'm running v16.3 Mac on server and client.


Two Way Communications via 4D_Tech 
May 20, 2018 at 11:11 AM
Hi,

Check under the ‘Edit’ menu: ‘Database settings’
Then select the ‘Interface’ tab

In the middle of the window, you will see the shortcuts that are being 
used for accepting and canceling input forms.


Regards,

Rudy Mortier
Two Way Communications bvba




**
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: mailto:4d_tech-unsubscr...@lists.4d.com
**
Sannyasin Siddhanathaswami 
May 20, 2018 at 10:06 AM
Aloha,

I'm playing with the "proper" way to open up a form. Here's what I have:
Open form window([ARInvoice_Payments];"Invoice_Payment_List";Plain 
form window;On the left;Vertically centered)

DIALOG([ARInvoice_Payments];"Invoice_Payment_List")

It works fine, but if a user presses "Enter" the window closes. I 
actually want "Return" and "Enter" to activate a search button. But 
that doesn't happen either.


If I make the search button the search button, the default button, 
that traps the "Return" key from closing the window.


An invisible button to trap the "Enter" key doesn't work.
Assigning a shortcut of "Enter" to my search button doesn't work

Am I missing something simple?



Sannyasin Siddhanathaswami



Sannyasin Siddhanathaswami
**
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:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Preventing Return and Enter from Closing a Dialog

2018-05-20 Thread Sannyasin Siddhanathaswami via 4D_Tech

Aloha,

I'm playing with the "proper" way to open up a form. Here's what I have:
Open form window([ARInvoice_Payments];"Invoice_Payment_List";Plain 
form window;On the left;Vertically centered)

DIALOG([ARInvoice_Payments];"Invoice_Payment_List")

It works fine, but if a user presses "Enter" the window closes. I 
actually want "Return" and "Enter" to activate a search button. But that 
doesn't happen either.


If I make the search button the search button, the default button, that 
traps the "Return" key from closing the window.


An invisible button to trap the "Enter" key doesn't work.
Assigning a shortcut of "Enter" to my search button doesn't work

Am I missing something simple?



Sannyasin Siddhanathaswami
**
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:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: OAuth Code Library

2017-12-06 Thread Sannyasin Siddhanathaswami via 4D_Tech
Thanks Miyako!

I’ll look at these carefully.

Sannyasin Siddhanathaswami

On Dec 6, 2017, 2:27 PM -1000, Keisuke Miyako via 4D_Tech 
<4d_tech@lists.4d.com>, wrote:
OAuth 1.0a and 2.0 work very differently (2.0 is way way easier)

2.0 Examples

https://github.com/miyako/4d-component-google-api
https://github.com/4D-JP/4d-tips-google-mail
https://github.com/miyako/4d-tips-facebook-integration
https://github.com/miyako/4d-tips-quickbook-integration

1.0 and 2.0 Example

https://github.com/miyako/4d-component-oauth

2017/12/07 7:10、Sannyasin Siddhanathaswami via 4D_Tech 
<4d_tech@lists.4d.com<mailto:4d_tech@lists.4d.com>> のメール:
Does anyone have an OAuth code library they would be willing to share? I’ve 
gone through the process of manually getting tokens via curl, but it’s going to 
be a pain reinventing the wheel to get that working and debugged in 4D.
Thanks in advance!


**
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
**
**
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
**

Undroppable Fantom Users in 4D v16.2 Server Mac

2017-10-03 Thread Sannyasin Siddhanathaswami via 4D_Tech
Aloha,

I’m getting users logged in twice to 4D Server 16.2 Mac. One of the duplicate 
is stuck for days. A manual “Drop User” doesn’t do anything. The only choice is 
to quit and restart 4D Server.

This is becoming a pain as we run out of licenses with stuck users!

Anyone run into this?

Clients are all on a mac, all but me are running the 32-bit client. I’ve been 
using the 64-bit client exclusively and also have a duplicate of me that’s 
un-droppable.

Clicking on “Watch Process” on one of these takes me to a 1 process:
Application process - 4D Client Process
State: Postponed

Tech support is my next option.

Sannyasin Siddhanathaswami
**
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: Love 4D's math interpretation...

2017-09-28 Thread Sannyasin Siddhanathaswami via 4D_Tech
For sure! I’ve been burned by 4Ds left to right operators. I assumed 4D 
followed order of operations…Oops. That was a weird bug to track down. Now I’m 
obsessive with parentheses!

Sannyasin Siddhanathaswami

On Sep 28, 2017, 10:14 AM -1000, Tom Dillon wrote:

A variation of this sig line would be, "Smart is knowing what the order of 
operations should be; wise is using parentheses to be sure."
**
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: Listbox Spacing Between Columns

2017-09-24 Thread Sannyasin Siddhanathaswami via 4D_Tech
Thanks. This does work reasonably well for this circumstance. As I’m using 
field based listboxes, I used the following to make the spacer column:

LISTBOX INSERT COLUMN FORMULA(*;"CCTransactionsLB";3;"SpacerCol";" ";Is 
text;"";$HeaderVar)
LISTBOX SET COLUMN WIDTH(*;"SpacerCol";10)
OBJECT SET ENTERABLE(*;"SpacerCol";False)  //make column unenterable



Sannyasin Siddhanathaswami

On Sep 23, 2017, 5:19 PM -1000, wrote:

This may not work for your situation, but I have used a dummy column to provide 
visual spacing between columns. Not a great solution but it has worked well 
enough for me in the past.
**
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: Listbox Spacing Between Columns

2017-09-24 Thread Sannyasin Siddhanathaswami via 4D_Tech
Very cool idea! Does this formula evaluation only work with arrays? Or text 
fields too?

Sannyasin Siddhanathaswami

On Sep 24, 2017, 3:20 AM -1000, wrote:

Next approach is to read the real arrays into text arrays. In this case
since they are just display it doesn't really matter. In lots of cases it's
a benefit using text arrays for user input as it lets you accept formulas
for input and then evaluate them. (eg. "1+34+2.2") Useful for forms where
users are updating real world data. For me that's things like inventory
worksheets.
**
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: Listbox Spacing Between Columns

2017-09-23 Thread Sannyasin Siddhanathaswami via 4D_Tech
Me too! (well not a couple of decades—at least 1 decade)

I’m looking again seriously at Listboxes as a replacement for ALP. It’s close, 
but there’s a couple things that don’t quite work well in Listboxes for heavy 
data editing. I do both the programming and the data editing for this, so 
little glitches and funky UI things make a difference!


Sannyasin Siddhanathaswami

On Sep 23, 2017, 5:04 PM -1000, wrote:

Sorry, that’s about it for me. I’ve been using AreaList Pro for a couple of
decades…
**
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: Listbox Spacing Between Columns

2017-09-23 Thread Sannyasin Siddhanathaswami via 4D_Tech
Excellent idea, unfortunately trailing spaces are ignored. Too bad, as that 
would have been perfect for this circumstance. Any other ideas?

Sannyasin Siddhanathaswami

On Sep 23, 2017, 12:03 PM -1000, wrote:

Have you tried a format that has a trailing space?
**
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
**

Listbox Spacing Between Columns

2017-09-23 Thread Sannyasin Siddhanathaswami via 4D_Tech
Aloha!

I have a listbox column for dollar amounts (aligned right) followed by a 
Description column with text aligned left. Unfortunately, that means the text 
of those two columns are butting up against each other. Is there a way to add a 
bit more space between columns?

See screen shot:
https://www.dropbox.com/s/w0kjr3bfdm8t6t1/Credit_Card_Transactions.jpg?dl=0

macOS does this in the Finder under the same circumstances:
https://www.dropbox.com/s/skpd8qi1ro9lylw/Dropbox.jpg?dl=0

Sannyasin Siddhanathaswami
**
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
**

Listbox Column Font Color Change

2017-09-23 Thread Sannyasin Siddhanathaswami via 4D_Tech
Aloha!

How do I change the font color of a listbox column and not change the 
background color? I’d like the fonts in certain columns to be “Dark grey”, and 
have rows alternate colors.

This changes the font color to Dark grey (but forces the background of the 
column to white:
OBJECT SET COLOR([CC_Transactions]Date_;-Dark grey)

This sets alternate row colors like macOS Finder (but makes all the font colors 
black):
OBJECT SET RGB COLORS(*;"CCTransactionsLB";Foreground color;Background 
color;0x00F5F5F5)

Each one overrides the other.

What am I missing?


Sannyasin Siddhanathaswami
**
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: [OFF] PCI/DSS compliance

2017-09-08 Thread Sannyasin Siddhanathaswami via 4D_Tech
Guess they weren’t PCI compliant…

PCI compliance is a huge pain. I highly recommend taking the route of not doing 
charges in house. It avoids most of the issues.

Sannyasin Siddhanathaswami

On Sep 8, 2017, 9:17 AM -1000, wrote:

I find the idea that it is necessary to implement PCI ironic, when
Equifax just lost the SS numbers, and other personal data of over
140,000,000 people.
**
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: Losing Hightlighted Records in a Listbox

2017-09-04 Thread Sannyasin Siddhanathaswami via 4D_Tech
Copy Set worked!

Just add one line of the following at the very end:
COPY SET($highlightSet;$highlightSet)` re-highlights records

and it works perfectly. That’s a bit obscure, but super easy. Thank you so much!

Sannyasin Siddhanathaswami

On Sep 3, 2017, 9:20 PM -1000, wrote:

you just have to

COPY SET ("$userset";"$userset")

on whatever the name of your highlight set.

> 2017/09/04 12:01、Sannyasin Siddhanathaswami via 4D_Tech 
> <4d_tech@lists.4d.com<mailto:4d_tech@lists.4d.com>> のメール:
> I can understand if changing the selection causes the highlight to be lost, 
> but then, how do I set the highlight again?
**
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
**

Losing Hightlighted Records in a Listbox

2017-09-03 Thread Sannyasin Siddhanathaswami via 4D_Tech
Aloha,

I don’t quite understand why my highlighted records are lost. 4D Server v15.4 
Mac.

I’m doing the following in a button on the form that has a listbox.

$ListBoxName:="CCTransactionsLB"
COPY NAMED SELECTION([CC_Transactions];"TempCurrentSet")
LISTBOX GET TABLE SOURCE(*;$ListBoxName;$tableNum;$namedSelection;$highlightSet)
USE SET($highlightSet)

//Do stuff with the records

USE NAMED SELECTION("TempCurrentSet”) //get the selection back
CLEAR NAMED SELECTION("TempCurrentSet”)

Once the button method is finished, the listbox highlight disappears. No other 
code is executed after the button finishes.

I can understand if changing the selection causes the highlight to be lost, but 
then, how do I set the highlight again?

HIGHLIGHT RECORDS doesn’t work for listboxes.

Thanks!





Sannyasin Siddhanathaswami
**
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: Datatables Tips

2017-06-23 Thread Sannyasin Siddhanathaswami via 4D_Tech
If this helps someone, here’s my code for creating the array of objects, 
summarized. This gives the same output for Datatables, but is from arrays (the 
last section builds the array of objects):

ARRAY LONGINT($aItemNum;0)
DISTINCT VALUES([Sale_Items]Item_Num;$aItemNum)  //get items nums
$CategoryTotal:=Sum([Sale_Items]Ext_Price)

ARRAY TEXT($aItemName;Size of array($aItemNum))
ARRAY REAL($aTotalSales;Size of array($aItemNum))
ARRAY LONGINT($aQtySold;Size of array($aItemNum))
ARRAY TEXT($aCategory;Size of array($aItemNum))
ARRAY TEXT($aSubCategory;Size of array($aItemNum))

  //create line items within this category
For ($x;1;Size of array($aItemNum))
USE SET("Sales”) //set with the selection of sales that needs to be summarized
$SaleCount:=0
$SaleSubtotalAmount:=0
QUERY SELECTION([Sale_Items];[Sale_Items]Item_Num=$aItemNum{$x})

$aItemName{$x}:=[Sale_Items]Item_Name
$aTotalSales{$x}:=Sum([Sale_Items]Ext_Price)
$aQtySold{$x}:=Sum([Sale_Items]Item_Quantity)
$aCategory{$x}:=[Sale_Items]Category
$aSubCategory{$x}:=[Sale_Items]SubCategory

End for


ARRAY OBJECT($oaSalesSummary;0)
C_OBJECT($oRef;$oRefCopy)
For ($x;1;Size of array($aItemNum))
OB SET($oRef;"Item Num";$aItemNum{$x};"Item Name";$aItemName{$x};"Total 
Sales";$aTotalSales{$x};”Qty 
Sold";$aQtySold{$x};"Category";$aCategory{$x};"SubCategory";$aSubCategory{$x})
$oRefCopy:=OB Copy($oRef)  //objects have to be copied, otherwise the object in 
OB SET just a reference
APPEND TO ARRAY($oaSalesSummary;$oRefCopy)


End for

Sannyasin Siddhanathaswami


**
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: Datatables Tips

2017-06-22 Thread Sannyasin Siddhanathaswami via 4D_Tech
For a javascript novice like me, all those weird comma, parenthesis and curly 
brackets gets confusing immediately!

Yes. I have a tough time finding a decent editor too. Having done most of my 
programing in 4D, I realized I’m spoiled with auto formatting and coloring. Yes 
I know js is flexible with it’s formatting rules, but why can’t hitting the 
“enter” key format, colorize and syntax check my Javascript! Forcing a 
reasonable formatting on me, would help me a bunch as a beginner.

I mainly use BBedit as I use it extensively for other text processing. I’ve 
also played with Atom with some success.


Sannyasin Siddhanathaswami

On Jun 22, 2017, 4:28 PM -1000, wrote:

* What's up with how hard it is to find a decent editor or linter? I use or
have used Microsoft's Visual Studio Code, BBEdit (like TextWrangler, but
you give them money), WebStorm (the horror...but it can be configured to
make for an excellent linter/syntax checker), and SublimeText. I've tried a
dozen more.
**
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
**

Datatables Tips

2017-06-22 Thread Sannyasin Siddhanathaswami via 4D_Tech
Aloha,

Since it’s in the air, I figured I’d share a couple tips I’ve discovered in the 
past few days. I’m not a Javascript programmer...

I think David Adams has done a post on this too.

For creating a DataTable (www.datatables.net), first create the data from 4D in 
a test method:

C_OBJECT($template)
QUERY([Sale_Items];[Sale_Items]Date_>=Add to date(Current date;0;0;-2))
   //the template format allows you to change the field names to labels
OB SET($template;"Item Num";->[Sale_Items]Item_Num;"Item 
Name";->[Sale_Items]Item_Name;"Total Sales";->[Sale_Items]Ext_Price;"Qty 
Sold";->[Sale_Items]Item_Quantity)

$JSONText:=JSON Stringify($template)
SET TEXT TO PASTEBOARD($JSONText)


Then in your text editor, create a simple DataTable

https://code.jquery.com/jquery-1.12.4.js";>
https://cdn.datatables.net/1.10.15/js/jquery.dataTables.min.js";>
https://cdn.datatables.net/1.10.15/css/jquery.dataTables.min.css; 
rel="stylesheet">



// and paste that data from above on the "var data =" line
var data = [{"Item Num":4,"Item Name”:”Cool book","Total Sales":49.9,”Qt……….
$(document).ready(function() {
var itemsTable = $('#items').DataTable( {
   data: data,
"paging":   false,
   columns: [
{ data: 'Item Num' },
{ data: 'Item Name' },
{ data: 'Qty Sold' },
  ]
}});




Then the html in the body tag:



Item Num
Item Name
Qty Sold





This will get you a basic template going with real data easily grabbed from 4D. 
Then you can preview this file in a browser, and keep adding features you need. 
Once you have your template finished, you can just replace the fixed data with 
a 4D Tag such as this:
var data = 

Re: Array Summary Sum Utility Method

2017-06-22 Thread Sannyasin Siddhanathaswami via 4D_Tech
Aloha Nigel!

Very interesting. I really haven’t used 2D arrays, I guess in part because I 
didn’t see a use. Summing a row of a 2D array is very slick. Thank you so much.

I ended up just using sets and looping through each unique ID to build the 
summary array.

Sannyasin Siddhanathaswami

On Jun 21, 2017, 2:50 AM -1000, wrote:

Surely here you could be utilizing 2D arrays?
**
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: Array Summary Sum Utility Method

2017-06-22 Thread Sannyasin Siddhanathaswami via 4D_Tech
Aloha Kirk!

This is an awesome tip that I will use! In this case, I’m currently using 
objects/json to output reports and lists to DataTables (www.datatables.net). 
I’m really impressed with DataTables. I’m getting into using objects more and 
more, and love them.

Sannyasin Siddhanathaswami

On Jun 20, 2017, 4:33 PM -1000, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com>, 
wrote:
1) make an object array of each record.

**
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
**

Array Summary Sum Utility Method

2017-06-20 Thread Sannyasin Siddhanathaswami via 4D_Tech
Aloha,

Does anyone have a utility method for summarizing (and summing) a set of arrays?

For example with Invoice Line Items:

Arrays:
aItemNumbers
aItemDescription
aQuantitySold
aExtendedSoldAmount

Of course, with invoice line items there are multiple records with item 
numbers. I want a summary array where there is only 1 element with an item 
number, and the aQuantitySold, and aExtendedSoldAmount gets summed.

I know there’s lots of ways to do this, but didn’t want to reinvent the wheel 
if possible.

Thanks!

Sannyasin Siddhanathaswami
**
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
**

Tips and Tricks Google Doc

2017-05-29 Thread Sannyasin Siddhanathaswami via 4D_Tech
Aloha,

Thanks for all the great favorite tips posted in the past few days! I’ve 
learned quite a bit of helpful time savers.

As part of that, I made a public Google Doc (editable by anyone with the link), 
summarizing all of the tips posted so I could reference and implement them. 
Feel free to add or edit any of them.

https://docs.google.com/document/d/1HpEqRUotpQtO3-3C_Tvpq1_MCte3qh-xSyGbdgJ7DQU/edit?usp=sharing

Thanks again!


Sannyasin Siddhanathaswami
**
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
**

Picture Buttons in v16

2017-05-29 Thread Sannyasin Siddhanathaswami via 4D_Tech
Aloha,

I’m trying to make progress preparing our database for v16.

Thanks for the help a few months back converting old PICT files. Turns out, 
Convert Picture was crashing like crazy in v15.2, but works fine in 15.3… 
Hopefully that helps someone else trying to do the same.

Now I’m trying to convert picture buttons. A ton of our forms use them. Picture 
buttons with a source of “Picture Library” and an ID # are in the old format 
and don’t show with v16.1 64bit Mac version. If I change the “Source” to file 
and give a path to the resource folder “.png” version, it works fine.

Is there a simple way to convert all my buttons to a format that works? I can’t 
find anything in the conversion documentation.

Thanks,

Sannyasin Siddhanathaswami
**
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: ON ERR CALL: Comments & Seeking Comments

2017-05-15 Thread Sannyasin Siddhanathaswami via 4D_Tech
Great tip! I’ll check it out for sure.

Sannyasin Siddhanathaswami

On May 14, 2017, 7:07 PM -1000, wrote:

Seriously though, if you want a chance to develop more consistent and
coherent code, you can't doo better than to read (or re-read) "Code
Complete." (There's a second edition now, for those that don't know.) Best.
Coding. Book. Ever.
**
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: ON ERR CALL: Comments & Seeking Comments

2017-05-14 Thread Sannyasin Siddhanathaswami via 4D_Tech
Thanks for this! Very helpful! I’ve started to use it more and more nowadays. 
I’m really curious how errors in 4D process tags are handled (especially in 
v16). I’m having a tough time debugging these tags through the 4D Web Server in 
v15. More testing needed as I didn’t realize you could use "Error line”. Oops.  
Hopefully the error line is of the html file.

Error formula seems to be v16 only.

For generic/lazy error testing (especially for Web Server items), I’ve been 
logging the On Err Calls:

LOG EVENT(Into 4D debug message;Error method+" Error Number: "+String(Error)+"; 
Line:"+String(Error line))

This is interesting as it shows in the Console.app on a Mac (in the 
system.log). This is easily filtered by entering “4D” in the search while 
choosing “system.log”

This is helpful when using 4D Server, as Console.app can be open with a screen 
sharing session, while doing testing from a client/browser.

PS: Thank you for your detailed emails with discoveries and questions and 
opinions. I read them with great care and work to implement as much as I can!

Sannyasin Siddhanathaswami

On May 12, 2017, 4:12 PM -1000, David Adams via 4D_Tech <4d_tech@lists.4d.com>, 
wrote:
Use it. All of the time.


**
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: 4D Server Crashes When Tracing Buggy Web Connection Code

2017-04-09 Thread Sannyasin Siddhanathaswami via 4D_Tech
Aloha,

Thanks for the tip. Tons and tons of errors in the first run of Check Syntax in 
the compiler. It is nice that it highlights the line numbers/issues in an open 
method. The errors though are mostly or all, “The Variable xxx has not been 
explicitly declared in the typing methods.” As I don't need/want to compile,  
how do I use this to my advantage? Are you saying I should add declarations to 
the compiler method for all variables?

What I’d really like, is to have only typing errors within a method highlighted.

For example, in the method I’m working on, my first lines are:
C_TEXT($0)
C_TEXT($1)

This give an error saying these variables are not declare in typing methods. I 
don’t see how these “errors" highlighted in my code will help with this.

The On Err Call, is helping with crashes, but if I do a TRACE (even with the On 
Err Call active), it still crashes when I get to the bad code line. I’ll play 
with the webserver on the client to see if I can work around that. Right now 
it’s crashing on Distinct Values, which I suspect means there are not 
“distinct” values in the selection. I’m a bit shocked how sensitive the Web 
Server is!



Sannyasin Siddhanathaswami

On Apr 7, 2017, 9:20 AM -1000, Timothy Penner via 4D_Tech 
<4d_tech@lists.4d.com>, wrote:
Aloha Sannyasin,

I probably sound like a broken record talking about the compiler so much, but I 
really wanted to comment on this:

As this is an internal database for our non-profits, it’s run in interpreted 
mode, so no compiler checking done.
I do a decent amount of the programing (for the past 10-years), and use what I 
program.

The compiler is a great tool for catching coding mistakes; regardless of 
whether you plan to deploy compiled or interpreted: 
http://kb.4d.com/assetid=50223
"If after fixing your code you do not want to run your application compiled, 
simply click on the *"Clear Compiled Code"* button to remove the compiled code."

I don’t think I can use the compiler to do checking either, as tons of the code 
is carried forward
from v1 and v2, and lots of code written without compiler declarations.

This shouldn't prevent you from using the compiler; as long as you have either 
Developer Pro (singleuser) or Team Developer (client-server) the compiler 
should work for you - it doesn't matter how old the code is, the compiler 
should still function. If you don’t have Developer Pro or Team Developer then I 
think that the "Check Syntax" option should still work, even if the compile 
button is greyed out.

Aloha,

-Tim


**
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: 4D Server Crashes When Tracing Buggy Web Connection Code

2017-04-07 Thread Sannyasin Siddhanathaswami via 4D_Tech
Thanks! I’ll be using both of those tips. I haven’t used On Error Call much, 
but will look into it. At a minimum, I want: “On Error, don’t crash my server!"

Sannyasin Siddhanathaswami

On Apr 7, 2017, 9:12 AM -1000, wrote:

Sannyasin,
Two things:
I make it a habit to check for -1 anywhere I'm using Find in array... it
just bites me if I don't.

For methods that run on the server, or even better for processes that run
on the server, wrap them in an On err call method that lets you manage the
errors yourself. Like not stopping for them. Log them or abort the process.
**
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: 4D Server Crashes When Tracing Buggy Web Connection Code

2017-04-07 Thread Sannyasin Siddhanathaswami via 4D_Tech
Aloha,

Yes. The crash did happen when accessing an array with a negative index! If 
that’s the only thing that causes the crash, I can be extra careful about that 
and do checks. Thanks for pointing this out. And yes, I wrote that serious bug. 
:)

As this is an internal database for our non-profits, it’s run in interpreted 
mode, so no compiler checking done. I do a decent amount of the programing (for 
the past 10-years), and use what I program.

I don’t think I can use the compiler to do checking either, as tons of the code 
is carried forward from v1 and v2, and lots of code written without compiler 
declarations.


Sannyasin Siddhanathaswami

On Apr 6, 2017, 11:15 PM -1000, wrote:

To be honest, I don't understand these problems. Our main product relies 
heavily on the 4D webserver on the server, for years. So far there aren't any 
serious problems. If there are any, we wouldn't use 4D anymore.
And running the webserver on a client isn't an option for us.

The only problem we experienced which causes a server crash is accessing an 
array with a negative index. But such things are caused by serious bugs (during 
development).
What compiler settings do you use?

Regards
Lutz
**
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
**

4D Server Crashes When Tracing Buggy Web Connection Code

2017-04-06 Thread Sannyasin Siddhanathaswami via 4D_Tech
Aloha,

If I trace On Web Connection code on 4D Server v15.3 Mac, and I goof and 
reference an out of index array (I know I’m the first to ever do that), our 
server crashes. It just quits to the Finder, no error message nothing. I view 
the trace via screen sharing to the server machine.

This is disastrous when other people are using 4D!!

Have others run into this? What’s the best way to debug On Web Connection code 
without crashing the server?

Maybe starting the webserver on 4D client? But how does adding a “Trace" On Web 
Connection code work? Won’t it still trace on the 4D Server?

Sannyasin Siddhanathaswami
**
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: Regex Find and Replace with Groups

2017-03-30 Thread Sannyasin Siddhanathaswami via 4D_Tech
Thank you so much! That was exactly what I needed!

Sannyasin Siddhanathaswami

On Mar 29, 2017, 11:44 PM -1000, Vincent de Lachaux via 4D_Tech 
<4d_tech@lists.4d.com>, wrote:
A component is available with source code here : 
http://forums.4d.fr/Post/EN/7161740/1/7161741#7161741

v i n c e n t d e l a c h a u x

Bee green - keep it on the screen



**
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: Understanding 4D Mobile...

2017-02-17 Thread Sannyasin Siddhanathaswami via 4D_Tech
We use 4D internally. Some of our people like web interfaces better than 
straight 4D. With that in mind, we created a web interface using 4D 
Mobile/Wakanda to allow users to easily add simple info to identify credit card 
charges they make.

For this, 4D Mobile/Wakanda works fantastically. Its really a simple web 
editable version of a 4D output form. But, I guess like with anything web 
related, it get’s very complex very quickly after that with much needed 
knowledge of JS and Wankanda.

And as you mention, licensing is an issue. Be sure you have extra wakanda user 
licenses as sometimes it takes awhile for one user to timeout. I think you get 
2 wakanda/4D mobile license for the same cost as one normal 4D user license.

I don’t see 4D mobile being viable for a general web app because of the license 
cost, but I’m never going to use it for that anyway.

Sannyasin Siddhanathaswami

On Feb 16, 2017, 6:09 PM -1000, Robert ListMail via 4D_Tech 
<4d_tech@lists.4d.com>, wrote:
Not such a hot topic I see…. :)

R

On Feb 16, 2017, at 12:53 PM, Robert ListMail via 4D_Tech 
<4d_tech@lists.4d.com> wrote:

Care to describe 4DM and explain how Wakanda and/or 4DM fits into your strategy?

**
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
**