New Objects ...

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
lambor734
User
User
Posts: 40
Joined: Sun Dec 19, 2010 7:46 pm
Location: ovanaro

New Objects ...

Post by lambor734 »

Hi ,

I love the new version of Pb, these objects exist. :D

1 - Grid Control
2 - ImageScroller With the ability Zoom & ...
3 - Timer Like Vb

Is whether, in the next version of PB these Objects exist? :o
c4s
Addict
Addict
Posts: 1981
Joined: Thu Nov 01, 2007 5:37 pm
Location: Germany

Re: New Objects ...

Post by c4s »

lambor734 wrote:Hi ,

I love the new version of Pb, these objects exist. :D

1 - Grid Control
2 - ImageScroller With the ability Zoom & ...
3 - Timer Like Vb

Is whether, in the next version of PB these Objects exist? :o
@ 3.
Do you mean timers like AddWindowTimer()?
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
lambor734
User
User
Posts: 40
Joined: Sun Dec 19, 2010 7:46 pm
Location: ovanaro

Re: New Objects ...

Post by lambor734 »

No No, timers like object in VB.I want to do this object exist. :wink:
User avatar
Kukulkan
Addict
Addict
Posts: 1396
Joined: Mon Jun 06, 2005 2:35 pm
Location: germany
Contact:

Re: New Objects ...

Post by Kukulkan »

Why don't you simply start a thread with the code you desired for the timer-control? As PB is not OOP, a object like a timer-control makes simply no sense to me...

A good, builtin grid-control would make sense. A image-viewer gadget seems not as important to me.

Kukulkan
eesau
Enthusiast
Enthusiast
Posts: 589
Joined: Fri Apr 27, 2007 12:38 pm
Location: Finland

Re: New Objects ...

Post by eesau »

How do timer objects work in VB?
User avatar
Kukulkan
Addict
Addict
Posts: 1396
Joined: Mon Jun 06, 2005 2:35 pm
Location: germany
Contact:

Re: New Objects ...

Post by Kukulkan »

Hi,
How do timer objects work in VB?
You create a timer-object (gadget) on your form. Upon this, you define an intervall in the properties of this object. Now you can insert code to the timer-event fired in this object (like you can insert code to every event of any other gadgets). The event gets fired automatically in the given interval and executes the timer-code.

Kukulkan
C64
Enthusiast
Enthusiast
Posts: 151
Joined: Sat Dec 18, 2010 4:40 am

Re: New Objects ...

Post by C64 »

That's what AddWindowTimer() does, except not asyncronously. Is the VB object asyncronous?
User avatar
Kukulkan
Addict
Addict
Posts: 1396
Joined: Mon Jun 06, 2005 2:35 pm
Location: germany
Contact:

Re: New Objects ...

Post by Kukulkan »

Is the VB object asyncronous?
Yes. I use CreateTask() for such functionality. It is, in simple cases, not really more work than placing a timer-object. Additionally, threads are much more flexible and are using hardware-ressources more effectively (multi-core CPU, hyperthreading).

Kukulkan
Post Reply