PxPlus User Forum

Twitter Twitter Twitter

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Stéphane Devouard

Pages: [1] 2 3
1
Nomads / Re: Response when clicking on inactive panel
« on: September 25, 2020, 01:50:26 PM »
Process is the command you use to run a panel.

A panel will be modal (it will « disable » the panel that run it) if it has the « dialogue » attribute checked in its header.

Regards

2
Nomads / Re: Response when clicking on inactive panel
« on: September 18, 2020, 02:47:31 AM »
Hi

If the popup panel is modal, which seems to be the case, then no, none of what you do in the calling panel will react since the input focus in on the modal

The best suggestion I can come up with would be to prevent the popup from being minimized -- remove the check from the "Minimize box" attribute on the header on the modal panel

Hope this helps

3
Mike

Interesting... This brings some questions

In the case of an object method, what if the variables you passed in are also properties ? Or maybe they HAVE to be declared as properties and you can set their values in the same line that you're invoking the method ? And are they passed by value or by reference ?

For CALL, same questions as the object method -- what if the variable name is also in the ENTER ?

For PERFORM that is pretty much like the GOSUB ... WITH that is alreay available

I guess they'll have to wait until next May... ;)

4
Mike

Thanks for the answer. I know about these small tricks.

I even used this construct in my days at Explorer :
Code: [Select]
with new("data")
.'numProp = 123
.'strProp = "Hi there"
someObject'someMethod(.'_OBJ)
drop object .'_OBJ
end with
We didn't have the FOR ... clauses for object housekeeping since we were stuck with V10

My point is elsewhere :
1. being able to pass an unnamed/anonymous array [ "Mike", "Was", "Here" ] to a function/call/method without having to declare a Y$[] array and parse a string to fill it
2. being able to pass an unnamed/anonymous associative array [ "name" => "Mike", "eyes" => "blue" ] to a function/call/method without having to declare a Y$ JSON string and parse it
3. being able to pass an unnamed/anonymous plain old pxplus object (popo ?) to a function/call/method without having to declare a class skeleton & loading it

