Tim Van Dusen

378 Reputation

7 Badges

17 years, 310 days

MaplePrimes Activity


These are replies submitted by Tim Van Dusen

Unless I'm misinterpretting something, Doug has mentioned further down that the TextArea0 does indeed update prior to the function returning, with Maple 12 in WinXP and you are saying it doesn't.

My interpretation of all this is:

1.) The original poster of this thread, wanted to have a procedure with a loop that he could call once, and let it run for up to ten hours or so. Within that loop would be some processing, as well as a visible update somewhere (preferably the screen) to indicate the processing was occurring.

2.) The sample I showed, could do that, but only by writing to a TextArea.

3.) My example would run forever, all the while being able to update a textarea at particular intervals. However, it worked for me in Maple 11 within WinXP, but not for you in WinXP with version 12. But a similar loop scenario worked for Doug with Maple 12 in WinXP. I'm confused about all this.

Please try my worksheet:  2timv.com/math/maple/loopTest/loopTest.zip  using Maple 12 in WinXP and let me know if BEFORE the function call returns, the TextArea updates with a's every second or so. This might help clear up some of the confusion in my mind.

 updated - I just made the file above a .zip file because it was being changed from a .mw to a .xml by this forum's formatting.

 

 

The worksheet worked fine for me. However, having f2(1) in the example instead of something like f2(5) seemed to somewhat obscure the fact that the TextArea0 was updating after each loop rather than waiting until the function returned. I think this is the behavior the original poster was looking for. I wonder why it doesn't work correctly in Maple 12 within WinVista as indicated by Robert Israel.

The worksheet worked fine for me. However, having f2(1) in the example instead of something like f2(5) seemed to somewhat obscure the fact that the TextArea0 was updating after each loop rather than waiting until the function returned. I think this is the behavior the original poster was looking for. I wonder why it doesn't work correctly in Maple 12 within WinVista as indicated by Robert Israel.

That was a nice example Doug - thanks. I was aware of the components in worksheet mode. What I was implying by the document mode, was to not use the classic worksheet, which is what I think of when I think "worksheet", and which I use a lot when I'm not in document mode of the standard maple GUI.

I got the same results as you did, with each update being done at the end of a loop, but before the function returning. What OS are you running?

That was a nice example Doug - thanks. I was aware of the components in worksheet mode. What I was implying by the document mode, was to not use the classic worksheet, which is what I think of when I think "worksheet", and which I use a lot when I'm not in document mode of the standard maple GUI.

I got the same results as you did, with each update being done at the end of a loop, but before the function returning. What OS are you running?

That would happen if you didn't create the TextArea prior to executing that code.

That would happen if you didn't create the TextArea prior to executing that code.

I'm using maple 11 on WinXP. The a's appeared in the box at 1 second interval for 10 seconds. I wonder why it would be different in your version or in another OS.

I'm using maple 11 on WinXP. The a's appeared in the box at 1 second interval for 10 seconds. I wonder why it would be different in your version or in another OS.

This kinda bothered me, so I tried a few things. Below is something that works - even though it's a little weird. You will need to be in document mode where you create a TextArea from the available components. The default name for the first TextArea is TextArea0. Then:

f := proc () local s;
use DocumentTools in
s := time();
while time() < s+10 do
    t2 := time():
    while time() < t2+1 do end do;
    SetProperty('TextArea0', 'value', cat(GetProperty('TextArea0', 'value'), "a "))
end do:
end use
end proc; f();

I gave it a try just to make sure it works.

 

This kinda bothered me, so I tried a few things. Below is something that works - even though it's a little weird. You will need to be in document mode where you create a TextArea from the available components. The default name for the first TextArea is TextArea0. Then:

f := proc () local s;
use DocumentTools in
s := time();
while time() < s+10 do
    t2 := time():
    while time() < t2+1 do end do;
    SetProperty('TextArea0', 'value', cat(GetProperty('TextArea0', 'value'), "a "))
end do:
end use
end proc; f();

I gave it a try just to make sure it works.

 

Oh, okay - I'll put my nomination for you from up in the upper three, to one spot below my nomination for myself, with all other's who post here above myself. That may help prevent your nomination.

But, your input is still very much appreciated!
 

This is really tough! There are quite a few here that provide such useful help. Like Axel Vogt, if I had to narrow it down to three, I too would recommend Jacques C, Robert Israel, and acer . Adding a fourth, would definitely include Doug Meade. They are each very exceptional, while each has their own way of going about helping. Acer, seems to me to be someone I can understand easily, at my level of understanding. Jacques, usually brings a special insight into most any topic. Doug Meade goes out of his way to make sure a question is answered, and that the person understands the answer.

But... as I think I mentioned before, Robert Israel would quailify as my mentor, and thus my number one pick.
 

I've updated my site for the slide rule I'm making for kids.

I've added an improved "virtual slide rule", as well as the same, except with some added
user-interraction capability. The links:

thekidsrule.com/VirtKidRule/

thekidsrule.com/VirtKidRule/Automated/

I realize that this is of interest to only a few members here, but I have received comments expressing interest in this from members of this group, so I figured I might as well continue this blog.

If you browse the pages there, you'll find one example showing how the slide rule can be moved to a particular position, and then without making any changes, all relationship between values of "candy bars" to "cost" can be determined. For example, and remember this is for kids:

If 5 candy bars cost $3, how much for 4 candy bars?
how many candy bars cost $1.20
how many candy bars cost $5.40
how many candy bars cost $3.60
for $1.50, how many can you buy?

That worked. I also discovered that I could save a font style sheet - pretty cool, and something I didn't know.

Is there a way to make the changes permanent so they'll load next time without me having to load the style sheet?

- Thanks

1 2 3 4 5 6 7 Last Page 2 of 15