PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WEBDEV 22 → [WebDev20] ExecuteCode Issue
[WebDev20] ExecuteCode Issue
Débuté par Jose, 03 avr. 2018 20:37 - 5 réponses
Membre enregistré
157 messages
Posté le 03 avril 2018 - 20:37
Hi everyone

I have an issue with this function, I want to give a static a name "Value" of another control like on a row of a table but it doesn't work, I tried to do with another static and still doesn't work

someone know what is happening?
Thanks
Best regards my fellows developers.
Posté le 03 avril 2018 - 23:08
hi

either your code is incorrect, or not placed at the right place or the
settings of your fields are incorrect...

Your choice, as you are not giving us ANY information

Best regards

--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

Free Video Courses, free WXShowroom.com, open source WXReplication, open
source WXEDM.

More information on http://www.fabriceharari.com


Le 4/3/2018 à 12:37 PM, Jose a écrit :
Hi everyone

I have an issue with this function, I want to give a static a name
"Value" of another control like on a row of a table but it doesn't work,
I tried to do with another static and still doesn't work

someone know what is happening?
Thanks
Best regards my fellows developers.
Membre enregistré
157 messages
Posté le 04 avril 2018 - 15:53
Hi Fabrice

Well I was putting the code on a Local procedure of the window on the event of end initialization, there it doesn't work so I tought if maybe I put the code on a click button it could work and still doesn't work.

Then I tought maybe it's the control that it can't work with the executecode so I put a Static with this code and like always it doesn't work so I write this thread so here's my code:

ExécuteCode("HS_Cate"+nNum+".STC_TitleCate"+nNum+"= table_tablewindow.Col_cate")
ExécuteCode("HS_Cate"+nNum+"..Visible = True")
ExécuteCode("STC_TitleCate"+nNum+"..Visible = True")


This is the first code that I want to use an HideShow control there on the title I put a Static, so it's the Static I want to change his caption.
I put this exact same code on a procedure on the end of initialization of the page (server)
I try to put it on browse but the ExecuteCode doesn't go on that event.


Also I Try it to use only a Static with this code and it still doesn't work even if it is a Static with Static like

ExécuteCode("STC_NoName1= STC_NoName2")


and doesn't work it doesn't change it's caption with the one of STC_NoName2 also try like this

ExécuteCode("STC_NoName1..Caption= STC_NoName2")


and even still doesn't work.

Thanks.
Best Regards my fellows developers.
Membre enregistré
157 messages
Posté le 04 avril 2018 - 16:13
Hi Fabrice

Hey! I found something weird...
I use this code:

ExécuteCode("STC_NoName1= STC_NoName2")


Then I use an info

Info(STC_NoName1)


and with this show the info I want to give to that control but the same control it doesn't show it only with the info...
I don't know why... so then I use this:

ExécuteCode("STC_NoName1= STC_NoName2")
STC_NoName1 = STC_NoName1


For some reason it work it show the info I want to put in...somehow... maybe I'm doing something wrong I'm not sure at all.
it's really strange that code I don't want to use it like this but for now I will until I figure out what is happening.

thanks
Best Regards my fellows developers.
Posté le 04 avril 2018 - 16:52
Looks like the settings of your fields should be forced to 'dynamic'.

As your changes are done in dynamically compiled code, the web page
generator doesn't see any change done anywhere on the fields, and if
they are set as 'automatic' (default) will generate them as static...
That will prevent any change by your code.

Best regards

--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

Free Video Courses, free WXShowroom.com, open source WXReplication, open
source WXEDM.

More information on http://www.fabriceharari.com


Le 4/4/2018 à 8:13 AM, Jose a écrit :
Hi Fabrice

Hey! I found something weird...
I use this code:

ExecuteCode("STC_NoName1= STC_NoName2")


Then I use an info

info(STC_NoName1)


and with this show the info I want to give to that control but the same
control it doesn't show it only with the info...
I don't know why... so then I use this:

ExecuteCode("STC_NoName1= STC_NoName2")
STC_NoName1 = STC_NoName1


For some reason it work it show the info I want to put in...somehow...
maybe I'm doing something wrong I'm not sure at all.
it's really strange that code I don't want to use it like this but for
now I will until I figure out what is happening.

thanks
Best Regards my fellows developers.
Membre enregistré
157 messages
Posté le 04 avril 2018 - 17:24
Hi Fabrice

SWEET! it work! you are a pro!!!

here it's what it was saying for someone who has the same problem:






On the Description of the control on GUI theres the Type zone where for default it's automatic, it needs to be on Dynamic to work like Fabrice said.

Thanks bro you are always there when I have a problem haha!
Best regards
Message modifié, 04 avril 2018 - 17:24