PrimalForm: Feature Request: Timer

This forum can be browsed by the general public. Posting is no longer allowed as the product has been discontinued.
This topic is 15 years and 1 week old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
mdomansky
Posts: 3
Last visit: Fri Dec 12, 2008 12:54 am

PrimalForm: Feature Request: Timer

Post by mdomansky »

LOVE PrimalFormThank you VERY MUCH!Can I request a new form options?1. Timer2. DataGridViewI was able to get both of these on by manually editing the pff file and they both worked and PrimalForm automatically detected the properties (WONDERFUL!). The only thing PrimalForm wouldn't handle is adding Columns in the DataGridView, but that's alright.
User avatar
jhicks
Posts: 1789
Last visit: Mon Oct 19, 2015 9:21 am

PrimalForm: Feature Request: Timer

Post by jhicks »

The problem is that PowerShell v1 is single threaded and won't support a feature like a timer.
User avatar
mdomansky
Posts: 3
Last visit: Fri Dec 12, 2008 12:54 am

PrimalForm: Feature Request: Timer

Post by mdomansky »

Powershell is Single Threaded, but I think in this case, we're really using .NET, and it is not single threaded.Here's a demo that shows 2 timers (one at 2 seconds, the other at 4 seconds) and a button. All are functional.uploads/29183/demo.zip
User avatar
jhicks
Posts: 1789
Last visit: Mon Oct 19, 2015 9:21 am

PrimalForm: Feature Request: Timer

Post by jhicks »

Even though you are using .NET, the PowerShell engine is single threaded so your ps1 file will not support timers. PowerShell v2.0 will offer an option to run multithreaded. The limitation is the Powershell engine here, not .NET and not PrimalForms.
User avatar
jhicks
Posts: 1789
Last visit: Mon Oct 19, 2015 9:21 am

PrimalForm: Feature Request: Timer

Post by jhicks »

Technically I see that your script works and uses the timer controls, and if that is what you want to do we'll add the control to the feature enhancement request list. But I guess I had a different impression about how to use a timer in terms of asynchronous and background threads, which you cannot do in PowerShell v1.0.
User avatar
simon.savva
Posts: 3
Last visit: Sat Mar 14, 2009 9:25 pm

PrimalForm: Feature Request: Timer

Post by simon.savva »

The Async method you speak of - I've just spent maybe 30hrs all up over the last couple of months trying to update a progressbar using powershell and primalforms using "background tasks" "runspaces" "registered events" with script blocks attached and all sorts of things - I'm even using CTP3 of V2, trying MTA and STA to no avail...


All I can say is, once I found this nugget of gold, it took two lines of code to achieve target. lmao, truly!


Must admit... I'm not 100% sure why it works, though I'm certainly glad it does - I think it's because the form is in now complete control (?) whereas before the form was constantly waiting for my background task to finish and hand control back to update to it at which point the progressbar would refresh...


(the progress bar tool I'm building is simply a time based bar, literally just a bar that goes left to right - it is to assist with Market Analysis so it cannot be even a second off over time)
User avatar
simon.savva
Posts: 3
Last visit: Sat Mar 14, 2009 9:25 pm

PrimalForm: Feature Request: Timer

Post by simon.savva »

May I throw in that I did get this to work using "Eventing" with WinRM introduced in Posh v2...however, as it stands, using winrm has many caveats in terms of OS version compatability, feature set and a fairly complex configuration overhead

Using the above technique I don't need to worry about any of that ;-)
This topic is 15 years and 1 week old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.