Regarding item IDs and functions

Moderator: Moderator Group

Regarding item IDs and functions

Postby claude.rivet » Fri Aug 15, 2014 4:47 pm

Hello

I stumbled upon what seems to be 2 issues while trying out 4.7 821. Those issues also affect 4.5 704.

1- I have several textboxes in use in my project, all numbered sequencially for the purpose of my issue grouped by 30 (called ME, so ME1 has boxes going from 1-30 while ME2 has boxes ID'd 31-60). This has been checked several time and according to the ID displayed in properties they are all sequencially ID'd. I then make a function that cycle trough these boxes and clear the box and append 0. It looks like this:

Code: Select all
resetME{meID}

VMultiply,resetitem,meID,30
VSubtract,resetitem,meID,30
VAdd,resetitem,resetitem,1

for 1 to 30

WDTextboxClear,resetitem
VAdd,resetitem,resetitem,1

next

VMultiply,resetitem,meID,30
VSubtract,resetitem,meID,30
VAdd,resetitem,resetitem,1

for 1 to 30

WDTextboxAppend,resetitem,0
VAdd,resetitem,resetitem,1

next



I have 2 issues, the first one comes from the fact that if I make only one loop the function just doesn't work, some boxes are cleared at the end of the function some have 0 in them, if I make two loops all boxes have 0 in them when the function ends. This is minor however. What is more problematic is that even with two loops some textboxes cannot be targeted by macros and functions for some commands, when trying to append anything in textbox 113 for example it writes in textbox 114, if I change my macro to address 112 it writes in 112, when I address 114 it writes in 114. It's like anything appending to textbox 113 just bypasses it and goes to 114, however the clear part works fine. The problem is that it is very specific as to which textbox is affected, trough saves and restarts and code modifications. Also in some cases it goes as far as clearing textboxes 1001 and 1002 even though the script cannot even reach these (there is a maximum of 8 ME so 240 textboxes).

2- Some functions need to be "applied" everytime I restart my project, if I don't open the function window and select every function one after the other and then click apply the function just doesn't exist when writting code or running scripts.

If you guys have any idea on how to solve or circumvent these I would be happy to know, thanks much!
claude.rivet
 
Posts: 67
Joined: Tue Aug 07, 2012 5:40 pm

Re: Regarding item IDs and functions

Postby AViefhues » Mon Aug 18, 2014 9:01 am

Hello,

I think the problem is, doing many GUI-actions(TextboxClear, TextboxAppend, etc.) in a short time.
Then some operations seems to be skipped.

I often use the WDWait Script to slow down the for-next-loop just for some milliseconds (depending on the actions in the loop).

regards Alex
User avatar
AViefhues
 
Posts: 37
Joined: Tue Jan 25, 2011 4:28 pm
Location: Gelsenkirchen


Return to Widget Designer V4.7

Who is online

Users browsing this forum: No registered users and 18 guests

cron