[IronPython] Silverlight code need help (Repost)

Andrew Evans andrew.canit at gmail.com
Thu Jan 14 21:17:48 CET 2010


Ok Problem solved

self.myslide.Maximum = 380

set that in the slider properties

then

self.myslide.Value = (self.video.Position.TotalSeconds /
self.video.NaturalDuration.TimeSpan.TotalSeconds) * self.myslide.Maximum

YAY :-)





On Tue, Jan 12, 2010 at 4:16 PM, Andrew Evans <andrew.canit at gmail.com>wrote:

> This hack seems to fix my problem only its backwards :-P
>
> self.video.NaturalDuration.TimeSpan.TotalSeconds -
> self.video.Position.TotalSeconds
>
> will keep playing with it
>
> On Tue, Jan 12, 2010 at 3:37 PM, Andrew Evans <andrew.canit at gmail.com>wrote:
>
>> Ok that has been done, but the values are incrementing correctly. So I am
>> not exactly sure why its doing this
>>
>> I checked all values in that function. They increment as floating point
>> numbers (time in milliseconds), which is correct.
>>
>> Any other suggestions ;)
>>
>>
>>
>> On Tue, Jan 12, 2010 at 1:52 PM, Jimmy Schementi <
>> Jimmy.Schementi at microsoft.com> wrote:
>>
>>> Thanks =)
>>>
>>> It's most likely an issue in the MyTimeToTick method. You should do some
>>> print-statement-debugging to make sure the properties you're using to
>>> compute the slider position are correct. To see the print statements, put
>>> this at the top of your file:
>>>
>>> import sys
>>> from Microsoft.Scripting.Silverlight import Repl
>>> repl = Repl.Show()
>>> sys.stdout = repl.output_buffer
>>>
>>> ... and then "print "Hello, World"" will show up in the "IronPython
>>> Console" tab.
>>>
>>> ~Jimmy
>>> _______________________________________________
>>> Users mailing list
>>> Users at lists.ironpython.com
>>> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20100114/ff4df5f7/attachment.html>


More information about the Ironpython-users mailing list