Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2000-08

ToolBar/ToolButton

5 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Unknown author

Yes,

I found the code in main.pp..... Thanks !!

One other question:

The "Assert" bit of code that could be found here and there is that for debugging or ??
If yes, how do I use that ?

Chris

Reply by email

Shane Miller

if you look at the main.pp file there is example code commented out in there. Then further down there is a

IF Assigned(Toolbar1) then
  Begin
...
...
  end;

That adds controls to the toolbar....

I know for a fact that it is quite buggy at the moment...

Shane

>> 08/08/00 11:34AM >>>

Hi

This is the case:

In the Test All app I want to create a ToolBar with an array of TToolButton....Ok
Ether it's some bugs or I don't know how it is done, I guess it is the last :-)

Could someone explain in a short way.

Chris

_________________________________________________________________ To unsubscribe: mail with
"unsubscribe" as the Subject
archives at http://www.miraclec.com/list_archives/lazarus

Reply by email

Unknown author

Hi

This is the case:

In the Test All app I want to create a ToolBar with an array of TToolButton....Ok
Ether it's some bugs or I don't know how it is done, I guess it is the last :-)

Could someone explain in a short way.

Chris

Reply by email

Shane Miller

If you put in your code

{ASSERTIONS ON}
then everytime it reaches an ASSERT it's print the text.

What it does is it prints the second parameter if the first one is false. Notice we put false in there so they all would print. What you can do is use assert's to check for critical errors. GTK uses it to check for null values.

ASSERT(pixmap  nil,'ERROR: PIXMAP is nil');

something like that...
Shane

>> 08/08/00 11:34AM >>>

Hi

This is the case:

In the Test All app I want to create a ToolBar with an array of TToolButton....Ok
Ether it's some bugs or I don't know how it is done, I guess it is the last :-)

Could someone explain in a short way.

Chris

_________________________________________________________________ To unsubscribe: mail with
"unsubscribe" as the Subject
archives at http://www.miraclec.com/list_archives/lazarus

Reply by email

Marc Weustink
to Shane Miller
Shane Miller wrote 13 lines
If you put in your code {ASSERTIONS ON} then everytime it reaches an ASSERT it's print the text. What it does is it prints the second parameter if the first one is false. Notice we put false in there so they all would print. What you can do is use assert's to check for critical errors. GTK uses it to check for null values. ASSERT(pixmap nil,'ERROR: PIXMAP is nil'); something like that...

In addition:

If in Lazarus you start the message with "trace:" (without quotes) it won't raise an exception but print the message and continue execution. This way you can turn of and on debug messages.

Marc

Reply by email