Maxim Ganetsky | 1 Mar 01:56
Picon

Re: opengl

Andrea Mauri пишет:
> I tried openglcontrol_demo.lpi, too. It works fine, but anyway if I put 
> a TOpenGLControl on a form I obtain the image I sent, also in run-time.

I confirm it. Windows XP SP2 32 bit, Lazarus SVN r14335, FPC 2.2.1 
r10343 (19.02.2008).

--

-- 
Best regards,
  Maxim Ganetsky                  mailto:ganmax <at> narod.ru
_______________________________________________
Lazarus mailing list
Lazarus <at> lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
Tobias Giesen | 1 Mar 09:26
Favicon

Re: Installation using MacPorts (solved)

> > Are there any objections or can I add it to the wiki at
> > http://wiki.lazarus.freepascal.org/OS_X_Programming_Tips
> > ?
> 
> Please add it.

Done! How exciting (my first Wiki contribution)!

Right now the www.macports.org link does not seem to work because of
a problem with their web site. But the link is correct.

Cheers,
Tobias

_______________________________________________
Lazarus mailing list
Lazarus <at> lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

zeljko | 1 Mar 13:14

Hint about CreateWnd

I'm creating an customized control, and have such hint when creating form with 
such control:

[HINT] TWinControl.CreateWnd creating Handle during loading Form1:TForm1 
csDesigning=False

Is this something bad , or I can live with it ?

_______________________________________________
Lazarus mailing list
Lazarus <at> lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Mattias Gaertner | 1 Mar 13:52
Picon
Favicon

Re: Hint about CreateWnd

On Sat, 1 Mar 2008 13:14:05 +0100
zeljko <zeljko <at> holobit.net> wrote:

> I'm creating an customized control, and have such hint when creating
> form with such control:
> 
> [HINT] TWinControl.CreateWnd creating Handle during loading
> Form1:TForm1 csDesigning=False
> 
> Is this something bad , or I can live with it ?

It's bad.
It creates a lot of unneeded overhead.
As long as the control is csloading, csdestroying or not becomes visible
a Handle is not needed and should not be created.

Use 'if csLoading in ComponentState' to find out if it is still
loading. Loading is finished when 'procedure Loaded;' is called. You
can override that.

Mattias
_______________________________________________
Lazarus mailing list
Lazarus <at> lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Paul Ishenin | 1 Mar 13:53
Picon

Re: Hint about CreateWnd

zeljko wrote:
> I'm creating an customized control, and have such hint when creating form with 
> such control:
>
> [HINT] TWinControl.CreateWnd creating Handle during loading Form1:TForm1 
> csDesigning=False
>
> Is this something bad , or I can live with it ?
>   
better to use

if HandleAllocated then
  DoSomeOperationWith(Handle)

Handle will be created when your control become visible - before that 
you should not use Handle property.

Best regards,
Paul Ishenin.
_______________________________________________
Lazarus mailing list
Lazarus <at> lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Mattias Gaertner | 1 Mar 13:57
Picon
Favicon

Re: opengl

On Sat, 01 Mar 2008 00:49:23 +0100
Andrea Mauri <andrea.mauri.75 <at> gmail.com> wrote:

> I tried openglcontrol_demo.lpi, too. It works fine, but anyway if I
> put a TOpenGLControl on a form I obtain the image I sent, also in
> run-time. andrea

Fixed by Paul.
It was a windows xp theme thing.

Mattias
_______________________________________________
Lazarus mailing list
Lazarus <at> lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

zeljko | 1 Mar 14:16

Re: Hint about CreateWnd

On Saturday 01 March 2008 13:53, Paul Ishenin wrote:
> zeljko wrote:
> > I'm creating an customized control, and have such hint when creating form
> > with such control:
> >
> > [HINT] TWinControl.CreateWnd creating Handle during loading Form1:TForm1
> > csDesigning=False
> >
> > Is this something bad , or I can live with it ?
>
> better to use
>
> if HandleAllocated then
>   DoSomeOperationWith(Handle)

This is exact what I'm using, and got that bad HINT message.

>
>
> Handle will be created when your control become visible - before that
> you should not use Handle property.
>
> Best regards,
> Paul Ishenin.
> _______________________________________________
> Lazarus mailing list
> Lazarus <at> lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
_______________________________________________
Lazarus mailing list
(Continue reading)

Mattias Gaertner | 1 Mar 14:52
Picon
Favicon

Re: Hint about CreateWnd

On Sat, 1 Mar 2008 14:16:02 +0100
zeljko <zeljko <at> holobit.net> wrote:

> On Saturday 01 March 2008 13:53, Paul Ishenin wrote:
> > zeljko wrote:
> > > I'm creating an customized control, and have such hint when
> > > creating form with such control:
> > >
> > > [HINT] TWinControl.CreateWnd creating Handle during loading
> > > Form1:TForm1 csDesigning=False
> > >
> > > Is this something bad , or I can live with it ?
> >
> > better to use
> >
> > if HandleAllocated then
> >   DoSomeOperationWith(Handle)
> 
> This is exact what I'm using, and got that bad HINT message.

Replace
  DoSomeOperationWith(Handle)
with
  DoSomeOperationThatNeedsAHandle;

For example any Canvas operation needs a handle.

> > Handle will be created when your control become visible - before
> > that you should not use Handle property.

(Continue reading)

Picon
Favicon
Gravatar

Re: Hint about CreateWnd

Mattias Gaertner wrote:
> On Sat, 1 Mar 2008 13:14:05 +0100
> zeljko <zeljko <at> holobit.net> wrote:
>
>   
>> I'm creating an customized control, and have such hint when creating
>> form with such control:
>>
>> [HINT] TWinControl.CreateWnd creating Handle during loading
>> Form1:TForm1 csDesigning=False
>>
>> Is this something bad , or I can live with it ?
>>     
>
> It's bad.
> It creates a lot of unneeded overhead.
> As long as the control is csloading, csdestroying or not becomes visible
> a Handle is not needed and should not be created.
>
> Use 'if csLoading in ComponentState' to find out if it is still
> loading. Loading is finished when 'procedure Loaded;' is called. You
> can override that.
>   

Is allowed to access Handle at TForm.OnCreate event?

Luiz

_______________________________________________
Lazarus mailing list
(Continue reading)

zeljko | 1 Mar 15:44

Re: Hint about CreateWnd

On Saturday 01 March 2008 14:52, Mattias Gaertner wrote:
> Replace
>   DoSomeOperationWith(Handle)
> with
>   DoSomeOperationThatNeedsAHandle;
>
> For example any Canvas operation needs a handle.

tnx, I've found Loaded() satisfies my needs - for runtime, but Loaded() isnt' 
called during design time ? so ... what to call here ?
_______________________________________________
Lazarus mailing list
Lazarus <at> lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Gmane