Permanently Sort Data

2016-09-02 Thread Steven
Hey, all.  Greetings from sunny Santa Fe, NM.

Every once in a while in my business we accidentally generate a lot of work, 
particularly photographic images, which include the wrong ID.  And sometimes it 
is just easier to reassign IDs than it is to redo the work.  When this happened 
in the past there was an easy fix:  Permanently Sort Data in 4D Tools.  

I guess in some respects I am lucky not to have to use the MSC very much.  But 
I went there yesterday after just such an incident was discovered only to find 
that that functionality is not available, at least not through the MSC.  Is it 
available built-in somewhere else in 4D?  Or can someone advise me as to how I 
might go about doing that programmatically?  

In this instance we decided to bite the bullet and reshoot all of the images.  
But it would be good to know how to do this if and when a real need arises in 
the future.  And Murphy’s Law dictates that it will...

Thanks in advance.

Steven Prins
Santa Fe, NM
**
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: v15 DLL Plugin Issue

2016-09-02 Thread Timothy Penner
Doug,

Check if it is enabled from 4D's Explorer like shown here:
http://kb.4d.com/assetid=76951

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

Go watch Thomas Maul's presentation. Now.

2016-09-02 Thread David Adams
I wasn't able to tune into this 4DMethod user group presentation live but
caught it later. First off, thanks to Brent Raymond for doing such a great
job with 4DMethod. I don't know if everyone is taking advantage of this
great resource. Given the various time zones we all live in, having
presentations available for playback at any time is *massively* helpful.
There are lots of good presentations up there so check it out.

Anyway, for anyone expecting to continue working with 4D down the versions,
go watch this excellent presentation now! There's an embedded link to the
presentation here at the moment:

https://4dmethod.com/

The meeting starts with the usual helpful reviews of 4D news and business,
NUG threads and pointers to KB of interest. There's a bit of a technical
glitch in the middle and if you want to skip through that, move to between
36 and 37 minutes. (36:45 when I watched,)

I haven't been in 4D fanboi mode on this list much lately, so excuse me
while I gush a bit. You know how sometimes 4D makes you scratch your head
and then other times it takes your breath away because it does something so
elegantly? This is one of those "check it out, it's so elegant" times. So
check it out!

Many old-timers will recall that I've said "SET PROCESS VARIABLE is evil"
more than once. Without belaboring my entirely reasonable and balanced
position ;-), 15 R5/16.0 (ish) bring a new and fundamentally improved
native interprocess/inter-window communication systems. Thomas' demos are
clear and persuasive. The upcoming features aren't going to allow for every
type/pattern of message queue that you might want, but they do allow for
some very helpful and common ones.

* Passing messages between windows in one process or across processes on
one machine with CALL FORM (perhaps it should be named CALL WINDOW?). This
makes complex UI code way simpler to implement and more efficient to run.

* Passing messages between processes with CALL WORKER.

* In both cases, 'messages' are a method call with whatever parameters you
need. Thomas doesn't discuss it, but an obvious strategy is to pass JSON
objects. Then again, you can pass simple parameters as well, which can be
even easier to read and write. Your choice.

* Thread-safe, pre-emptive, avoids globals and semaphores, very efficient
polling, etc. Yeah, nicely done 4D.