Basically 2 & 3 are very similar (in Javascript you can get/set an object property values either with objectRef.propertyName or objectRef["propertyName"] and so if either one was possible ("litteral" associative array or object definition), that would be cool.

As a suggestion, you could provide a standard / popo class yourself (for exemple, *obj/data.pvc or *plus/obj/data.pvc or whatever name you see fit)
Then allow a syntax such as :
Code: [Select]

someObject’someMethod(new("*obj/data" for program with Param1=123, Param2$="Hello World"))

// in someObject.pvc
function someMethod(options)
! // the anonymous object instantiated above is received with the Param1 and Param2$ property values set
enter options
! // now do something with options'Param1 and options'Param2$
end function

5
Wish List / Short-hand syntax for anonymous arrays or objects initialization
« on: September 11, 2020, 05:16:39 AM »
In PHP you can create and initialize an array with :
Code: [Select]
$myArray = [ "item", "another item", "a third item"];
You can also pass either an indexed or associative anonymous array to a function using :
Code: [Select]
myFunction([
  "key1" => "value 1",
  "key2" => "value 2"
]);

Almost same in C# :
Code: [Select]
string[] myArray = { "value", "another value" }; // declaring and initializing an array
myFunction(new[] {10, 20, 30}); // passing an anonymous array to a function

In Javascript you can create a simple object (and manipulate it with a syntax which is basically that of an associative array)
Code: [Select]
let options = {
  url: "server:port/path/to/resource",
  timeout: 5000,
};
myFunction({
  mailFrom: "me@myisp.com",
  mailTo: "you@yourisp.com",
  message: "Hello there"
}); // passing an anonymous object

Almost the same in C#
Code: [Select]
myFunction(new { TextProperty = "Some Value", NumProperty = 100 });
In summary :

You do not always need to declare a variable -- you can already pass literal string or number values to a subroutine or method in PxPlus.

It would be great if it was possible to do it with other data structures such as arrays, associative arrays and objects -- the latter could be wiped out when not needed anymore using the "FOR OBJECT/PROGRAM/..." housekeeping clauses

6
iNomads / Re: No Windows Printers Available
« on: September 09, 2020, 11:52:03 AM »
Jeff

The usual way of running reports with iNomads is to output them to PDF on the server and then let the system push the final document to the browser.

There is no such thing as opening client-side printers with *windev* or *winprt*, only the server-side configured printers are accessible to iNomads.

Not knowing what your code is doing with *windev* makes it difficult to give you an idea if this is an easy fix, but migrating from Windows Desktop to iNomads and Web Browser often means some changes in your code base

Hope this helps

7
I have been programming in ProvideX for Windows since 1998 after 10 years with TBred on SCO and AIX
I was instrumental in migrating my first employer's apps from CHUI to GUI, then migrating Explorer Software's WindX-only based ERP to the web using iNomads

I have re-skilled myself in mainstream web development and am also proficient in PHP 7, Javascript/jQuery, Java, C#, VB.Net, Android mobile development, MySQL, Postgres, MS SQL Server and MongoDB databases, and various frameworks (PHP Symfony 4, Microsoft .Net ASP MVC5 & Winforms, IONIC 4 for hybrid mobile apps, Express for NodeJS)

You can read more about me and my work with ProvideX and PxPlus on my resume and professional websites

I am looking for any type of work related to the topics above :
  • PxPlus training and consulting
  • Legacy applications conversion to Nomads & iNomads GUI
  • Legacy applications migration to SQL back-end databases
  • Web applications and Web services
  • Desktop applications

If you know of anyone who would be interested or are interested yourself, please contact me by private message here, or via email, or via my LinkedIn account.

Regards,

8
Language / Re: @(X),@(Y)
« on: June 22, 2020, 09:14:08 AM »
Gilles

@X() and @Y() do their calculation based on the channel passed to them as the 2nd parameter, or 0 (terminal) if no channel is passed
When running as cron, I guess the stdout and stderr are redirected either to /dev/null or to some other file (a log file maybe ?) which explains the issue
In any case, you should always base the @X() and @Y() calculation on the actual output channel

Regards

9
Programming / Re: Working with DLL
« on: May 14, 2020, 01:59:01 AM »
Make sure this is a real Win32 DLL
A .Net component class could also be compiled as file with a .dll extension but would not be suitable for use with the PxPlus DLL() function

10
Off Topic / Re: When designing your data base, did you use ERD's?
« on: February 14, 2020, 09:40:00 AM »
Hi Dave,

After being let go by Explorer Software at the end of 2018, I have followed a 5-months training last year followed by a 2,5 months internship. The goal was to gain skills in mainstream web development languages & frameworks (PHP, Symfony, Java, Android, Javascript/jQuery, IONIC/Angular/Typescript, MySQL, MongoDB) as well as modern software design (UML, Object Oriented multi-layered apps, Relational Database Design). I needed to find another job and since you can consider the french ProvideX market as slowly dying, it was time to move on.

Although my past experience with ProvideX allowed me to get in touch with SQL & RDBMS as well as the ProvideX implementation of the object paradigm, it was also the very first time in 30 years I was seeing Classes diagrams and E/R diagrams as well as the methods and techniques to build them.

In 1986-88 french software programming schools, you learned COBOL and GW-BASIC, using the built-in ISAM files for one, and building them yourself for the other. I also learned a bit of dBASE III+ during the second year. No SQL courses and no UML / OO design at the time.

When I joined my first employer in 1989, they were still using Tbred, I was the one who discovered ProvideX and advocated for the migration of the application. There were some attempts to migrate the ISAM files to SQL backends, but all were cancelled before being completed. The only documentation available when you started working on the software were the file layouts. Which could not be imported into the PVX Data Dictionary as the files were non-normalized and the DD did not support them back then (around 99-2000, before PVX V5).

When I joined Explorer in 2008, their SQL migration had been done for years. However I never saw any ERDs there, not even a Merise Physical Data Models.

In my experience, when you migrate ProvideX files to SQL, you only change for a different data store, and rarely enable all the power of the RDMBS engine -- I can be wrong, but I don't think after migration, people add foreign keys constraints to enforce referential integrity. Either your legacy BB application stores data forever without any archive/purge, or it does purge files but has referential integrity checks already programmed at the app level, when a user wants to remove some static data (a customer, a vendor) and the system needs to search all the transactional data (invoices, orders, etc...) to make sure the entity to delete does not exist anymore in your detail files.

BTW, I passed a final exam on January 8th. The official results are unknown yet (probably next week) but I got some not-official info from the main trainer who discussed with the examiners, and he told me not to worry about it ;-) I now have the equivalent of a BS degree in software design & development (I only had an associate degree from 1988). I am also in the process of creating a small one-person consulting & development services company to do free-lance work for the company where I did my internship (using ASP.Net MVC with C#). If you need any help with your db courses, feel free to pm me, I'll be happy to help an old fellow ProvideX programmer ;-)

11
Wish List / Re: passing parameters to a panel
« on: January 17, 2020, 10:25:17 AM »
Thomas,

You could convert your associative array to a JSON string before the PROCESS, and then convert back ARG_1$ from JSON to assoc. array in the panel pre-display routine

Regards

12
Programming / Re: add counter bubble to button image
« on: December 16, 2019, 05:44:09 AM »
Mike

Thomas will correct me if I'm wrong but I guess the visual rendering he is after is of this kind :
https://getbootstrap.com/docs/4.4/components/badge/

Or those red bubbles that appear on your email or facebook clients icons on your smartphone home page, to let you know the number of unread emails or notifications...

13
Wish List / Re: Tool on license use
« on: October 31, 2019, 07:18:23 PM »
Mike

If I am not mistaken, the PID of the current interpreter process is also stored in tcb(89).
Just wondering if it is just duplicate information, or if there are uses cases where tcb(506) is better than tcb(89) ?


14
Wish List / Re: Tool on license use
« on: October 31, 2019, 01:25:40 PM »
Thomas

This information is stored in a pxplus file keyed on the pid
IIRC it is *it.dbg/control.dat
It is automatically retrieved by the system when you use one of the TSK() un-documented functions — TSK(*PROCESS LIST) if I am not mistaken.
Would be easier if the PxPlus folks provided a Get_State routine indeed

Regards

15
Wish List / Re: Database Conversion Utility
« on: June 29, 2019, 01:09:50 PM »
Another issue that could be improved in the DCU

Setup (Windows 10 system):
  • myapp
    => folder that contains the data dictionary files, and a prefixdb prefix file
    => in the dictionary, each logical table name is associated with data/physical as the physical pathname
  • myapp\data
    => folder that contains the ProvideX data files

When using the DCU, the prefix file entry is created as DATA\PHYSICAL (since the key has the uppercase option set)

Therefore, if you do something like :

Code: [Select]
OPEN DICTIONARY
PREFIX FILE "prefixdb"
OPEN (nn) TABLE "logical"

ProvideX translates logical to data/physical (as set in the dictionary)
And thus does not find the entry in the PREFIX FILE and does not open the SQL table but rather the keyed file

Two possible solutions :
  • Either create the PREFIX FILE entry the same as in the dictionary
  • Or create 2 entries (DATA/PHYSICAL and DATA\PHYSICAL)

Thanks,

Pages: [1] 2 3