Recent

Author Topic: Sigsegv error.  (Read 36055 times)

matthijs

  • Hero Member
  • *****
  • Posts: 537
Sigsegv error.
« Reply #15 on: February 09, 2006, 08:00:20 am »
Have you tried setting the "Directory for building test projects" to something like C:\temp\?
What's in a sig? Would my posting look less if it didnot have a sig? (Free after William S.) :)

:( Why cannot I upload my own Avatar? :(

Anonymous

  • Guest
Sigsegv error.
« Reply #16 on: February 09, 2006, 10:28:51 pm »
I installed Lazarus on a different computer, and did everythiing exactly the same, but it worked on the other computer.
This other computer has Windows XP Pro with a Pentium 4 and ATI Mobility Radeon 7500. The original comp has Windows XP Home with an AMD and SiS graphics hardware at the time of test. It now has a better graphics card on it, so I'll try it on there.

Also, on this other computer I downloaded and compiled the GLScene package. (There is info on it in the graphics programming tutorial on the wiki) It had multiple warnings, but compile completed. When I installed and rebuilt Lazarus, Lazarus gave an error saying that ode.dll was not found, and Lazarus could not run. Do you guys know what the problem was?

Thanks

Anonymous

  • Guest
Sigsegv error.
« Reply #17 on: February 10, 2006, 12:39:58 am »
I tried it on my usual computer, but it still didn't work. Same error. It must either be a compatibility error with Lazarus, or something irregular about my computer.
So the queestions are:

On my other computer (where Lazarus works) I downloaded and compiled the GLScene package. (There is info on it in the graphics programming tutorial on the wiki) It had multiple warnings, but compile completed. When I installed and rebuilt Lazarus, Lazarus gave an error saying that ode.dll was not found, and Lazarus could not run. Do you guys know what the problem was?

Why won't Lazarus work on my usual computer?

Is there a way in Lazarus to create a new object, say a button, in the onClick event of an existing button, or any event for that matter? How would I code that?

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Sigsegv error.
« Reply #18 on: February 10, 2006, 02:24:45 am »
Quote
When I installed and rebuilt Lazarus, Lazarus gave an error saying that ode.dll was not found, and Lazarus could not run. Do you guys know what the problem was?


That's a game library. You can download it and put it on the same dir as lazarus. google for ode.

If you want to do 3D game developmente I can sujest that you use the 3D game pack.

It already comes with Lazarus, GLScene, and a open source 3D editor called Quark. This way you don't have to worry about installing GLScene. Everything comes pre-configured!

Take a look here:

http://www.skinhat.com/3dpack/

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Sigsegv error.
« Reply #19 on: February 10, 2006, 02:31:20 am »
Quote
Is there a way in Lazarus to create a new object, say a button, in the onClick event of an existing button, or any event for that matter? How would I code that?


You need a variable to reference the button (or other control).

You can put this variable on the "private" section of the declaration of the class of your form.

The code would be something like:

procedure myform.Button1OnClick(Sender: TObject);
begin
  Button2 := TButton.Create(Self);
  Button2.Parent := Self; // This is needed to show the button

  // position the button
  Button2.Top := 50;
  Button2.Left := 40;

  Button2.Caption := 'My newly created button!!';
end;

Now you created a new instance of the button. Since it is a descendent of TComponent and has a owner it will be automatically destroyed when the form is destroyed. You can destroy it before that using Button2.Free;

tech-pro

  • Full Member
  • ***
  • Posts: 173
    • Tech-Pro.net
Sigsegv error.
« Reply #20 on: February 10, 2006, 10:35:47 am »
When I want to do something like that, I create the button in the form designer as usual and set its Visible property to False, then I simply change the property to True when I want it to show. It's easier, and avoids the possibility of creating multiple instances of the button.
Julian

Anonymous

  • Guest
Sigsegv error.
« Reply #21 on: February 10, 2006, 07:43:16 pm »
Ok thanks. I wanted GLScene installed manually so I could get the latest Lazarus version with it, but I'll just use that game pack instead. Quark is neat. :P
Thanks. What is the point of putting the procedure in the private declarations section instead of the implementations section of the class?
I'm wanting to make a interface creation tool for a rapid game developing kit, so I couldn't just spawn multiple objects of each type and set them visible or invisible.
Is there any way to fake multithreading with some kind of suspend procedure command? I tried using the timer object, but that doesn't suspend the execution, it just executes itself.
Thanks again.

Anonymous

  • Guest
Sigsegv error.
« Reply #22 on: February 10, 2006, 07:50:01 pm »
I'm the guest poster on this topic. Just to let you guys know I registered.

crazy8john

  • Newbie
  • Posts: 5
Sigsegv error.
« Reply #23 on: February 10, 2006, 11:59:48 pm »
:p Lol that was me.

crazy8john

  • Newbie
  • Posts: 5
Sigsegv error.
« Reply #24 on: February 11, 2006, 01:09:34 am »
I want the user to be able to add buttons to an interface. I don't know how many buttons he will add, so I need a way to dynamically create buttons while the program is running. Since I can't put procedures into the variable declaration area, is there any way to do this? What is the private/public sections for-are they just different types of declaration sections, and can they support procedures? I tried putting that procedure into the private section, but it didn't work, so I suppose not. Sry for not knowing the class structure; I'm new to Delphi.
Thanks a lot

crazy8john

  • Newbie
  • Posts: 5
Sigsegv error.
« Reply #25 on: February 11, 2006, 09:58:18 pm »
So, other than the questions four posts up, I also have this question:
Can you do dynamic component loading or reloading in Lazarus Delphi?

mikiwoz

  • Full Member
  • ***
  • Posts: 130
Sigsegv error.
« Reply #26 on: February 12, 2006, 11:27:35 am »
first of all: there is no Lazarus Delphi. Lazarus is a stand-alone project, connected with Delphi only through using very similar language.

And no, there is no way of dynamic loading of components to Lazarus, at least not yet - it's a question of "when will the new linker be available" and that's about 2007.

Cheers
Mike

matthijs

  • Hero Member
  • *****
  • Posts: 537
Sigsegv error.
« Reply #27 on: February 12, 2006, 01:47:43 pm »
Because there is a space in the path?
What's in a sig? Would my posting look less if it didnot have a sig? (Free after William S.) :)

:( Why cannot I upload my own Avatar? :(

crazy8john

  • Newbie
  • Posts: 5
Sigsegv error.
« Reply #28 on: February 12, 2006, 05:57:04 pm »
It's probably just something wrong with the hardware of the computer. It's rather old. Thanks though!
Ugh...so I guess I'll have to use teh ol' multiple variable declarations for creating new objects. Definitely looking forward to the  new linker!

Is there any way to fake multithreading with some kind of suspend procedure command? I tried using the timer object, but that doesn't suspend the execution, it just executes itself.
Also, I have a listBox that I programmed to add the names of components that are created to. The purpose of it is so the user can click on a component's name in the list box, then edit the component's parameters with sliders. I was wondering how to code something that dynamically returns the name of a component that I can use to modify properties of:

if ListBox1.ItemIndex <> -1 then
  begin
    ListBox1.Items[ListBox1.ItemIndex] := trackBar1.position;
  end;

That code obviously does not work, but you get what I'm trying to do. Any ideas on how to do it?
Thanks

mikiwoz

  • Full Member
  • ***
  • Posts: 130
Sigsegv error.
« Reply #29 on: February 12, 2006, 10:39:34 pm »
crazy8john: what do you mean by "dynamic loading of components to lazarus"?

if you mean "adding a new components package to the IDE so that you can drop it on the form during design time" -> no, that's the case Laz needs the new linker.

if you mean "dynamically creating controls on a form during runtime in your program" -> of course, it's supported! how do you think Laz does, anyway? :)

consider the code:
Code: [Select]
procedure CreateMyNewButton(x, y, w, h:integer; txt:string; owner:TComponent);
var
 MyButton:TButton;
begin
  MyButton:=TButton.Create(owner);
  MyButton.Left:=x;
  MyButton.Top:=y;
  MyButton.Width:=w;
  MyButton.Height:=h;
  MyButton.Caption:=txt;
end;

although it's not pretty (what happens to the button when the procedure terminates?), it will work and create a TButton control during runtime. if this is what you call "dynamic components loading" then yes, it's supported, and usually it's called "creating components during run-time". :)

Cheers
Mike

 

TinyPortal © 2005-2018