I've been writing message queues in 4D for a really long time...the first
one was at 4D years ago to generate plug-in serial numbers. (There was a
special plug-in to do it that was tied to a single machine...and there was
no sort of RPC system in 4D Server at the time.) I figured out SET PROCESS
VARIABLE & friends enough to see their downsides and never used them again.
(I also never used subtables in productions after the first attempt, for
that matter.) Instead, I use record-based queues (which I still like) and
IPC communication with NTK (which I also still like.) The new commands
looks extremely well thought out and deceptively easy to use. (Meaning, you
could be forgiven for not even knowing how much complexity 4D is sheltering
you from, and how well they're doing it.) If you've done any sort of
queuing work yourself, you'll quickly appreciate that the new approach is
one of those areas where 4D is hitting it out of the park. Like I said
early, excuse my gushing...but this is an awesome set of features.

Note that the demo is showing features in unreleased versions so things may
change (improve). For example, it appears that the message queues die if 4D
shuts down or crashes. This is absolutely fine for some uses and a
deal-breaker for others. Perhaps CALL WORKER will gain an option to retain
unprocessed messages?

P.S. If anyone is interested in multi-platform queuing solutions, ping me.
I'm diving into RabbitMQ these days and it's sweet. Welsh Harris turned me
onto IronMQ and it also looks pretty great. It's more similar
architecturally to AWS's SQS than RabbitMQ but any of these three are
solid-looking choices for scalable, distributed systems.
**
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: Named selection based List Box

2016-09-02 Thread cswirth
John,

We've been using "Named Selection" list boxes from the beginning to display
different selections from the same table. It works like a charm. The only
issues arise when you want to edit a particular record. It's doable but you
have to handle all the loading and unloading yourself.

Regards,
Scott Wirth



--
View this message in context: 
http://4d.1045681.n5.nabble.com/Named-selection-based-List-Box-tp5747151p5747216.html
Sent from the 4D Tech mailing list archive at Nabble.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
**

Re: activating default user

2016-09-02 Thread Randy Jaynes

> On Sep 2, 2016, at 11:52 AM, Kirk Brooks  wrote:
> 
> Randy,
> Not really. All logins are automatically attributed to the default user. I
> used it for years with my own user login system. You have to explicitly
> offer some way to log in as a different 4D user or, as I eventually did,
> tie my user records to a 4D user.
> 

Ideally I would like to do the same. We’ve been using our own user login system 
for years, like many, many others.

Now that the tools are available to re-map the record based users to the 4D 
based users, I would like to get that mapping as well because there are more 
and more requests about meticulously tracking who did what.

It’s hard to do that without using the 4D password system.

So I see this at least as the first step to getting where you are.

I just have slight concerns that I’ll be logging in as default user, creating 
forms, objects, methods, etc…then update someone’s server and suddenly they 
can’t access parts of our system because the user they logged in as somehow 
doesn’t have the right access or something.

However, at the moment, It’ll just be Default User, no groups, and everyone has 
Design Access.

Simple as possible to start with.

Thanks for the feedback!

Randy

--
Randy Jaynes
Senior Programmer and Customer Support

http://printpoint.com • (845) 359-0298 • PrintPoint, Inc • 57 Ludlow Lane • 
Palisades, NY 10964 


 

**
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: activating default user

2016-09-02 Thread Kirk Brooks
Randy,
Not really. All logins are automatically attributed to the default user. I
used it for years with my own user login system. You have to explicitly
offer some way to log in as a different 4D user or, as I eventually did,
tie my user records to a 4D user.

On Fri, Sep 2, 2016 at 7:59 AM, Randy Jaynes  wrote:

> I have a need to activate the default user in the 4D password system
> (KB-76953 Enabling Default User) so I can get the 4D Backup progress
> thermometer deactivated on client machines.
>
> Is anyone aware of development 'gotchas’ or other problems that might
> occur which would suggest this is a bad idea?
>
> I did a quick test this morning and it _seems_ like it will be ok to do
> this and leave the new “Default User” in the design group, but before doing
> this on my real structure i thought I’d check in with everyone else.
>
> Thanks,
> Randy
>
> --
> Randy Jaynes
> Senior Programmer and Customer Support
>
> http://printpoint.com • (845) 359-0298 • PrintPoint, Inc • 57 Ludlow Lane
> • Palisades, NY 10964
>
>
>
>
> **
> 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
> **




-- 
Kirk Brooks
San Francisco, CA
===
**
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
**

mysql connection issues

2016-09-02 Thread Randy Jaynes
I’ve been using myConnect from Pluggers.nl to connect to a mySQL database at 
GoDaddy.

Over the years there have been a couple customers who have reported getting 
connection problems when trying to update the records in the mySQL database.

There are probably 15-20 different locations around the US & Canada connecting 
to the same mySQL database without issue. Of those, maybe 2 of them have 
reported connection issues at various times.

One of them says he’s up to a 75% failure rate.

My guess is something in his network is somehow interfering with the traffic on 
the 3306 port that mySQL uses by default.

I have no idea what it could be or what to look at.

Anyone out there have some ideas?

Thanks,
Randy

--
Randy Jaynes
Senior Programmer and Customer Support

http://printpoint.com • (845) 359-0298 • PrintPoint, Inc • 57 Ludlow Lane • 
Palisades, NY 10964 




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

activating default user

2016-09-02 Thread Randy Jaynes
I have a need to activate the default user in the 4D password system (KB-76953 
Enabling Default User) so I can get the 4D Backup progress thermometer 
deactivated on client machines.

Is anyone aware of development 'gotchas’ or other problems that might occur 
which would suggest this is a bad idea?

I did a quick test this morning and it _seems_ like it will be ok to do this 
and leave the new “Default User” in the design group, but before doing this on 
my real structure i thought I’d check in with everyone else.

Thanks,
Randy

--
Randy Jaynes
Senior Programmer and Customer Support

http://printpoint.com • (845) 359-0298 • PrintPoint, Inc • 57 Ludlow Lane • 
Palisades, NY 10964 




**
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: v15 DLL Plugin Issue

2016-09-02 Thread Keisuke Miyako
the command name tokenising in the method editor only proves that the RSR (or 
manifest,json) file is present.
whether a plugin is loaded or not is evident in the Explorer, plugins page.

> 2016/09/02 22:25、Douglas Cryer  のメール:
> In both the plugin shows OK in the method after re-parsing it (several times).



宮古 啓介
セールス・エンジニア

株式会社フォーディー・ジャパン
〒150-0043
東京都渋谷区道玄坂1-10-2 渋谷THビル6F
Tel: 03-6427-8441
Fax: 03-6427-8449

keisuke.miy...@4d.com
www.4D.com/JP

**
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: v15 DLL Plugin Issue

2016-09-02 Thread Douglas Cryer
Miyako,

Re:
unless the plugin is dynamically loading the DLL (LoadLibrary),
it should appear as disabled immediately because dependencies are resolved 
at startup.
if that is the case, you could use "depends" to see which DLLs are missing.

http://www.dependencywalker.com

If I understand you correctly you are saying that if there was a broken 
dependency then the plugin would not load.  If so,  I can rule that out because 
the plugin is loading.

On the clients machine I have put a very simple uncompiled database with two 
methods to test what happens.  I have copied it and lauched it separately with 
v13 and v15.  The converted (new style) plugin is installed in both.  In both 
the plugin shows OK in the method after re-parsing it (several times).

On the v13 copy the method runs and calls the plugin commands OK.

On the v15 copy the 4D just crashes.

what if you place the DLL right next to the 4DX?

I had tried this, although it made no sense doing it as the original path was 
set to the DLL in the original DLLWizard project.

Struggling…


telekinetix Limited- J. Douglas Cryer
Phone : 01234 761759  Mobile : 07973 675 218
2nd Floor Broadway House, 4-6 The Broadway, Bedford MK40 2TE
Email : jdcr...@telekinetix.com  Web : http://www.telekinetix.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
**

Re: Can't Save Record Mandatory field is null

2016-09-02 Thread Sannyasin Siddhanathaswami
Regarding the debug log, I was able to start and stop it from the maintenance 
tab on the 4D Server administration window. That’s good enough as I didn’t have 
any other activity at the logging time. Of course, I don’t understand enough of 
what the log says to see any problem...

--
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: Can't Save Record Mandatory field is null

2016-09-02 Thread Sannyasin Siddhanathaswami
That’s helpful. I suspect now that it’s some related table that has bad data in 
it’s primary key field even though the error I get when saving says it’s in my 
main Members table. I doubt this helps, but this is the full error:
Error when executing the method "Test Method" at line number 18
Cannot save record 81770 in table Members of database Akasha Danta

Error code: 1046
Cannot save record 81770 in table Members of database Akasha Danta
component: 'dbmg'
task -21, name: 'P_9'

Error code: 1049
Cannot update record 81770 in table Members of database Akasha Danta
component: 'dbmg'
task -21, name: 'P_9'

Error code: 1116
Mandatory field is Null in record 81770 in table Members
component: 'dbmg'
task -21, name: 'P_9'

I wanted to activate the debug log and see if there was anything helpful there, 
but I can’t seem to get the debug log to work:
SET DATABASE PARAMETER(34;2+4)  // enables file with v14 format, with 
parameters and runtimes
QUERY([Members];[Members]EMB=81766)
[Members]UUID:=Generate UUID
SAVE RECORD([Members])
SET DATABASE PARAMETER (34;0) // disables file

But no file is created in the Logs folder next to the structure file on our 4D 
server (v15.1 on a Mac). Any idea why a log file isn’t created?





--
Sannyasin SiddhanathaswamiOn September 1, 2016 at 12:47:49 AM, Arnaud de 
Montard (arn...@init5.fr) wrote:


Hi,
note that the code you send detects mandatory fields but not primary keys… 
while PKs *are* mandatory.

--
Arnaud de Montard
**
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: Using ListBoxes as Output forms

2016-09-02 Thread Douglas Cryer
I would agree with what Nigel said:
“I would certainly recommend using Table based for the internal forms and only 
switching to array based only for the external data. The display of data in 
field based is easier to deal with.”

We have been using list boxes in this way for a long time now for output 
listings.  It has helped keep costs down as in the past we used ALP as there 
was nothing that could natively do the job.  I do not miss anything from ALP 
but I know that it probably has some advantages for some people.

Regards,  Dougie


telekinetix Limited- J. Douglas Cryer
Phone : 01234 761759  Mobile : 07973 675 218
2nd Floor Broadway House, 4-6 The Broadway, Bedford MK40 2TE
Email : jdcr...@telekinetix.com  Web : http://www.telekinetix.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
**

Re: Pop up Calendar

2016-09-02 Thread 4dialog
Its in the Object Library in the Design menu of 4d.
commands is Datepicker


I have a date field with this object method that pop up the calendar when
click in the field:

  //T_Utmeldt 

C_DATE($OldDate)
Case of 
: (Form event=On Getting Focus)
$OldDate:=Self->
If (Self->#!00.00.!)
  //set default to self-> date
Else 
  // set default to current date
End if 
Self->:=OM_DatoVelger (Self)
If (Self->#$OldDate)
CONFIRM("Skal utmeldt settes til "+String(Self->)+"?")
If (OK=1)
OM_Studium_Utmeldt 
Else 
Self->:=Old(Self->)
End if 

End if 

End case 

OM_DatoVelger

  //kalles fra datofelter
C_POINTER($1)  // peker til object
C_DATE($0)
C_LONGINT($Left;$Top;$Right;$Bottom)
OBJECT GET COORDINATES(Self->;$Left;$Top;$Right;$Bottom)
DatePicker RESET DEFAULT VALUES 
$0:=DatePicker Display Dialog ($Top;$Right)


Dont forget to set the field to:On Getting Focus.
Hope this helps.




-
Hilsen
--
Helge Antonsen
4Dialog as
Tel: +47 64 000 164
Mob: +47 90 15 56 19
Web: www.4dialog.no 
--
View this message in context: 
http://4d.1045681.n5.nabble.com/Pop-up-Calendar-tp5747202p5747205.html
Sent from the 4D Tech mailing list archive at Nabble.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
**

Re: v15 DLL Plugin Issue

2016-09-02 Thread Douglas Cryer
Randy,

Re: Is it a path issue with how Windows is seamlessly running things out of the 
C:/ProgramData folder when your application is in C:/Program Files?

No I do not thank it is anything like that.  I thought it might be a 64bit vs 
32bit issue because the server was moved from v13 to v15 64bit but when I try 
the code on standalone v15 which is 32 bit the code crashes when it makes the 
call to the plugin method which works fine with v13.

Is there such a thing as a direct replacement for DLLWizard?

Regards,  Dougie


telekinetix Limited- J. Douglas Cryer
Phone : 01234 761759  Mobile : 07973 675 218
2nd Floor Broadway House, 4-6 The Broadway, Bedford MK40 2TE
Email : jdcr...@telekinetix.com  Web : http://www.telekinetix.com



On 01/09/2016, 18:39, "4d_tech-boun...@lists.4d.com on behalf of 
4d_tech-requ...@lists.4d.com" <4d_tech-boun...@lists.4d.com on behalf of 
4d_tech-requ...@lists.4d.com> wrote:

Re: v15 DLL Plugin Issue




**
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: Coloured button background

2016-09-02 Thread Kirk Brooks
Mitch,
It's easy to roll your own menus on the fly for buttons or anything else
for that matter. I have dozens of them.

For simple lists I use the popup menu command:


$menu:="Item 1;Item2;Item3"
$result:=Pop up menu($menu)

Case of
: ($result>0)
  // do something
End case


For more involved menus, or if I want submenus, I build them:

$menu:=Create menu

APPEND MENU ITEM($menu;"Menu Item 0")
SET MENU ITEM PARAMETER($menu;-1;"0")

APPEND MENU ITEM($menu;"---")  // line

  // display the menu, get the result
$result:=Dynamic pop up menu($menu)
RELEASE MENU($menu)

Case of

:($result="0")

...

End case


​It's very fast to do this sort of thing and easy to put the code in
project methods you call from any object. ​I typically pop them up for On
click & Contextual click. And this is how I popup menus when a user clicks
a link or button on a web form.

On Thu, Sep 1, 2016 at 5:37 PM, Mitchell Shiller 
wrote:

> Custom buttons do not allow you to have a popup menu feature.  So I can
> get most of what I want but not all.
>
-- 
Kirk Brooks
San Francisco, CA
===
**
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
**