Welcome! Log In Create A New Profile

Advanced

[WD24] Examples and other things ...

Posted by Al 
Al
[WD24] Examples and other things ...
April 24, 2019 02:39AM
Hello All

I can see some advantages in the web download approach to the examples but the downside is that it is painfully slow to operate and most of the examples are the same old error ridden ones we are used to.

My solution to the table is to export it. The Excel and XML exports don't work because the results are unreadable, however the RTF export works ok and once you trim the columns down to just 2 - Name of example and Description - it produces a quite workable document to look through.

You have to love the way that PCSoft make changes just because they can. e.g. the highlight for displaying the elements of a switch or if/end construction has changed from a solid green background to a much harder to see thin green outline which is so much harder to see. This is despite it still showing as a solid colour in the code editor setup.

That is on a par with the decision, I think it was in V22, to hide the the code of table processes in condensed form so you have to click on each one to see the code or remember the Ctlr Alt * sequence to open them all.

Why they change the images in the IDE in every release baffles me. The only solution I can come up with it is that it is a make work exercise for the someones relative.

Can anyone explain what a "token" control is for ?
PCSoft seem quite excited about it but I haven't a clue what it is or how it can be used.

At least they have maintained support for turning off the damn ribbon smiling smiley

Regards
Al
Re: [WD24] Examples and other things ...
April 24, 2019 04:42PM
Hi Al

I'd not noticed the change to highlighting.
Have to agree - pointless and unnecessary
It is quite difficult, especially in large code blocks, to home in on the usage of a given variable.

Just spent (some may say wasted) an hour playing with Token control - pretty underwhelmed tbh.
On the plus side all of the 'by progamming' functions do work so you could display say a token containing the email address for each client selected from a table.
Why you would allow or need a user to enter random tokens totally escapes me.

There are IMHO some issues.....

The width of the token is determined by the text displayed
If 'Automatic line wrap' is selected then once the width of the control is exceeded a (small) vertical scroll bar will automatically appear.
If not then you have to tab through the tokens as no horizontal scrollbar is available.

A token only contains the information displayed and using my Client/Email scenario has no link or knowledge of its parent.
In development the token displayed does have a code editor but code entered would be common to all Tokens added therefore to send an email would require clicking on each token in succession.

The Tokens themselves have no idea of who or where they are so you cannot click on one and send a numeric value (as in a tab) to a local procedure instead you would need to send the ..StoredValue of the clicked Token.

In the procedure itself you will need to loop through all Tokens

n is int = edtToken.TokenCount()		//n will equal the count of tokens process
FOR i = 1 TO n					//Loop
	Edit2 += edtToken[n]..StoredValue	//BAD LUCK - [] brackets not supported
END


s_email is string
FOR EACH STRING ToK OF edtToken SEPARATED BY CR  //Loop
	s_email = ToK		//s_email will contain the Token displayed value
	//Do stuff with email address here
END
Processing a single clicked token would require an IF statement to compare TK with Token..storedValue sent in parameter.

There may be more but by now I was losing the will to live.
Maybe its an age thing and some 'young gun' will come along and explain the many advantages of this but for now I do not see it making an appearance on any of the apps I may write
Al
Re: [WD24] Examples and other things ...
April 24, 2019 05:48PM
Hello Derek

Thanks for looking and the explanation on the software tokens as opposed to the first thought that came to mind - The lion sleeps tonight - a-weema-weh smiling smiley

As I said in an earlier post there is nothing in this update that I need or can see myself using so it is just an exercise in staying current.

Regards
Al
Re: [WD24] Examples and other things ...
September 15, 2019 07:50PM
Hi Al/Derek,

I remember you discussing the new Token feature a while back. I notice the Help mentions the Unit Examples for Tokens, but have you ever tried to find Unit Examples that are mentioned in the Help... especially for these new whizzy features or do they not expect people to actually try to use them "...because they should know better by now!" eye rolling smiley

Regards,
Darren.
Al
Re: [WD24] Examples and other things ...
September 15, 2019 09:35PM
Hello Darren

To be honest, I couldn't see any use for them so I didn't bother going any further.

Regards
Al
Re: [WD24] Examples and other things ...
September 16, 2019 04:07AM
Hi
I use the tokens a lot and find them to work well. I do allow users to enter new tokens when using them for specification of search terms. Using tokens makes for a far easier to read list of search terms than say a standard string.

Rgds
Paul
Re: [WD24] Examples and other things ...
September 16, 2019 07:36PM
Thanks guys - do you know where I might the Unit Example for it? I've got WX24, but can't find the Unit examples that are mentioned in the Help... confused smiley

Regards,
Darren.
Al
Re: [WD24] Examples and other things ...
September 16, 2019 08:42PM
Hello Darren

I only have one example for the tokens "Using a "Text Token" edit control in Windev
If you enable the Unit examples pane, a search for "token" should find it.

Regards
Al
Re: [WD24] Examples and other things ...
September 17, 2019 07:19AM
Hi Darren,

in case you need examples etc. I recommend to install the French Wx version on your computer too. Most times you can find more examples there than with the English version. A few words of French are required, use DeepL [www.deepl.com] for translation. Very good.

Kind regards,
Guenter Predl
office@windev.at
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: